Hello,
I try to implement VLANs into my network. But I doesn’t get the traffic routed between some VLANs and to the internet. I hope somebody of you has any suggestions for me.
My first setup only deals with VLANs, access to the internet for the VLANs and the management of the hEX has to be separated from VLAN traffic. There will be no access for the VLANs to the management address of the hEX. After this I will implement CAPsMAN with 2 hAP und 1 wAP, but this is the second step.
This is what I want to do first:
I have different VLANs which are connected to the hEX via trunk port. The switch has a trunk port defined and tags all traffic with the correct VLAN-ID. The trunk Port is Ether2
The port Ether1 ist for access to the internet. The stuff of my provider is connected at this port.
The ports Ether3 and Ether5 are for CAPsMAN at the second step. At the moment I choose port Ether4 as my configuration port outside any bridges and VLANs.
Now in some words what I have done and after this I show you the configuration.
I created a bridge called “MainBridge”. This should be for the VLANs and to connect them and the internet. All LAN ports (not Ether4 and Ether1) are configured as ports of the “MainBridge”. THE PVID is the same as the PVID of the bridge.
I created a VLAN-Interface for every VLAN/PVID and located this interface on the bridge. Every VLAN-Interface got a IP adress - for example VLAN 150 and address 192.168.150.1/24.
For every VLAN I created a DHCP-Server which generates dynamic adresses for the connected devices.
The last step was to tell the bridge which VLAN is connected at which port and if it is tagged or antagged on this port (Bridge - VLAN).
Now I activated the checkbox “VLAN filtering”. This was my first approach.
If I connect a PC to one of the VLANs it gets a correct adress from the DHCP-Server. This works fine.
Now I treid to connect to the internet or other devices in different VLANs and this doesn’t work. I’m also not able to ping the gateway of VLAN150 from PC in VLAN150. I always get a “request timeout”.
I tried to configure different filter rules at the bridge, activated IP firewall and configured some FW rules without success. I think I’m missing some knowledge about what to do next to get the traffic fully routed.
This is my configuration:
# jun/23/2018 13:20:31 by RouterOS 6.42.4
# software id = G7JR-VZNY
#
# model = 960PGS
# serial number = 89F908AE5EB1
/interface bridge
add admin-mac=CC:2D:E0:68:3D:3E auto-mac=no comment=defconf name=MainBridge \
pvid=5 vlan-filtering=yes
add fast-forward=no name=SubBridge
/interface vlan
add interface=MainBridge name=VLAN5 vlan-id=5
add interface=MainBridge name=VLAN40 vlan-id=40
add interface=MainBridge name=VLAN110 vlan-id=110
add interface=MainBridge name=VLAN120 vlan-id=120
add interface=MainBridge name=VLAN130 vlan-id=130
add interface=MainBridge name=VLAN140 vlan-id=140
add interface=MainBridge name=VLAN150 vlan-id=150
add interface=MainBridge name=VLAN160 vlan-id=160
add interface=MainBridge name=VLAN170 vlan-id=170
/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=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=192.168.110.150-192.168.110.200
add name=dhcp_pool2 ranges=192.168.120.150-192.168.120.200
add name=dhcp_pool3 ranges=192.168.130.150-192.168.130.200
add name=dhcp_pool4 ranges=192.168.140.150-192.168.140.200
add name=dhcp_pool5 ranges=192.168.150.150-192.168.150.200
add name=dhcp_pool6 ranges=192.168.160.150-192.168.160.200
add name=dhcp_pool7 ranges=192.168.170.150-192.168.170.200
add name=dhcp_pool8 ranges=192.168.40.150-192.168.40.200
/ip dhcp-server
add address-pool=default-dhcp interface=MainBridge name=defconf
add address-pool=dhcp_pool1 disabled=no interface=VLAN110 name=dhcp1
add address-pool=dhcp_pool2 disabled=no interface=VLAN120 name=dhcp2
add address-pool=dhcp_pool3 disabled=no interface=VLAN130 name=dhcp3
add address-pool=dhcp_pool4 disabled=no interface=VLAN140 name=dhcp4
add address-pool=dhcp_pool5 disabled=no interface=VLAN150 name=dhcp5
add address-pool=dhcp_pool6 disabled=no interface=VLAN160 name=dhcp6
add address-pool=dhcp_pool7 disabled=no interface=VLAN170 name=dhcp7
add address-pool=dhcp_pool8 disabled=no interface=VLAN40 name=dhcp8
/interface bridge port
add bridge=MainBridge comment=defconf interface=ether2 pvid=5
add bridge=MainBridge comment=defconf interface=ether3 pvid=5
add bridge=MainBridge comment=defconf interface=ether5 pvid=5
add bridge=MainBridge comment=defconf disabled=yes interface=sfp1 pvid=5
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=SubBridge tagged=ether2 untagged=ether3,ether5 vlan-ids=40
add bridge=MainBridge tagged=ether2 vlan-ids=110
add bridge=MainBridge tagged=ether2 vlan-ids=120
add bridge=MainBridge tagged=ether2 vlan-ids=130
add bridge=MainBridge tagged=ether2 vlan-ids=140
add bridge=MainBridge tagged=ether2 vlan-ids=150
add bridge=MainBridge tagged=ether2 vlan-ids=160
add bridge=MainBridge tagged=ether2 vlan-ids=170
add bridge=MainBridge untagged=ether3,ether5 vlan-ids=5
/interface list member
add comment=defconf interface=MainBridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=ether4 list=LAN
/ip address
add address=192.168.5.10/24 interface=MainBridge network=192.168.5.0
add address=192.168.15.15/24 interface=ether4 network=192.168.15.0
add address=192.168.2.10/24 interface=ether1 network=192.168.2.0
add address=192.168.40.1/24 interface=VLAN40 network=192.168.40.0
add address=192.168.110.1/24 interface=VLAN110 network=192.168.110.0
add address=192.168.120.1/24 interface=VLAN120 network=192.168.120.0
add address=192.168.130.1/24 interface=VLAN130 network=192.168.130.0
add address=192.168.140.1/24 interface=VLAN140 network=192.168.140.0
add address=192.168.150.1/24 interface=VLAN150 network=192.168.150.0
add address=192.168.160.1/24 interface=VLAN160 network=192.168.160.0
add address=192.168.170.1/24 interface=VLAN170 network=192.168.170.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=\
ether1
/ip dhcp-server network
add address=192.168.40.0/24 dns-server=192.168.40.1,192.168.2.1 gateway=\
192.168.40.1
add address=192.168.110.0/24 dns-server=192.168.110.1,192.168.2.1 gateway=\
192.168.110.1
add address=192.168.120.0/24 dns-server=192.168.120.1,192.168.2.1 gateway=\
192.168.120.1
add address=192.168.130.0/24 dns-server=192.168.130.1,192.168.2.1 gateway=\
192.168.130.1
add address=192.168.140.0/24 dns-server=192.168.140.1,192.168.2.1 gateway=\
192.168.140.1
add address=192.168.150.0/24 dns-server=192.168.150.1,192.168.2.1 gateway=\
192.168.150.1
add address=192.168.160.0/24 dns-server=192.168.160.1,192.168.2.1 gateway=\
192.168.160.1
add address=192.168.170.0/24 dns-server=192.168.170.1,192.168.2.1 gateway=\
192.168.170.1
/ip dns
set allow-remote-requests=yes servers=192.168.2.1
/ip dns static
add address=192.168.88.1 name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked disabled=yes
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" disabled=yes \
protocol=icmp
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" \
disabled=yes ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
disabled=yes ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related disabled=yes
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked disabled=yes
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid disabled=yes
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/ip route
add distance=1 gateway=192.168.2.1
/system clock
set time-zone-name=Europe/Berlin
/system routerboard settings
set silent-boot=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
I hope you understand what I try to achieve.
If you have any questions …
Thanks,
Jens