# Generated for:
# RouterOSv5.x
:log info "Unsolclic for 5882-AlbMMontSTSud going to be executed."
#
# Configuration for RouterOSv5.x
# Device: 5882-AlbMMontSTSud
#
# Methods to upload/execute this script:
# 1.-As a script. Upload this output as a script either with:
#     a.Winbox (with Linux, wine required)
#     b.Terminal (telnet, ssh...)
#    Then execute the script with:
#      > /system script run script_name
# 2.-Imported file:
#     Save this output to a file, then upload it to the router
#     using ftp using a name like "script_name.rsc".
#     (note that extension ".rsc" is required)
#     Run the import file using the command:
#      > /import script_name
# 3.-Telnet cut&paste:
#     Open a terminal session, and cut&paste this output
#     directly on the terminal input.
#
# Notes:
# -routing-test package is required if you use RouterOSv2.9 , be sure you have it enabled at system packages
# -wlans should be enabled manually, be sure to set the correct antenna (a or b)
#   according in how did you connect the cable to the miniPCI. Keep the
#   power at the minimum possible and check the channel.
# -The script doesn't reset the router, you might have to do it manually
# -You must have write access to the router
# -MAC access (winbox, MAC telnet...) method is recommended
#   (the script reconfigures some IP addresses, so communication can be lost)
# -No changes are done in user passwords on the device
# -A Read Only guest account with no password will be created to allow guest access
#   to the router with no danger of damage but able to see the config.
# -Be sure that all packages are activated.
# -Don't run the script from telnet and being connected through an IP connection at
#   the wLan/Lan interface: This interface will be destroyed during the script.
#
/ system identity set name=AlbMMontSTSud
#
# DNS (client & server cache) zone: 9171
/ip dns set servers=10.139.31.2 allow-remote-requests=yes
:delay 1
#
# NTP (client & server cache) zone: 9171
:delay 1
#
# Bandwidth-server
/ tool bandwidth-server set enabled=yes authenticate=no allocate-udp-ports-from=2000
#
# SNMP
/snmp set contact="guifi@guifi.net" enabled=yes location="AlbMMont"
#
# Guest user
/user
:foreach i in [find group=read] do={/user remove $i;}
add name="guest" group=read address=0.0.0.0/0 comment="" disabled=no
#
# Graphing
/tool graphing interface add
# Remove current wLan/Lan bridge if exists
:foreach i in [/interface bridge find name=wLan/Lan] \
do={:foreach i in [/interface bridge port find bridge=wLan/Lan] \
do={/interface bridge port remove $i; \
:foreach i in [/ip address find interface=wLan/Lan] \
do={/ip address remove $i;};};
/interface bridge remove $i;}
# Construct main bridge on wlan1 & ether1
/ interface bridge
add name="wLan/Lan"
/ interface bridge port
add interface=ether1 bridge=wLan/Lan
add interface=wlan1 bridge=wLan/Lan
:delay 1
#
# Radio#: 0 AlbMdDeuMont2SudOest
/interface wireless set wlan1 name="wlan1" \
radio-name="AlbMdDeuMont2SudOest" mode=ap-bridge ssid="guifi.net-AlbMdDeuMont2SudOest" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2437 \
dfs-mode=none \
wds-mode=static wds-default-bridge=none wds-default-cost=100 \
wds-cost-range=50-150 wds-ignore-ssid=yes hide-ssid=no
:delay 1
# Type: wLan/Lan
/ip address
:foreach i in [find address="10.139.14.1/27"] do={remove $i}
/ ip address add address=10.139.14.1/27 network=10.139.14.0 broadcast=10.139.14.31 interface=wLan/Lan disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.139.14.0/27] do={/routing bgp network remove $i;}
add network=10.139.14.0/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wLan/Lan] do={/routing ospf interface remove $i;}
add interface=wLan/Lan
/ routing ospf network
:foreach i in [/routing ospf network find network=10.139.14.0/27] do={/routing ospf network remove $i;}
add network=10.139.14.0/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wLan/Lan] do={/ip pool remove $i;}
/ip pool add name=dhcp-wLan/Lan ranges=10.139.14.7-10.139.14.30
:foreach i in [/ip dhcp-server find name=dhcp-wLan/Lan] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wLan/Lan interface=wLan/Lan address-pool=dhcp-wLan/Lan disabled=no
:foreach i in [/ip dhcp-server network find address="10.139.14.0/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.139.14.0/27 gateway=10.139.14.1 domain=guifi.net comment=dhcp-wLan/Lan
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.139.14.2 mac-address=00:15:6D:D4:83:D0 client-id=provesjoanRd1 server=dhcp-wLan/Lan
add address=10.139.14.3 mac-address=00:15:6D:E4:7F:BB client-id=SFerMasReigd1 server=dhcp-wLan/Lan
add address=10.139.14.4 mac-address=00:15:6D:A7:B5:56 client-id=TortellaMSarolaRd1 server=dhcp-wLan/Lan
add address=10.139.14.5 mac-address=00:15:6D:A9:BA:A6 client-id=SalesLLCansabaterRd1 server=dhcp-wLan/Lan
add address=10.139.14.6 mac-address=00:15:6D:AA:BC:EC client-id=Mntglafont1Rd1 server=dhcp-wLan/Lan
add address=10.139.14.7 mac-address=00:15:6D:A9:2C:D8 client-id=MntgtMasVallmajor server=dhcp-wLan/Lan
add address=10.139.14.8 mac-address=00:15:6D:AD:0A:E5 client-id=MaiaAGarretaRd1 server=dhcp-wLan/Lan
add address=10.139.14.9 mac-address=00:15:6D:D4:F6:DE client-id=CDLRJPozasRd1 server=dhcp-wLan/Lan
add address=10.139.14.10 mac-address=FF:FF:10:00:00:00 client-id=CDeLJaonRd1 server=dhcp-wLan/Lan
add address=10.139.14.11 mac-address=00:15:6D:AD:32:80 client-id=MntgcsnouRd1 server=dhcp-wLan/Lan
add address=10.139.14.12 mac-address=00:15:6D:A7:AB:83 client-id=TortellaDMagretRd1 server=dhcp-wLan/Lan
add address=10.139.14.13 mac-address=00:15:6D:A7:AB:3A client-id=MntgtCMartinezRd1 server=dhcp-wLan/Lan
add address=10.139.14.14 mac-address=00:1D:0F:AE:BB:22 client-id=ARGJuliaGrau server=dhcp-wLan/Lan
add address=10.139.14.15 mac-address=00:15:6D:D3:F5:BE client-id=BesaluMAuletRd1 server=dhcp-wLan/Lan
add address=10.139.14.16 mac-address=00:15:6D:A9:BB:20 client-id=BesalufbjRd2 server=dhcp-wLan/Lan
add address=10.139.14.17 mac-address=00:15:6D:A7:AB:A4 client-id=MntgtECasasRd1 server=dhcp-wLan/Lan
add address=10.139.14.18 mac-address=00:15:6D:F0:30:7A client-id=TortellaStMiquel8Rd1 server=dhcp-wLan/Lan
add address=10.139.14.19 mac-address=00:15:6D:F6:78:85 client-id=SJDLLCostillaRd1 server=dhcp-wLan/Lan
add address=10.139.14.20 mac-address=00:15:6D:1A:36:6E client-id=TortellaVJoanRd1 server=dhcp-wLan/Lan
add address=10.139.14.21 mac-address=00:15:6D:F6:82:D0 client-id=MrsMesasRd2 server=dhcp-wLan/Lan
add address=10.139.14.22 mac-address=00:15:6D:E8:B8:CD client-id=SJDLLGrtx29Rd1 server=dhcp-wLan/Lan
add address=10.139.14.23 mac-address=00:15:6D:E4:7D:7D client-id=MaiaMCollRd2 server=dhcp-wLan/Lan
add address=10.139.14.24 mac-address=00:15:6D:E4:7F:2A client-id=BeudaMPareRd1 server=dhcp-wLan/Lan
add address=10.139.14.25 mac-address=00:15:6D:E4:7F:AE client-id=BeudaMPare2Rd1 server=dhcp-wLan/Lan
add address=10.139.14.26 mac-address=00:15:6D:DA:C9:2F client-id=SalescuniRd1 server=dhcp-wLan/Lan
add address=10.139.14.27 mac-address=00:15:6D:60:D0:BF client-id=VDeBAdriRd1 server=dhcp-wLan/Lan
add address=10.139.14.28 mac-address=00:15:6D:1A:0B:A3 client-id=MntgtJoopRd1 server=dhcp-wLan/Lan
add address=10.139.14.29 mac-address=FF:FF:10:00:00:00 client-id=MntgabelliRd1 server=dhcp-wLan/Lan
add address=10.139.14.30 mac-address=00:15:6D:AD:09:B5 client-id=MntgtXPujiulaRd1 server=dhcp-wLan/Lan
#
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan1] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
#
:delay 1
#
# Radio#: 1 AlbMdDeuMont5SudOest
/interface wireless set wlan2 name="wlan2" \
radio-name="AlbMdDeuMont5SudOest" mode=ap-bridge ssid="guifi.net-AlbMdDeuMont5SudOest" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5180 \
dfs-mode=none \
wds-mode=static wds-default-bridge=none wds-default-cost=100 \
wds-cost-range=50-150 wds-ignore-ssid=yes hide-ssid=no
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan2] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
/ interface wireless wds
add name="wds_AjunArgelaguerRadio1" master-interface=wlan2 wds-address=00:15:6D:63:79:5E disabled=no
/ ip address add address=172.25.7.254/30 network=172.25.7.252 broadcast=172.25.7.255 interface=wds_AjunArgelaguerRadio1 disabled=no comment="wds_AjunArgelaguerRadio1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_AjunArgelaguerRadio1] do={/routing ospf interface remove $i;}
add interface=wds_AjunArgelaguerRadio1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.7.252/30] do={/routing ospf network remove $i;}
add network=172.25.7.252/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=AjunArgelaguerRadio1] do={/routing bgp peer remove $i;}
add name="AjunArgelaguerRadio1" instance=default remote-address=172.25.7.253 remote-as=7692 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_TortellaAjST" master-interface=wlan2 wds-address=00:0C:42:1B:0E:1C disabled=no
/ ip address add address=172.25.9.50/30 network=172.25.9.48 broadcast=172.25.9.51 interface=wds_TortellaAjST disabled=no comment="wds_TortellaAjST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_TortellaAjST] do={/routing ospf interface remove $i;}
add interface=wds_TortellaAjST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.9.48/30] do={/routing ospf network remove $i;}
add network=172.25.9.48/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=TortellaAjST] do={/routing bgp peer remove $i;}
add name="TortellaAjST" instance=default remote-address=172.25.9.49 remote-as=6796 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_MontolivetRadio1" master-interface=wlan2 wds-address=00:0C:42:23:A0:F2 disabled=no
/ ip address add address=172.25.9.54/30 network=172.25.9.52 broadcast=172.25.9.55 interface=wds_MontolivetRadio1 disabled=no comment="wds_MontolivetRadio1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_MontolivetRadio1] do={/routing ospf interface remove $i;}
add interface=wds_MontolivetRadio1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.9.52/30] do={/routing ospf network remove $i;}
add network=172.25.9.52/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=MontolivetRadio1] do={/routing bgp peer remove $i;}
add name="MontolivetRadio1" instance=default remote-address=172.25.9.53 remote-as=9200 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_ElCosRadio1" master-interface=wlan2 wds-address=00:0C:42:26:59:30 disabled=no
/ ip address add address=172.25.32.22/30 network=172.25.32.20 broadcast=172.25.32.23 interface=wds_ElCosRadio1 disabled=no comment="wds_ElCosRadio1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_ElCosRadio1] do={/routing ospf interface remove $i;}
add interface=wds_ElCosRadio1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.32.20/30] do={/routing ospf network remove $i;}
add network=172.25.32.20/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=ElCosRadio1] do={/routing bgp peer remove $i;}
add name="ElCosRadio1" instance=default remote-address=172.25.32.21 remote-as=10426 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_castellfollitRadio1" master-interface=wlan2 wds-address=00:15:6D:63:77:8D disabled=no
/ ip address add address=172.25.32.74/30 network=172.25.32.72 broadcast=172.25.32.75 interface=wds_castellfollitRadio1 disabled=no comment="wds_castellfollitRadio1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_castellfollitRadio1] do={/routing ospf interface remove $i;}
add interface=wds_castellfollitRadio1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.32.72/30] do={/routing ospf network remove $i;}
add network=172.25.32.72/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=castellfollitRadio1] do={/routing bgp peer remove $i;}
add name="castellfollitRadio1" instance=default remote-address=172.25.32.73 remote-as=7552 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_SalesLLEsglesiaRd1" master-interface=wlan2 wds-address=00:0C:42:26:45:54 disabled=no
/ ip address add address=172.25.32.166/30 network=172.25.32.164 broadcast=172.25.32.167 interface=wds_SalesLLEsglesiaRd1 disabled=no comment="wds_SalesLLEsglesiaRd1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_SalesLLEsglesiaRd1] do={/routing ospf interface remove $i;}
add interface=wds_SalesLLEsglesiaRd1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.32.164/30] do={/routing ospf network remove $i;}
add network=172.25.32.164/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=SalesLLEsglesiaRd1] do={/routing bgp peer remove $i;}
add name="SalesLLEsglesiaRd1" instance=default remote-address=172.25.32.165 remote-as=11857 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_BatetRepeRd1" master-interface=wlan2 wds-address=00:27:22:32:1E:F4 disabled=yes
/ ip address add address=172.25.44.202/29 network=172.25.44.200 broadcast=172.25.44.207 interface=wds_BatetRepeRd1 disabled=yes comment="wds_BatetRepeRd1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_BatetRepeRd1] do={/routing ospf interface remove $i;}
add interface=wds_BatetRepeRd1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.44.200/29] do={/routing ospf network remove $i;}
add network=172.25.44.200/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=BatetRepeRd1] do={/routing bgp peer remove $i;}
add name="BatetRepeRd1" instance=default remote-address=172.25.44.201 remote-as=28546 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 2 AlbMdDeuMont2SudEst
/interface wireless set wlan3 name="wlan3" \
radio-name="AlbMdDeuMont2SudEst" mode=ap-bridge ssid="guifi.net-AlbMdDeuMont2SudEst" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2452 \
dfs-mode=none \
wds-mode=static wds-default-bridge=none wds-default-cost=100 \
wds-cost-range=50-150 wds-ignore-ssid=yes hide-ssid=no
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.139.14.65/27"] do={remove $i}
/ ip address add address=10.139.14.65/27 network=10.139.14.64 broadcast=10.139.14.95 interface=wlan3 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.139.14.64/27] do={/routing bgp network remove $i;}
add network=10.139.14.64/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan3] do={/routing ospf interface remove $i;}
add interface=wlan3
/ routing ospf network
:foreach i in [/routing ospf network find network=10.139.14.64/27] do={/routing ospf network remove $i;}
add network=10.139.14.64/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan3] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan3 ranges=10.139.14.71-10.139.14.94
:foreach i in [/ip dhcp-server find name=dhcp-wlan3] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan3 interface=wlan3 address-pool=dhcp-wlan3 disabled=no
:foreach i in [/ip dhcp-server network find address="10.139.14.64/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.139.14.64/27 gateway=10.139.14.65 domain=guifi.net comment=dhcp-wlan3
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.139.14.66 mac-address=00:15:6D:E5:7D:7C client-id=MaiaCanGenassaRd1 server=dhcp-wlan3
add address=10.139.14.67 mac-address=00:15:6D:A6:DE:B0 client-id=SerinyaRCorominasRd1 server=dhcp-wlan3
add address=10.139.14.68 mac-address=00:00:00:00:00:01 client-id=CbnQueixasRd1 server=dhcp-wlan3
add address=10.139.14.69 mac-address=00:1D:0F:AE:BB:77 client-id=BeudaJaRiuRd1 server=dhcp-wlan3
add address=10.139.14.70 mac-address=00:15:6D:AD:0A:C7 client-id=MaiaUClemenRd1 server=dhcp-wlan3
add address=10.139.14.71 mac-address=00:19:E0:67:1C:18 client-id=BeudaJriuRd1 server=dhcp-wlan3
add address=10.139.14.72 mac-address=00:15:6D:A6:DF:02 client-id=martisRd1 server=dhcp-wlan3
add address=10.139.14.73 mac-address=00:1D:0F:AE:D5:C9 client-id=BeudaCanTerradesRd1 server=dhcp-wlan3
add address=10.139.14.74 mac-address=00:15:6D:D4:F6:1B client-id=MaiaMJoseRd1 server=dhcp-wlan3
add address=10.139.14.75 mac-address=00:15:6D:E4:7F:88 client-id=MaiaMaliRd1 server=dhcp-wlan3
add address=10.139.14.76 mac-address=00:15:6D:E4:7F:D7 client-id=MaiaAOllerRd1 server=dhcp-wlan3
add address=10.139.14.77 mac-address=00:15:6D:D4:F6:EE client-id=MaiaAOreroRd1 server=dhcp-wlan3
add address=10.139.14.78 mac-address=00:15:6D:D4:F5:E7 client-id=MaiaNSerraRd1 server=dhcp-wlan3
add address=10.139.14.79 mac-address=00:15:6D:DA:A2:56 client-id=EspcertEs10Rd1 server=dhcp-wlan3
add address=10.139.14.80 mac-address=00:15:6D:A6:77:20 client-id=MaiaJRomanRd1 server=dhcp-wlan3
add address=10.139.14.81 mac-address=00:15:6D:AD:09:60 client-id=MaiaTMartinezRd1 server=dhcp-wlan3
add address=10.139.14.82 mac-address=00:15:6D:A7:AB:88 client-id=MaiaMasRieraRd1 server=dhcp-wlan3
add address=10.139.14.83 mac-address=00:15:6D:D4:F5:9B client-id=MaiaIXiquesRd1 server=dhcp-wlan3
add address=10.139.14.84 mac-address=00:15:6D:1A:36:38 client-id=MaiaJPamiesRd1 server=dhcp-wlan3
add address=10.139.14.85 mac-address=00:19:3B:80:EC:8B client-id=EspCanbondasia server=dhcp-wlan3
add address=10.139.14.86 mac-address=00:15:6D:E4:7D:6D client-id=BesaluDDonnayRd1 server=dhcp-wlan3
add address=10.139.14.87 mac-address=00:13:10:3F:A8:77 client-id=GuialbesRaulRd1 server=dhcp-wlan3
add address=10.139.14.88 mac-address=00:0C:42:30:48:2C client-id=MaiaCanRd1 server=dhcp-wlan3
add address=10.139.14.89 mac-address=00:15:6D:A6:79:1B client-id=MaiaJPlanasRd1 server=dhcp-wlan3
add address=10.139.14.90 mac-address=00:15:6D:E5:7E:CD client-id=MaiaFMoyanaRd1 server=dhcp-wlan3
add address=10.139.14.91 mac-address=00:15:6D:D4:7E:BD client-id=spnvssCanPericRd1 server=dhcp-wlan3
add address=10.139.14.92 mac-address=00:15:6D:E3:7F:8A client-id=BeudaCanTerrades2Rd1 server=dhcp-wlan3
add address=10.139.14.93 mac-address=00:27:22:1F:84:FB client-id=ndcmRd1 server=dhcp-wlan3
add address=10.139.14.94 mac-address=00:15:6D:F4:E2:61 client-id=MARTSJanRd1 server=dhcp-wlan3
#
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan3] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
#
:delay 1
#
# Radio#: 3 AlbMdDeuMont5SudEst
/interface wireless set wlan4 name="wlan4" \
radio-name="AlbMdDeuMont5SudEst" mode=ap-bridge ssid="guifi.net-AlbMdDeuMont5SudEst" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5200 \
dfs-mode=none \
wds-mode=static wds-default-bridge=none wds-default-cost=100 \
wds-cost-range=50-150 wds-ignore-ssid=yes hide-ssid=no
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan4] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
/ interface wireless wds
add name="wds_SFERRIOLTelecentreR1" master-interface=wlan4 wds-address=00:0B:6B:81:3E:5D disabled=no
/ ip address add address=172.25.7.42/30 network=172.25.7.40 broadcast=172.25.7.43 interface=wds_SFERRIOLTelecentreR1 disabled=no comment="wds_SFERRIOLTelecentreR1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_SFERRIOLTelecentreR1] do={/routing ospf interface remove $i;}
add interface=wds_SFERRIOLTelecentreR1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.7.40/30] do={/routing ospf network remove $i;}
add network=172.25.7.40/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=SFERRIOLTelecentreR1] do={/routing bgp peer remove $i;}
add name="SFERRIOLTelecentreR1" instance=default remote-address=172.25.7.41 remote-as=6523 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_BeudaGranjaRd1" master-interface=wlan4 wds-address=00:1D:0F:B1:89:5E disabled=no
/ ip address add address=172.25.32.50/30 network=172.25.32.48 broadcast=172.25.32.51 interface=wds_BeudaGranjaRd1 disabled=no comment="wds_BeudaGranjaRd1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_BeudaGranjaRd1] do={/routing ospf interface remove $i;}
add interface=wds_BeudaGranjaRd1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.32.48/30] do={/routing ospf network remove $i;}
add network=172.25.32.48/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=BeudaGranjaRd1] do={/routing bgp peer remove $i;}
add name="BeudaGranjaRd1" instance=default remote-address=172.25.32.49 remote-as=11093 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_SibiRadio1" master-interface=wlan4 wds-address=00:0C:42:26:CB:01 disabled=no
/ ip address add address=172.25.32.62/30 network=172.25.32.60 broadcast=172.25.32.63 interface=wds_SibiRadio1 disabled=no comment="wds_SibiRadio1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_SibiRadio1] do={/routing ospf interface remove $i;}
add interface=wds_SibiRadio1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.32.60/30] do={/routing ospf network remove $i;}
add network=172.25.32.60/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=SibiRadio1] do={/routing bgp peer remove $i;}
add name="SibiRadio1" instance=default remote-address=172.25.32.61 remote-as=7843 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_MaiaSMagdalenaRd1" master-interface=wlan4 wds-address=00:1D:0F:B1:89:7A disabled=no
/ ip address add address=172.25.34.86/30 network=172.25.34.84 broadcast=172.25.34.87 interface=wds_MaiaSMagdalenaRd1 disabled=no comment="wds_MaiaSMagdalenaRd1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_MaiaSMagdalenaRd1] do={/routing ospf interface remove $i;}
add interface=wds_MaiaSMagdalenaRd1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.34.84/30] do={/routing ospf network remove $i;}
add network=172.25.34.84/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=MaiaSMagdalenaRd1] do={/routing bgp peer remove $i;}
add name="MaiaSMagdalenaRd1" instance=default remote-address=172.25.34.85 remote-as=15118 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_Sericomnou26Rd2" master-interface=wlan4 wds-address=00:0C:42:2C:4E:7B disabled=no
/ ip address add address=172.25.35.110/30 network=172.25.35.108 broadcast=172.25.35.111 interface=wds_Sericomnou26Rd2 disabled=no comment="wds_Sericomnou26Rd2"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_Sericomnou26Rd2] do={/routing ospf interface remove $i;}
add interface=wds_Sericomnou26Rd2
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.35.108/30] do={/routing ospf network remove $i;}
add network=172.25.35.108/30 area=backbone disabled=yes
/ routing bgp peer
:foreach i in [find name=Sericomnou26Rd2] do={/routing bgp peer remove $i;}
add name="Sericomnou26Rd2" instance=default remote-address=172.25.35.109 remote-as=16822 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=no
#
:delay 1
#
# Routed device
#
# Other cable connections
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=ether1] do={/routing ospf interface remove $i;}
add interface=ether1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.2.116/30] do={/routing ospf network remove $i;}
add network=172.25.2.116/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=AlbMMontSTNord] do={/routing bgp peer remove $i;}
add name="AlbMMontSTNord" instance=default remote-address=172.25.2.117 remote-as=10360 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
:foreach i in [/ip address find address="172.25.2.118/30"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.2.118/30 network=172.25.2.116 broadcast=172.25.2.119 interface=ether1 disabled=no comment="AlbMMontSTNord"
#
# Internal addresses NAT
:foreach i in [/ip firewall nat find src-address="172.16.0.0/12"] do={/ip firewall nat remove $i;}
:foreach i in [/ip firewall nat find src-address="192.168.0.0/16"] do={/ip firewall nat remove $i;}
/ip firewall nat
add chain=srcnat src-address="192.168.0.0/16" dst-address=!192.168.0.0/16 action=src-nat to-addresses=10.139.14.1 comment="" disabled=no
add chain=srcnat src-address="172.16.0.0/12" dst-address=!172.16.0.0/12 protocol=!ospf action=src-nat to-addresses=10.139.14.1 comment="" disabled=no
#
# BGP Routing
# BGP & OSPF Filters
:foreach i in [/routing filter find chain=ospf-in] do={/routing filter remove $i;}
:foreach i in [/routing filter find chain=ospf-out] do={/routing filter remove $i;}
:foreach i in [/routing filter find chain=ebgp-in] do={/routing filter remove $i;}
:foreach i in [/routing filter find chain=ebgp-out] do={/routing filter remove $i;}
/ routing filter
add action=discard chain=ebgp-in comment="1. Discard insert non 10.x routes from BGP peer" disabled=no invert-match=no prefix=!10.0.0.0/8 prefix-length=!8-32
add action=discard chain=ebgp-out comment="2. Discard send non 10.x routes to BGP peer" disabled=no invert-match=no prefix=!10.0.0.0/8 prefix-length=!8-32
add action=accept chain=ospf-in comment="3. Accept insert 10.x routes from OSPF neighbor" disabled=no invert-match=no prefix=10.0.0.0/8 prefix-length=8-32
add action=accept chain=ospf-in comment="4. Accept insert 172.x routes from OSPF neighbor" disabled=no invert-match=no prefix=172.16.0.0/12 prefix-length=8-32
add action=discard chain=ospf-in comment="5. Discard insert non 10.x and 172.x from OSPF neighbor" disabled=no invert-match=no
add action=accept chain=ospf-out comment="6. Allow send 10.x routes to OSPF neighbor" disabled=no invert-match=no prefix=10.0.0.0/8 prefix-length=8-32
add action=accept chain=ospf-out comment="7. Allow send 172.x routes to OSPF neighbor" disabled=no invert-match=no prefix=172.16.0.0/12 prefix-length=8-32
add action=discard chain=ospf-out comment="8. Discard send non 10.x and 172.x to OSPF neighbor" disabled=no invert-match=no
#
# BGP instance
/ routing bgp instance
set default name="default" as=5882 router-id=10.139.14.1 \
redistribute-connected=no redistribute-static=no redistribute-rip=no \
redistribute-ospf=yes redistribute-other-bgp=yes out-filter=ebgp-out \
client-to-client-reflection=yes comment="" disabled=no
#
# OSPF Routing
/routing ospf instance set default name=default router-id=10.139.14.1 comment="" disabled=no distribute-default=never \
redistribute-bgp=as-type-1 redistribute-connected=no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no in-filter=ospf-in out-filter=ospf-out
#
:log info "Unsolclic for 5882-AlbMMontSTSud executed."
/