x
/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether2 hw=yes
add bridge=bridge1 interface=ether3 hw=yes
add bridge=bridge1 interface=ether4 hw=yes
add bridge=bridge1 interface=ether5 hw=yes
/interface ethernet switch ingress-vlan-translation
add ports=ether2 customer-vid=0 new-customer-vid=20 sa-learning=yes
add ports=ether3 customer-vid=0 new-customer-vid=30 sa-learning=yes
add ports=ether4 customer-vid=0 new-customer-vid=40 sa-learning=yes
add ports=ether5 customer-vid=0 new-customer-vid=50 sa-learning=yes
/interface ethernet switch egress-vlan-tag
add vlan-id=20
add vlan-id=30
add vlan-id=40
add vlan-id=50
/interface ethernet switch vlan
add ports=switch1-cpu,ether2 vlan-id=20 learn=yes
add ports=switch1-cpu,ether3 vlan-id=30 learn=yes
add ports=switch1-cpu,ether4 vlan-id=40 learn=yes
add ports=switch1-cpu,ether5 vlan-id=50 learn=yes
/interface vlan
add interface=bridge1 vlan-id=20 name=VLAN20
add interface=bridge1 vlan-id=30 name=VLAN30
add interface=bridge1 vlan-id=40 name=VLAN40
add interface=bridge1 vlan-id=50 name=VLAN50
/ip address
add address=192.168.20.1/24 interface=VLAN20
add address=192.168.30.1/24 interface=VLAN30
add address=192.168.40.1/24 interface=VLAN40
add address=192.168.50.1/24 interface=VLAN50
## Create DHCP Server for every VLAN
I assume all of the interface ports can be part of the same bridge? I saw one example online that was creating separate bridges, just wondering if this is necessary for some reason.
I have not tested, but i would try something like:
Code: Select all/interface bridge add name=bridge1 /interface bridge port add bridge=bridge1 interface=ether2 hw=yes add bridge=bridge1 interface=ether3 hw=yes add bridge=bridge1 interface=ether4 hw=yes add bridge=bridge1 interface=ether5 hw=yes /interface ethernet switch ingress-vlan-translation add ports=ether2 customer-vid=0 new-customer-vid=20 sa-learning=yes add ports=ether3 customer-vid=0 new-customer-vid=30 sa-learning=yes add ports=ether4 customer-vid=0 new-customer-vid=40 sa-learning=yes add ports=ether5 customer-vid=0 new-customer-vid=50 sa-learning=yes /interface ethernet switch egress-vlan-tag add vlan-id=20 add vlan-id=30 add vlan-id=40 add vlan-id=50 /interface ethernet switch vlan add ports=switch1-cpu,ether2 vlan-id=20 learn=yes add ports=switch1-cpu,ether3 vlan-id=30 learn=yes add ports=switch1-cpu,ether4 vlan-id=40 learn=yes add ports=switch1-cpu,ether5 vlan-id=50 learn=yes /interface vlan add interface=bridge1 vlan-id=20 name=VLAN20 add interface=bridge1 vlan-id=30 name=VLAN30 add interface=bridge1 vlan-id=40 name=VLAN40 add interface=bridge1 vlan-id=50 name=VLAN50 /ip address add address=192.168.20.1/24 interface=VLAN20 add address=192.168.30.1/24 interface=VLAN30 add address=192.168.40.1/24 interface=VLAN40 add address=192.168.50.1/24 interface=VLAN50 ## Create DHCP Server for every VLAN
I am not sure why this was the problem, switch1-cpu just gives access to CPU, needed or not i don't see why it caused a problem...I removed switch1-cpu from switch vlan and everything is working as expected.
I have not tested, but i would try something like:
Code: Select all/interface bridge add name=bridge1 /interface bridge port add bridge=bridge1 interface=ether2 hw=yes add bridge=bridge1 interface=ether3 hw=yes add bridge=bridge1 interface=ether4 hw=yes add bridge=bridge1 interface=ether5 hw=yes /interface ethernet switch ingress-vlan-translation add ports=ether2 customer-vid=0 new-customer-vid=20 sa-learning=yes add ports=ether3 customer-vid=0 new-customer-vid=30 sa-learning=yes add ports=ether4 customer-vid=0 new-customer-vid=40 sa-learning=yes add ports=ether5 customer-vid=0 new-customer-vid=50 sa-learning=yes /interface ethernet switch egress-vlan-tag add vlan-id=20 add vlan-id=30 add vlan-id=40 add vlan-id=50 /interface ethernet switch vlan add ports=switch1-cpu,ether2 vlan-id=20 learn=yes add ports=switch1-cpu,ether3 vlan-id=30 learn=yes add ports=switch1-cpu,ether4 vlan-id=40 learn=yes add ports=switch1-cpu,ether5 vlan-id=50 learn=yes /interface vlan add interface=bridge1 vlan-id=20 name=VLAN20 add interface=bridge1 vlan-id=30 name=VLAN30 add interface=bridge1 vlan-id=40 name=VLAN40 add interface=bridge1 vlan-id=50 name=VLAN50 /ip address add address=192.168.20.1/24 interface=VLAN20 add address=192.168.30.1/24 interface=VLAN30 add address=192.168.40.1/24 interface=VLAN40 add address=192.168.50.1/24 interface=VLAN50 ## Create DHCP Server for every VLAN
Yeah, I couldn't begin to guess I don't really know this architecture. But I tested adding it back and as soon as I did it stopped working again.I am not sure why this was the problem, switch1-cpu just gives access to CPU, needed or not i don't see why it caused a problem...I removed switch1-cpu from switch vlan and everything is working as expected.
Thanks.
Yeah, I couldn't begin to guess I don't really know this architecture. But I tested adding it back and as soon as I did it stopped working again.
Nice to clarify that @mkx...As others mentioned, switch shouldn't be doing that.
/interface ethernet switch vlan
add ports=ether2,switch1-cpu vlan-id=99
/interface ethernet switch egress-vlan-tag
add tagged-ports=ether2,switch1-cpu vlan-id=99