I'd like to use this post to get a better understanding with hands-on work to set up my future LAN environment using VLANs.
So far this is all testing and my setup is:
- a RB5009 which shall act as the primary router
- a hAPac2 which shall act as a switch and provide its radios to the Capsman on the router
- an ordinary switch that connects both devices and my PC using static addresses, so that I hopefully do not lock myself out.
Router and hap are both on ROS 7.2rc1.
I'd like to start with the router:
I have three VLANs (31, 32, 33).
Ether 1 is statically configured (for local testing maintenance)
Ether 2 shall be the trunk port to the hap (not connected, yet)
Ether 3 shall be an access port for VLAN 31
Ether 4 shall be an access port for VLAN 32
Ether 5 shall be an access port for VLAN 33
My config so far looks like this:
Code: Select all
/interface bridge
add name=bridge1 vlan-filtering=yes
/interface vlan
add interface=bridge1 name=vlan_31 vlan-id=31
add interface=bridge1 name=vlan_32 vlan-id=32
add interface=bridge1 name=vlan_33 vlan-id=33
/interface bridge port
add bridge=bridge1 interface=ether2 pvid=31
add bridge=bridge1 interface=ether3 pvid=31
add bridge=bridge1 interface=ether4 pvid=32
add bridge=bridge1 interface=ether5 pvid=33
/interface bridge vlan
add bridge=bridge1 tagged=bridge1,ether2 untagged=vlan_31 vlan-ids=31
add bridge=bridge1 tagged=bridge1,ether2 untagged=vlan_32 vlan-ids=32
add bridge=bridge1 tagged=bridge1,ether2 untagged=vlan_33 vlan-ids=33
/ip pool
add name=pool_31 ranges=10.31.0.100-10.31.0.254
add name=pool_32 ranges=10.32.0.100-10.32.0.254
add name=pool_33 ranges=10.33.0.100-10.33.0.254
/ip dhcp-server
add address-pool=pool_31 interface=vlan_31 lease-time=1m name=dhcp_31
add address-pool=pool_32 interface=vlan_32 lease-time=1m name=dhcp_32
add address-pool=pool_33 interface=vlan_33 lease-time=1m name=dhcp_33
/ip address
add address=192.168.88.101/24 interface=ether1 network=192.168.88.0
add address=10.31.0.1/24 interface=vlan_31 network=10.31.0.0
add address=10.32.0.1/24 interface=vlan_32 network=10.32.0.0
add address=10.33.0.1/24 interface=vlan_33 network=10.33.0.0
/ip dhcp-server network
add address=10.31.0.0/24 netmask=24
add address=10.32.0.0/24
add address=10.33.0.0/24
Am I on the right way with this? Or is there already a misunderstanding that will make my life harder in the next steps?