Code: Select all
:global accessPort "ingress-filtering=yes frame-types=admit-only-untagged-and-priority-tagged"
:global trunkPort "ingress-filtering=yes frame-types=admit-only-vlan-tagged"
:global hybridPort "ingress-filtering=yes frame-types=admit-all"
/interface bridge port
set bridge=BR1 $hybridPort [find interface=ether3] pvid=108 comment="Hybrid Port (X8_IoT)"
set bridge=BR1 $trunkPort [find interface=ether4] pvid=1 comment="Trunk Port (default)"
set bridge=BR1 $accessPort [find interface=ether5] pvid=101 comment="Access Port (X1_Base)"
set bridge=BR1 $hybridPort [find interface=sfp1] pvid=1 comment="Hybrid Port (default)"
Edit Update: Based on the input from @rextended, the following code snippet accomplishes what I was trying aiming for:
Code: Select all
:global accessPort "ingress-filtering=yes frame-types=admit-only-untagged-and-priority-tagged"
:global trunkPort "ingress-filtering=yes frame-types=admit-only-vlan-tagged"
:global hybridPort "ingress-filtering=yes frame-types=admit-all"
:global ibp "/interface bridge port"
[:parse "$ibp set bridge=BR1 $hybridPort [find interface=ether3] pvid=108 comment=\"Hybrid Port (X8_IoT)\"" ]
[:parse "$ibp set bridge=BR1 $trunkPort [find interface=ether4] pvid=1 comment=\"Trunk Port (default)\"" ]
[:parse "$ibp set bridge=BR1 $accessPort [find interface=ether5] pvid=101 comment=\"Access Port (X1_Base)\"" ]
[:parse "$ibp set bridge=BR1 $hybridPort [find interface=sfp1] pvid=1 comment=\"Hybrid Port (default)\"" ]