Reinici
- power off the unit
- connect ethernet cable to ether2
- hold down reset button
- power on the unit
- release reset button after ~10s
- "ether boot"
- "Loading kernel from nand" -> "Starting services"
- Tap to hide this info : user "admin", pwd (blank), IP = 192.168.88.1
Configuracio de fabrica
Every router is factory pre-configured with the IP address 192.168.88.1/24 on the ether1 port.
The default username is admin with no password.
first time startup
The simplest way to make sure you have absolutely clean router is to run :
/system reset-configuration no-defaults=yes skip-backup=yes
mikrotik help
Anem per feina :
- conectem cable de xarxa a eth5
- configurem el PC/MARS amb IP = 5.5.5.55
- editem eth2 a la pantalleta - demana "pin code", q es 1234
- posem una IP i mascara coneguda : 5.5.5.5/24
- apuntem un browser a 5.5.5.5 i veiem RouterOS v6.38.1 - ens entra sense clau de pas
Obrim un terminal i veiem :
MikroTik RouterOS 6.38.1 (c) 1999-2017 http://www.mikrotik.com/
The following default configuration has been installed on your router:
-------------------------------------------------------------------------------
RouterMode:
* WAN port is protected by firewall and enabled DHCP client
* IP address 192.168.88.1/24 is set on LAN port
LAN Configuration:
switch group: ether2 (master), ether3, ether4, ether5
switch group: ether6 (master), ether7, ether8, ether9, ether10
DHCP Server: enabled;
DNS: enabled;
WAN (gateway) Configuration:
gateway: ether1 ;
firewall: enabled;
NAT: enabled;
-------------------------------------------------------------------------------
You can type "v" to see the exact commands that are used to add and remove
this default configuration, or you can view them later with
'/system default-configuration print' command.
To remove this default configuration type "r" or hit any other key to continue.
If you are connected using the above IP and you remove it, you will be disconnected.
Millor entrem amb SSH des el MARS :
nicolau@mars:~$ ssh admin@5.5.5.5 {"quit" to close}
[admin@MikroTik] > /system default-configuration print
script: #| RouterMode:
#| * WAN port is protected by firewall and enabled DHCP client
#| * IP address 192.168.88.1/24 is set on LAN port
#| LAN Configuration:
#| switch group: ether2 (master), ether3, ether4, ether5
#| switch group: ether6 (master), ether7, ether8, ether9, ether10
#| DHCP Server: enabled;
#| DNS: enabled;
#| WAN (gateway) Configuration:
#| gateway: ether1 ;
#| firewall: enabled;
#| NAT: enabled;
:log info Starting_defconf_script_;
:global action;
#-------------------------------------------------------------------------------
# Apply configuration.
# these commands are executed after installation or configuration reset
#-------------------------------------------------------------------------------
:if ($action = "apply") do={
# wait for interfaces
:local count 0;
:while ([/interface ethernet find] = "") do={
:if ($count = 30) do={
:log warning "DefConf: Unable to find ethernet interfaces";
/quit;
}
:delay 1s; :set count ($count +1);
};
/interface ethernet {
set ether2 name=ether2-master;
set ether3 master-port=ether2-master;
set ether4 master-port=ether2-master;
set ether5 master-port=ether2-master;
set ether6 name=ether6-master;
set ether7 master-port=ether6-master;
set ether8 master-port=ether6-master;
set ether9 master-port=ether6-master;
set ether10 master-port=ether6-master;
}
/interface bridge
add name=bridge disabled=no auto-mac=yes protocol-mode=rstp comment=defconf;
:local bMACIsSet 0;
-- [Q quit|D dump|down]
Configuracio minima, des de 0, via Mikrotik
Basat en aquest document :
# 1- clean router
/system reset-configuration no-defaults=yes skip-backup=yes
# 2- create bridge
/interface bridge add name=local
/interface bridge port add interface=ether2 bridge=local
/ip address add address=192.168.88.1/24 interface=local
# 3- setup DHCP server (ommited)
# 4- configure internet connection
/ip address add address=1.2.3.100/24 interface=ether1
/ip route add gateway=1.2.3.1
/ip dns set servers=8.8.8.8
# 5- route
/ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade
Configuracio minima, des de 0, via Sebas
Clean the router amb el contingut
$ cat esborrar_tot.rsc
/system reset-configuration no-defaults=yes skip-backup=yes
Som-hi, via ssh :
[admin@sag-2022-10-01-l] > import esborrar_tot.rsc verbose=yes
#line 1
/system reset-configuration no-defaults=yes skip-backup=yesDangerous! Reset anyway? [y/N]:
y
system configuration will be reset
Connection to 10.139.130.65 closed by remote host.
Connection to 10.139.130.65 closed.
Com el router es net, posem la IP 5.5.5.5/24 a ether 9, a ma.
Posar configuracio minima (per comentar al blog)
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$ cat minim.rsc
# 2021.12.23 - RouterOS 6.47.4
# 20211227 - add "/ip route add"
# 20220111 - a2e - 1 FO + 5 usr + 9 con
# f - no
# -----------------------------------
/ip address
add address=192.168.1.254/24 comment="router FO" interface=ether1 network=192.168.1.0
add address=5.5.5.5/24 comment="port de Gestio" interface=ether9 network=5.5.5.0
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add distance=1 gateway=192.168.1.1
/system identity
set name=SAG-a2f
La instalem :
[admin@sag-2022-10-01-l] > import minim.rsc verbose=yes
Conectem el router a la boca #1 i el T 440 a la boca #9 :
ether1 = 192.168.1.254 ---------- | ------ Mitra, ip = 192.168.1.1
ether9 = 5.5.5.5 ---------- | ------ T 440, ip = 5.5.5.6
El resultat es q tenim sortida a Internet :
[admin@SAG-a2f] > ping 8.8.8.8
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 116 23ms
1 8.8.8.8 56 116 16ms
2 8.8.8.8 56 116 21ms
3 8.8.8.8 56 116 16ms
sent=4 received=4 packet-loss=0% min-rtt=16ms avg-rtt=19ms max-rtt=23ms
Funciona "wget" del pc al router :
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$ wget 192.168.1.254 {hem de rebre la pantalla del Webfig}
--2022-06-10 08:49:24-- http://192.168.1.254/
Connecting to 192.168.1.254:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7029 (6.9K) [text/html]
Saving to: ‘index.html’
index.html 100%[======================================================>] 6.86K --.-KB/s in 0.03s
2022-06-10 08:49:25 (240 KB/s) - ‘index.html’ saved [7029/7029]
Podem acedir al Mikrotik remotament si fem un mapeig al Mitra del port exterior 1234 al 22 del Mikrotik :
$ ssh admin@183.143.110.133 -p 1234
Es pot accedir al Webfig des un browser :
http://192.168.1.254/webfig/#Interfaces
Les rutes del router q tenim son :
[admin@SAG-a2f] > /ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 192.168.1.1 1
1 ADC 5.5.5.0/24 5.5.5.5 ether9 0
2 ADC 192.168.1.0/24 192.168.1.254 ether1 0
Afegim les IPs de la boca 7 :
[admin@SAG-a2f] /ip address> add address=172.25.33.17/30 comment="WDS TDLCampanarRocketRd3" interface=ether7 network=172.25.33.16
[admin@SAG-a2f] /ip address> add address=10.139.130.97/27 comment="Gateway TDLCampanarAP3" interface=ether7 network=10.139.130.96
Ara conectem el T60 a la boca 7, amb ip = 172.25.33.18 i tenim internet !
Fem un backup :
[admin@SAG-a2f] > /system backup save name=minimi7
Saving system configuration
Configuration backup saved
[admin@SAG-a2f] /file> print
# NAME TYPE SIZE CREATION-TIME
7 minimi7.backup backup 18.2KiB jun/10/2022 09:36:55
El convertim en texte :
[admin@SAG-a2f] > export file=minimi7.backup
[admin@SAG-a2f] > file
[admin@SAG-a2f] /file> print
# NAME TYPE SIZE CREATION-TIME
5 minimi7.backup.rsc script 820 jun/10/2022 09:38:50
Baixem la configuracio al MARS amb Filezilla !
Albert, 20220610
Get WinBox - port 8291
Jitsi Meet "guifibages", 838.1427.5392.83.10304, dial 93.220.54.09
acces Webfig o SSH - mind Mitra
Webfig : browser to 183.143.110.133:1235
Hi podem accedir remotament :
nicolau@mars:~$ ssh admin@183.143.110.133 -p 1234
cablejat
Fem servir "ether4" en el lloc de "ether8" que te el LED encès permanent
[admin@TDLCampanarST1] > /ip/address/print
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
;;; router FO
0 192.168.1.254/24 192.168.1.0 ether1
;;; WDS TDLCampanarRocketRd3
1 172.25.33.17/30 172.25.33.16 ether7
;;; Gateway TDLCampanarAP3
2 10.139.130.97/27 10.139.130.96 ether7
;;; router fibra ajuntament
3 192.168.1.254/24 192.168.1.0 bridge-Fibra
;;; link TDLTaborDipST3
4 172.25.66.4/29 172.25.66.0 ether2
;;; WDS TDLCampanarRocketRd1
5 172.25.33.9/30 172.25.33.8 ether5
;;; WDS TDLCampanarRocketRd2
6 172.25.33.13/30 172.25.33.12 ether6
;;; WDS TDLCampanarRocketRd4
7 172.25.33.21/30 172.25.33.20 ether4
;;; Gateway TDLCampanarAP1
8 10.139.130.65/27 10.139.130.64 ether5
;;; Gateway TDLCampanarAP2
9 10.139.238.33/27 10.139.238.32 ether6
;;; Gateway TDLCampanarAP4
10 10.139.238.65/27 10.139.238.64 ether4
rutes
El routing abans s'encaminava a "ether1", ara va al bridge :
[admin@TDLCampanarST1] /ip/firewall/nat> print
Flags: X - disabled, I - invalid; D - dynamic
0 chain=srcnat action=masquerade out-interface=bridge-Fibra
El resultat es :
[admin@TDLCampanarST1] > /ip/route/print
Flags: D - DYNAMIC; I, A - ACTIVE; c, s, y - COPY; H - HW-OFFLOADED; + - ECMP
Columns: DST-ADDRESS, GATEWAY, DISTANCE
# DST-ADDRESS GATEWAY DISTANCE
0 As 0.0.0.0/0 192.168.1.1 1
DIcH 10.139.130.64/27 ether5 0
DAc 10.139.130.96/27 ether7 0
DAc 10.139.238.32/27 ether6 0
DIcH 10.139.238.64/27 ether4 0
DIcH 172.25.33.8/30 ether5 0
DAc 172.25.33.12/30 ether6 0
DAc 172.25.33.16/30 ether7 0
DIcH 172.25.33.20/30 ether4 0
DIcH 172.25.66.0/29 ether2 0
DAc + 192.168.1.0/24 bridge-Fibra 0
DAc + 192.168.1.0/24 bridge-Fibra 0
;;; Fibra
1 As 0.0.0.0/0 192.168.1.1 1
backup
Funciona correctament, aixi que fem un backup :
[admin@TDLCampanarST1] /file> print
Columns: NAME, TYPE, SIZE, CREATION-TIME
# NAME TYPE SIZE CREATION-TIME
5 albert20220610.backup backup 47.2KiB jun/10/2022 12:51:04
6 albert20220610.backup.rsc script 16.3KiB jun/10/2022 12:51:50
Esquema per recanvi al Campanar
AP4 no fa servir ether8 (te el LED ences sempre) sino ether4 :
[ether1] 192.1678.1.254 --- 192.168.1.1 (FO)
[ether2] 172.25.66.4 --- 172.26.66.3 Tabor
[ether4] 10.139.238.65 / 172.25.33.21 --- 172.25.33.22 AP4
[ether5] 10.139.130.65 / 172.25.33.9 --- 172.25.33.10 AP1
[ether6] 10.139.238.33 / 172.25.33.13 --- 172.25.33.14 AP2
[ether7] 10.139.130.97 / 172.25.33.17 --- 172.25.33.18 AP3
[ether10] --- (FO)
Configuracio pel Campanar
RB2011 webfig
|
.--- ether1 : 192.168.1.254 --- router Tfca {192.168.1.1} -
|
|--- ether5 : 10.139.130.65 --- GW AP1 {10.139.130.66} -
| 172.25.33.9 --( antena AP1 {172.25.33.10} -
|
.--- ether7 : 10.139.130.97 --- GW AP3 {10.139.130.117 SAG} -
| 172.25.33.17 --( antena AP3 {172.25.33.18} -
|
.--- ether10 : {bridge amb ether1}
Pujem el fitxer via FTP :
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$ ftp 5.5.5.5
Connected to 5.5.5.5.
220 MikroTik FTP server (MikroTik 6.38.1) ready
Name (5.5.5.5:nicolau): admin
331 Password required for admin
Password:
230 User admin logged in
Remote system type is UNIX.
ftp> pwd
257 "/" is current directory
ftp> dir
200 PORT command successful
150 Opening data connection
drwxrwx--- 1 root root 2048 Jan 1 00:00 skins
drwxrwx--- 1 root root 2048 Sep 26 19:44 web-proxy1
-rw-rw---- 1 root root 345591 Feb 26 02:11 TDLTaborDipST3-20160226-0311.backup
-rw-rw---- 1 root root 600314 Feb 26 02:15 TDLTaborDipST2-27022016.backup
-rw-rw---- 1 root root 294079 Jan 29 10:10 TDLTaborDipST3.backup
-rw-rw---- 1 root root 10750 Jan 29 15:22 backup.txt.rsc
-rw-rw---- 1 root root 77674 May 4 20:24 utik20210702.backup
drwxrwx--- 1 root root 2048 Nov 30 21:34 pub
-rw-rw---- 1 root root 480850 Jun 9 04:23 autosupout.old.rif
-rw-rw---- 1 root root 497864 Jun 9 04:33 autosupout.rif
226 Transfer complete
ftp> put a1.backup.rsc
200 PORT command successful
150 Opening ASCII mode data connection for '/a1.backup.rsc'
226 ASCII transfer complete
1052 bytes sent in 0.00 secs (20.4748 MB/s)
ftp> bye
221 Closing
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$
Reposem la configuracio :
nicolau@mars:~$ ssh admin@5.5.5.5 {"quit" to close}
[admin@MikroTik] /file> /import sag20210607.backup.rsc
expected end of command (line 8 column 5)
[admin@MikroTik] /file> /import a1.backup.rsc verbose=yes
Script file loaded and executed successfully
Veiem que la configuració de Mikrotik es va actualitzant.
Podem fer el FTP amb Filezilla !
[admin@MikroTik] > /import a2.backup.rsc verbose=yes
syntax error (line 23 column 5) { treure /ip neighbor discovery-settings + set discover-interface-list=!dynamic }
[admin@MikroTik] > /import a2.backup.rsc verbose=yes
input does not match any value of bridge {bridge-1 no existia}
[admin@TDLCampanarSAG] > /import a2.backup.rsc verbose=yes
ambiguous value of interface, more than one possible value matches input
[admin@TDLCampanarSAG] > /import a2.backup.rsc verbose=yes
add address=192.168.1.254/24 comment="router FO ajuntament" interface=ether1 network=192.168.1.0
failure: already have such address {no se esborrar la anterior, ni "replace"}
Amb aquest fitxer de configuracio :
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$ cat a2.backup.rsc
# 20211223 - RouterOS 6.47.4
/interface ethernet
set [ find default-name=ether1 ] comment="link FO" speed=100Mbps
set [ find default-name=ether2 ] comment="link Tabor" speed=100Mbps
set [ find default-name=ether5 ] comment=AP1 speed=100Mbps
set [ find default-name=ether6 ] comment=AP2 speed=100Mbps
set [ find default-name=ether7 ] comment=AP3 speed=100Mbps
set [ find default-name=ether8 ] comment=AP4 speed=100Mbps
set [ find default-name=ether9 ] speed=100Mbps
set [ find default-name=ether10 ] comment="link gestio" speed=100Mbps
# /ip address
# add address=192.168.1.254/24 comment="router FO ajuntament" interface=ether1 network=192.168.1.0
# add address=192.168.10.1/24 comment="Port de Gestio" interface=ether10 network=192.168.10.0
# add address=172.25.66.4/29 comment="TDLTaborDipST3" interface=ether2 network=172.25.66.0
# add address=172.25.33.9/30 comment="WDS TDLCampanarRocketRd1" interface=ether5 network=172.25.33.8
# add address=172.25.33.13/30 comment="WDS TDLCampanarRocketRd2" interface=ether6 network=172.25.33.12
# add address=172.25.33.17/30 comment="WDS TDLCampanarRocketRd3" interface=ether7 network=172.25.33.16
# add address=172.25.33.21/30 comment="WDS TDLCampanarRocketRd4" interface=ether8 network=172.25.33.20
# add address=10.139.130.65/27 comment="Gateway TDLCampanarAP1" interface=ether5 network=10.139.130.64
# add address=10.139.238.33/27 comment="Gateway TDLCampanarAP2" interface=ether6 network=10.139.238.32
# add address=10.139.130.97/27 comment="Gateway TDLCampanarAP3" interface=ether7 network=10.139.130.96
# add address=10.139.238.65/27 comment="Gateway TDLCampanarAP4" interface=ether8 network=10.139.238.64
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/system clock
set time-zone-name=Europe/Madrid
/system identity
set name=TDLCampanarSAG-a2c
... el resultat es :
[admin@TDLCampanarSAG-a2c] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 5.5.5.5/24 5.5.5.0 ether9
1 ;;; router FO ajuntament 192.168.1.254/24 192.168.1.0 ether1
2 ;;; Port de Gestio 192.168.10.1/24 192.168.10.0 ether10
3 ;;; TDLTaborDipST3 172.25.66.4/29 172.25.66.0 ether2
4 ;;; WDS TDLCampanarRocketRd1 172.25.33.9/30 172.25.33.8 ether5
5 ;;; WDS TDLCampanarRocketRd2 172.25.33.13/30 172.25.33.12 ether6
6 ;;; WDS TDLCampanarRocketRd3 172.25.33.17/30 172.25.33.16 ether7
7 ;;; WDS TDLCampanarRocketRd4 172.25.33.21/30 172.25.33.20 ether8
8 ;;; Gateway TDLCampanarAP1 10.139.130.65/27 10.139.130.64 ether5
9 ;;; Gateway TDLCampanarAP2 10.139.238.33/27 10.139.238.32 ether6
10 ;;; Gateway TDLCampanarAP3 10.139.130.97/27 10.139.130.96 ether7
11 ;;; Gateway TDLCampanarAP4 10.139.238.65/27 10.139.238.64 ether8
[admin@TDLCampanarSAG-a2c] >
Una part molt important es el tallafocs :
[admin@TDLCampanarSAG-a2c] > ip firewall filter print
Flags: X - disabled, I - invalid, D - dynamic
0 D ;;; special dummy rule to show fasttrack counters
chain=forward action=passthrough
1 ;;; defconf: accept ICMP
chain=input action=accept protocol=icmp
2 ;;; defconf: accept established,related
chain=input action=accept connection-state=established,related
3 ;;; defconf: drop all from WAN
chain=input action=drop in-interface=ether1
4 ;;; defconf: fasttrack
chain=forward action=fasttrack-connection connection-state=established,related
5 ;;; defconf: accept established,related
chain=forward action=accept connection-state=established,related
6 ;;; defconf: drop invalid
chain=forward action=drop connection-state=invalid
7 ;;; defconf: drop all from WAN not DSTNATed
chain=forward action=drop connection-state=new connection-nat-state=!dstnat in-interface=ether1
I també les rutes :
[admin@TDLCampanarSAG-a2c] > ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 192.168.1.1 1
1 ADC 5.5.5.0/24 5.5.5.5 ether6 0
2 ADC 10.139.130.64/27 10.139.130.65 ether2 0
3 ADC 10.139.130.96/27 10.139.130.97 ether6 0
4 ADC 10.139.238.32/27 10.139.238.33 ether6 0
5 ADC 10.139.238.64/27 10.139.238.65 ether6 0
6 ADC 172.25.33.8/30 172.25.33.9 ether2 0
7 ADC 172.25.33.12/30 172.25.33.13 ether6 0
8 ADC 172.25.33.16/30 172.25.33.17 ether6 0
9 ADC 172.25.33.20/30 172.25.33.21 ether6 0
10 ADC 172.25.66.0/29 172.25.66.4 ether2 0
11 ADC 192.168.1.0/24 192.168.1.254 ether1 0
12 ADC 192.168.10.0/24 192.168.10.1 ether6 0
reconfiguracio radical del Campanar
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$ cat a3.backup.rsc
/system reset-configuration no-defaults=yes skip-backup=yes
/ip address
add address=192.168.1.254/24 comment="router FO ajuntament" interface=ether1 network=192.168.1.0
add address=10.139.130.65/27 comment="gateway TDLCampanarAP1" interface=ether5 network=10.139.130.64
add address=10.139.238.33/27 comment="gateway TDLCampanarAP2" interface=ether6 network=10.139.238.32
add address=10.139.130.97/27 comment="gateway TDLCampanarAP3" interface=ether7 network=10.139.130.96
add address=10.139.238.65/27 comment="gateway TDLCampanarAP4" interface=ether8 network=10.139.238.64
add address=5.5.5.5/24 comment="port de gestio 1" interface=ether9 network=5.5.5.0
add address=192.168.10.1/24 comment="port de gestio 2" interface=ether10 network=192.168.10.0
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add comment="Fibra optica" distance=1 gateway=192.168.1.1
/system identity
set name=TDLCampanarSAG-a3a
Pugem el fitxer amb FTP :
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$ ftp 10.139.130.65
Connected to 10.139.130.65.
220 TDLCampanarSAG-a2c FTP server (MikroTik 6.38.1) ready
Name (10.139.130.65:nicolau): admin
331 Password required for admin
Password:
230 User admin logged in
Remote system type is UNIX.
ftp> ls
200 PORT command successful
150 Opening data connection
drwxrwx--- 1 root root 2048 Nov 30 22:34 pub
-rw-rw---- 1 root root 480850 Jun 9 05:23 autosupout.old.rif
-rw-rw---- 1 root root 497864 Jun 9 05:33 autosupout.rif
-rw-rw---- 1 root root 662 Jan 2 01:07 a1.backup.rsc
-rw-rw---- 1 root root 14148 Jan 2 01:35 console-dump.txt
-rw-rw---- 1 root root 2019 Jan 2 02:15 a2.backup.rsc
226 Transfer complete
ftp> put a3.backup.rsc
local: a3.backup.rsc remote: a3.backup.rsc
200 PORT command successful
150 Opening ASCII mode data connection for '/a3.backup.rsc'
226 ASCII transfer complete
1052 bytes sent in 0.00 secs (20.4748 MB/s)
ftp> bye
221 Closing
Activem la configuracio :
nicolau@mars:~$ ssh admin@10.139.130.65 {"quit" to close}
[admin@TDLCampanarSAG-a2c] > import a3.backup.rsc verbose=yes
Dangerous! Reset anyway? [y/N]:
y
system configuration will be reset
interrupted
Connection to 10.139.130.65 closed by remote host.
Connection to 10.139.130.65 closed.
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/fem_Campanar$
... we have a "beep" and reboot loop ... i acabem amb el router "net"
repassem la configuracio del Campanar
[xarxa@TDLCampanarST1] > /system backup save name=sag202201
Saving system configuration
Configuration backup saved -> tenim sag202201.backup
[xarxa@TDLCampanarST1] > /export file=sag202201 -> tenim sag202201.rsc
[xarxa@TDLCampanarST1] >
nicolau@mars:~/sebas/guifi/Torrelles/backup/Campanar/feina$ ftp 10.139.130.97
Connected to 10.139.130.97.
220 TDLCampanarST1 FTP server (MikroTik 6.47.4) ready
ftp> get sag202201.rsc
local: sag202201.rsc remote: sag202201.rsc
200 PORT command successful
150 Opening ASCII mode data connection for sag202201.rsc (15752 bytes)
226 ASCII transfer complete
15752 bytes received in 0.00 secs (3.2579 MB/s)
Comparem sag202201.rsc amb utik20210702.backup.rsc - "sag" te 2 linies mes :
/interface detect-internet
set detect-interface-list=all
Ho canvio per "none" :
[xarxa@TDLCampanarST1] > /interface detect-internet print
detect-interface-list: none
lan-interface-list: none
wan-interface-list: none
internet-interface-list: none
ROS
No arregla res
deconstruccio de la configuracio del Campanar
Agafem sag202201.rsc, el pujem a rb2011 via Filezilla i el instalem amb "/import sag202101.rsc verbose=yes"
Despres esborrem la linia amb error, canviem la identificacio i hi tornem.
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc verbose=yes
expected end of command (line 8 column 5)
>>> treure "add fast-forward=no name=bridge1" + sag-2022-10-01-b
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc
expected end of command (line 50 column 12)
>>> treure "/dude" + "set enabled=yes" + sag-2022-10-01-c
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc
syntax error (line 57 column 5)
>>> treure "/ip neighbor discovery-settings" + "set discover-interface-list=!dynamic" + sag-2022-10-01-d
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc
expected end of command (line 59 column 5)
>>> treure "/interface detect-internet" + "set detect-interface-list=all" + sag-2022-10-01-e
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc
expected end of command (line 272 column 5)
>>> treure "/ip ssh" + "set allow-none-crypto=yes forwarding-enabled=remote" + sag-2022-10-01-f
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc
invalid value for argument advertise
>>> canviem
set [ find default-name=ether1 ] advertise="10M-half,10M-full,100M-half,100M-f\
ull,1000M-half,1000M-full,2500M-full,5000M-full,10000M-full" comment=\
"Enlla\E7 Fibra"
>>> per
set [ find default-name=ether1 ] advertise="10M-half,10M-full,100M-half,100M-f\
ull,1000M-half,1000M-full" comment="link fibra"
>>> canviem
set [ find default-name=sfp1 ] advertise=\
10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
>>> per
set [ find default-name=sfp1 ] advertise=\
10M-half,10M-full,100M-half,100M-full
>>> + set name=sag-2022-10-01-g
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc verbose=yes
failure: already have interface with such name --- "export compact" ?
>>> rename ether1-10 and bridge-Fibra adding "Z"
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc
input does not match any value of interface
[admin@TDLCampanarSAG-a4a] > /import sag202201.rsc verbose=yes
input does not match any value of interface
/ip pool
add name=manage_dhcp_pool ranges=192.168.10.2-192.168.10.254
failure: pool with such name exists
>>> remove 5x /ip pool manually
add address-pool=manage_dhcp_pool authoritative=after-2sec-delay disabled=no \
interface=bridge1 lease-time=1d name=manage_dhcp
input does not match any value of interface
>>> afegir "add name=bridge1" en lloc de "add fast-forward=no name=bridge1" --- que fa fast-forward=no ?
/interface bridge port
#line 50
add bridge=bridge1 disabled=yes interface=ether2
ambiguous value of interface, more than one possible value matches input
>>> treure les "Z" del final dels noms del interface
>>> comento (trec) 5 x IP pool i el DHCP server + sag-2022-10-01-h
add bridge=bridge1 disabled=yes interface=ether2
failure: device already added as bridge port
>>> trec a ma el ether2 del bridge1
add bridge=bridge1 disabled=yes interface=ether9
add bridge=bridge1 disabled=yes interface=ether7
add bridge=bridge1 interface=ether1
add bridge=bridge-Fibra interface=ether9
failure: device already added as bridge port
>>> comento "# add bridge=bridge1 disabled=yes interface=ether9" i "# add bridge=bridge1 disabled=yes interface=ether7"
>>> afegir /interface bridge + remove name=bridge-Fibra + remove name=bridge1 + sag-2022-10-01-i
remove name=bridge-Fibra
expected end of command (line 1 column 12) --- on hi ha el "="
>>> afegir /interface bridge + remove bridge-Fibra + remove bridge1 + sag-2022-10-01-j
remove bridge1
no such item
>>> s'hauria de posar condicional
add address=10.139.130.65/27 comment="Gateway TDLCampanarAP1" interface=\
ether5 network=10.139.130.64
failure: already have such address
>>> trec ether3 i 4, linies mes curtes + sag-2022-10-01-k
>>> trec ports dels bridge - compte : numeros : /interface bridge port remove 3