# Generat per a:
# RouterOSv2.9
:log info "Unsolclic for 3062-OlostAjuntamentST going to be executed."
#
# Configuration for RouterOS > 2.9.51 or 3.x
# Trasto: 3062-OlostAjuntamentST
#
# ATENCIÓ: Versió Beta
#
# 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, 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=OlostAjuntamentST
#
# DNS (client & server cache) zone: 2458
/ip dns set primary-dns=10.138.120.66 secondary-dns=10.138.25.68 allow-remote-requests=yes
:delay 1
#
# NTP (client & server cache) zone: 2458
/system ntp client set enabled=yes mode=unicast primary-ntp=10.138.15.130
/system ntp server set manycast=no enabled=yes
: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="OlostAjuntament"
#
# 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 OlostAjAP1
/interface wireless set wlan1 name="wlan1" \
radio-name="OlostAjAP1" mode=ap-bridge ssid="guifi.net-OlostAjAP1" \
band="2.4ghz-b" \
frequency-mode=manual-txpower country=spain antenna-gain=0 \
frequency=2412 \
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.120.65/27"] do={remove $i}
/ ip address add address=10.138.120.65/27 network=10.138.120.64 broadcast=10.138.120.95 interface=wLan/Lan 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.120.64/27] do={/routing ospf network remove $i;}
add network=10.138.120.64/27 area=backbone disabled=no
:delay 1
#
# DHCP
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.120.66 mac-address=ff:ff:ff:ff:ff:ff client-id=OlostAjuntamentServer1 server=dhcp-wLan/Lan
add address=10.138.120.67 mac-address=ff:ff:ff:ff:ff:ff client-id=OlostAjuntamentADSL server=dhcp-wLan/Lan
add address=10.138.120.68 mac-address=00:16:01:8C:08:EC client-id=OlostgRieraRadio1 server=dhcp-wLan/Lan
add address=10.138.120.69 mac-address=00:16:01:8C:12:34 client-id=OlostMarsopareRadio1 server=dhcp-wLan/Lan
add address=10.138.120.70 mac-address=00:18:F8:F2:6A:89 client-id=OlostPerico server=dhcp-wLan/Lan
add address=10.138.120.71 mac-address=00:16:01:8C:0A:00 client-id=OlostComalrenaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.72 mac-address=00:16:01:8C:16:48 client-id=OlostGilsucaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.73 mac-address=00:16:01:8C:0A:26 client-id=OlostJosepCasellasRadio1 server=dhcp-wLan/Lan
add address=10.138.120.74 mac-address=00:16:01:84:6E:2C client-id=OLostdaniRadio1 server=dhcp-wLan/Lan
add address=10.138.120.75 mac-address=00:16:01:8C:0D:4E client-id=OlostGarciaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.76 mac-address=00:16:01:8C:15:26 client-id=olostcostaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.77 mac-address=00:16:01:8E:DD:A0 client-id=OlostReinaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.78 mac-address=00:16:01:8E:E0:CE client-id=OlostRarboixRadio1 server=dhcp-wLan/Lan
add address=10.138.120.79 mac-address=00:16:01:8C:72:C6 client-id=OlostJMBertransRadio2 server=dhcp-wLan/Lan
add address=10.138.120.80 mac-address=00:16:01:8C:95:04 client-id=OlostMartaFRadio1 server=dhcp-wLan/Lan
add address=10.138.120.81 mac-address=ff:ff:ff:ff:ff:ff client-id=SBGSantJaumeRadio1 server=dhcp-wLan/Lan
add address=10.138.120.82 mac-address=00:16:01:AD:D8:0C client-id=OlostDolorsRadio1 server=dhcp-wLan/Lan
add address=10.138.120.83 mac-address=00:18:F8:F1:FD:DE client-id=OLostCasalRadio1 server=dhcp-wLan/Lan
add address=10.138.120.84 mac-address=00:16:01:8E:DD:64 client-id=OlostSubiranaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.85 mac-address=00:16:01:F2:14:9E client-id=ToriRadio1 server=dhcp-wLan/Lan
add address=10.138.120.86 mac-address=00:16:01:B0:0C:36 client-id=OlostCalprudenciRadio1 server=dhcp-wLan/Lan
add address=10.138.120.87 mac-address=00:16:01:8C:07:70 client-id=DisbauxaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.88 mac-address=00:15:6D:A8:21:1D client-id=OlostcalgarrosRadio1 server=dhcp-wLan/Lan
add address=10.138.120.89 mac-address=00:16:01:8C:72:62 client-id=OlostJordiRadio1 server=dhcp-wLan/Lan
add address=10.138.120.90 mac-address=00:16:01:8C:14:E6 client-id=OlostMfreiRadio1 server=dhcp-wLan/Lan
add address=10.138.120.91 mac-address=00:15:6D:A8:20:E2 client-id=OlostCanCandelaRadio1 server=dhcp-wLan/Lan
add address=10.138.120.92 mac-address=00:16:B6:1F:F5:08 client-id=OlostSantiRadio1 server=dhcp-wLan/Lan
add address=10.138.120.93 mac-address=00:15:6D:A8:B8:8D client-id=OlostJordi22Rd1 server=dhcp-wLan/Lan
:foreach i in [/ip dhcp-server network find address="10.138.120.64/27"] do={/ip dhcp-server network remove $i;}
: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.120.94-10.138.120.94
/ip dhcp-server network add address=10.138.120.64/27 gateway=10.138.120.65 domain=guifi.net comment=dhcp-wLan/Lan
: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=yes
#
: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 OlostAjDip
/interface wireless set wlan2 name="wlan2" \
radio-name="OlostAjDip" mode=ap-bridge ssid="guifi.net-OlostAjDip" \
band="5ghz" \
frequency-mode=manual-txpower country=spain antenna-gain=0 \
frequency=5220 \
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=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_OLSTDipST1" master-interface=wlan2 wds-address=00:0C:42:0C:1A:DB disabled=no
/ ip address add address=172.25.3.234/30 network=172.25.3.232 broadcast=172.25.3.235 interface=wds_OLSTDipST1 disabled=no comment="wds_OLSTDipST1"
/ routing ospf interface
:foreach i in [/routing ospf interface find interface=wds_OLSTDipST1] do={/routing ospf interface remove $i;}
add interface=wds_OLSTDipST1
/ routing ospf network
:foreach i in [/routing ospf network find network=172.25.3.232/30] do={/routing ospf network remove $i;}
add network=172.25.3.232/30 area=backbone disabled=yes
/ routing bgp peer
:foreach i in [find name=OLSTDipST1] do={/routing bgp peer remove $i;}
add name="OLSTDipST1" instance=default remote-address=172.25.3.233 remote-as=3061 \
multihop=no route-reflect=no ttl=1 in-filter=ospf-in out-filter=ospf-out disabled=no
#
:delay 1
#
# Radio#: 2 OlostAjAP2
/interface wireless set wlan3 name="wlan3" \
radio-name="OlostAjAP2" mode=ap-bridge ssid="guifi.net-OlostAjAP2" \
band="2.4ghz-b" \
frequency-mode=manual-txpower country=spain antenna-gain=0 \
frequency=2437 \
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.120.97/27"] do={remove $i}
/ ip address add address=10.138.120.97/27 network=10.138.120.96 broadcast=10.138.120.127 interface=wlan3 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.120.96/27] do={/routing ospf network remove $i;}
add network=10.138.120.96/27 area=backbone disabled=no
:delay 1
#
# DHCP
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.120.98 mac-address=00:16:01:84:A7:68 client-id=OlostCanCucaRadio1 server=dhcp-wlan3
add address=10.138.120.99 mac-address=ff:ff:ff:ff:ff:ff client-id=OlostEvaRadio1 server=dhcp-wlan3
add address=10.138.120.100 mac-address=00:16:01:84:9A:BA client-id=OlostPalauRadio1 server=dhcp-wlan3
add address=10.138.120.101 mac-address=00:18:F8:F2:52:D9 client-id=OlostArdid server=dhcp-wlan3
add address=10.138.120.102 mac-address=00:16:01:8C:0C:96 client-id=OlostBasterRadio1 server=dhcp-wlan3
add address=10.138.120.103 mac-address=00:16:01:8C:08:F4 client-id=OlostRCBRadio1 server=dhcp-wlan3
add address=10.138.120.104 mac-address=00:16:01:8C:18:12 client-id=OlostMartiMegiasRadio1 server=dhcp-wlan3
add address=10.138.120.105 mac-address=00:16:01:8C:15:10 client-id=OlostAssumptaRadio1 server=dhcp-wlan3
add address=10.138.120.106 mac-address=00:16:01:8C:15:12 client-id=OLOSTSARARadio1 server=dhcp-wlan3
add address=10.138.120.107 mac-address=00:16:01:8C:6C:CA client-id=OlostRamonSalaRadio1 server=dhcp-wlan3
add address=10.138.120.108 mac-address=00:16:01:8C:09:3A client-id=OlostDomiRadio1 server=dhcp-wlan3
add address=10.138.120.109 mac-address=00:16:01:8C:18:12 client-id=DANICRadio1 server=dhcp-wlan3
add address=10.138.120.110 mac-address=00:1C:10:13:B1:CA client-id=sansalvadorRadio1 server=dhcp-wlan3
add address=10.138.120.111 mac-address=00:1C:10:44:39:53 client-id=OlostMGeneroRadio1 server=dhcp-wlan3
add address=10.138.120.112 mac-address=00:16:01:8D:86:18 client-id=OlostCalCiuroRadio1 server=dhcp-wlan3
add address=10.138.120.113 mac-address=00:16:01:8E:E1:66 client-id=OlostEsteveRadio1 server=dhcp-wlan3
add address=10.138.120.114 mac-address=00:1C:10:13:A9:8C client-id=OlostBcnRadio1 server=dhcp-wlan3
add address=10.138.120.115 mac-address=00:16:01:AD:D6:06 client-id=OlostDavidRadio1 server=dhcp-wlan3
add address=10.138.120.116 mac-address=00:16:01:F2:10:46 client-id=OlostPepiRadio1 server=dhcp-wlan3
add address=10.138.120.117 mac-address=00:1A:70:4E:B8:EA client-id=JondalarRadio1 server=dhcp-wlan3
add address=10.138.120.118 mac-address=00:16:01:8C:76:D1 client-id=OlostElTeixellRadio1 server=dhcp-wlan3
add address=10.138.120.119 mac-address=00:16:01:B0:05:60 client-id=OlostAnaRadio1 server=dhcp-wlan3
add address=10.138.120.120 mac-address=00:16:01:8C:18:44 client-id=OlostEvaSRadio1 server=dhcp-wlan3
add address=10.138.120.121 mac-address=00:16:01:8C:0F:22 client-id=OlostcoriRadio1 server=dhcp-wlan3
add address=10.138.120.122 mac-address=00:16:01:AF:F0:87 client-id=OlostGuillermoRadio1 server=dhcp-wlan3
add address=10.138.120.123 mac-address=00:16:01:B0:0E:76 client-id=OlostPereRadio1 server=dhcp-wlan3
add address=10.138.120.124 mac-address=00:1A:70:7B:6F:41 client-id=olostviaRadio2 server=dhcp-wlan3
add address=10.138.120.125 mac-address=00:16:01:8C:18:28 client-id=OlostCotsRadio1 server=dhcp-wlan3
add address=10.138.120.126 mac-address=00:15:6D:E0:93:61 client-id=OlostCorderoureRadio1 server=dhcp-wlan3
:foreach i in [/ip dhcp-server network find address="10.138.120.96/27"] do={/ip dhcp-server network remove $i;}
:foreach i in [/ip pool find name=dhcp-wlan3] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan3 ranges=10.138.120.126-10.138.120.126
/ip dhcp-server network add address=10.138.120.96/27 gateway=10.138.120.97 domain=guifi.net comment=dhcp-wlan3
: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=yes
#
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan3] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
#
:delay 1
#
# Radio#: 3 OlostAjAP3
/interface wireless set wlan4 name="wlan4" \
radio-name="OlostAjAP3" mode=ap-bridge ssid="guifi.net-OlostAjAP3" \
band="2.4ghz-b" \
frequency-mode=manual-txpower country=spain antenna-gain=0 \
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.120.129/27"] do={remove $i}
/ ip address add address=10.138.120.129/27 network=10.138.120.128 broadcast=10.138.120.159 interface=wlan4 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.120.128/27] do={/routing ospf network remove $i;}
add network=10.138.120.128/27 area=backbone disabled=no
:delay 1
#
# DHCP
/ip dhcp-server lease
:foreach i in [find comment=""] do={remove $i;}
:delay 1
add address=10.138.120.130 mac-address=00:18:F8:F1:FD:15 client-id=OlostRavalJosepRadio1 server=dhcp-wlan4
add address=10.138.120.131 mac-address=00:18:F8:F2:2C:5F client-id=OlostReixagoRadio1 server=dhcp-wlan4
add address=10.138.120.132 mac-address=00:18:F8:E5:FA:B2 client-id=OlostMarcelRadio1 server=dhcp-wlan4
add address=10.138.120.133 mac-address=00:18:F8:F1:AC:93 client-id=OlostMarianoRadio1 server=dhcp-wlan4
add address=10.138.120.134 mac-address=00:16:01:84:70:D8 client-id=OlostMaTereRadio1 server=dhcp-wlan4
add address=10.138.120.135 mac-address=00:18:F8:F1:AC:C3 client-id=OlostRavalRibasRadio1 server=dhcp-wlan4
add address=10.138.120.136 mac-address=00:18:F8:F1:AC:57 client-id=ArmasterdidRadio1 server=dhcp-wlan4
add address=10.138.120.137 mac-address=ff:ff:ff:ff:ff:ff client-id=OlostLluissaRadio1 server=dhcp-wlan4
add address=10.138.120.138 mac-address=00:16:01:8C:09:6A client-id=OlostMarsofillRadio1 server=dhcp-wlan4
add address=10.138.120.139 mac-address=00:18:39:CE:BC:5D client-id=CalFornesaRadio1 server=dhcp-wlan4
add address=10.138.120.140 mac-address=00:18:39:AE:88:5B client-id=navarroRadio1 server=dhcp-wlan4
add address=10.138.120.141 mac-address=00:18:F8:F2:52:5A client-id=OlostLaLluna server=dhcp-wlan4
add address=10.138.120.142 mac-address=00:16:01:B0:60:8A client-id=OlostEliRadio1 server=dhcp-wlan4
add address=10.138.120.143 mac-address=ff:ff:ff:ff:ff:ff client-id=OlostJoantxellRadio1 server=dhcp-wlan4
add address=10.138.120.144 mac-address=00:16:01:8C:6F:52 client-id=OlostCalSerraRadio1 server=dhcp-wlan4
add address=10.138.120.145 mac-address=00:16:01:8C:12:5C client-id=OlostCristinaRadio1 server=dhcp-wlan4
add address=10.138.120.146 mac-address=00:15:6D:E0:93:61 client-id=OLostFiteRadio1 server=dhcp-wlan4
add address=10.138.120.147 mac-address=00:16:01:8C:77:AC client-id=OlostCalJuanicRadio1 server=dhcp-wlan4
add address=10.138.120.148 mac-address=00:16:01:8C:CD:4E client-id=OlostCrisRadio1 server=dhcp-wlan4
add address=10.138.120.149 mac-address=00:16:01:F2:2C:E4 client-id=OlostTheresaRadio1 server=dhcp-wlan4
add address=10.138.120.150 mac-address=00:16:01:8C:6F:88 client-id=OlostArolaRadio1 server=dhcp-wlan4
add address=10.138.120.151 mac-address=00:16:01:8C:70:FC client-id=OlostBreuRadio1 server=dhcp-wlan4
add address=10.138.120.152 mac-address=00:16:01:AD:DD:88 client-id=OlostLlorensRadio1 server=dhcp-wlan4
add address=10.138.120.153 mac-address=00:16:01:8C:6F:AA client-id=OlostSilvanRadio1 server=dhcp-wlan4
add address=10.138.120.154 mac-address=00:16:01:8C:07:9C client-id=OlostEsterRadio1 server=dhcp-wlan4
add address=10.138.120.155 mac-address=00:16:01:8C:71:E6 client-id=OlostMunsRadio1 server=dhcp-wlan4
add address=10.138.120.156 mac-address=00:16:01:8C:71:E0 client-id=OlostCalNotRadio1 server=dhcp-wlan4
add address=10.138.120.157 mac-address=00:16:01:8E:D2:E4 client-id=OlostBarcelonaRadio1 server=dhcp-wlan4
add address=10.138.120.158 mac-address=00:16:01:8C:08:90 client-id=OlostKmRadio1 server=dhcp-wlan4
:foreach i in [/ip dhcp-server network find address="10.138.120.128/27"] do={/ip dhcp-server network remove $i;}
:foreach i in [/ip pool find name=dhcp-wlan4] do={/ip pool remove $i;}
/ip pool add name=dhcp-wlan4 ranges=10.138.120.158-10.138.120.158
/ip dhcp-server network add address=10.138.120.128/27 gateway=10.138.120.129 domain=guifi.net comment=dhcp-wlan4
: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=yes
#
:delay 1
# Type: wds/p2p
# Remove all existing wds interfaces
:foreach i in [/interface wireless wds find master-interface=wlan4] \
do={:foreach n in [/interface wireless wds get $i name] \
do={:foreach inum in [/ip address find interface=$n] \
do={/ip address remove $inum;};}; \
/interface wireless wds remove $i;}
#
:delay 1
#
# Routed device
#
# Altres connexions de cable
#
# Internal addresses NAT
:foreach i in [/ip firewall nat find src-address="172.25.0.0/16"] 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.120.129 to-ports=0-65535 comment="" disabled=no
add chain=srcnat src-address="172.25.0.0/16" dst-address=!172.25.0.0/16 protocol=!ospf action=src-nat to-addresses=10.138.120.129 to-ports=0-65535 comment="" disabled=no
#
# Enrutament BGP
# Filtres BGP i OSPF
: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;}
/ routing filter
add chain=ospf-out prefix=10.0.0.0/8 prefix-length=8-32 invert-match=no action=accept comment="" disabled=no
add chain=ospf-out invert-match=no action=discard comment="" disabled=no
add chain=ospf-in prefix=10.0.0.0/8 prefix-length=8-32 invert-match=no action=accept comment="" disabled=no
add chain=ospf-in invert-match=no action=reject comment="" disabled=no
#
# Instància BGP
/ routing bgp instance
set default name="default" as=3062 router-id=10.138.120.129 redistribute-static=yes \
redistribute-connected=yes redistribute-rip=yes redistribute-ospf=yes \
redistribute-other-bgp=yes out-filter=ospf-out \
client-to-client-reflection=yes comment="" disabled=no
#
# Enrutament OSPF
/routing ospf set router-id=10.138.120.129 redistribute-connected=as-type-1 redistribute-static=as-type-1 redistribute-bgp=as-type-1
#
:log info "Unsolclic for 3062-OlostAjuntamentST executed."
/