# Generat per a:
# RouterOSv6.x
:log info "Unsolclic for 35203-GurbTecMundoST going to be executed."
#
# Configuration for RouterOSv6.x
# Trasto: 35203-GurbTecMundoST
#
# 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.-Fitxer importat:
#     Desa aquesta "sortida" a un fitxer, després puja'l al router
#     fent servir FTP amb un nom de l'estil "script_name.rsc".
#     (note, l'extensió ".rsc" es un requisit)
#     Executa el fitxer importat amb la comanda:
#      > /import script_name
# 3.-Telnet copia i enganxar:
#     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=GurbTecMundoST
#
# DNS (client & server cache) zone: 2451
/ip dns set servers=10.138.0.2,10.138.0.2 allow-remote-requests=yes
:delay 1
#
# NTP (client & server cache) zone: 2451
/system ntp client set enabled=yes mode=unicast primary-ntp=10.138.0.2 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 community set public addresses=10.0.0.0/8
/snmp set contact="guifi@guifi.net" enabled=yes location="GurbTecMundo" trap-community=public
#
# Guest user
/user
:foreach i in [find group=read] do={/user remove $i;}
add name="guest" group=read address=10.0.0.0/8 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;}
:delay 1
#
# Radio#: 0 GurbTecMundoXiob
/interface wireless set wlan1 name="wlan1" \
radio-name="GurbTecMundoXiob" mode=ap-bridge ssid="guifi.net-GurbTecMundoXiob" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=25 \
dfs-mode=radar-detect \
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: wdsGurbTecMundoXiob
# 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;}
/ interface wireless wds
add name="wds_GurbXiobST" master-interface=wlan1 wds-address=00:0C:42:7F:64:7E disabled=no
/ ip address add address=172.25.135.225/29 network=172.25.135.224 broadcast=172.25.135.231 interface=wds_GurbXiobST disabled=no comment="wds_GurbXiobST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_GurbXiobST] do={/routing ospf interface remove $i;}
add interface=wds_GurbXiobST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.135.224/29] do={/routing ospf network remove $i;}
add network=172.25.135.224/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=GurbXiobST] do={/routing bgp peer remove $i;}
add name="GurbXiobST" instance=default remote-address=172.25.135.226 remote-as=35189 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
# Type: other
/ip address
:foreach i in [find address="10.138.15.193/27"] do={remove $i}
/ ip address add address=10.138.15.193/27 network=10.138.15.192 broadcast=10.138.15.223 interface=wlan1 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.15.192/27] do={/routing bgp network remove $i;}
add network=10.138.15.192/27 synchronize=no 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.15.192/27] do={/routing ospf network remove $i;}
add network=10.138.15.192/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.15.199-10.138.15.222
: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.15.192/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.15.192/27 gateway=10.138.15.193 domain=guifi.net comment=dhcp-wlan1
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.15.198 mac-address=00:00:00:00:00:00 client-id=GurbTecMundoSCVDip server=dhcp-wlan1
#
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.138.14.65/27"] do={remove $i}
/ ip address add address=10.138.14.65/27 network=10.138.14.64 broadcast=10.138.14.95 interface=wlan1 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.14.64/27] do={/routing bgp network remove $i;}
add network=10.138.14.64/27 synchronize=no 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.14.64/27] do={/routing ospf network remove $i;}
add network=10.138.14.64/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.14.71-10.138.14.94
: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.14.64/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.14.64/27 gateway=10.138.14.65 domain=guifi.net comment=dhcp-wlan1
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
#
:delay 1
#
# Radio#: 1 GurbTecMundoVic11Set
/interface wireless set wlan2 name="wlan2" \
radio-name="GurbTecMundoVic11Set" mode=ap-bridge ssid="guifi.net-GurbTecMundoVic11Set" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbTecMundoVic11Set
# 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_Vic11SetembreST" master-interface=wlan2 wds-address=00:0C:42:B7:3E:8F disabled=no
/ ip address add address=172.25.20.30/29 network=172.25.20.24 broadcast=172.25.20.31 interface=wds_Vic11SetembreST disabled=no comment="wds_Vic11SetembreST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_Vic11SetembreST] do={/routing ospf interface remove $i;}
add interface=wds_Vic11SetembreST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.20.24/29] do={/routing ospf network remove $i;}
add network=172.25.20.24/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=Vic11SetembreST] do={/routing bgp peer remove $i;}
add name="Vic11SetembreST" instance=default remote-address=172.25.20.29 remote-as=47692 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 2 GurbTecMundoROUGURB03
/interface wireless set wlan3 name="wlan3" \
radio-name="GurbTecMundoROUGURB03" mode=ap-bridge ssid="guifi.net-GurbTecMundoROUGURB03" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbTecMundoROUGURB03
# 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;}
/ interface wireless wds
add name="wds_ROUGURB03" master-interface=wlan3 wds-address=00:0C:42:FE:3F:06 disabled=no
/ ip address add address=172.25.0.114/30 network=172.25.0.112 broadcast=172.25.0.115 interface=wds_ROUGURB03 disabled=no comment="wds_ROUGURB03"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_ROUGURB03] do={/routing ospf interface remove $i;}
add interface=wds_ROUGURB03
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.112/30] do={/routing ospf network remove $i;}
add network=172.25.0.112/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=ROUGURB03] do={/routing bgp peer remove $i;}
add name="ROUGURB03" instance=default remote-address=172.25.0.113 remote-as=32394 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 3 GurbTecMundoSBGRocLarg
/interface wireless set wlan4 name="wlan4" \
radio-name="GurbTecMundoSBGRocLarg" mode=ap-bridge ssid="guifi.net-GurbTecMundoSBGRocLarg" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbTecMundoSBGRocLlarg
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan4] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
/ interface wireless wds
add name="wds_SBGRocLlargST" master-interface=wlan4 wds-address=00:0C:42:BD:7E:7C disabled=no
/ ip address add address=172.25.25.81/29 network=172.25.25.80 broadcast=172.25.25.87 interface=wds_SBGRocLlargST disabled=no comment="wds_SBGRocLlargST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_SBGRocLlargST] do={/routing ospf interface remove $i;}
add interface=wds_SBGRocLlargST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.25.80/29] do={/routing ospf network remove $i;}
add network=172.25.25.80/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=SBGRocLlargST] do={/routing bgp peer remove $i;}
add name="SBGRocLlargST" instance=default remote-address=172.25.25.82 remote-as=29877 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 4 GurbTecMundo-ManLogw
/interface wireless set wlan5 name="wlan5" \
radio-name="GurbTecMundo-ManLogw" mode=ap-bridge ssid="guifi.net-GurbTecMundo-ManLogw" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbTecMundo-ManLogw
# 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_ManlleuLogway2007ST" master-interface=wlan5 wds-address=00:0C:42:BD:7E:7A disabled=no
/ ip address add address=172.25.0.106/29 network=172.25.0.104 broadcast=172.25.0.111 interface=wds_ManlleuLogway2007ST disabled=no comment="wds_ManlleuLogway2007ST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_ManlleuLogway2007ST] do={/routing ospf interface remove $i;}
add interface=wds_ManlleuLogway2007ST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.104/29] do={/routing ospf network remove $i;}
add network=172.25.0.104/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=ManlleuLogway2007ST] do={/routing bgp peer remove $i;}
add name="ManlleuLogway2007ST" instance=default remote-address=172.25.0.105 remote-as=67143 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 5 GurbTecMundoVicSeminar
/interface wireless set wlan6 name="wlan6" \
radio-name="GurbTecMundoVicSeminar" mode=ap-bridge ssid="guifi.net-GurbTecMundoVicSeminar" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbTecMundoVicSeminar
# 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_VicSeminariST" master-interface=wlan6 wds-address=00:1A:4D:21:10:9D disabled=no
/ ip address add address=172.20.10.66/30 network=172.20.10.64 broadcast=172.20.10.67 interface=wds_VicSeminariST disabled=no comment="wds_VicSeminariST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_VicSeminariST] do={/routing ospf interface remove $i;}
add interface=wds_VicSeminariST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.20.10.64/30] do={/routing ospf network remove $i;}
add network=172.20.10.64/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicSeminariST] do={/routing bgp peer remove $i;}
add name="VicSeminariST" instance=default remote-address=172.20.10.65 remote-as=3 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 6 GurbTecMundoTavertetDi
/interface wireless set wlan7 name="wlan7" \
radio-name="GurbTecMundoTavertetDi" mode=ap-bridge ssid="guifi.net-GurbTecMundoTavertetDi" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=18 \
dfs-mode=radar-detect \
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=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_TavertetDipositST" master-interface=wlan7 wds-address=4C:5E:0C:88:A3:D0 disabled=no
/ ip address add address=172.25.6.65/29 network=172.25.6.64 broadcast=172.25.6.71 interface=wds_TavertetDipositST disabled=no comment="wds_TavertetDipositST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_TavertetDipositST] do={/routing ospf interface remove $i;}
add interface=wds_TavertetDipositST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.6.64/29] do={/routing ospf network remove $i;}
add network=172.25.6.64/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=TavertetDipositST] do={/routing bgp peer remove $i;}
add name="TavertetDipositST" instance=default remote-address=172.25.6.66 remote-as=57475 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 7 GurbTecMundoVicVictori
/interface wireless set wlan8 name="wlan8" \
radio-name="GurbTecMundoVicVictori" mode=ap-bridge ssid="guifi.net-GurbTecMundoVicVictori" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=20 \
dfs-mode=radar-detect \
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: wdsGurbTecMundoVicVictori
# Remove all existing wds interfaces
: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_VicVictoriaST" master-interface=wlan8 wds-address=00:16:E6:3C:93:68 disabled=no
/ ip address add address=172.25.10.38/30 network=172.25.10.36 broadcast=172.25.10.39 interface=wds_VicVictoriaST disabled=no comment="wds_VicVictoriaST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_VicVictoriaST] do={/routing ospf interface remove $i;}
add interface=wds_VicVictoriaST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.10.36/30] do={/routing ospf network remove $i;}
add network=172.25.10.36/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicVictoriaST] do={/routing bgp peer remove $i;}
add name="VicVictoriaST" instance=default remote-address=172.25.10.37 remote-as=9009 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 8 GurbMundoSCVDip
/interface wireless set wlan9 name="wlan9" \
radio-name="GurbMundoSCVDip" mode=ap-bridge ssid="guifi.net-GurbMundoSCVDip" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbMundoSCVDip
# Remove all existing wds interfaces
: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_SCVDipositST" master-interface=wlan9 wds-address=FF:FF:FF:FF:FF:FF disabled=no
/ ip address add address=172.24.2.34/29 network=172.24.2.32 broadcast=172.24.2.39 interface=wds_SCVDipositST disabled=no comment="wds_SCVDipositST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_SCVDipositST] do={/routing ospf interface remove $i;}
add interface=wds_SCVDipositST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.24.2.32/29] do={/routing ospf network remove $i;}
add network=172.24.2.32/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=SCVDipositST] do={/routing bgp peer remove $i;}
add name="SCVDipositST" instance=default remote-address=172.24.2.33 remote-as=2129 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 9 GurubMundoVicVIT
/interface wireless set wlan10 name="wlan10" \
radio-name="GurubMundoVicVIT" mode=ap-bridge ssid="guifi.net-GurubMundoVicVIT" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurubMundoVicVIT
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan10] \
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_ROUVICVIT03" master-interface=wlan10 wds-address=5C:D9:98:53:B7:A3 disabled=no
/ ip address add address=172.27.10.34/30 network=172.27.10.32 broadcast=172.27.10.35 interface=wds_ROUVICVIT03 disabled=no comment="wds_ROUVICVIT03"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_ROUVICVIT03] do={/routing ospf interface remove $i;}
add interface=wds_ROUVICVIT03
/ routing ospf network
:foreach i in [/routing ospf network find network=172.27.10.32/30] do={/routing ospf network remove $i;}
add network=172.27.10.32/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=ROUVICVIT03] do={/routing bgp peer remove $i;}
add name="ROUVICVIT03" instance=default remote-address=172.27.10.33 remote-as=29880 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 10 GurbMundoTorelloGestio
/interface wireless set wlan11 name="wlan11" \
radio-name="GurbMundoTorelloGestio" mode=ap-bridge ssid="guifi.net-GurbMundoTorelloGestio" \
band="5ghz-a" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=22 \
dfs-mode=radar-detect \
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: wdsGurbMundoTorelloGestio
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan11] \
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_rou01stprdcpdtorellogoufonecat" master-interface=wlan11 wds-address=D4:CA:6D:43:82:17 disabled=no
/ ip address add address=172.26.2.33/29 network=172.26.2.32 broadcast=172.26.2.39 interface=wds_rou01stprdcpdtorellogoufonecat disabled=no comment="wds_rou01stprdcpdtorellogoufonecat"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_rou01stprdcpdtorellogoufonecat] do={/routing ospf interface remove $i;}
add interface=wds_rou01stprdcpdtorellogoufonecat
/ routing ospf network
:foreach i in [/routing ospf network find network=172.26.2.32/29] do={/routing ospf network remove $i;}
add network=172.26.2.32/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=rou01stprdcpdtorellogoufonecat] do={/routing bgp peer remove $i;}
add name="rou01stprdcpdtorellogoufonecat" instance=default remote-address=172.26.2.34 remote-as=2813 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 11 GurbMundoVicMartirs
/interface wireless set wlan12 name="wlan12" \
radio-name="GurbMundoVicMartirs" mode=ap-bridge ssid="guifi.net-GurbMundoVicMartirs" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbMundoVicMartirs
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan12] \
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_VicMartirsST" master-interface=wlan12 wds-address=3A:2A:1A:3E:2A:1A disabled=no
/ ip address add address=172.25.0.53/30 network=172.25.0.52 broadcast=172.25.0.55 interface=wds_VicMartirsST disabled=no comment="wds_VicMartirsST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_VicMartirsST] do={/routing ospf interface remove $i;}
add interface=wds_VicMartirsST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.52/30] do={/routing ospf network remove $i;}
add network=172.25.0.52/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicMartirsST] do={/routing bgp peer remove $i;}
add name="VicMartirsST" instance=default remote-address=172.25.0.54 remote-as=11712 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 12 GurbTecMundoVicSubViga
/interface wireless set wlan13 name="wlan13" \
radio-name="GurbTecMundoVicSubViga" mode=ap-bridge ssid="guifi.net-GurbTecMundoVicSubViga" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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
#
# Radio#: 13 GurbMundoVicRavalCorti
/interface wireless set wlan14 name="wlan14" \
radio-name="GurbMundoVicRavalCorti" mode=ap-bridge ssid="guifi.net-GurbMundoVicRavalCorti" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbMundoVicRavalCorti
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan14] \
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_VicRavalCortinesST" master-interface=wlan14 wds-address=00:27:22:B8:66:73 disabled=no
/ ip address add address=172.25.0.129/30 network=172.25.0.128 broadcast=172.25.0.131 interface=wds_VicRavalCortinesST disabled=no comment="wds_VicRavalCortinesST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_VicRavalCortinesST] do={/routing ospf interface remove $i;}
add interface=wds_VicRavalCortinesST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.128/30] do={/routing ospf network remove $i;}
add network=172.25.0.128/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicRavalCortinesST] do={/routing bgp peer remove $i;}
add name="VicRavalCortinesST" instance=default remote-address=172.25.0.130 remote-as=28944 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 14 GurbMundoCallSerrat
/interface wireless set wlan15 name="wlan15" \
radio-name="GurbMundoCallSerrat" mode=ap-bridge ssid="guifi.net-GurbMundoCallSerrat" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbMundoCallSerrat
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan15] \
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_CallSerratST" master-interface=wlan15 wds-address=00:00:00:00:00:00 disabled=no
/ ip address add address=172.25.0.222/30 network=172.25.0.220 broadcast=172.25.0.223 interface=wds_CallSerratST disabled=no comment="wds_CallSerratST"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_CallSerratST] do={/routing ospf interface remove $i;}
add interface=wds_CallSerratST
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.220/30] do={/routing ospf network remove $i;}
add network=172.25.0.220/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=CallSerratST] do={/routing bgp peer remove $i;}
add name="CallSerratST" instance=default remote-address=172.25.0.221 remote-as=46131 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 15 GurbMundoOlostDip
/interface wireless set wlan16 name="wlan16" \
radio-name="GurbMundoOlostDip" mode=ap-bridge ssid="guifi.net-GurbMundoOlostDip" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
dfs-mode=radar-detect \
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: wdsGurbMundoOlostDip
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan16] \
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_rou01stprdcpdscjgoufonecat" master-interface=wlan16 wds-address=00:00:00:00:00:00 disabled=no
/ ip address add address=172.25.37.74/30 network=172.25.37.72 broadcast=172.25.37.75 interface=wds_rou01stprdcpdscjgoufonecat disabled=no comment="wds_rou01stprdcpdscjgoufonecat"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_rou01stprdcpdscjgoufonecat] do={/routing ospf interface remove $i;}
add interface=wds_rou01stprdcpdscjgoufonecat
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.37.72/30] do={/routing ospf network remove $i;}
add network=172.25.37.72/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=rou01stprdcpdscjgoufonecat] do={/routing bgp peer remove $i;}
add name="rou01stprdcpdscjgoufonecat" instance=default remote-address=172.25.37.73 remote-as=106575 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 16 GurbMundoCNTElectraPOP
/interface wireless set wlan17 name="wlan17" \
radio-name="GurbMundoCNTElectraPOP" mode=ap-bridge ssid="guifi.net-GurbMundoCNTElectraPOP" \
band="2ghz-b" channel-width=20mhz \
frequency-mode=regulatory-domain country=spain antenna-gain=24 \
dfs-mode=radar-detect \
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: wdsGurbMundoCNTElectraPOP
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan17] \
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_rou01stprdcpdcntgoufonecat" master-interface=wlan17 wds-address=00:00:00:00:00:00 disabled=no
/ ip address add address=172.25.1.69/30 network=172.25.1.68 broadcast=172.25.1.71 interface=wds_rou01stprdcpdcntgoufonecat disabled=no comment="wds_rou01stprdcpdcntgoufonecat"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_rou01stprdcpdcntgoufonecat] do={/routing ospf interface remove $i;}
add interface=wds_rou01stprdcpdcntgoufonecat
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.1.68/30] do={/routing ospf network remove $i;}
add network=172.25.1.68/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=rou01stprdcpdcntgoufonecat] do={/routing bgp peer remove $i;}
add name="rou01stprdcpdcntgoufonecat" instance=default remote-address=172.25.1.70 remote-as=77035 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Routed device
#
# Altres connexions de cable
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=ether7] do={/routing ospf interface remove $i;}
add interface=ether7
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.84/30] do={/routing ospf network remove $i;}
add network=172.25.0.84/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=router03goufonecom] do={/routing bgp peer remove $i;}
add name="router03goufonecom" instance=default remote-address=172.25.0.85 remote-as=85554 \
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.0.86/30"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.0.86/30 network=172.25.0.84 broadcast=172.25.0.87 interface=ether7 disabled=no comment="router03goufonecom"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=ether12] do={/routing ospf interface remove $i;}
add interface=ether12
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.248/29] do={/routing ospf network remove $i;}
add network=172.25.0.248/29 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=radius01goufonecom] do={/routing bgp peer remove $i;}
add name="radius01goufonecom" instance=default remote-address=172.25.0.249 remote-as=82141 \
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.0.250/29"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.0.250/29 network=172.25.0.248 broadcast=172.25.0.255 interface=ether12 disabled=no comment="radius01goufonecom"
/ 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=10.138.0.128/27] do={/routing ospf network remove $i;}
add network=10.138.0.128/27 area=backbone disabled=yes
/ routing bgp peer
:foreach i in [find name=GurbTecMundoCaseta] do={/routing bgp peer remove $i;}
add name="GurbTecMundoCaseta" instance=default remote-address=10.138.0.129 remote-as=38611 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=no
:foreach i in [/ip address find address="10.138.0.131/27"] do={/ip address remove $i;}
:delay 1
/ ip address add address=10.138.0.131/27 network=10.138.0.128 broadcast=10.138.0.159 interface=ether1 disabled=no comment="GurbTecMundoCaseta"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=ether2] do={/routing ospf interface remove $i;}
add interface=ether2
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.60/30] do={/routing ospf network remove $i;}
add network=172.25.0.60/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=GurbTecMUNDO01] do={/routing bgp peer remove $i;}
add name="GurbTecMUNDO01" instance=default remote-address=172.25.0.61 remote-as=48457 \
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.0.62/30"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.0.62/30 network=172.25.0.60 broadcast=172.25.0.63 interface=ether2 disabled=no comment="GurbTecMUNDO01"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=ether21] do={/routing ospf interface remove $i;}
add interface=ether21
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.0.228/30] do={/routing ospf network remove $i;}
add network=172.25.0.228/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=GurbTecMundo07] do={/routing bgp peer remove $i;}
add name="GurbTecMundo07" instance=default remote-address=172.25.0.229 remote-as=61275 \
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.0.230/30"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.0.230/30 network=172.25.0.228 broadcast=172.25.0.231 interface=ether21 disabled=no comment="GurbTecMundo07"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=ether5] do={/routing ospf interface remove $i;}
add interface=ether5
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.25.128/27] do={/routing ospf network remove $i;}
add network=10.138.25.128/27 area=backbone disabled=yes
/ routing bgp peer
:foreach i in [find name=GurbTecMundoConfine] do={/routing bgp peer remove $i;}
add name="GurbTecMundoConfine" instance=default remote-address=10.138.25.130 remote-as=66005 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=no
:foreach i in [/ip address find address="10.138.25.129/27"] do={/ip address remove $i;}
:delay 1
/ ip address add address=10.138.25.129/27 network=10.138.25.128 broadcast=10.138.25.159 interface=ether5 disabled=yes comment="GurbTecMundoConfine"
#
# 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.15.193 comment="" disabled=no
#
# Enrutament BGP
# 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 chain=ebgp-in comment="0. Set ebgp-in preferred source." set-pref-src="10.138.15.193" disabled=no
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 set-pref-src="10.138.15.193"
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
#
# Instància BGP
/ routing bgp instance
set default name="default" as=35203 router-id=10.138.15.193 \
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
#
# Enrutament OSPF
/routing ospf instance set default name=default router-id=10.138.15.193 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 35203-GurbTecMundoST executed."
/