I'm attempting to configure both VLAN and LAN functionality on the same port simultaneously on my MikroTik RB5009. Here's what I've done so far:
- I created VLAN50 on the bridge for ether3 as untagged and VLAN100 as tagged.
- I added both vlan100 and vlan50 under 'Interfaces > VLAN'.
- I set up IP addresses and a DHCP server for these VLANs.
The issue arises when I connect my computer to ether3. I receive an IP from the VLAN100 tagged interface, but no IP from the untagged LAN line. If I change the PVID of ether3 under 'Bridge > Ports', I can then get an IP via the LAN, but I lose connectivity over VLAN100.
I've tried several approaches, such as creating separate bridges for each VLAN and interlinking them, but nothing seems to work. Either the LAN network connects or the VLAN does, but never both simultaneously.
Previously, I used a TP-Link ER605 router, where configuring tagged/untagged LAN ports to work at the same time was just a few clicks away.
Additionally, I noticed that even without configuring other Ethernet ports, like ether7, when connected to it, the ARP table on the MikroTik shows the IP of VLAN50's network.
My main goal is to establish separate, isolated networks that can interact through nested VLANs. This setup aims to support basic Wi-Fi access points on OpenWRT routers, where VLAN and LAN from ether3 are mapped to the WAN of OpenWRT. This allows OpenWRT to extend ether3`s LAN network to its LAN ports, provide its own Wi-Fi access point, and link any VLAN's from MikroTik's ether3 to its related Wi-Fi access point.
Can anyone help troubleshoot this setup or suggest configurations that might resolve these issues?
Thank you!
Here is my basic test setup :
Code: Select all
# software id = YNHJ-D8KX
#
# model = RB5009UG+S+
# serial number = X
/interface bridge
add admin-mac=78:9A:18:C5:71:EF auto-mac=no comment=defconf name=bridge vlan-filtering=yes
/interface vlan
add interface=bridge name=HXNET vlan-id=100
add interface=bridge name=Management vlan-id=10
add interface=bridge name=SXNET vlan-id=50
add interface=sfp-sfpplus1 name=vlan111 vlan-id=111
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool5 ranges=192.168.50.2-192.168.50.254
add name=dhcp_pool6 ranges=192.168.100.2-192.168.100.254
/ip dhcp-server
add address-pool=dhcp_pool5 interface=SXNET name=dhcp1
add address-pool=dhcp_pool6 interface=HXNET name=dhcp2
/interface bridge port
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=sfp-sfpplus1
add bridge=bridge interface=ether3
add bridge=bridge interface=ether1 pvid=10
add bridge=bridge interface=ether2
add bridge=bridge interface=ether7
/interface bridge settings
set use-ip-firewall=yes use-ip-firewall-for-pppoe=yes
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge untagged=sfp-sfpplus1 vlan-ids=111
add bridge=bridge tagged=ether7,bridge untagged=ether1 vlan-ids=10
add bridge=bridge tagged=bridge untagged=ether3 vlan-ids=50
add bridge=bridge tagged=ether3,bridge vlan-ids=100
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=vlan111 list=WAN
add interface=Management list=LAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=10.66.10.1/24 interface=ether8 network=10.66.10.0
add address=192.168.50.1/24 interface=SXNET network=192.168.50.0
add address=192.168.100.1/24 interface=HXNET network=192.168.100.0
add address=192.168.99.1/24 interface=Management network=192.168.99.0
add address=192.168.50.1/24 interface=ether3 network=192.168.50.0
/ip dhcp-client
add interface=vlan111
/ip dhcp-server network
add address=192.168.50.0/24 gateway=192.168.50.1
add address=192.168.100.0/24 gateway=192.168.100.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid disabled=yes
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new disabled=yes in-interface-list=WAN
add action=accept chain=input disabled=yes in-interface=ether8
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/ipv6 dhcp-server
add address-pool="" interface=*1D name=server1
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" dst-port=33434-33534 protocol=udp
add action=accept chain=input comment="defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=input comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=forward comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN
/system note
set show-at-login=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN