
/interface/bridge/add name=switch vlan-filtering=yes comment="Global Switch Bridge"

{#
# Created Switched VLANs interfaces
#}
{% for vname,vdata in vlans.items() if vdata.mode is defined and vdata.mode != 'route' %}
/interface/vlan/add name=vlan{{ vdata.id }} vlan-id={{ vdata.id }} interface=switch
{% endfor +%}

{#
# Created Routed VLANs interfaces
#}
{% for interface in interfaces|default() if interface.vlan is defined and interface.vlan.mode|default('') == 'route' %}
/interface/vlan/add name={{interface.ifname}} vlan-id={{interface.vlan.access_id}} interface={{interface.parent_ifname}}
{% endfor %}
