# Generated for:
# RouterOSv3.x
:log info "Unsolclic for 12372-HostaletsPuigsagordi going to be executed."
#
# Configuration for RouterOSv3.x
# Device: 12372-HostaletsPuigsagordi
#
# 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=HostaletsPuigsagordi
#
# DNS (client & server cache) zone: 2447
/ip dns set primary-dns=10.138.71.3 secondary-dns=10.138.0.2 allow-remote-requests=yes
:delay 1
#
# NTP (client & server cache) zone: 2447
/system ntp client set enabled=yes mode=unicast primary-ntp=10.138.71.3 secondary-ntp=10.138.0.2
: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="CNTTVCentelles"
#
# 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 HostaletsPgsgrdAPNord
/interface wireless set wlan1 name="wlan1" \
radio-name="HostaletsPgsgrdAPNord" mode=ap-bridge ssid="guifi.net-HostaletsPgsgrdAPNord" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2412 \
dfs-mode=none \
antenna-mode=ant-a 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.138.86.161/27"] do={remove $i}
/ ip address add address=10.138.86.161/27 network=10.138.86.160 broadcast=10.138.86.191 interface=wLan/Lan disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.86.160/27] do={/routing bgp network remove $i;}
add network=10.138.86.160/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.138.86.160/27] do={/routing ospf network remove $i;}
add network=10.138.86.160/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.138.86.167-10.138.86.190
: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.138.86.160/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.86.160/27 gateway=10.138.86.161 domain=guifi.net comment=dhcp-wLan/Lan
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.86.163 mac-address=00:15:6D:A8:BF:D0 client-id=HostaletsFrancescRd2 server=dhcp-wLan/Lan
add address=10.138.86.165 mac-address=00:15:6D:A7:BF:FE client-id=HostaletsBessonesRd2 server=dhcp-wLan/Lan
add address=10.138.86.166 mac-address=00:15:6D:AD:6E:BE client-id=HdBMarcelesrubRd1 server=dhcp-wLan/Lan
add address=10.138.86.167 mac-address=00:15:6D:AA:CD:2E client-id=HostaletsRodriguezRd2 server=dhcp-wLan/Lan
add address=10.138.86.168 mac-address=00:15:6D:A7:B7:A4 client-id=HostaletsVilaltaRd2 server=dhcp-wLan/Lan
add address=10.138.86.169 mac-address=00:15:6D:A7:C0:34 client-id=HostaletsEnricRd1 server=dhcp-wLan/Lan
add address=10.138.86.170 mac-address=00:16:01:AF:D8:46 client-id=PPUIGRadio1 server=dhcp-wLan/Lan
add address=10.138.86.171 mac-address=00:15:6D:D4:77:49 client-id=HostaletsRosaRd1 server=dhcp-wLan/Lan
add address=10.138.86.173 mac-address=00:15:6D:D4:78:10 client-id=HostaletsJimenezRd1 server=dhcp-wLan/Lan
add address=10.138.86.174 mac-address=00:15:6D:A9:CD:2B client-id=HostaletsToniRd1 server=dhcp-wLan/Lan
add address=10.138.86.176 mac-address=00:16:01:AD:03:3B client-id=HostaletsSergiRadio2 server=dhcp-wLan/Lan
add address=10.138.86.177 mac-address=FF:FF:10:00:00:00 client-id=CNTPPMRd1 server=dhcp-wLan/Lan
add address=10.138.86.178 mac-address=00:15:6D:AD:D8:15 client-id=HostaletsSandRd1 server=dhcp-wLan/Lan
add address=10.138.86.179 mac-address=00:15:6D:D5:77:86 client-id=HostaletsJMMolistRd1 server=dhcp-wLan/Lan
add address=10.138.86.180 mac-address=00:15:6D:D4:77:52 client-id=HostaletsMaideuRd1 server=dhcp-wLan/Lan
add address=10.138.86.181 mac-address=00:15:6D:E5:7D:9C client-id=HostaletsInformticsRd3 server=dhcp-wLan/Lan
add address=10.138.86.182 mac-address=00:15:6D:1A:07:C5 client-id=HSTLTScrrtrrbs73Rd1 server=dhcp-wLan/Lan
add address=10.138.86.183 mac-address=00:1D:7E:BC:E2:0B client-id=HostaletPasserellsST1 server=dhcp-wLan/Lan
add address=10.138.86.184 mac-address=00:15:6D:D4:77:20 client-id=HostaletsMasCanPlaneRd1 server=dhcp-wLan/Lan
add address=10.138.86.185 mac-address=00:15:6D:D7:90:9C client-id=HostaletsSilviaRd1 server=dhcp-wLan/Lan
add address=10.138.86.186 mac-address=00:15:6D:E4:7C:EF client-id=HstltsJrdRd1 server=dhcp-wLan/Lan
add address=10.138.86.187 mac-address=00:15:6D:D4:77:53 client-id=HostaletsLauraRd1 server=dhcp-wLan/Lan
add address=10.138.86.188 mac-address=00:15:6D:AC:FE:1B client-id=HostMasiaAumetRd1 server=dhcp-wLan/Lan
add address=10.138.86.189 mac-address=00:15:6D:A9:CD:2B client-id=HostaletsPozueloRd2 server=dhcp-wLan/Lan
add address=10.138.86.190 mac-address=00:15:6D:A7:C1:F0 client-id=HostaletsJMolistRd2 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 HostaletsPgsgrdAP5Nord
/interface wireless set wlan2 name="wlan2" \
radio-name="HostaletsPgsgrdAP5Nord" mode=ap-bridge ssid="guifi.net-HostaletsPgsgrdAP5Nord" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5700 \
dfs-mode=none \
antenna-mode=ant-a 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.138.86.193/27"] do={remove $i}
/ ip address add address=10.138.86.193/27 network=10.138.86.192 broadcast=10.138.86.223 interface=wlan2 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.86.192/27] do={/routing bgp network remove $i;}
add network=10.138.86.192/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan2] do={/routing ospf interface remove $i;}
add interface=wlan2
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.86.192/27] do={/routing ospf network remove $i;}
add network=10.138.86.192/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan2] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan2 ranges=10.138.86.199-10.138.86.222
:foreach i in [/ip dhcp-server find name=dhcp-wlan2] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan2 interface=wlan2 address-pool=dhcp-wlan2 disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.86.192/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.86.192/27 gateway=10.138.86.193 domain=guifi.net comment=dhcp-wlan2
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.86.194 mac-address=00:15:6D:3E:84:04 client-id=CNTJvivet server=dhcp-wlan2
add address=10.138.86.195 mac-address=00:15:6D:1E:B4:C4 client-id=HdBEBARHostaletsRd1 server=dhcp-wlan2
add address=10.138.86.196 mac-address=00:15:6D:D0:FD:3B client-id=HostaletsFinaRd1 server=dhcp-wlan2
add address=10.138.86.197 mac-address=00:15:6D:BE:E7:4D client-id=HostaletsNereaRd1 server=dhcp-wlan2
add address=10.138.86.198 mac-address=00:15:6D:BD:D5:DE client-id=CNTCSarrateRd1 server=dhcp-wlan2
add address=10.138.86.199 mac-address=00:15:6D:BD:D5:B1 client-id=CNTCrisSRd1 server=dhcp-wlan2
add address=10.138.86.200 mac-address=00:15:6D:D1:FD:3C client-id=HostaletsMargaRd1 server=dhcp-wlan2
add address=10.138.86.201 mac-address=00:15:6D:BE:E6:52 client-id=HostaletsOuissamRd1 server=dhcp-wlan2
add address=10.138.86.202 mac-address=00:15:6D:C0:B5:A6 client-id=CNTCiuroRd2 server=dhcp-wlan2
add address=10.138.86.203 mac-address=00:15:6D:D2:56:78 client-id=SMBMasRiquerRd1 server=dhcp-wlan2
add address=10.138.86.204 mac-address=00:15:6D:D8:0D:E6 client-id=CNTTanaRd1 server=dhcp-wlan2
add address=10.138.86.205 mac-address=01:01:01:02:02:03 client-id=TonaFPuenteRd2 server=dhcp-wlan2
add address=10.138.86.206 mac-address=00:15:6D:BD:D5:2B client-id=CNTDavidPRd1 server=dhcp-wlan2
add address=10.138.86.207 mac-address=00:15:6D:9E:1E:F3 client-id=HostaletsTaniaRd1 server=dhcp-wlan2
add address=10.138.86.208 mac-address=02:02:02:03:03:04 client-id=CNTFPuenteRd1 server=dhcp-wlan2
add address=10.138.86.209 mac-address=00:15:6D:BD:D4:AF client-id=CNTFrancescRRd1 server=dhcp-wlan2
add address=10.138.86.210 mac-address=00:27:22:32:9A:8F client-id=CNTRafaRd1 server=dhcp-wlan2
add address=10.138.86.211 mac-address=00:15:6D:DC:73:C8 client-id=CNTStJoanRd1 server=dhcp-wlan2
add address=10.138.86.212 mac-address=00:15:6D:BD:D4:E2 client-id=CNTIgorRd1 server=dhcp-wlan2
add address=10.138.86.213 mac-address=00:15:6D:EA:EC:3D client-id=HDBPuigBalenyaRd1 server=dhcp-wlan2
add address=10.138.86.214 mac-address=00:15:6D:D1:FC:A7 client-id=HostaletsVidalRd1 server=dhcp-wlan2
add address=10.138.86.215 mac-address=00:15:6D:D2:4E:3E client-id=HostaletsFontRd1 server=dhcp-wlan2
add address=10.138.86.216 mac-address=00:15:6D:DD:75:72 client-id=SEVACabaRd1 server=dhcp-wlan2
add address=10.138.86.217 mac-address=00:0C:42:26:DF:97 client-id=CNTMatRd1 server=dhcp-wlan2
add address=10.138.86.218 mac-address=00:15:6D:B5:1D:30 client-id=HostaletsCogullada7Rd2 server=dhcp-wlan2
add address=10.138.86.219 mac-address=00:15:6D:E6:8E:E5 client-id=SMBSDCorreaRd1 server=dhcp-wlan2
add address=10.138.86.220 mac-address=00:15:6D:F2:22:F4 client-id=CNTMCasanovasRd1 server=dhcp-wlan2
add address=10.138.86.221 mac-address=00:11:22:33:44:56 client-id=CNTXtrigRd1 server=dhcp-wlan2
add address=10.138.86.222 mac-address=00:15:6D:A0:7D:09 client-id=HostaletsDachsRd1 server=dhcp-wlan2
#
:delay 1
#
# Radio#: 2 HostaletsPgsgrdAPSud
/interface wireless set wlan3 name="wlan3" \
radio-name="HostaletsPgsgrdAPSud" mode=ap-bridge ssid="guifi.net-HostaletsPgsgrdAPSud" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2462 \
dfs-mode=none \
antenna-mode=ant-a 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.138.86.225/27"] do={remove $i}
/ ip address add address=10.138.86.225/27 network=10.138.86.224 broadcast=10.138.86.255 interface=wlan3 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.86.224/27] do={/routing bgp network remove $i;}
add network=10.138.86.224/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.138.86.224/27] do={/routing ospf network remove $i;}
add network=10.138.86.224/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.138.86.231-10.138.86.254
: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.138.86.224/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.86.224/27 gateway=10.138.86.225 domain=guifi.net comment=dhcp-wlan3
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.86.226 mac-address=00:15:6D:AB:F6:C6 client-id=HostaletsSuriRd1 server=dhcp-wlan3
add address=10.138.86.227 mac-address=00:15:6D:D5:77:83 client-id=HostaletshernandezRd2 server=dhcp-wlan3
add address=10.138.86.228 mac-address=00:1D:7E:C6:74:D2 client-id=HostaletsLaraRd2 server=dhcp-wlan3
add address=10.138.86.229 mac-address=00:15:6D:1A:05:BB client-id=HostaletsAdriaRd2 server=dhcp-wlan3
add address=10.138.86.230 mac-address=00:15:6D:AE:15:C8 client-id=HostaletsDanielRd1 server=dhcp-wlan3
add address=10.138.86.231 mac-address=00:16:B6:1F:F4:CD client-id=HdBPilarRd1 server=dhcp-wlan3
add address=10.138.86.232 mac-address=00:15:6D:AD:D7:D3 client-id=CNTTrufaRd3 server=dhcp-wlan3
add address=10.138.86.233 mac-address=00:22:6B:60:EB:C6 client-id=CNTLLOPRd1 server=dhcp-wlan3
add address=10.138.86.234 mac-address=00:27:22:4C:4A:09 client-id=HostaletsJosepPla server=dhcp-wlan3
add address=10.138.86.235 mac-address=00:15:6D:1A:07:79 client-id=HostaletsCogullada29Rd1 server=dhcp-wlan3
add address=10.138.86.236 mac-address=00:15:6D:A7:C2:44 client-id=HostaletsBusquetsRd2 server=dhcp-wlan3
add address=10.138.86.237 mac-address=00:C0:CA:1D:A2:EE client-id=CNTblaksammerRd1 server=dhcp-wlan3
add address=10.138.86.238 mac-address=00:15:00:06:96:60 client-id=HostaletsPereVinasRd1 server=dhcp-wlan3
add address=10.138.86.239 mac-address=00:23:69:2A:79:10 client-id=SEVArariRd1 server=dhcp-wlan3
add address=10.138.86.240 mac-address=00:15:6D:AC:67:21 client-id=CNTCanCuaRd1 server=dhcp-wlan3
add address=10.138.86.241 mac-address=00:1D:7E:C6:BA:CC client-id=HostaletsPedroRd1 server=dhcp-wlan3
add address=10.138.86.242 mac-address=00:15:6D:DA:B7:70 client-id=HostaletsJavi2Rd1 server=dhcp-wlan3
add address=10.138.86.243 mac-address=00:15:6D:D3:E0:A2 client-id=HDBMontserratRd1 server=dhcp-wlan3
add address=10.138.86.244 mac-address=00:15:6D:DA:B6:AE client-id=HostaletsMaiteRd2 server=dhcp-wlan3
add address=10.138.86.245 mac-address=00:15:6D:AE:16:C7 client-id=HostaletsMariRd2 server=dhcp-wlan3
add address=10.138.86.246 mac-address=00:15:6D:E5:7C:F3 client-id=HostaletsMagdaRd1 server=dhcp-wlan3
add address=10.138.86.247 mac-address=00:15:6D:D4:77:4E client-id=HostaletsRibesRd2 server=dhcp-wlan3
add address=10.138.86.248 mac-address=00:01:02:03:04:06 client-id=HostaletsSandrRd2 server=dhcp-wlan3
add address=10.138.86.249 mac-address=00:15:6D:E5:7C:8C client-id=HostaletsPlEsponaRd2 server=dhcp-wlan3
add address=10.138.86.250 mac-address=00:16:01:F4:CB:CB client-id=HostaletsMolistRd1 server=dhcp-wlan3
add address=10.138.86.251 mac-address=00:16:01:AF:D8:45 client-id=HostaletsPPUIGRd2 server=dhcp-wlan3
add address=10.138.86.252 mac-address=00:15:6D:E5:7E:21 client-id=HostaletsAlbaRd1 server=dhcp-wlan3
add address=10.138.86.253 mac-address=00:15:6D:E5:7C:8B client-id=HostaletsBortRd1 server=dhcp-wlan3
add address=10.138.86.254 mac-address=00:15:6D:F9:2E:EE client-id=HostaletsIsidreRd1 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 HostaletsPgsgrdAP5Sud
/interface wireless set wlan4 name="wlan4" \
radio-name="HostaletsPgsgrdAP5Sud" mode=ap-bridge ssid="guifi.net-HostaletsPgsgrdAP5Sud" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5320 \
dfs-mode=none \
antenna-mode=ant-a 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.138.87.161/27"] do={remove $i}
/ ip address add address=10.138.87.161/27 network=10.138.87.160 broadcast=10.138.87.191 interface=wlan4 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.87.160/27] do={/routing bgp network remove $i;}
add network=10.138.87.160/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan4] do={/routing ospf interface remove $i;}
add interface=wlan4
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.87.160/27] do={/routing ospf network remove $i;}
add network=10.138.87.160/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan4] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan4 ranges=10.138.87.167-10.138.87.190
:foreach i in [/ip dhcp-server find name=dhcp-wlan4] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan4 interface=wlan4 address-pool=dhcp-wlan4 disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.87.160/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.87.160/27 gateway=10.138.87.161 domain=guifi.net comment=dhcp-wlan4
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.87.162 mac-address=00:15:6D:BD:E7:5F client-id=HostaletsMasUsartRd1 server=dhcp-wlan4
add address=10.138.87.163 mac-address=00:15:6D:BE:E6:54 client-id=HostaletsPratRd1 server=dhcp-wlan4
add address=10.138.87.164 mac-address=00:15:6D:D2:56:DB client-id=CNTEJoanFontRd1 server=dhcp-wlan4
add address=10.138.87.165 mac-address=00:15:6D:7C:FE:5E client-id=HostaletsAPuigseslloRd1 server=dhcp-wlan4
add address=10.138.87.166 mac-address=00:15:6D:D4:7E:7F client-id=CNTEJFontarneuRd1 server=dhcp-wlan4
add address=10.138.87.167 mac-address=00:15:6D:D1:FC:89 client-id=CNTTraCatalunyaArumRd1 server=dhcp-wlan4
add address=10.138.87.168 mac-address=00:15:6D:BD:D4:E0 client-id=CNTIsabelRd1 server=dhcp-wlan4
add address=10.138.87.169 mac-address=00:15:6D:BD:D5:B5 client-id=CNTJonRd1 server=dhcp-wlan4
add address=10.138.87.170 mac-address=00:27:22:2A:6E:57 client-id=CNTVillenaRd2 server=dhcp-wlan4
add address=10.138.87.171 mac-address=00:15:6D:D0:FC:16 client-id=HostaletsFreixiRd1 server=dhcp-wlan4
add address=10.138.87.172 mac-address=00:15:6D:D0:FD:3B client-id=HostaletsManelRd1 server=dhcp-wlan4
add address=10.138.87.173 mac-address=00:15:6D:B9:23:DE client-id=HostaletsFernandoRd2 server=dhcp-wlan4
add address=10.138.87.174 mac-address=00:15:6D:D3:4B:27 client-id=HostaletsMajor98Rd1 server=dhcp-wlan4
add address=10.138.87.175 mac-address=00:0B:6B:81:D6:2D client-id=HostaletsMarcRadio1 server=dhcp-wlan4
add address=10.138.87.176 mac-address=00:15:6D:A0:EA:52 client-id=CNTISaezRd1 server=dhcp-wlan4
add address=10.138.87.177 mac-address=00:15:6D:F6:BE:B8 client-id=CNTcondesRd1 server=dhcp-wlan4
add address=10.138.87.178 mac-address=00:15:6D:D2:4B:8C client-id=CNTteuleriaRd1 server=dhcp-wlan4
add address=10.138.87.179 mac-address=00:15:6D:F3:3C:64 client-id=HostMartinezRd7 server=dhcp-wlan4
add address=10.138.87.180 mac-address=00:15:6D:EE:A6:45 client-id=CNTfolchtorres15Rd2 server=dhcp-wlan4
add address=10.138.87.181 mac-address=00:15:6D:EA:F1:39 client-id=HDBPauVI41Rd1 server=dhcp-wlan4
add address=10.138.87.182 mac-address=00:0C:42:05:84:64 client-id=HostaletsAudioPRd1 server=dhcp-wlan4
add address=10.138.87.183 mac-address=00:15:6D:E6:49:B8 client-id=HostaletsEliRd1 server=dhcp-wlan4
add address=10.138.87.184 mac-address=00:15:6D:FF:B1:8F client-id=CNTJF71RMBRd1 server=dhcp-wlan4
add address=10.138.87.185 mac-address=00:15:6D:D0:FD:72 client-id=HostaletsKhadijaRd2 server=dhcp-wlan4
add address=10.138.87.186 mac-address=01:02:03:01:02:04 client-id=CNTFelixPuente2Rd1 server=dhcp-wlan4
add address=10.138.87.187 mac-address=00:15:6D:BD:FE:CF client-id=CNTgavarra29Rd3 server=dhcp-wlan4
add address=10.138.87.188 mac-address=00:19:3B:81:1E:1B client-id=HostaletsJoanMiro24Rd1 server=dhcp-wlan4
add address=10.138.87.189 mac-address=00:15:6D:7E:F5:25 client-id=HostaletspepRd1 server=dhcp-wlan4
add address=10.138.87.190 mac-address=00:01:02:03:04:06 client-id=CNTBacRd1 server=dhcp-wlan4
#
: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;}
#
:delay 1
#
# Radio#: 4 HstltsPgsgrd-HstltsFpa
/interface wireless set wlan5 name="wlan5" \
radio-name="HstltsPgsgrd-HstltsFpa" mode=ap-bridge ssid="guifi.net-HstltsPgsgrd-HstltsFpa" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5680 \
dfs-mode=none \
antenna-mode=ant-a 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=wlan5] \
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_HostaletsFpasauRd1" master-interface=wlan5 wds-address=00:0B:6B:DF:FB:16 disabled=no
/ ip address add address=172.25.0.178/30 network=172.25.0.176 broadcast=172.25.0.179 interface=wds_HostaletsFpasauRd1 disabled=no comment="wds_HostaletsFpasauRd1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_HostaletsFpasauRd1] do={/routing ospf interface remove $i;}
add interface=wds_HostaletsFpasauRd1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.176/30] do={/routing ospf network remove $i;}
add network=172.25.0.176/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=HostaletsFpasauRd1] do={/routing bgp peer remove $i;}
add name="HostaletsFpasauRd1" instance=default remote-address=172.25.0.177 remote-as=19068 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 5 HstltsPgsgrd-FIGCanBosc
/interface wireless set wlan6 name="wlan6" \
radio-name="HstltsPgsgrd-FIGCanBosc" mode=ap-bridge ssid="guifi.net-HstltsPgsgrd-FIGCanBosc" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=21 \
frequency=5560 \
dfs-mode=none \
antenna-mode=ant-a 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=wlan6] \
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_FIGMCanBoscRd1" master-interface=wlan6 wds-address=00:0C:42:39:49:E6 disabled=no
/ ip address add address=172.25.36.82/30 network=172.25.36.80 broadcast=172.25.36.83 interface=wds_FIGMCanBoscRd1 disabled=no comment="wds_FIGMCanBoscRd1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_FIGMCanBoscRd1] do={/routing ospf interface remove $i;}
add interface=wds_FIGMCanBoscRd1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.36.80/30] do={/routing ospf network remove $i;}
add network=172.25.36.80/30 area=backbone disabled=yes
/ routing bgp peer
:foreach i in [find name=FIGMCanBoscRd1] do={/routing bgp peer remove $i;}
add name="FIGMCanBoscRd1" instance=default remote-address=172.25.36.81 remote-as=16198 \
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.1.48/30] do={/routing ospf network remove $i;}
add network=172.25.1.48/30 area=backbone disabled=yes
/ routing bgp peer
:foreach i in [find name=CNTTVCentellesST2] do={/routing bgp peer remove $i;}
add name="CNTTVCentellesST2" instance=default remote-address=172.25.1.49 remote-as=4231 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=no
:foreach i in [/ip address find address="172.25.1.50/30"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.1.50/30 network=172.25.1.48 broadcast=172.25.1.51 interface=ether1 disabled=no comment="CNTTVCentellesST2"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=other] do={/routing ospf interface remove $i;}
add interface=other
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.1.216/30] do={/routing ospf network remove $i;}
add network=172.25.1.216/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=HostaletsPuigsagordiSt2] do={/routing bgp peer remove $i;}
add name="HostaletsPuigsagordiSt2" instance=default remote-address=172.25.1.217 remote-as=34450 \
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.1.218/30"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.1.218/30 network=172.25.1.216 broadcast=172.25.1.219 interface=other disabled=no comment="HostaletsPuigsagordiSt2"
#
# 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.138.86.161 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.138.86.161 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=12372 router-id=10.138.86.161 \
redistribute-connected=yes redistribute-static=yes redistribute-rip=yes \
redistribute-ospf=yes redistribute-other-bgp=yes out-filter=ebgp-out \
client-to-client-reflection=yes comment="" disabled=no
#
# OSPF Routing
/routing ospf set router-id=10.138.86.161 distribute-default=never redistribute-connected=no \
redistribute-static=no redistribute-rip=no redistribute-bgp=as-type-1
#
:log info "Unsolclic for 12372-HostaletsPuigsagordi executed."
/