This is what I did on my HAPAC2 VLAN config using switch chip (not bridge). As I understand it, if I use vlans using bridge, I believe it disables hardware offloading to the switch chip, and therefore may reduce performance. I would like to use the HAPAC2 only as a switch therefore I set the vlan on the switch chip. Experts correct me if I am wrong.
/interface bridge
add name=bridge1 protocol-mode=none
/interface bridge port
add bridge=bridge1 interface=ether1 hw=yes
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
set [ find default-name=ether1 ] comment=“UPLINK (TRUNK)” (note: from previous HAPAC2, trunk = default vl1 (untagged) and all vlans (tagged) active on trunk)
set [ find default-name=ether2 ] comment=“DOWNLINK (TRUNK)” (note: to next HAPAC2, trunk)
set [ find default-name=ether3 ] comment=“HOTSPOT (TRUNK)” (note: to Wifi AP)
set [ find default-name=ether4 ] comment=“OFFICE VL10”
set [ find default-name=ether5 ] comment=“CCTV VL35”
/interface vlan
add interface=bridge1 name=“VL03 - Network Device” vlan-id=3 (note: I put all my network devices on vl3. If I don’t add this, the HAPAC2 won’t get its ip from the dhcp server on vl3. If your device is on the default vlan, you don’t need this.)
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=“VL03 - Network Device” (note: related to above)
/interface ethernet switch vlan
add ports=ether1,ether2,ether3,switch1-cpu switch=switch1 vlan-id=1
add ports=ether1,ether2,ether3,switch1-cpu switch=switch1 vlan-id=3
add ports=ether1,ether2,ether3 switch=switch1 vlan-id=5
add ports=ether1,ether2,ether3,ether4 switch=switch1 vlan-id=10
add ports=ether1,ether2,ether3 switch=switch1 vlan-id=15
add ports=ether1,ether2,ether3 switch=switch1 vlan-id=20
add ports=ether1,ether2,ether3 switch=switch1 vlan-id=25
add ports=ether1,ether2,ether3 switch=switch1 vlan-id=30
add ports=ether1,ether2,ether3,ether5 switch=switch1 vlan-id=35
/interface ethernet switch port
set ether1 vlan-mode=fallback vlan-header=leave-as-is (note: trunk)
set ether2 vlan-mode=fallback vlan-header=leave-as-is (note: trunk)
set ether3 vlan-mode=fallback vlan-header=leave-as-is (note: trunk)
set ether4 vlan-mode=secure vlan-header=always-strip default-vlan-id=10 (note: access port vl10)
set ether5 vlan-mode=secure vlan-header=always-strip default-vlan-id=35 (note: access port vl35)
set switch1-cpu vlan-header=leave-as-is vlan-mode=fallback default-vlan-id=0 (note: I am not 100% sure I have this right. I had the switch-cpu on vl3 with vlan-header=secure, which is the vlan I want the HAPAC2 to be in, but I can’t access the HAPAC2 with that setting.)