Creating a baseline config script

Trying to script out a base “Golden Config” that will work on all my customer routers which leaves ether1 (WAN) out of the bridge but adds all other ether* interfaces to the bride regardless of if it is a 5 port (hAP AC) or a 10 port (RB4011) if anyone could help me out that would be awesome!!

Below is a base add of ehter2-ether10 for a RB4011
/interface bridge port
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether2
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether3
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether4
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether5
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether6
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether7
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether8
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether9
add bridge=bridge1 disabled=yes ingress-filtering=no interface=ether10

I use something like this:

:foreach k in=[/interface ethernet find where !(slave=yes || name=ether1)] do={
    :local interfaceName [/interface get $k name]
    /interface bridge port add bridge=bridge interface=$interfaceName
}

@eallen, And the wireless interfaces?


:global ifWAN "ether1"

/int bridge
remove [find]
add name=bri-lan protocol-mode=none

/int bridge port
remove [find]
:foreach ifList in=[/int ethernet find where name!=$ifWAN] do={add bridge=bri-lan interface=$ifList}
:foreach ifList in=[/int find where type="wlan"] do={add bridge=bri-lan interface=$ifList}