# Generated for:
# RouterOSv3.x
:log info "Unsolclic for 4016-CNTElTussolRadio1 going to be executed."
#
# Configuration for RouterOSv3.x
# Device: 4016-CNTElTussolRadio1
#
# 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=CNTElTussolRadio1
#
# 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="CNTElTussol"
#
# 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 CNTElTussolAp1-SudOest
/interface wireless set wlan1 name="wlan1" \
radio-name="CNTElTussolAp1-SudOest" mode=ap-bridge ssid="guifi.net-CNTElTussolAp1-SudOest" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2427 \
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.71.161/27"] do={remove $i}
/ ip address add address=10.138.71.161/27 network=10.138.71.160 broadcast=10.138.71.191 interface=wLan/Lan disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.71.160/27] do={/routing bgp network remove $i;}
add network=10.138.71.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.71.160/27] do={/routing ospf network remove $i;}
add network=10.138.71.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.71.167-10.138.71.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.71.160/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.71.160/27 gateway=10.138.71.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.71.162 mac-address=ff:ff:ff:ff:ff:ff client-id=CNTRamonVRadio1 server=dhcp-wLan/Lan
add address=10.138.71.163 mac-address=ff:ff:ff:ff:ff:ff client-id=CNTElTussolveins server=dhcp-wLan/Lan
add address=10.138.71.164 mac-address=00:15:6D:A6:66:46 client-id=CNTRamonSRadio1 server=dhcp-wLan/Lan
add address=10.138.71.165 mac-address=ff:ff:ff:ff:ff:ff client-id=CNTElTussolveins2 server=dhcp-wLan/Lan
add address=10.138.71.166 mac-address=00:1D:0F:AE:CB:8B client-id=CNTLluisRRadio1 server=dhcp-wLan/Lan
add address=10.138.71.167 mac-address=00:0C:42:05:98:F3 client-id=CNTCasalFMRadio1 server=dhcp-wLan/Lan
add address=10.138.71.169 mac-address=00:1C:10:36:50:BD client-id=cntjesusRadio1 server=dhcp-wLan/Lan
add address=10.138.71.170 mac-address=00:00:00:00:00:00 client-id=CNTElTussolveins3 server=dhcp-wLan/Lan
add address=10.138.71.171 mac-address=00:16:01:AF:EF:0A client-id=CNTgirventRadio1 server=dhcp-wLan/Lan
add address=10.138.71.172 mac-address=00:1C:10:91:44:FB client-id=CNTRocioRadio1 server=dhcp-wLan/Lan
add address=10.138.71.173 mac-address=00:1C:10:36:58:34 client-id=CNTFRibeRadio2 server=dhcp-wLan/Lan
add address=10.138.71.174 mac-address=00:1D:7E:28:08:63 client-id=CNTSURIRadio1 server=dhcp-wLan/Lan
add address=10.138.71.175 mac-address=00:16:E6:3C:95:B4 client-id=CNTSanchezRadio1 server=dhcp-wLan/Lan
add address=10.138.71.176 mac-address=00:16:01:8E:E7:44 client-id=Josepfs server=dhcp-wLan/Lan
add address=10.138.71.177 mac-address=00:1D:7E:ED:25:A0 client-id=CntMaiteGallifapRadio1 server=dhcp-wLan/Lan
add address=10.138.71.178 mac-address=00:16:01:16:3D:0D client-id=CNTCanCases2Rd3 server=dhcp-wLan/Lan
add address=10.138.71.179 mac-address=00:1D:7E:28:17:AB client-id=CNTCLIMENTRadio1 server=dhcp-wLan/Lan
add address=10.138.71.180 mac-address=00:21:27:CA:D7:C9 client-id=CNTDanielARadio1 server=dhcp-wLan/Lan
add address=10.138.71.181 mac-address=00:1A:70:DF:AA:D7 client-id=CNTPLAAYSARadio1 server=dhcp-wLan/Lan
add address=10.138.71.182 mac-address=00:1A:70:7B:6B:CE client-id=CNTlluisfabreRadio3 server=dhcp-wLan/Lan
add address=10.138.71.183 mac-address=00:0B:6B:09:D7:50 client-id=CNTJosepPRadio1 server=dhcp-wLan/Lan
add address=10.138.71.184 mac-address=00:16:01:B0:57:79 client-id=CNTcabreRadio1 server=dhcp-wLan/Lan
add address=10.138.71.185 mac-address=00:19:E0:67:1C:5D client-id=CNTmasRadio1 server=dhcp-wLan/Lan
add address=10.138.71.186 mac-address=00:00:00:00:00:00 client-id=CNTElTussolveins4 server=dhcp-wLan/Lan
add address=10.138.71.187 mac-address=ff:ff:ff:ff:ff:ff client-id=CNTLaiaRadio1 server=dhcp-wLan/Lan
add address=10.138.71.188 mac-address=00:19:E0:67:8E:9E client-id=CNTespunyaRadio1 server=dhcp-wLan/Lan
add address=10.138.71.189 mac-address=00:0C:42:27:40:96 client-id=CNTjuancarlosRadio1 server=dhcp-wLan/Lan
add address=10.138.71.190 mac-address=00:1D:7E:C7:09:0E client-id=CNTPereRadio1 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 CNTElTussol-ElPipa
/interface wireless set wlan2 name="wlan2" \
radio-name="CNTElTussol-ElPipa" mode=ap-bridge ssid="guifi.net-CNTElTussol-ElPipa" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=21 \
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: 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_CNTElPipaST1" master-interface=wlan2 wds-address=00:0B:6B:57:E9:2A disabled=no
/ ip address add address=172.25.3.185/30 network=172.25.3.184 broadcast=172.25.3.187 interface=wds_CNTElPipaST1 disabled=no comment="wds_CNTElPipaST1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_CNTElPipaST1] do={/routing ospf interface remove $i;}
add interface=wds_CNTElPipaST1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.3.184/30] do={/routing ospf network remove $i;}
add network=172.25.3.184/30 area=backbone disabled=yes
/ routing bgp peer
:foreach i in [find name=CNTElPipaST1] do={/routing bgp peer remove $i;}
add name="CNTElPipaST1" instance=default remote-address=172.25.3.186 remote-as=4010 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=no
#
:delay 1
#
# Radio#: 2 CNTElTussolAp2-SudEst
/interface wireless set wlan3 name="wlan3" \
radio-name="CNTElTussolAp2-SudEst" mode=ap-bridge ssid="guifi.net-CNTElTussolAp2-SudEst" \
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
/ip address
:foreach i in [find address="10.138.71.193/27"] do={remove $i}
/ ip address add address=10.138.71.193/27 network=10.138.71.192 broadcast=10.138.71.223 interface=wlan3 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.71.192/27] do={/routing bgp network remove $i;}
add network=10.138.71.192/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.71.192/27] do={/routing ospf network remove $i;}
add network=10.138.71.192/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.71.199-10.138.71.222
: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.71.192/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.71.192/27 gateway=10.138.71.193 domain=guifi.net comment=dhcp-wlan3
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.71.194 mac-address=00:15:6D:AE:09:1A client-id=CNTTarragona33Rd1 server=dhcp-wlan3
add address=10.138.71.195 mac-address=00:1A:70:4F:22:DE client-id=CNTESantFerran server=dhcp-wlan3
add address=10.138.71.196 mac-address=00:15:6D:F2:B3:47 client-id=CNTAugustinaRd1 server=dhcp-wlan3
add address=10.138.71.197 mac-address=00:16:01:F2:14:10 client-id=CNTCurtidorsRadio2 server=dhcp-wlan3
add address=10.138.71.198 mac-address=00:15:6D:A7:C1:33 client-id=CNTerTerrassa server=dhcp-wlan3
add address=10.138.71.199 mac-address=00:19:E0:67:45:17 client-id=CNTDiagonal27Rd2 server=dhcp-wlan3
add address=10.138.71.200 mac-address=00:15:6D:A9:B9:5C client-id=CNTIndustria6Rd1 server=dhcp-wlan3
add address=10.138.71.201 mac-address=00:16:01:92:59:9F client-id=CNTElsSotsRadio server=dhcp-wlan3
add address=10.138.71.202 mac-address=00:0C:42:25:41:F0 client-id=CNTHernandezRd2 server=dhcp-wlan3
add address=10.138.71.203 mac-address=00:16:01:F2:2E:77 client-id=CNTcomtes4Rd1 server=dhcp-wlan3
add address=10.138.71.204 mac-address=00:15:6D:8A:9E:62 client-id=CNTPepGirvRd1 server=dhcp-wlan3
add address=10.138.71.205 mac-address=00:16:01:AE:F5:CF client-id=CNTGirbentRadio1 server=dhcp-wlan3
add address=10.138.71.206 mac-address=00:1A:70:4F:42:B3 client-id=CNTgrauRadio2 server=dhcp-wlan3
add address=10.138.71.207 mac-address=00:1A:70:64:E7:56 client-id=CNTsantmiquelRadio2 server=dhcp-wlan3
add address=10.138.71.208 mac-address=00:AD:0F:AE:8C:B0 client-id=CNTIndustriaFMRd1 server=dhcp-wlan3
add address=10.138.71.209 mac-address=00:1A:70:4E:BC:3D client-id=CNTMontserratQuatreRadio1 server=dhcp-wlan3
add address=10.138.71.210 mac-address=00:16:01:AE:ED:43 client-id=CNTMatavacasPC server=dhcp-wlan3
add address=10.138.71.211 mac-address=00:1C:10:14:14:CA client-id=CNTMontoliofontRadio1 server=dhcp-wlan3
add address=10.138.71.212 mac-address=00:16:01:F2:30:C2 client-id=CNTLaRoviradeBaixRadio1 server=dhcp-wlan3
add address=10.138.71.213 mac-address=00:1C:10:91:4B:9D client-id=CNTRicardRadio1 server=dhcp-wlan3
add address=10.138.71.214 mac-address=00:1C:10:36:74:61 client-id=CNTJMCasalsRadio1 server=dhcp-wlan3
add address=10.138.71.215 mac-address=00:16:01:B0:0C:8A client-id=CNTRafaelCasanovesRadio1 server=dhcp-wlan3
add address=10.138.71.216 mac-address=00:1C:10:91:4B:B2 client-id=CNTCheRadio1 server=dhcp-wlan3
add address=10.138.71.217 mac-address=00:15:6D:A9:BB:95 client-id=CNTSocosRd1 server=dhcp-wlan3
add address=10.138.71.218 mac-address=00:15:6D:1A:08:0F client-id=CNTJCentRd1 server=dhcp-wlan3
add address=10.138.71.219 mac-address=01:10:02:20:03:31 client-id=CNTCentellesCreuRojaRd1 server=dhcp-wlan3
add address=10.138.71.220 mac-address=00:1D:7E:28:0B:C0 client-id=CNTJosepPlaRadio1 server=dhcp-wlan3
add address=10.138.71.221 mac-address=00:1C:10:13:AE:93 client-id=CNTErnestRadio1 server=dhcp-wlan3
add address=10.138.71.222 mac-address=00:16:01:98:92:F4 client-id=CNTJordijuradaRadio 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 CNTElTussolAp3-NordEst
/interface wireless set wlan4 name="wlan4" \
radio-name="CNTElTussolAp3-NordEst" mode=ap-bridge ssid="guifi.net-CNTElTussolAp3-NordEst" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2467 \
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.71.225/27"] do={remove $i}
/ ip address add address=10.138.71.225/27 network=10.138.71.224 broadcast=10.138.71.255 interface=wlan4 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.71.224/27] do={/routing bgp network remove $i;}
add network=10.138.71.224/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.71.224/27] do={/routing ospf network remove $i;}
add network=10.138.71.224/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.71.231-10.138.71.254
: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.71.224/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.71.224/27 gateway=10.138.71.225 domain=guifi.net comment=dhcp-wlan4
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.71.226 mac-address=00:1D:0F:AE:E2:CC client-id=CNTPuigsagordiRadio1 server=dhcp-wlan4
add address=10.138.71.227 mac-address=00:15:6D:DA:A0:1D client-id=CNTNavRd1 server=dhcp-wlan4
add address=10.138.71.228 mac-address=00:16:01:8E:D6:7C client-id=CNTCMPURadio1 server=dhcp-wlan4
add address=10.138.71.229 mac-address=00:15:6D:A6:79:2B client-id=CNTmonteroRadio1 server=dhcp-wlan4
add address=10.138.71.230 mac-address=00:16:01:92:FD:78 client-id=CNTToniRd2 server=dhcp-wlan4
add address=10.138.71.231 mac-address=00:1D:7E:C6:76:25 client-id=CNTBrechaaRadio1 server=dhcp-wlan4
add address=10.138.71.232 mac-address=00:15:6D:F6:77:D0 client-id=CNTBellSguardRd1 server=dhcp-wlan4
add address=10.138.71.233 mac-address=08:00:69:02:01:FE client-id=CNTFinaFontRadio1 server=dhcp-wlan4
add address=10.138.71.234 mac-address=00:1C:10:14:1B:2F client-id=CNTJuanantonioRadio1 server=dhcp-wlan4
add address=10.138.71.235 mac-address=00:1A:70:79:51:8B client-id=cntbrechaRadio1 server=dhcp-wlan4
add address=10.138.71.236 mac-address=00:16:E6:3C:96:FF client-id=HostaletsLinuesaRd2 server=dhcp-wlan4
add address=10.138.71.237 mac-address=00:1A:70:4E:B5:68 client-id=CNTJJCOROMINARadio1 server=dhcp-wlan4
add address=10.138.71.238 mac-address=00:1A:70:47:B8:88 client-id=CNTNuriRadio1 server=dhcp-wlan4
add address=10.138.71.239 mac-address=00:16:01:F2:31:35 client-id=CNTnaranjoRadio1 server=dhcp-wlan4
add address=10.138.71.240 mac-address=00:0C:42:16:6A:DD client-id=CNTJordiBRadio1 server=dhcp-wlan4
add address=10.138.71.241 mac-address=00:1D:7E:28:19:8E client-id=CNTramosRadio1 server=dhcp-wlan4
add address=10.138.71.242 mac-address=00:80:48:4E:FF:9E client-id=CNTJosepFRadio1 server=dhcp-wlan4
add address=10.138.71.243 mac-address=00:1C:10:91:3E:F9 client-id=CNTGaudiRadio1 server=dhcp-wlan4
add address=10.138.71.244 mac-address=00:1C:10:36:57:24 client-id=cnttoniguardiaRadio1 server=dhcp-wlan4
add address=10.138.71.245 mac-address=00:80:48:4E:FF:A1 client-id=CNTJoanRadio1 server=dhcp-wlan4
add address=10.138.71.246 mac-address=00:1D:7E:28:1B:02 client-id=CNTFutsalRadio1 server=dhcp-wlan4
add address=10.138.71.247 mac-address=00:1D:7E:28:1A:BA client-id=CNTanaRadio1 server=dhcp-wlan4
add address=10.138.71.249 mac-address=00:1C:10:36:4E:2C client-id=cntfalgueresRadio3 server=dhcp-wlan4
add address=10.138.71.250 mac-address=00:1C:10:44:34:EB client-id=CNTJVallsRadio1 server=dhcp-wlan4
add address=10.138.71.251 mac-address=00:15:6D:DA:BA:84 client-id=CNTVicRadio1 server=dhcp-wlan4
add address=10.138.71.252 mac-address=00:16:01:ED:FE:33 client-id=HostbrunetRadio1 server=dhcp-wlan4
add address=10.138.71.253 mac-address=00:80:48:4E:FF:8F client-id=CNTJosepARadio1 server=dhcp-wlan4
add address=10.138.71.254 mac-address=00:16:01:AF:E8:57 client-id=HostaletsMasRadio1 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 CNTTussolAp5Ghz-SudOest
/interface wireless set wlan5 name="wlan5" \
radio-name="CNTTussolAp5Ghz-SudOest" mode=ap-bridge ssid="guifi.net-CNTTussolAp5Ghz-SudOest" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5180 \
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.65/27"] do={remove $i}
/ ip address add address=10.138.86.65/27 network=10.138.86.64 broadcast=10.138.86.95 interface=wlan5 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.86.64/27] do={/routing bgp network remove $i;}
add network=10.138.86.64/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan5] do={/routing ospf interface remove $i;}
add interface=wlan5
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.86.64/27] do={/routing ospf network remove $i;}
add network=10.138.86.64/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan5] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan5 ranges=10.138.86.71-10.138.86.94
:foreach i in [/ip dhcp-server find name=dhcp-wlan5] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan5 interface=wlan5 address-pool=dhcp-wlan5 disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.86.64/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.86.64/27 gateway=10.138.86.65 domain=guifi.net comment=dhcp-wlan5
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.86.66 mac-address=00:15:6D:BE:F6:C7 client-id=CNTFortiaSolaRd1 server=dhcp-wlan5
add address=10.138.86.67 mac-address=00:15:6D:BD:1F:44 client-id=CNTcollsuspina31Rd1 server=dhcp-wlan5
add address=10.138.86.68 mac-address=00:0C:42:E7:70:67 client-id=CNTRIBARd1 server=dhcp-wlan5
add address=10.138.86.69 mac-address=00:15:6D:BE:5E:EF client-id=CNTMagdaGijonRd1 server=dhcp-wlan5
add address=10.138.86.70 mac-address=00:15:6D:D2:5D:07 client-id=CNTcampdelaiguaRd1 server=dhcp-wlan5
add address=10.138.86.72 mac-address=00:15:6D:C0:B5:50 client-id=CNTAReixachRd1 server=dhcp-wlan5
add address=10.138.86.73 mac-address=00:15:6D:DC:73:C8 client-id=CNTMonRd1 server=dhcp-wlan5
add address=10.138.86.74 mac-address=00:15:6D:D7:53:38 client-id=CNTAlSoriaRd1 server=dhcp-wlan5
add address=10.138.86.75 mac-address=00:15:6D:BD:D5:BB client-id=CNTFatiRd1 server=dhcp-wlan5
add address=10.138.86.76 mac-address=00:15:6D:D3:4B:2F client-id=CNTTeixidorsMonicaTussol5APSO server=dhcp-wlan5
add address=10.138.86.77 mac-address=00:15:6D:D2:D7:D4 client-id=CNTEMargoRd1 server=dhcp-wlan5
add address=10.138.86.78 mac-address=00:15:6D:E2:E3:FB client-id=CNTcargolRd1 server=dhcp-wlan5
add address=10.138.86.79 mac-address=00:15:6D:E2:E5:6A client-id=CNTXPrimsRd1 server=dhcp-wlan5
add address=10.138.86.80 mac-address=00:15:6D:55:84:CA client-id=CNTEDARCentellesRd1 server=dhcp-wlan5
add address=10.138.86.81 mac-address=00:0C:42:60:1F:E4 client-id=CNTABSRd1 server=dhcp-wlan5
add address=10.138.86.82 mac-address=00:15:6D:E2:E4:08 client-id=CNTCollsuspina42Rd1 server=dhcp-wlan5
add address=10.138.86.83 mac-address=00:0C:42:48:F6:D1 client-id=CNTMGarcesRadio1 server=dhcp-wlan5
add address=10.138.86.84 mac-address=00:15:00:09:53:E2 client-id=CNTACarmonaRd1 server=dhcp-wlan5
add address=10.138.86.85 mac-address=00:15:6D:E3:E4:95 client-id=CNTLluisMRd1 server=dhcp-wlan5
add address=10.138.86.86 mac-address=00:15:6D:B9:44:E2 client-id=CNTJordiRd2 server=dhcp-wlan5
add address=10.138.86.87 mac-address=00:15:6D:D2:56:96 client-id=CNTNourdineRd2 server=dhcp-wlan5
add address=10.138.86.88 mac-address=00:15:00:09:74:D2 client-id=CNTJordi8Rd1 server=dhcp-wlan5
add address=10.138.86.89 mac-address=00:15:6D:F6:BE:D0 client-id=CNTsantjosep41Rd1 server=dhcp-wlan5
add address=10.138.86.90 mac-address=00:15:6D:F6:77:D0 client-id=CNTJudRd1 server=dhcp-wlan5
add address=10.138.86.91 mac-address=00:15:6D:E2:E5:B3 client-id=CNTJSolaRd1 server=dhcp-wlan5
add address=10.138.86.92 mac-address=00:15:6D:10:FB:D4 client-id=CNTivanRd2 server=dhcp-wlan5
add address=10.138.86.93 mac-address=00:15:6D:E8:E0:0C client-id=CNTDPlaRd1 server=dhcp-wlan5
add address=10.138.86.94 mac-address=00:15:6D:BA:11:73 client-id=CNTvivetRd2 server=dhcp-wlan5
#
: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;}
#
: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;}
#
:delay 1
#
# Radio#: 5 CNTTussolAp5Ghz-SudEst
/interface wireless set wlan6 name="wlan6" \
radio-name="CNTTussolAp5Ghz-SudEst" mode=ap-bridge ssid="guifi.net-CNTTussolAp5Ghz-SudEst" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5240 \
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.97/27"] do={remove $i}
/ ip address add address=10.138.86.97/27 network=10.138.86.96 broadcast=10.138.86.127 interface=wlan6 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.86.96/27] do={/routing bgp network remove $i;}
add network=10.138.86.96/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan6] do={/routing ospf interface remove $i;}
add interface=wlan6
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.86.96/27] do={/routing ospf network remove $i;}
add network=10.138.86.96/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan6] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan6 ranges=10.138.86.103-10.138.86.126
:foreach i in [/ip dhcp-server find name=dhcp-wlan6] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan6 interface=wlan6 address-pool=dhcp-wlan6 disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.86.96/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.86.96/27 gateway=10.138.86.97 domain=guifi.net comment=dhcp-wlan6
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.86.98 mac-address=00:11:22:33:44:56 client-id=CNTAntoRd1 server=dhcp-wlan6
add address=10.138.86.99 mac-address=00:15:6D:31:1A:95 client-id=CNTRiuMunde15Rd1 server=dhcp-wlan6
add address=10.138.86.100 mac-address=00:11:22:33:44:56 client-id=CNTRosellRd1 server=dhcp-wlan6
add address=10.138.86.101 mac-address=00:0C:42:39:0C:10 client-id=CNTsantjosepRd1 server=dhcp-wlan6
add address=10.138.86.102 mac-address=00:15:6D:D0:14:D8 client-id=CNTsantjosep45Rd1 server=dhcp-wlan6
add address=10.138.86.103 mac-address=00:01:02:03:04:06 client-id=CNTGonzRd1 server=dhcp-wlan6
add address=10.138.86.104 mac-address=00:15:6D:BE:F5:DB client-id=CNTTarragona46Rd1 server=dhcp-wlan6
add address=10.138.86.105 mac-address=00:15:6D:D0:95:37 client-id=CNTACDCRd1 server=dhcp-wlan6
add address=10.138.86.106 mac-address=00:15:6D:BE:5F:21 client-id=CNTAMasRd1 server=dhcp-wlan6
add address=10.138.86.107 mac-address=00:27:22:02:14:B0 client-id=CNTGeneralitat7Rd1 server=dhcp-wlan6
add address=10.138.86.108 mac-address=00:15:00:7F:34:89 client-id=CNTJosepHRd1 server=dhcp-wlan6
add address=10.138.86.109 mac-address=00:15:6D:BB:8E:EA client-id=CntJoanRuizRd1 server=dhcp-wlan6
add address=10.138.86.110 mac-address=00:15:6D:B5:B6:12 client-id=CNTbarcelonetaRadio1 server=dhcp-wlan6
add address=10.138.86.111 mac-address=00:15:6D:BC:2F:2F client-id=CNTjesus10Rd1 server=dhcp-wlan6
add address=10.138.86.112 mac-address=00:15:6D:D2:6C:8C client-id=CNTimmaordeigRd1 server=dhcp-wlan6
add address=10.138.86.113 mac-address=00:13:10:1F:A4:A4 client-id=CNTComtCent25Rd1 server=dhcp-wlan6
add address=10.138.86.114 mac-address=00:15:6D:BD:FF:11 client-id=CNTJuanJoRd1 server=dhcp-wlan6
add address=10.138.86.115 mac-address=00:15:6D:D5:A7:88 client-id=CNTMagdaRd1 server=dhcp-wlan6
add address=10.138.86.116 mac-address=08:00:69:02:01:FD client-id=CNTRiumundeNuriaRocaRd1 server=dhcp-wlan6
add address=10.138.86.117 mac-address=00:15:6D:BC:32:5F client-id=CNTAngelRd1 server=dhcp-wlan6
add address=10.138.86.118 mac-address=00:01:02:03:04:06 client-id=CNTTasaRd1 server=dhcp-wlan6
add address=10.138.86.119 mac-address=00:15:6D:BD:FF:F9 client-id=CNTBeltranRd1 server=dhcp-wlan6
add address=10.138.86.120 mac-address=00:15:6D:BD:FE:41 client-id=CNTMiramRd1 server=dhcp-wlan6
add address=10.138.86.121 mac-address=00:15:6D:BB:2E:49 client-id=CNTERauletRd1 server=dhcp-wlan6
add address=10.138.86.122 mac-address=00:15:6D:BE:D4:E3 client-id=CNTJRuizRd1 server=dhcp-wlan6
add address=10.138.86.123 mac-address=00:15:6D:D0:14:D8 client-id=CNTsantjordi14Rd1 server=dhcp-wlan6
add address=10.138.86.124 mac-address=00:15:6D:DC:73:67 client-id=CNTTosqRd1 server=dhcp-wlan6
add address=10.138.86.125 mac-address=00:15:6D:BD:D4:AF client-id=CNTJumiRRd1 server=dhcp-wlan6
add address=10.138.86.126 mac-address=00:15:6D:DC:73:AF client-id=CNTJaumeRRd1 server=dhcp-wlan6
#
: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;}
#
:delay 1
#
# Radio#: 6 CNTTussolAp5Ghz-NordEst
/interface wireless set wlan7 name="wlan7" \
radio-name="CNTTussolAp5Ghz-NordEst" mode=ap-bridge ssid="guifi.net-CNTTussolAp5Ghz-NordEst" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5660 \
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.129/27"] do={remove $i}
/ ip address add address=10.138.86.129/27 network=10.138.86.128 broadcast=10.138.86.159 interface=wlan7 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.86.128/27] do={/routing bgp network remove $i;}
add network=10.138.86.128/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan7] do={/routing ospf interface remove $i;}
add interface=wlan7
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.86.128/27] do={/routing ospf network remove $i;}
add network=10.138.86.128/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan7] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan7 ranges=10.138.86.135-10.138.86.158
:foreach i in [/ip dhcp-server find name=dhcp-wlan7] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan7 interface=wlan7 address-pool=dhcp-wlan7 disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.86.128/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.86.128/27 gateway=10.138.86.129 domain=guifi.net comment=dhcp-wlan7
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.86.130 mac-address=01:02:03:04:05:07 client-id=CNTVicSRd1 server=dhcp-wlan7
add address=10.138.86.131 mac-address=00:15:6D:C0:A5:0A client-id=CNTJordiSGRd2 server=dhcp-wlan7
add address=10.138.86.132 mac-address=00:15:6D:BD:FE:C5 client-id=CNTEvaRd1 server=dhcp-wlan7
add address=10.138.86.133 mac-address=00:15:6D:D8:0C:51 client-id=CNTJSallentRd1 server=dhcp-wlan7
add address=10.138.86.134 mac-address=00:01:02:03:04:06 client-id=CNTAntGauRd1 server=dhcp-wlan7
add address=10.138.86.135 mac-address=00:7G:00:04:F1:25 client-id=CNTJMusachRd1 server=dhcp-wlan7
add address=10.138.86.136 mac-address=00:23:23:23:23:24 client-id=SevaRogerRd1 server=dhcp-wlan7
add address=10.138.86.137 mac-address=00:15:6D:ED:83:D2 client-id=CNTguer9Rd1 server=dhcp-wlan7
add address=10.138.86.138 mac-address=00:15:6D:EB:ED:7A client-id=CNTMpagesRd1 server=dhcp-wlan7
add address=10.138.86.139 mac-address=00:01:02:03:04:06 client-id=CNTRondaRd1 server=dhcp-wlan7
add address=10.138.86.140 mac-address=00:15:6D:EA:ED:20 client-id=CNTjmbadilloRd1 server=dhcp-wlan7
add address=10.138.86.141 mac-address=00:15:6D:EB:EB:E4 client-id=CNTdolorsRd2 server=dhcp-wlan7
add address=10.138.86.142 mac-address=00:15:6D:EA:F2:28 client-id=CNTGuer7Rd1 server=dhcp-wlan7
add address=10.138.86.143 mac-address=00:15:6D:E2:E5:B3 client-id=CNTSonRd1 server=dhcp-wlan7
add address=10.138.86.144 mac-address=00:15:6D:E8:DF:A2 client-id=CNTVic19Rd1 server=dhcp-wlan7
add address=10.138.86.145 mac-address=00:15:6D:EE:A6:CB client-id=CNTpepeRd2 server=dhcp-wlan7
add address=10.138.86.146 mac-address=00:15:6D:D9:BA:27 client-id=CNTVic7Rd1 server=dhcp-wlan7
add address=10.138.86.147 mac-address=00:15:6D:18:28:8B client-id=CNTJMFalguerasRd1 server=dhcp-wlan7
add address=10.138.86.148 mac-address=00:15:6D:8C:DB:68 client-id=CNTJCARDENASRd1 server=dhcp-wlan7
add address=10.138.86.149 mac-address=00:15:6D:BD:D5:AF client-id=CNTPuigsagordi12Rd1 server=dhcp-wlan7
add address=10.138.86.150 mac-address=00:15:6D:8C:DB:5D client-id=CNTDValloveraRd1 server=dhcp-wlan7
add address=10.138.86.151 mac-address=00:15:6D:1A:56:1A client-id=CNTJpocaRadio1 server=dhcp-wlan7
add address=10.138.86.152 mac-address=00:00:00:00:00:01 client-id=CNTBigasRd2 server=dhcp-wlan7
add address=10.138.86.153 mac-address=00:15:6D:72:11:7B client-id=CNTSandRd1 server=dhcp-wlan7
add address=10.138.86.154 mac-address=00:15:6D:BD:D4:AF client-id=CNTGusRd2 server=dhcp-wlan7
add address=10.138.86.156 mac-address=00:27:22:3E:33:BC client-id=CNTSilviaRd1 server=dhcp-wlan7
#
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan7] \
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
#
# Routed device
#
# Other cable connections
#
# 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.71.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.71.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=4016 router-id=10.138.71.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.71.161 distribute-default=never redistribute-connected=no \
redistribute-static=no redistribute-rip=no redistribute-bgp=as-type-1
#
:log info "Unsolclic for 4016-CNTElTussolRadio1 executed."
/