Vlan
Vlan
• Now you will create a single bridge and then decide which ports are
tagged or untagged.
• We will configure:
Eth1 with no VLAN configuration.
Eth2 with VLAN10, 11, 12 tagged. This will act as a trunk port.
Eth3 with VLAN10, 11, 12 tagged. This will act as a trunk port.
Eth4 with VLAN10 untagged and a PVID of 10. This will act as an access point
for PCs to connect to.
1. Add a bridge
/interface bridge
add fast-forward=no name=bridge1 vlan-filtering=no
2. Add a VLAN interface to the bridge (this will hold the IP address and the DHCP server.
/interface vlan
add interface=bridge1 name=VLAN10 vlan-id=10
add interface=bridge1 name=VLAN11 vlan-id=11
add interface=bridge1 name=VLAN12 vlan-id=12
3. Add the DHCP server config and IP address to each VLAN interface
/ip pool
add name=VLAN10 ranges=192.168.10.1-192.168.10.50
add name=VLAN11 ranges=192.168.11.1-192.168.11.50
add name=VLAN12 ranges=192.168.12.1-192.168.12.50
/ip address
add address=192.168.10.254/24 interface=VLAN10 network=192.168.10.0
add address=192.168.11.254/24 interface=VLAN11 network=192.168.11.0
add address=192.168.12.254/24 interface=VLAN12 network=192.168.12.0
/ip dhcp-server network
add address=192.168.10.0/24 dns-server=192.168.10.254 gateway=192.168.10.254
add address=192.168.11.0/24 dns-server=192.168.11.254 gateway=192.168.11.254
add address=192.168.12.0/24 dns-server=192.168.12.254 gateway=192.168.12.254
/ip dhcp-server
add address-pool=VLAN10 disabled=no interface=VLAN10 name=VLAN10
add address-pool=VLAN11 disabled=no interface=VLAN11 name=VLAN11
add address-pool=VLAN12 disabled=no interface=VLAN12 name=VLAN12