# Generado por:
# RouterOSv4.7+
:log info "Unsolclic for 2581-TorelloCalsAvisST going to be executed."
#
# Configuration for RouterOS 4.7 and newer 4.x
# Dispositivo: 2581-TorelloCalsAvisST
#
# Métodos para subir/ejecutar este script:
# 1.-Como un script. Sube este texto como un script bien con:
#     a.Winbox (con Linux es necesario wine)
#     b.Terminal (telnet, ssh...)
#    Entonces ejecuta el script con:
#      > /system script run nombre_del_script
# 2.-Fichero importado:
#     Guarda este texto en un fichero, luego súbelo al router
#     utilizando ftp con un nombre como "script_name.rsc".
#     (ten en cuenta que la extensión ".rsc" es necesaria)
#     Ejecuta el fichero importado utilizando el comando:
#      > /import nombre_del_script
# 3.-Telnet copiar&pegar:
#     Abre una sesión de terminal, y copia y pega el texto
#     directamente en la ventana de la terminal.
#
# Notas:
# -routing-test package is required if you use RouterOSv2.9 , be sure you have it enabled at system packages
# -las wlans deberían activarse de forma manual. Asegúrate de que están establecidas en la antena correcta (a/b)
#   de acuerdo con cómo has conectado el cable a la miniPCI. Mantén la
#   potencia al mínimo posible y comprueba el canal.
# -El script no reinicia el router. Quizá tengas que hacerlo de forma manual
# -Debes tener acceso de escritura al router
# -Se recomienda el método de acceso por MAC (winbox, telnet a la MAC...)
#   (el script reconfigura algunas direcciones IP, así que se puede perder la comunicación)
# -No se realizan cambios en las contraseñas de usuario del dispositivo
# -Se creará una cuenta de invitado de Sólo Lectura para permitir el acceso de invitados
#   al router sin riesgo de daño pero con capacidad para ver la configuración.
# -Asegúrate de que todos los paquetes están activados.
# -No ejecutes el script desde telnet si estás conectado mediante una conexión IP en
#   la interfaz: Esta interfaz será desctruida durante la ejecución del script.
#
/ system identity set name=TorelloCalsAvisST
#
# DNS (client & server cache) zone: 2471
/ip dns set servers=10.138.50.194,10.138.0.2 allow-remote-requests=yes
:delay 1
#
# NTP (client & server cache) zone: 2471
/system ntp client set enabled=yes mode=unicast primary-ntp=10.138.0.2 secondary-ntp=10.138.0.2
:delay 1
#
# Servidor de ancho de banda
/ tool bandwidth-server set enabled=yes authenticate=no allocate-udp-ports-from=2000
#
# SNMP
/snmp set contact="guifi@guifi.net" enabled=yes location="TorelloCalsAvis"
#
# 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
#
# Gráficas
/tool graphing interface add
# Eliminar el puente (bridge) actual wLan/Lan si existe
: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;}
# Crear puente (bridge) principal entre wlan1 y 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 TorelloCalsAvisAP1
/interface wireless set wlan1 name="wlan1" \
radio-name="TorelloCalsAvisAP1" mode=ap-bridge ssid="guifi.net-TorelloCalsAvisAP1" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2422 \
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.138.60.161/27"] do={remove $i}
/ ip address add address=10.138.60.161/27 network=10.138.60.160 broadcast=10.138.60.191 interface=wLan/Lan disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.60.160/27] do={/routing bgp network remove $i;}
add network=10.138.60.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.60.160/27] do={/routing ospf network remove $i;}
add network=10.138.60.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.60.167-10.138.60.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.60.160/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.60.160/27 gateway=10.138.60.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.60.162 mac-address=00:13:10:83:7B:2B client-id=TorelloQToneuRadio4 server=dhcp-wLan/Lan
add address=10.138.60.163 mac-address=00:16:01:AF:01:12 client-id=TorelloJaumeiNuriaRadio1 server=dhcp-wLan/Lan
add address=10.138.60.164 mac-address=00:14:BF:D2:72:9B client-id=torellogestsoftRadio1 server=dhcp-wLan/Lan
add address=10.138.60.166 mac-address=CD:F9:0E:74:69:23 client-id=TorellolXPratdesabaRadio1 server=dhcp-wLan/Lan
add address=10.138.60.167 mac-address=00:15:6D:AE:E2:95 client-id=TrllCrdnyRd1 server=dhcp-wLan/Lan
add address=10.138.60.168 mac-address=00:18:39:AE:57:3B client-id=TorelloRMontoro server=dhcp-wLan/Lan
add address=10.138.60.170 mac-address=00:15:D6:A0:25:67 client-id=TorelloMontseGRadio2 server=dhcp-wLan/Lan
add address=10.138.60.171 mac-address=00:16:B6:D9:08:D0 client-id=TorelloQBautistaRadio1 server=dhcp-wLan/Lan
add address=10.138.60.172 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloTECRadio1 server=dhcp-wLan/Lan
add address=10.138.60.173 mac-address=00:18:39:C6:83:05 client-id=TorelloGSolanoRadio1 server=dhcp-wLan/Lan
add address=10.138.60.174 mac-address=00:18:39:86:FA:55 client-id=FVaqueRadio1 server=dhcp-wLan/Lan
add address=10.138.60.175 mac-address=34:07:44:74:96:2A client-id=neguhouseRadio1 server=dhcp-wLan/Lan
add address=10.138.60.176 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloYRuizRadio1 server=dhcp-wLan/Lan
add address=10.138.60.177 mac-address=00:25:9C:41:92:01 client-id=TorelloMMohamedRd2 server=dhcp-wLan/Lan
add address=10.138.60.178 mac-address=00:16:01:84:5F:0A client-id=TorelloIvankaRadio1 server=dhcp-wLan/Lan
add address=10.138.60.179 mac-address=00:18:F8:7A:3A:56 client-id=TorelloRobertRadio1 server=dhcp-wLan/Lan
add address=10.138.60.180 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloCampsPlaRadio1 server=dhcp-wLan/Lan
add address=10.138.60.181 mac-address=00:00:00:00:00:00 client-id=TorelloCalsAvisSXTStFeliu server=dhcp-wLan/Lan
add address=10.138.60.182 mac-address=00:18:39:AE:6E:36 client-id=TorelloCarreraRadio1 server=dhcp-wLan/Lan
add address=10.138.60.183 mac-address=00:15:6D:DB:19:B3 client-id=TorelloFarranRd1 server=dhcp-wLan/Lan
add address=10.138.60.184 mac-address=00:16:01:84:65:56 client-id=TorelloPuigdecanetRadio1 server=dhcp-wLan/Lan
add address=10.138.60.185 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloDaniIsus server=dhcp-wLan/Lan
add address=10.138.60.186 mac-address=00:14:BF:B2:16:B0 client-id=TorelloPVilaRadio1 server=dhcp-wLan/Lan
add address=10.138.60.187 mac-address=ff:ff:ff:ff:ff:ff client-id=torellocunillRadio1 server=dhcp-wLan/Lan
add address=10.138.60.188 mac-address=ff:ff:ff:ff:ff:ff client-id=TorellojcasasRadio1 server=dhcp-wLan/Lan
add address=10.138.60.189 mac-address=00:14:BF:D2:6C:DE client-id=DaniAnnaRadio1 server=dhcp-wLan/Lan
add address=10.138.60.190 mac-address=00:00:00:00:00:00 client-id=TorelloCalsAvisPuig server=dhcp-wLan/Lan
#
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.138.136.129/27"] do={remove $i}
/ ip address add address=10.138.136.129/27 network=10.138.136.128 broadcast=10.138.136.159 interface=wlan1 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.136.128/27] do={/routing bgp network remove $i;}
add network=10.138.136.128/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan1] do={/routing ospf interface remove $i;}
add interface=wlan1
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.136.128/27] do={/routing ospf network remove $i;}
add network=10.138.136.128/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan1] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan1 ranges=10.138.136.135-10.138.136.158
:foreach i in [/ip dhcp-server find name=dhcp-wlan1] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan1 interface=wlan1 address-pool=dhcp-wlan1 disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.136.128/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.136.128/27 gateway=10.138.136.129 domain=guifi.net comment=dhcp-wlan1
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.136.130 mac-address=00:1C:10:9A:0A:5C client-id=TorelloXeviRadio1 server=dhcp-wlan1
add address=10.138.136.131 mac-address=00:18:F8:F1:CD:A1 client-id=TorelloalbertsRadio2 server=dhcp-wlan1
add address=10.138.136.132 mac-address=00:18:39:AE:46:75 client-id=TorelloPereCapRd1 server=dhcp-wlan1
add address=10.138.136.133 mac-address=00:15:6D:F3:B3:43 client-id=TorelloMFernandezRd1 server=dhcp-wlan1
add address=10.138.136.134 mac-address=00:1D:7E:4B:74:8F client-id=TorelloEBardoletRadio1 server=dhcp-wlan1
add address=10.138.136.135 mac-address=00:16:01:16:92:66 client-id=TorelloAFerresRadio3 server=dhcp-wlan1
add address=10.138.136.136 mac-address=00:16:B6:D9:87:38 client-id=torelloMoreraRadio2 server=dhcp-wlan1
add address=10.138.136.137 mac-address=00:15:6D:D3:E6:8B client-id=TorelloNBoutabaRd1 server=dhcp-wlan1
add address=10.138.136.138 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloAVallejoRadio1 server=dhcp-wlan1
add address=10.138.136.139 mac-address=00:0B:6B:81:CE:AB client-id=TorelloJVillarrazoRadio2 server=dhcp-wlan1
add address=10.138.136.140 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloHurtadoRadio1 server=dhcp-wlan1
add address=10.138.136.141 mac-address=00:11:22:33:44:67 client-id=TorelloJNogueRd1 server=dhcp-wlan1
add address=10.138.136.142 mac-address=00:16:01:B0:39:C4 client-id=TorelloOXuclaRadio1 server=dhcp-wlan1
add address=10.138.136.143 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloMMorenoRadio1 server=dhcp-wlan1
add address=10.138.136.144 mac-address=00:15:6D:A7:20:94 client-id=TorelloJPizarroRadio1 server=dhcp-wlan1
add address=10.138.136.145 mac-address=00:0B:6B:4E:CD:9D client-id=TorelloJoanBRd1 server=dhcp-wlan1
add address=10.138.136.146 mac-address=00:1D:7E:3A:47:2A client-id=TorelloSastreRd1 server=dhcp-wlan1
add address=10.138.136.147 mac-address=00:21:29:99:3B:F2 client-id=TorelloJMTenaRd1 server=dhcp-wlan1
add address=10.138.136.148 mac-address=00:0B:6B:4E:CD:9D client-id=pinRd1 server=dhcp-wlan1
add address=10.138.136.149 mac-address=00:1D:73:18:31:CF client-id=TorelloJMorenoRd2 server=dhcp-wlan1
add address=10.138.136.152 mac-address=00:14:BF:D2:72:9B client-id=TorelloEcasasRd1 server=dhcp-wlan1
add address=10.138.136.153 mac-address=00:15:6D:D8:AE:AF client-id=TorelloCanParrella38Rd1 server=dhcp-wlan1
add address=10.138.136.154 mac-address=00:15:6D:A9:2C:AC client-id=TorelloSala1Rd2 server=dhcp-wlan1
add address=10.138.136.155 mac-address=00:15:6D:D5:7A:1F client-id=TorelloDaniGarciaRd1 server=dhcp-wlan1
add address=10.138.136.156 mac-address=00:15:6D:D7:96:46 client-id=TorelloAArboixRd1 server=dhcp-wlan1
add address=10.138.136.157 mac-address=00:15:6D:D9:09:05 client-id=TorelloJMGamezRd1 server=dhcp-wlan1
add address=10.138.136.158 mac-address=00:15:6D:D5:78:9F client-id=TorelloCPoll25Rd1 server=dhcp-wlan1
#
:delay 1
# Type: wds/p2p
# Eliminar todas las interfaces wds existentes
: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 TorelloCalsAvisAP2
/interface wireless set wlan2 name="wlan2" \
radio-name="TorelloCalsAvisAP2" mode=ap-bridge ssid="guifi.net-TorelloCalsAvisAP2" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2442 \
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.138.60.193/27"] do={remove $i}
/ ip address add address=10.138.60.193/27 network=10.138.60.192 broadcast=10.138.60.223 interface=wlan2 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.60.192/27] do={/routing bgp network remove $i;}
add network=10.138.60.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.60.192/27] do={/routing ospf network remove $i;}
add network=10.138.60.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.60.199-10.138.60.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.60.192/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.60.192/27 gateway=10.138.60.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.60.194 mac-address=00:16:01:AF:DC:84 client-id=TorelloJBalmesRadio1 server=dhcp-wlan2
add address=10.138.60.195 mac-address=00:00:00:00:00:01 client-id=TorelloDSanchezRd2 server=dhcp-wlan2
add address=10.138.60.196 mac-address=00:1E:E5:36:04:22 client-id=TorelloSandradamasRd1 server=dhcp-wlan2
add address=10.138.60.197 mac-address=00:14:BF:EF:2F:25 client-id=TorelloLGarciaRadio1 server=dhcp-wlan2
add address=10.138.60.198 mac-address=00:14:BF:EB:76:3B client-id=TorelloTSolaRadio1 server=dhcp-wlan2
add address=10.138.60.199 mac-address=00:16:01:4D:A5:94 client-id=TorelloJEscobarRadio1 server=dhcp-wlan2
add address=10.138.60.200 mac-address=00:14:BF:EB:6C:6F client-id=TorelloVergesCRadio1 server=dhcp-wlan2
add address=10.138.60.201 mac-address=00:15:6D:F6:75:E1 client-id=TorelloSMakarrouchRd1 server=dhcp-wlan2
add address=10.138.60.202 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloCarbones server=dhcp-wlan2
add address=10.138.60.203 mac-address=00:15:6D:AE:ED:F2 client-id=TorelloMAankadRd2 server=dhcp-wlan2
add address=10.138.60.204 mac-address=00:15:6D:E4:F0:3A client-id=TorelloCanParrellaRd1 server=dhcp-wlan2
add address=10.138.60.205 mac-address=00:16:01:16:92:66 client-id=TorelloAFerresRadio1 server=dhcp-wlan2
add address=10.138.60.206 mac-address=00:15:6D:E9:CC:6B client-id=TorelloNoelia31Rd1 server=dhcp-wlan2
add address=10.138.60.207 mac-address=00:14:BF:D2:6C:BD client-id=TorelloSGonzalezRadio2 server=dhcp-wlan2
add address=10.138.60.208 mac-address=00:16:01:16:91:E8 client-id=TorelloJQuelRadio1 server=dhcp-wlan2
add address=10.138.60.209 mac-address=00:18:39:C6:82:EF client-id=TorelloJMBartrinaRadio1 server=dhcp-wlan2
add address=10.138.60.210 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloFranciscoFernandez server=dhcp-wlan2
add address=10.138.60.211 mac-address=00:16:01:16:8C:DC client-id=TorelloParcRadio1 server=dhcp-wlan2
add address=10.138.60.212 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloEsturi server=dhcp-wlan2
add address=10.138.60.213 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloMariaRadio1 server=dhcp-wlan2
add address=10.138.60.214 mac-address=00:18:39:C6:82:F9 client-id=TorelloPratdesabaRadio2 server=dhcp-wlan2
add address=10.138.60.215 mac-address=00:18:39:86:F2:78 client-id=TorelloJAvilesRadio1 server=dhcp-wlan2
add address=10.138.60.216 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloSobremuntRadio1 server=dhcp-wlan2
add address=10.138.60.217 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloParcDinouRadio1 server=dhcp-wlan2
add address=10.138.60.218 mac-address=00:16:B6:11:45:E5 client-id=TorelloSAparicioRadio2 server=dhcp-wlan2
add address=10.138.60.219 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloJVidal server=dhcp-wlan2
add address=10.138.60.221 mac-address=00:1D:7E:BC:30:B8 client-id=ConanglellXTrucharteRadio1 server=dhcp-wlan2
add address=10.138.60.222 mac-address=00:16:B6:C7:D3:5C client-id=TorelloDGodayolRadio1 server=dhcp-wlan2
#
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.138.136.161/27"] do={remove $i}
/ ip address add address=10.138.136.161/27 network=10.138.136.160 broadcast=10.138.136.191 interface=wlan2 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.136.160/27] do={/routing bgp network remove $i;}
add network=10.138.136.160/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.136.160/27] do={/routing ospf network remove $i;}
add network=10.138.136.160/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.136.167-10.138.136.190
: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.136.160/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.136.160/27 gateway=10.138.136.161 domain=guifi.net comment=dhcp-wlan2
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.136.162 mac-address=00:1D:7E:4B:3B:00 client-id=TorelloSellesRadio1 server=dhcp-wlan2
add address=10.138.136.164 mac-address=00:16:01:F4:B4:DB client-id=TorelloMariaSanchezRadio1 server=dhcp-wlan2
add address=10.138.136.165 mac-address=00:15:6D:A6:DE:4A client-id=TorelloFPuig server=dhcp-wlan2
add address=10.138.136.168 mac-address=00:14:BF:D2:6C:D7 client-id=TorelloPirineusRd1 server=dhcp-wlan2
add address=10.138.136.171 mac-address=00:22:6B:7A:5F:02 client-id=TorelloJVilaltaRd1 server=dhcp-wlan2
add address=10.138.136.172 mac-address=00:16:B6:D9:01:17 client-id=TorelloMRuiz server=dhcp-wlan2
add address=10.138.136.173 mac-address=00:15:6D:AE:D8:86 client-id=ConanglellSoniaRd1 server=dhcp-wlan2
add address=10.138.136.174 mac-address=00:16:01:F4:9B:AD client-id=TorelloGalobardesRadio1 server=dhcp-wlan2
add address=10.138.136.175 mac-address=00:15:6D:AD:5D:D6 client-id=TorelloMontseCorbellRd1 server=dhcp-wlan2
add address=10.138.136.176 mac-address=00:15:6D:F7:75:98 client-id=MdVDSanchezRd3 server=dhcp-wlan2
add address=10.138.136.177 mac-address=00:1A:70:4E:E4:76 client-id=TorellojbflyRadio1 server=dhcp-wlan2
add address=10.138.136.178 mac-address=00:00:00:00:00:12 client-id=TorelloMarRd1 server=dhcp-wlan2
add address=10.138.136.179 mac-address=00:1C:10:36:57:0C client-id=TorelloRocaprevera2Rd1 server=dhcp-wlan2
add address=10.138.136.180 mac-address=00:1D:73:55:49:FD client-id=TorelloJosepRomansRd1 server=dhcp-wlan2
add address=10.138.136.181 mac-address=00:15:6D:60:D7:CC client-id=TorelloMAnanouhRd1 server=dhcp-wlan2
add address=10.138.136.182 mac-address=00:16:01:B0:6E:3F client-id=TorelloCMateoRd1 server=dhcp-wlan2
add address=10.138.136.183 mac-address=00:1D:73:55:66:05 client-id=TorelloJDorcaRd1 server=dhcp-wlan2
add address=10.138.136.184 mac-address=00:15:6D:AB:69:F5 client-id=TorelloMTanaRd1 server=dhcp-wlan2
add address=10.138.136.185 mac-address=00:15:6D:AE:E2:F3 client-id=TorelloCaniRd1 server=dhcp-wlan2
add address=10.138.136.186 mac-address=00:15:6D:AE:5E:90 client-id=TorelloJoanRifaRd1 server=dhcp-wlan2
add address=10.138.136.187 mac-address=00:15:6D:AC:F3:CA client-id=TorelloCRubioRd1 server=dhcp-wlan2
add address=10.138.136.188 mac-address=00:15:6D:AE:53:35 client-id=TorelloAvingudaPiRd1 server=dhcp-wlan2
add address=10.138.136.189 mac-address=00:15:6D:AE:00:A8 client-id=TorelloCarlesVRd1 server=dhcp-wlan2
add address=10.138.136.190 mac-address=00:15:6D:AE:5D:D6 client-id=TorelloBVergesRd1 server=dhcp-wlan2
#
:delay 1
#
# Radio#: 2 TorelloCalsAvisAP3
/interface wireless set wlan3 name="wlan3" \
radio-name="TorelloCalsAvisAP3" mode=ap-bridge ssid="guifi.net-TorelloCalsAvisAP3" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2472 \
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.138.60.225/27"] do={remove $i}
/ ip address add address=10.138.60.225/27 network=10.138.60.224 broadcast=10.138.60.255 interface=wlan3 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.60.224/27] do={/routing bgp network remove $i;}
add network=10.138.60.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.60.224/27] do={/routing ospf network remove $i;}
add network=10.138.60.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.60.231-10.138.60.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.60.224/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.60.224/27 gateway=10.138.60.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.60.226 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloJOliva server=dhcp-wlan3
add address=10.138.60.227 mac-address=ff:ff:ff:ff:ff:ff client-id=TorellofurtetRadio1 server=dhcp-wlan3
add address=10.138.60.228 mac-address=00:18:39:AE:4A:0F client-id=TorelloMPresseguerRadio1 server=dhcp-wlan3
add address=10.138.60.229 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloAdolf server=dhcp-wlan3
add address=10.138.60.230 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloJoaniNuria server=dhcp-wlan3
add address=10.138.60.231 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloVigueRadio1 server=dhcp-wlan3
add address=10.138.60.232 mac-address=00:1D:73:55:6A:75 client-id=TorelloHilarioSRd1 server=dhcp-wlan3
add address=10.138.60.233 mac-address=00:16:01:16:92:66 client-id=TorelloAFerresRadio2 server=dhcp-wlan3
add address=10.138.60.234 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloegravolosaRadio1 server=dhcp-wlan3
add address=10.138.60.235 mac-address=00:16:B6:11:42:9D client-id=OrisJCarreraRadio1 server=dhcp-wlan3
add address=10.138.60.236 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloMontserratCRadio3 server=dhcp-wlan3
add address=10.138.60.237 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloJMoraRadio3 server=dhcp-wlan3
add address=10.138.60.238 mac-address=ff:ff:ff:ff:ff:ff client-id=jmcaballeriaRadio1 server=dhcp-wlan3
add address=10.138.60.239 mac-address=00:16:01:ED:F0:3A client-id=TorelloXuinsRadio1 server=dhcp-wlan3
add address=10.138.60.240 mac-address=00:16:01:4D:8A:8C client-id=TorelloNVicenteRadio1 server=dhcp-wlan3
add address=10.138.60.241 mac-address=00:16:01:B0:65:D7 client-id=TorelloTSanchezRadio1 server=dhcp-wlan3
add address=10.138.60.242 mac-address=ff:ff:ff:ff:ff:ff client-id=ParicioRadio1 server=dhcp-wlan3
add address=10.138.60.243 mac-address=00:15:6D:AC:FD:20 client-id=TorelloPereCapdRd2 server=dhcp-wlan3
add address=10.138.60.244 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloAparicioRadio2 server=dhcp-wlan3
add address=10.138.60.245 mac-address=ff:ff:ff:ff:ff:ff client-id=TorelloJoanCapdevilaRadio2 server=dhcp-wlan3
add address=10.138.60.246 mac-address=00:18:39:C6:28:36 client-id=TorelloMag1 server=dhcp-wlan3
add address=10.138.60.247 mac-address=00:1A:70:4F:0D:11 client-id=TorelloRGarciaRadio1 server=dhcp-wlan3
add address=10.138.60.248 mac-address=00:18:39:C6:4A:59 client-id=SVDTPujadas server=dhcp-wlan3
add address=10.138.60.249 mac-address=00:18:39:AE:6E:33 client-id=TorelloMMonteroRadio1 server=dhcp-wlan3
add address=10.138.60.250 mac-address=00:16:01:4D:A8:47 client-id=TorelloSJufreRadio1 server=dhcp-wlan3
add address=10.138.60.251 mac-address=00:16:01:4D:87:14 client-id=torelloalbertrdRadio1 server=dhcp-wlan3
add address=10.138.60.253 mac-address=00:16:B6:D9:00:36 client-id=TorelloABCRadio1 server=dhcp-wlan3
add address=10.138.60.254 mac-address=00:1A:70:D6:CE:A5 client-id=TorelloMComellasRadio1 server=dhcp-wlan3
#
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.138.136.193/27"] do={remove $i}
/ ip address add address=10.138.136.193/27 network=10.138.136.192 broadcast=10.138.136.223 interface=wlan3 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.136.192/27] do={/routing bgp network remove $i;}
add network=10.138.136.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.136.192/27] do={/routing ospf network remove $i;}
add network=10.138.136.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.136.199-10.138.136.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.136.192/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.136.192/27 gateway=10.138.136.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.136.194 mac-address=00:16:01:ED:FB:07 client-id=TorelloSolanichRadio1 server=dhcp-wlan3
add address=10.138.136.195 mac-address=00:1D:7E:E3:91:2A client-id=TorelloFMorenoRadio1 server=dhcp-wlan3
add address=10.138.136.196 mac-address=00:16:B6:D9:00:2D client-id=TorelloARuizRadio1 server=dhcp-wlan3
add address=10.138.136.197 mac-address=00:16:01:F4:BE:29 client-id=TorelloBrugueraDachsRadio1 server=dhcp-wlan3
add address=10.138.136.198 mac-address=00:16:01:F4:B1:91 client-id=TorelloTSolerRadio1 server=dhcp-wlan3
add address=10.138.136.199 mac-address=00:21:29:99:3C:55 client-id=TorelloFRiubugentRd1 server=dhcp-wlan3
add address=10.138.136.200 mac-address=00:16:01:B0:4E:15 client-id=TorelloCExcTorelloRadio1 server=dhcp-wlan3
add address=10.138.136.201 mac-address=00:18:39:AE:4B:20 client-id=MdVJMontoroRadio1 server=dhcp-wlan3
add address=10.138.136.202 mac-address=00:16:01:ED:F6:09 client-id=TorelloAlbertPRadio1 server=dhcp-wlan3
add address=10.138.136.203 mac-address=00:1C:10:BF:6C:FF client-id=TORELLOnatifloresRd2 server=dhcp-wlan3
add address=10.138.136.204 mac-address=00:15:6D:D3:E0:CF client-id=TorelloRGarcia3Rd1 server=dhcp-wlan3
add address=10.138.136.205 mac-address=00:16:01:B0:39:C3 client-id=TorelloOXuclaRd2 server=dhcp-wlan3
add address=10.138.136.206 mac-address=00:21:29:B0:A7:71 client-id=TorelloELopezRd1 server=dhcp-wlan3
add address=10.138.136.207 mac-address=00:1D:73:55:49:A7 client-id=TorelloImmaHRd1 server=dhcp-wlan3
add address=10.138.136.208 mac-address=00:15:6D:AE:5D:D3 client-id=TorelloSKabouRd1 server=dhcp-wlan3
add address=10.138.136.209 mac-address=00:15:6D:AC:DE:CE client-id=TorelloRamonBRd1 server=dhcp-wlan3
add address=10.138.136.210 mac-address=00:15:6D:A9:2D:B4 client-id=TorelloPins5Rd1 server=dhcp-wlan3
add address=10.138.136.211 mac-address=00:15:6D:AC:FA:29 client-id=TorelloJtorresRd1 server=dhcp-wlan3
add address=10.138.136.212 mac-address=00:15:6D:AD:5E:10 client-id=TorelloLNavasRd2 server=dhcp-wlan3
add address=10.138.136.213 mac-address=00:15:6D:D3:E6:F3 client-id=TorelloFontsereRd1 server=dhcp-wlan3
add address=10.138.136.215 mac-address=00:15:6D:AD:52:07 client-id=TorelloAPirineusRd1 server=dhcp-wlan3
add address=10.138.136.216 mac-address=00:15:6D:E4:7C:7E client-id=torelloestacioRd1 server=dhcp-wlan3
add address=10.138.136.217 mac-address=00:01:15:AF:2E:B0 client-id=TorelloRuaRd3 server=dhcp-wlan3
add address=10.138.136.219 mac-address=00:1D:7E:4B:3B:01 client-id=TorelloJuvantenyRd2 server=dhcp-wlan3
add address=10.138.136.220 mac-address=00:16:01:F2:20:05 client-id=TorelloJSalaRd2 server=dhcp-wlan3
add address=10.138.136.221 mac-address=00:15:6D:A7:20:93 client-id=TorelloJPizarroRd2 server=dhcp-wlan3
add address=10.138.136.222 mac-address=DD:BB:CC:DD:CC:DE client-id=TorelloAVillanuevaRd3 server=dhcp-wlan3
#
:delay 1
# Type: wds/p2p
# Eliminar todas las interfaces wds existentes
: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 TorelloCalsAvis5GAP4
/interface wireless set wlan4 name="wlan4" \
radio-name="TorelloCalsAvis5GAP4" mode=ap-bridge ssid="guifi.net-TorelloCalsAvis5GAP4" \
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.139.225/27"] do={remove $i}
/ ip address add address=10.138.139.225/27 network=10.138.139.224 broadcast=10.138.139.255 interface=wlan4 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.139.224/27] do={/routing bgp network remove $i;}
add network=10.138.139.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.139.224/27] do={/routing ospf network remove $i;}
add network=10.138.139.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.139.231-10.138.139.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.139.224/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.139.224/27 gateway=10.138.139.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.139.226 mac-address=00:15:6D:18:2E:20 client-id=TorelloIRomeroRd2 server=dhcp-wlan4
add address=10.138.139.227 mac-address=00:15:6D:B9:44:88 client-id=TorelloSala1Rd1 server=dhcp-wlan4
#
:delay 1
# Type: wds/p2p
# Eliminar todas las interfaces wds existentes
: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
# Type: wds/p2p
# Eliminar todas las interfaces wds existentes
: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 TorelloCalsAvis5GAP5
/interface wireless set wlan5 name="wlan5" \
radio-name="TorelloCalsAvis5GAP5" mode=ap-bridge ssid="guifi.net-TorelloCalsAvis5GAP5" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5200 \
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.140.1/27"] do={remove $i}
/ ip address add address=10.138.140.1/27 network=10.138.140.0 broadcast=10.138.140.31 interface=wlan5 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.140.0/27] do={/routing bgp network remove $i;}
add network=10.138.140.0/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.140.0/27] do={/routing ospf network remove $i;}
add network=10.138.140.0/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.140.7-10.138.140.30
: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.140.0/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.140.0/27 gateway=10.138.140.1 domain=guifi.net comment=dhcp-wlan5
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.140.2 mac-address=00:15:6D:B0:2B:FE client-id=TorelloRArquimbauRd2 server=dhcp-wlan5
add address=10.138.140.3 mac-address=00:15:6D:F8:73:55 client-id=TorelloLLSabatesUBNT server=dhcp-wlan5
add address=10.138.140.4 mac-address=00:0C:42:11:3F:2A client-id=TorelloJSantiagoRadio1 server=dhcp-wlan5
add address=10.138.140.5 mac-address=00:0C:42:97:9E:E9 client-id=TorelloAngelVilaRd1 server=dhcp-wlan5
add address=10.138.140.6 mac-address=00:0C:42:88:DF:55 client-id=TorelloJuvantenyRd3 server=dhcp-wlan5
add address=10.138.140.7 mac-address=00:00:00:00:00:01 client-id=TorelloJMoleraRd1 server=dhcp-wlan5
add address=10.138.140.8 mac-address=00:0C:42:97:9C:4F client-id=TorelloEuVilaRd1 server=dhcp-wlan5
add address=10.138.140.9 mac-address=00:0C:42:E7:74:6E client-id=TorelloMolinaRd4 server=dhcp-wlan5
add address=10.138.140.10 mac-address=00:0C:42:E7:74:83 client-id=TorelloJFajulaRd1 server=dhcp-wlan5
#
:delay 1
# Type: wds/p2p
# Eliminar todas las interfaces wds existentes
: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 TorelloCalsAvis5GAP6
/interface wireless set wlan6 name="wlan6" \
radio-name="TorelloCalsAvis5GAP6" mode=ap-bridge ssid="guifi.net-TorelloCalsAvis5GAP6" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5220 \
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.140.33/27"] do={remove $i}
/ ip address add address=10.138.140.33/27 network=10.138.140.32 broadcast=10.138.140.63 interface=wlan6 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.140.32/27] do={/routing bgp network remove $i;}
add network=10.138.140.32/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.140.32/27] do={/routing ospf network remove $i;}
add network=10.138.140.32/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.140.39-10.138.140.62
: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.140.32/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.140.32/27 gateway=10.138.140.33 domain=guifi.net comment=dhcp-wlan6
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.140.34 mac-address=00:0C:42:D7:51:3B client-id=Torellgranw2Rd1 server=dhcp-wlan6
add address=10.138.140.35 mac-address=00:0C:42:69:6C:1B client-id=TorelloATubauRd2 server=dhcp-wlan6
add address=10.138.140.36 mac-address=00:15:6D:D2:55:C9 client-id=TorelloRocaprevera40Rd1 server=dhcp-wlan6
#
:delay 1
# Type: wds/p2p
# Eliminar todas las interfaces wds existentes
: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 TorelloCalsAvisDip
/interface wireless set wlan7 name="wlan7" \
radio-name="TorelloCalsAvisDip" mode=ap-bridge ssid="guifi.net-TorelloCalsAvisDip" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5520 \
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
# Eliminar todas las interfaces wds existentes
: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;}
/ interface wireless wds
add name="wds_TorelloDipSudST1" master-interface=wlan7 wds-address=00:0B:6B:4E:D4:5A disabled=no
/ ip address add address=172.25.16.6/30 network=172.25.16.4 broadcast=172.25.16.7 interface=wds_TorelloDipSudST1 disabled=no comment="wds_TorelloDipSudST1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_TorelloDipSudST1] do={/routing ospf interface remove $i;}
add interface=wds_TorelloDipSudST1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.16.4/30] do={/routing ospf network remove $i;}
add network=172.25.16.4/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=TorelloDipSudST1] do={/routing bgp peer remove $i;}
add name="TorelloDipSudST1" instance=default remote-address=172.25.16.5 remote-as=2582 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 7 TorelloAvis-UBNT-Puigrubi
/interface wireless set wlan8 name="wlan8" \
radio-name="TorelloAvis-UBNT-Puigrubi" mode=ap-bridge ssid="guifi.net-TorelloAvis-UBNT-Puigrubi" \
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: wds/p2p
# Eliminar todas las interfaces wds existentes
:foreach i in [/interface wireless wds find master-interface=wlan8] \
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_TorelloDipPuigRubiST2" master-interface=wlan8 wds-address=11:22:33:44:55:66 disabled=no
/ ip address add address=172.25.17.1/29 network=172.25.17.0 broadcast=172.25.17.7 interface=wds_TorelloDipPuigRubiST2 disabled=no comment="wds_TorelloDipPuigRubiST2"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_TorelloDipPuigRubiST2] do={/routing ospf interface remove $i;}
add interface=wds_TorelloDipPuigRubiST2
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.17.0/29] do={/routing ospf network remove $i;}
add network=172.25.17.0/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=TorelloDipPuigRubiST2] do={/routing bgp peer remove $i;}
add name="TorelloDipPuigRubiST2" instance=default remote-address=172.25.17.2 remote-as=24204 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 8 TorelloCalsAvisSXT-StFeliu
/interface wireless set wlan9 name="wlan9" \
radio-name="TorelloCalsAvisSXT-StFeliu" mode=ap-bridge ssid="guifi.net-TorelloCalsAvisSXT-StFeliu" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=5620 \
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
# Eliminar todas las interfaces wds existentes
:foreach i in [/interface wireless wds find master-interface=wlan9] \
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_TorelloStFeliuST2" master-interface=wlan9 wds-address=00:0C:42:87:EF:3B disabled=no
/ ip address add address=172.25.17.33/29 network=172.25.17.32 broadcast=172.25.17.39 interface=wds_TorelloStFeliuST2 disabled=no comment="wds_TorelloStFeliuST2"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_TorelloStFeliuST2] do={/routing ospf interface remove $i;}
add interface=wds_TorelloStFeliuST2
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.17.32/29] do={/routing ospf network remove $i;}
add network=172.25.17.32/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=TorelloStFeliuST2] do={/routing bgp peer remove $i;}
add name="TorelloStFeliuST2" instance=default remote-address=172.25.17.36 remote-as=29685 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Routed device
#
# Otra conexiones cableadas
#
# NAT de direcciones internas
: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.60.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.60.161 comment="" disabled=no
#
# Enrutamiento BMP
# 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
#
# instancia BGP
/ routing bgp instance
set default name="default" as=2581 router-id=10.138.60.161 \
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
#
# Enrutamiento OSPF
/routing ospf instance set default name=default router-id=10.138.60.161 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 2581-TorelloCalsAvisST executed."
/