# Generated for:
# RouterOSv4.7+
:log info "Unsolclic for 2550-VicPlacaAP going to be executed."
#
# Configuration for RouterOS 4.7 and newer 4.x
# Device: 2550-VicPlacaAP
#
# 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=VicPlacaAP
#
# DNS (client & server cache) zone: 27557
/ip dns set servers=10.138.160.98,10.138.0.2 allow-remote-requests=yes
:delay 1
#
# NTP (client & server cache) zone: 27557
/system ntp client set enabled=yes mode=unicast primary-ntp=10.138.160.98 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="VicPlacaEloi"
#
# 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 VicPlacaAP-N
/interface wireless set wlan1 name="wlan1" \
radio-name="VicPlacaAP-N" mode=ap-bridge ssid="guifi.net-VicPlacaAP-N" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2447 \
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.160.1/27"] do={remove $i}
/ ip address add address=10.138.160.1/27 network=10.138.160.0 broadcast=10.138.160.31 interface=wLan/Lan disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.160.0/27] do={/routing bgp network remove $i;}
add network=10.138.160.0/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wLan/Lan] do={/routing ospf interface remove $i;}
add interface=wLan/Lan
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.160.0/27] do={/routing ospf network remove $i;}
add network=10.138.160.0/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wLan/Lan] do={/ip pool remove $i;}
/ip pool add name=dhcp-wLan/Lan ranges=10.138.160.7-10.138.160.30
:foreach i in [/ip dhcp-server find name=dhcp-wLan/Lan] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wLan/Lan interface=wLan/Lan address-pool=dhcp-wLan/Lan disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.160.0/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.160.0/27 gateway=10.138.160.1 domain=guifi.net comment=dhcp-wLan/Lan
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.160.2 mac-address=00:13:10:E5:75:3F client-id=VicAlguerRadio1 server=dhcp-wLan/Lan
add address=10.138.160.3 mac-address=00:15:6D:AD:6F:1E client-id=VicElenaBerezRd1 server=dhcp-wLan/Lan
add address=10.138.160.4 mac-address=00:15:6D:AC:FE:11 client-id=VicAnnaCRd1 server=dhcp-wLan/Lan
add address=10.138.160.5 mac-address=ff:ff:ff:ff:ff:ff client-id=VicCNouRadio1 server=dhcp-wLan/Lan
add address=10.138.160.6 mac-address=00:15:6D:1A:66:CB client-id=VicMossSer16Rd1 server=dhcp-wLan/Lan
add address=10.138.160.7 mac-address=00:16:01:0D:14:84 client-id=VicRavalCortinesRadio1 server=dhcp-wLan/Lan
add address=10.138.160.8 mac-address=00:18:39:C6:26:B0 client-id=VicPClaraRadio1 server=dhcp-wLan/Lan
add address=10.138.160.10 mac-address=00:1D:07:E4:BF:8D client-id=VicRenomMTRd1 server=dhcp-wLan/Lan
add address=10.138.160.11 mac-address=00:18:39:AE:8B:5B client-id=VicCanigo13 server=dhcp-wLan/Lan
add address=10.138.160.12 mac-address=00:16:01:AF:F5:2D client-id=VICMEDRadio1 server=dhcp-wLan/Lan
add address=10.138.160.13 mac-address=00:15:6D:AA:B9:77 client-id=VicMerceMirRd1 server=dhcp-wLan/Lan
add address=10.138.160.14 mac-address=ff:ff:ff:ff:ff:ff client-id=VicAndreuMiaRadio1 server=dhcp-wLan/Lan
add address=10.138.160.15 mac-address=00:1D:0F:AE:8C:85 client-id=VicStLlatzerAMRadio1 server=dhcp-wLan/Lan
add address=10.138.160.16 mac-address=00:15:6D:D6:95:B9 client-id=VicIgnasi2Rd1 server=dhcp-wLan/Lan
add address=10.138.160.17 mac-address=00:00:00:00:00:01 client-id=VicJRSolerRd1 server=dhcp-wLan/Lan
add address=10.138.160.18 mac-address=00:1D:7E:55:AD:FD client-id=VicManelAlanaRadio1 server=dhcp-wLan/Lan
add address=10.138.160.19 mac-address=ff:ff:ff:ff:ff:ff client-id=vicsolaRadio1 server=dhcp-wLan/Lan
add address=10.138.160.20 mac-address=00:1A:70:4E:C1:9C client-id=VicASunyerRadio1 server=dhcp-wLan/Lan
add address=10.138.160.21 mac-address=ff:ff:ff:ff:ff:ff client-id=VicPinguines server=dhcp-wLan/Lan
add address=10.138.160.22 mac-address=00:16:B6:39:7E:BF client-id=VicRomeroRadio1 server=dhcp-wLan/Lan
add address=10.138.160.23 mac-address=ff:ff:ff:ff:ff:ff client-id=VicAssumptaRadio1 server=dhcp-wLan/Lan
add address=10.138.160.24 mac-address=00:13:10:92:72:82 client-id=VicFerranF server=dhcp-wLan/Lan
add address=10.138.160.25 mac-address=00:18:F8:F2:69:F9 client-id=VicDolorsSolaRadio1 server=dhcp-wLan/Lan
add address=10.138.160.26 mac-address=00:1A:70:4F:41:C7 client-id=VicGuillemRadio1 server=dhcp-wLan/Lan
add address=10.138.160.27 mac-address=00:15:6D:A7:20:DD client-id=VicLaiaRd2 server=dhcp-wLan/Lan
add address=10.138.160.29 mac-address=00:27:22:16:67:21 client-id=VicMercedesRd1 server=dhcp-wLan/Lan
add address=10.138.160.30 mac-address=00:15:6D:AD:E3:78 client-id=VicXeviPuigdemuntRd1 server=dhcp-wLan/Lan
#
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.138.5.33/27"] do={remove $i}
/ ip address add address=10.138.5.33/27 network=10.138.5.32 broadcast=10.138.5.63 interface=wlan1 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.5.32/27] do={/routing bgp network remove $i;}
add network=10.138.5.32/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.5.32/27] do={/routing ospf network remove $i;}
add network=10.138.5.32/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.5.39-10.138.5.62
: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.5.32/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.5.32/27 gateway=10.138.5.33 domain=guifi.net comment=dhcp-wlan1
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.5.34 mac-address=00:15:6D:DA:CE:03 client-id=VicRinkkaRd2 server=dhcp-wlan1
add address=10.138.5.35 mac-address=00:16:01:F2:11:EE client-id=VicNofrarias server=dhcp-wlan1
add address=10.138.5.36 mac-address=00:0C:42:18:45:0D client-id=VicTania server=dhcp-wlan1
add address=10.138.5.37 mac-address=00:16:01:F2:12:78 client-id=VicDaouayRadio1 server=dhcp-wlan1
add address=10.138.5.38 mac-address=00:1C:10:14:14:A1 client-id=VicPuigiRadio1 server=dhcp-wlan1
add address=10.138.5.39 mac-address=00:15:6D:A8:BF:11 client-id=VicRosaRd1 server=dhcp-wlan1
add address=10.138.5.40 mac-address=00:00:00:00:00:02 client-id=VicMariaARd1 server=dhcp-wlan1
add address=10.138.5.41 mac-address=99:99:99:99:99:9A client-id=VicRblPsg50Rd2 server=dhcp-wlan1
add address=10.138.5.43 mac-address=00:16:01:F2:36:2A client-id=VicGuillemFRadio1 server=dhcp-wlan1
add address=10.138.5.44 mac-address=00:15:6D:5E:88:18 client-id=VicCentreOptometricRadio1 server=dhcp-wlan1
add address=10.138.5.46 mac-address=00:16:01:F4:C6:D6 client-id=VicFrancescARadio1 server=dhcp-wlan1
add address=10.138.5.47 mac-address=00:15:6D:A8:AC:57 client-id=VicMariaAngelsRd1 server=dhcp-wlan1
add address=10.138.5.48 mac-address=00:18:DE:DA:04:ED client-id=VicMlSbrt10Rd1 server=dhcp-wlan1
add address=10.138.5.49 mac-address=00:15:6D:E4:F0:E9 client-id=VicJordiNRd1 server=dhcp-wlan1
add address=10.138.5.50 mac-address=00:15:6D:EF:5E:20 client-id=VicPortalRamblaERd1 server=dhcp-wlan1
add address=10.138.5.51 mac-address=00:16:01:AF:E3:4D client-id=VicMACRd1 server=dhcp-wlan1
add address=10.138.5.52 mac-address=00:15:6D:D4:77:1B client-id=VictorresRd1 server=dhcp-wlan1
add address=10.138.5.53 mac-address=00:15:6D:A7:B8:BA client-id=VicBaghdadMRadio1 server=dhcp-wlan1
add address=10.138.5.54 mac-address=ff:ff:ff:ff:ff:ff client-id=VicSalimRadio1 server=dhcp-wlan1
add address=10.138.5.55 mac-address=00:15:6D:A9:BA:AE client-id=VicMAngelsRd1 server=dhcp-wlan1
add address=10.138.5.56 mac-address=00:15:6D:AB:70:B6 client-id=VicArmandoRd1 server=dhcp-wlan1
add address=10.138.5.59 mac-address=00:16:01:B0:0E:75 client-id=VicLMGRd1 server=dhcp-wlan1
add address=10.138.5.61 mac-address=00:15:6D:D6:96:EC client-id=VicSaraRd1 server=dhcp-wlan1
add address=10.138.5.62 mac-address=00:15:6D:DA:1B:DC client-id=vicpalaciosRd4 server=dhcp-wlan1
#
: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 VicPlacaAP-SE
/interface wireless set wlan2 name="wlan2" \
radio-name="VicPlacaAP-SE" mode=ap-bridge ssid="guifi.net-VicPlacaAP-SE" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2417 \
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: HotSpot
#
# HotSpot
/interface wireless
:foreach i in [find name=hotspot2] do={remove $i}
add name="hotspot2" arp=enabled master-interface=wlan2 ssid="guifi.net-AccesObert" disabled="no"
/ip address
:foreach i in [find address="192.168.101.1/24"] do={remove $i}
/ip address add address=192.168.101.1/24 interface=hotspot2 disabled=no
/ip pool
:foreach i in [find name=hs-pool-101] do={remove $i}
add name="hs-pool-101" ranges=192.168.101.2-192.168.101.254
/ip dhcp-server
:foreach i in [find name=hs-dhcp-101] do={remove $i}
add name="hs-dhcp-101" interface=hotspot2 lease-time=1h address-pool=hs-pool-101 bootp-support=static authoritative=after-2sec-delay disabled=no
/ip dhcp-server network
:foreach i in [find address="192.168.101.0/24"] do={remove $i}
add address=192.168.101.0/24 gateway=192.168.101.1 domain=guifi.net comment=dhcp-1
/ip hotspot profile
:foreach i in [find name=hsprof2] do={remove $i}
add name="hsprof2" hotspot-address=192.168.101.1 dns-name="guests.guifi.net" html-directory=hotspot smtp-server=0.0.0.0 login-by=http-pap,trial split-user-domain=no trial-uptime=30m/1d trial-user-profile=default use-radius=no
/ip hotspot user profile
set default name="default" advertise-url=http://guifi.net/trespassos/
/ip hotspot
:foreach i in [find name=hotspot2] do={remove $i}
add name="hotspot2" interface=hotspot2 address-pool=hs-pool-101 profile=hsprof2 idle-timeout=5m keepalive-timeout=none addresses-per-mac=2 disabled=no
# end of HotSpot
:delay 1
#
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.138.160.33/27"] do={remove $i}
/ ip address add address=10.138.160.33/27 network=10.138.160.32 broadcast=10.138.160.63 interface=wlan2 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.160.32/27] do={/routing bgp network remove $i;}
add network=10.138.160.32/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.160.32/27] do={/routing ospf network remove $i;}
add network=10.138.160.32/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.160.39-10.138.160.62
: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.160.32/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.160.32/27 gateway=10.138.160.33 domain=guifi.net comment=dhcp-wlan2
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.160.34 mac-address=00:13:10:3F:A6:D8 client-id=VicCNordMontserratRadio1 server=dhcp-wlan2
add address=10.138.160.35 mac-address=00:18:F8:E5:FA:E5 client-id=VicMercaderRadio1 server=dhcp-wlan2
add address=10.138.160.36 mac-address=00:0F:66:37:48:53 client-id=VicLluisSTclient server=dhcp-wlan2
add address=10.138.160.37 mac-address=00:18:F8:E5:FA:A9 client-id=VicRubenAcevesRadio1 server=dhcp-wlan2
add address=10.138.160.38 mac-address=00:15:6D:AE:0A:E2 client-id=VicFinaVigueRd1 server=dhcp-wlan2
add address=10.138.160.40 mac-address=00:12:17:49:93:17 client-id=VicVerdaguer server=dhcp-wlan2
add address=10.138.160.41 mac-address=00:15:6D:A7:AB:C3 client-id=VicJordiMireiaRd1 server=dhcp-wlan2
add address=10.138.160.42 mac-address=00:16:B6:C9:14:AD client-id=VicAnna server=dhcp-wlan2
add address=10.138.160.43 mac-address=00:0B:6B:4F:7D:C0 client-id=vicJosepQRd1 server=dhcp-wlan2
add address=10.138.160.44 mac-address=00:15:6D:A7:AB:7D client-id=VicNuriaimRd1 server=dhcp-wlan2
add address=10.138.160.45 mac-address=08:18:F8:F2:2B:7C client-id=VicPlacaXubeRd1 server=dhcp-wlan2
add address=10.138.160.46 mac-address=00:0C:42:1B:52:53 client-id=VicSmartPointPlacaST server=dhcp-wlan2
add address=10.138.160.47 mac-address=00:18:F8:E5:FB:C6 client-id=VicPlazacRadio1 server=dhcp-wlan2
add address=10.138.160.48 mac-address=00:15:6D:E0:78:01 client-id=VicLLBarniolRadio2 server=dhcp-wlan2
add address=10.138.160.49 mac-address=ff:ff:ff:ff:ff:ff client-id=VicNaudoRadio1 server=dhcp-wlan2
add address=10.138.160.50 mac-address=00:16:01:92:62:8C client-id=VicVerdaguer2 server=dhcp-wlan2
add address=10.138.160.51 mac-address=00:1D:0F:AE:BA:E6 client-id=VicNuriaPRadio1 server=dhcp-wlan2
add address=10.138.160.52 mac-address=ff:ff:ff:ff:ff:ff client-id=VicSamuRadio1 server=dhcp-wlan2
add address=10.138.160.53 mac-address=00:16:01:AD:02:6C client-id=VicPepMireRadio1 server=dhcp-wlan2
add address=10.138.160.54 mac-address=00:16:01:AF:06:10 client-id=GurbVerdaguerRadio1 server=dhcp-wlan2
add address=10.138.160.55 mac-address=00:15:6D:AE:ED:7C client-id=VicJMLlopRd1 server=dhcp-wlan2
add address=10.138.160.56 mac-address=00:15:6D:F8:2E:EC client-id=VicNouCRd2 server=dhcp-wlan2
add address=10.138.160.57 mac-address=00:1D:0F:AE:BA:FE client-id=VicVerdaguer22 server=dhcp-wlan2
add address=10.138.160.58 mac-address=00:15:6D:D8:22:C1 client-id=VicPlacaPes1Rd1 server=dhcp-wlan2
add address=10.138.160.59 mac-address=00:27:22:26:65:C9 client-id=VicPlacaMajor3Rd1 server=dhcp-wlan2
add address=10.138.160.61 mac-address=00:15:6D:1A:01:62 client-id=VicPlMajorDCRd1 server=dhcp-wlan2
add address=10.138.160.62 mac-address=00:12:17:C7:DB:B4 client-id=VicEdMallaRadio1 server=dhcp-wlan2
#
: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;}
#
:delay 1
#
# Radio#: 2 VicPlacaAP-SO
/interface wireless set wlan3 name="wlan3" \
radio-name="VicPlacaAP-SO" mode=ap-bridge ssid="guifi.net-VicPlacaAP-SO" \
band="2.4ghz-b" \
frequency-mode=regulatory-domain country=spain antenna-gain=14 \
frequency=2432 \
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.160.65/27"] do={remove $i}
/ ip address add address=10.138.160.65/27 network=10.138.160.64 broadcast=10.138.160.95 interface=wlan3 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.160.64/27] do={/routing bgp network remove $i;}
add network=10.138.160.64/27 disabled=no
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wlan3] do={/routing ospf interface remove $i;}
add interface=wlan3
/ routing ospf network
:foreach i in [/routing ospf network find network=10.138.160.64/27] do={/routing ospf network remove $i;}
add network=10.138.160.64/27 area=backbone disabled=no
:delay 1
#
# DHCP
:foreach i in [/ip pool find name=dhcp-wlan3] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan3 ranges=10.138.160.71-10.138.160.94
:foreach i in [/ip dhcp-server find name=dhcp-wlan3] do={/ip dhcp-server remove $i;}
/ip dhcp-server add name=dhcp-wlan3 interface=wlan3 address-pool=dhcp-wlan3 disabled=no
:foreach i in [/ip dhcp-server network find address="10.138.160.64/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.160.64/27 gateway=10.138.160.65 domain=guifi.net comment=dhcp-wlan3
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.160.66 mac-address=00:18:39:C6:83:1D client-id=VicManel007 server=dhcp-wlan3
add address=10.138.160.67 mac-address=00:16:01:F2:2A:81 client-id=VicIkanRd1 server=dhcp-wlan3
add address=10.138.160.68 mac-address=00:13:10:E5:75:45 client-id=VicStFrancesc server=dhcp-wlan3
add address=10.138.160.69 mac-address=00:16:01:10:09:B4 client-id=VicStFrancescJordiRadio1 server=dhcp-wlan3
add address=10.138.160.70 mac-address=00:15:6D:1A:5E:C3 client-id=VicMisericordiaRd1 server=dhcp-wlan3
add address=10.138.160.71 mac-address=00:12:17:BC:C2:6F client-id=VicMiriamRadio server=dhcp-wlan3
add address=10.138.160.72 mac-address=00:18:39:AE:46:7C client-id=VicMestreGarrigaClient server=dhcp-wlan3
add address=10.138.160.73 mac-address=00:15:6D:5E:75:C6 client-id=VicTeresaHRd2 server=dhcp-wlan3
add address=10.138.160.74 mac-address=00:16:B6:B0:F0:14 client-id=VicJordiRoviraRadio1 server=dhcp-wlan3
add address=10.138.160.75 mac-address=00:18:39:BC:02:D5 client-id=VicMartaARadio1 server=dhcp-wlan3
add address=10.138.160.76 mac-address=00:16:B6:D9:87:2C client-id=VicSRiuRadio1 server=dhcp-wlan3
add address=10.138.160.77 mac-address=00:15:6D:DA:A9:1D client-id=VicUrena2Nano2 server=dhcp-wlan3
add address=10.138.160.78 mac-address=00:14:BF:D2:70:6B client-id=VicEOrdeixRadio1 server=dhcp-wlan3
add address=10.138.160.79 mac-address=00:15:6D:AE:D9:08 client-id=rzzb2009Rd2 server=dhcp-wlan3
add address=10.138.160.80 mac-address=00:16:01:4B:65:42 client-id=VicMestralRadio1 server=dhcp-wlan3
add address=10.138.160.81 mac-address=00:12:17:DE:0D:88 client-id=GXAVladimir server=dhcp-wlan3
add address=10.138.160.82 mac-address=00:01:02:03:04:07 client-id=vicMiquelBclient server=dhcp-wlan3
add address=10.138.160.83 mac-address=00:0E:8E:13:AA:2F client-id=VicRichardRadio1 server=dhcp-wlan3
add address=10.138.160.84 mac-address=ff:ff:ff:ff:ff:ff client-id=VicLSabataWRT0 server=dhcp-wlan3
add address=10.138.160.85 mac-address=00:18:F8:F2:2A:F6 client-id=VicCasalRadio1 server=dhcp-wlan3
add address=10.138.160.86 mac-address=00:16:01:AD:CD:48 client-id=VicColomaRadio1 server=dhcp-wlan3
add address=10.138.160.88 mac-address=00:16:01:8C:72:78 client-id=VicLeliaRadio1 server=dhcp-wlan3
add address=10.138.160.89 mac-address=00:15:6D:A6:93:78 client-id=VicSantiJRadio1 server=dhcp-wlan3
add address=10.138.160.90 mac-address=00:15:6D:EA:91:AB client-id=VicHassanRd1 server=dhcp-wlan3
add address=10.138.160.91 mac-address=00:0C:42:15:D3:95 client-id=VicJSolerRd3 server=dhcp-wlan3
add address=10.138.160.92 mac-address=00:16:01:F4:67:C5 client-id=VICSDRadio1 server=dhcp-wlan3
add address=10.138.160.93 mac-address=00:23:CD:BF:51:B5 client-id=VicIoliRadio1 server=dhcp-wlan3
add address=10.138.160.94 mac-address=00:15:6D:AC:F1:9F client-id=VicFerrersRd1 server=dhcp-wlan3
#
:delay 1
# Type: wLan
/ip address
:foreach i in [find address="10.138.4.33/27"] do={remove $i}
/ ip address add address=10.138.4.33/27 network=10.138.4.32 broadcast=10.138.4.63 interface=wlan3 disabled=no
/ routing bgp network
:foreach i in [/routing bgp network find network=10.138.4.32/27] do={/routing bgp network remove $i;}
add network=10.138.4.32/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.4.32/27] do={/routing ospf network remove $i;}
add network=10.138.4.32/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.4.39-10.138.4.62
: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.4.32/27"] do={/ip dhcp-server network remove $i;}
/ip dhcp-server network add address=10.138.4.32/27 gateway=10.138.4.33 domain=guifi.net comment=dhcp-wlan3
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.4.34 mac-address=00:1C:10:36:51:6C client-id=VicBarnadesRadio1 server=dhcp-wlan3
add address=10.138.4.35 mac-address=00:14:BF:EB:89:FA client-id=VicElPrat5 server=dhcp-wlan3
add address=10.138.4.36 mac-address=00:15:6D:D4:77:D7 client-id=VicBaragoraRd1 server=dhcp-wlan3
add address=10.138.4.37 mac-address=ff:ff:ff:ff:ff:ff client-id=VicMasRieraRadio2 server=dhcp-wlan3
add address=10.138.4.38 mac-address=00:15:6D:1F:47:34 client-id=VicDrissRd5 server=dhcp-wlan3
add address=10.138.4.39 mac-address=00:0C:42:1B:52:5F client-id=VicSmartPointCarmeST server=dhcp-wlan3
add address=10.138.4.40 mac-address=00:1C:10:14:17:01 client-id=VicToniRadio1 server=dhcp-wlan3
add address=10.138.4.41 mac-address=00:0C:42:1B:52:6D client-id=VicSmartPointPG2 server=dhcp-wlan3
add address=10.138.4.42 mac-address=00:1D:7E:4B:18:E1 client-id=VicPasseigRadio1 server=dhcp-wlan3
add address=10.138.4.43 mac-address=00:15:6D:DC:5B:DB client-id=VicTxellParesRd1 server=dhcp-wlan3
add address=10.138.4.44 mac-address=ff:ff:ff:ff:ff:ff client-id=VicJordiGRadio1 server=dhcp-wlan3
add address=10.138.4.47 mac-address=00:15:6D:A8:B7:E8 client-id=VicAumatellRd1 server=dhcp-wlan3
add address=10.138.4.48 mac-address=11:22:33:44:55:67 client-id=VicRosarogerRd1 server=dhcp-wlan3
add address=10.138.4.49 mac-address=00:15:6D:1A:93:74 client-id=VicJMesquiasRd1 server=dhcp-wlan3
add address=10.138.4.50 mac-address=00:15:6D:AE:70:05 client-id=VicPauliRd2 server=dhcp-wlan3
add address=10.138.4.51 mac-address=00:15:6D:AB:98:2A client-id=vicplmajor41CPE1 server=dhcp-wlan3
add address=10.138.4.52 mac-address=00:15:6D:A9:CE:5C client-id=VicAlopezRd3 server=dhcp-wlan3
add address=10.138.4.53 mac-address=00:15:6D:AC:C7:62 client-id=vicsoledat20Rd2 server=dhcp-wlan3
add address=10.138.4.54 mac-address=00:15:6D:A7:1E:E7 client-id=VicMRSalaRd2 server=dhcp-wlan3
add address=10.138.4.55 mac-address=00:18:F8:E5:FB:08 client-id=VicSalaRd2 server=dhcp-wlan3
add address=10.138.4.56 mac-address=00:15:6D:A7:21:29 client-id=VicPgGen18Rd1 server=dhcp-wlan3
add address=10.138.4.57 mac-address=01:01:01:02:02:04 client-id=VicMeritxellRd1 server=dhcp-wlan3
add address=10.138.4.58 mac-address=00:15:6D:EA:91:AC client-id=VicConstantinTerecRd1 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;}
/ interface wireless wds
add name="wds_VicCasaSacerdotal" master-interface=wlan3 wds-address=00:14:BF:EB:73:98 disabled=no
/ ip address add address=172.25.10.114/30 network=172.25.10.112 broadcast=172.25.10.115 interface=wds_VicCasaSacerdotal disabled=no comment="wds_VicCasaSacerdotal"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_VicCasaSacerdotal] do={/routing ospf interface remove $i;}
add interface=wds_VicCasaSacerdotal
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.10.112/30] do={/routing ospf network remove $i;}
add network=172.25.10.112/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicCasaSacerdotal] do={/routing bgp peer remove $i;}
add name="VicCasaSacerdotal" instance=default remote-address=172.25.10.113 remote-as=1350 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Radio#: 3 VicPlacaAP-5ghz
/interface wireless set wlan4 name="wlan4" \
radio-name="VicPlacaAP-5ghz" mode=ap-bridge ssid="guifi.net-VicPlacaAP-5ghz" \
band="5ghz" \
frequency-mode=regulatory-domain country=spain antenna-gain=21 \
frequency=5680 \
dfs-mode=none \
wds-mode=static wds-default-bridge=none wds-default-cost=100 \
wds-cost-range=50-150 wds-ignore-ssid=yes hide-ssid=no
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan4] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
/ interface wireless wds
add name="wds_VicSalvadorAllendeRadio1" master-interface=wlan4 wds-address=00:0E:8E:13:AB:A3 disabled=no
/ ip address add address=172.25.10.62/30 network=172.25.10.60 broadcast=172.25.10.63 interface=wds_VicSalvadorAllendeRadio1 disabled=no comment="wds_VicSalvadorAllendeRadio1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_VicSalvadorAllendeRadio1] do={/routing ospf interface remove $i;}
add interface=wds_VicSalvadorAllendeRadio1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.10.60/30] do={/routing ospf network remove $i;}
add network=172.25.10.60/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicSalvadorAllendeRadio1] do={/routing bgp peer remove $i;}
add name="VicSalvadorAllendeRadio1" instance=default remote-address=172.25.10.61 remote-as=10257 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
/ interface wireless wds
add name="wds_VicCentre" master-interface=wlan4 wds-address=00:0C:42:06:9D:D3 disabled=no
/ ip address add address=172.25.10.82/30 network=172.25.10.80 broadcast=172.25.10.83 interface=wds_VicCentre disabled=no comment="wds_VicCentre"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_VicCentre] do={/routing ospf interface remove $i;}
add interface=wds_VicCentre
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.10.80/30] do={/routing ospf network remove $i;}
add network=172.25.10.80/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicCentre] do={/routing bgp peer remove $i;}
add name="VicCentre" instance=default remote-address=172.25.10.81 remote-as=2650 \
multihop=no route-reflect=no ttl=default in-filter=ebgp-in out-filter=ebgp-out disabled=yes
#
:delay 1
#
# Routed device
#
# Other cable connections
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=ether3] do={/routing ospf interface remove $i;}
add interface=ether3
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.10.92/30] do={/routing ospf network remove $i;}
add network=172.25.10.92/30 area=backbone disabled=no
/ routing bgp peer
:foreach i in [find name=VicPlacaEnllacos] do={/routing bgp peer remove $i;}
add name="VicPlacaEnllacos" instance=default remote-address=172.25.10.93 remote-as=2707 \
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.10.94/30"] do={/ip address remove $i;}
:delay 1
/ ip address add address=172.25.10.94/30 network=172.25.10.92 broadcast=172.25.10.95 interface=ether3 disabled=no comment="VicPlacaEnllacos"
#
# 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.160.1 comment="" disabled=no
add chain=srcnat src-address="172.16.0.0/12" dst-address=!172.16.0.0/12 protocol=!ospf action=src-nat to-addresses=10.138.160.1 comment="" disabled=no
#
# BGP Routing
# BGP & OSPF Filters
:foreach i in [/routing filter find chain=ospf-in] do={/routing filter remove $i;}
:foreach i in [/routing filter find chain=ospf-out] do={/routing filter remove $i;}
:foreach i in [/routing filter find chain=ebgp-in] do={/routing filter remove $i;}
:foreach i in [/routing filter find chain=ebgp-out] do={/routing filter remove $i;}
/ routing filter
add action=discard chain=ebgp-in comment="1. Discard insert non 10.x routes from BGP peer" disabled=no invert-match=no prefix=!10.0.0.0/8 prefix-length=!8-32
add action=discard chain=ebgp-out comment="2. Discard send non 10.x routes to BGP peer" disabled=no invert-match=no prefix=!10.0.0.0/8 prefix-length=!8-32
add action=accept chain=ospf-in comment="3. Accept insert 10.x routes from OSPF neighbor" disabled=no invert-match=no prefix=10.0.0.0/8 prefix-length=8-32
add action=accept chain=ospf-in comment="4. Accept insert 172.x routes from OSPF neighbor" disabled=no invert-match=no prefix=172.16.0.0/12 prefix-length=8-32
add action=discard chain=ospf-in comment="5. Discard insert non 10.x and 172.x from OSPF neighbor" disabled=no invert-match=no
add action=accept chain=ospf-out comment="6. Allow send 10.x routes to OSPF neighbor" disabled=no invert-match=no prefix=10.0.0.0/8 prefix-length=8-32
add action=accept chain=ospf-out comment="7. Allow send 172.x routes to OSPF neighbor" disabled=no invert-match=no prefix=172.16.0.0/12 prefix-length=8-32
add action=discard chain=ospf-out comment="8. Discard send non 10.x and 172.x to OSPF neighbor" disabled=no invert-match=no
#
# BGP instance
/ routing bgp instance
set default name="default" as=2550 router-id=10.138.160.1 \
redistribute-connected=no redistribute-static=no redistribute-rip=no \
redistribute-ospf=yes redistribute-other-bgp=yes out-filter=ebgp-out \
client-to-client-reflection=yes comment="" disabled=no
#
# OSPF Routing
/routing ospf instance set default name=default router-id=10.138.160.1 comment="" disabled=no distribute-default=never \
redistribute-bgp=as-type-1 redistribute-connected=no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no in-filter=ospf-in out-filter=ospf-out
#
:log info "Unsolclic for 2550-VicPlacaAP executed."
/