Nella scorsa "puntata" abbiamo visto  come possiamo implementare la soluzione, proseguiamo quindi con la pratica ⌨️

Configurazione IP di base

Iniziamo quindi configurando le varie PtP:

# West
/interface ethernet
set [ find default-name=ether1 ] comment="Link to North"
set [ find default-name=ether2 ] comment="Link to South"
/ip address
add address=192.0.2.1/30 interface=ether1
add address=192.0.2.5/30 interface=ether2

# North
/interface ethernet
set [ find default-name=ether1 ] comment="Link to West"
set [ find default-name=ether2 ] comment="Link to East"
/ip address
add address=192.0.2.2/30 interface=ether1
add address=192.0.2.9/30 interface=ether2

# South
/interface ethernet
set [ find default-name=ether1 ] comment="Link to West"
set [ find default-name=ether2 ] comment="Link to East"
/ip address
add address=192.0.2.6/30 interface=ether1
add address=192.0.2.13/30 interface=ether2

# East
/interface ethernet
set [ find default-name=ether1 ] comment="Link to North"
set [ find default-name=ether2 ] comment="Link to South"
/ip address
add address=192.0.2.10/30 interface=ether1
add address=192.0.2.14/30 interface=ether2
Configurazione di base

Verifichiamo la connettività:

[admin@North] > ping 192.0.2.1 count=1
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.1                                  56  64 0ms
    sent=1 received=1 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=0ms

[admin@North] > ping 192.0.2.10 count=1
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.10                                 56  64 4ms
    sent=1 received=1 packet-loss=0% min-rtt=4ms avg-rtt=4ms max-rtt=4ms
    
[admin@South] > ping 192.0.2.5 count=1
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.5                                  56  64 1ms
    sent=1 received=1 packet-loss=0% min-rtt=1ms avg-rtt=1ms max-rtt=1ms

[admin@South] > ping 192.0.2.14 count=1
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.14                                 56  64 2ms
    sent=1 received=1 packet-loss=0% min-rtt=2ms avg-rtt=2ms max-rtt=2ms
Il ping dà esito positivo 👍

Ultimiamo la configurazione, aggiungendo le loopback, relativi IP ed, infine, configurando OSPF:

# West
/interface bridge
add name=loop0 protocol-mode=none
/ip address
add address=192.0.2.240/32 interface=loop0
add address=192.0.2.248/32 interface=loop0
add address=192.0.2.249/32 interface=loop0
/mpls traffic-eng interface
add interface=ether1
add interface=ether2
/routing ospf instance
set [ find default=yes ] router-id=192.0.2.240
/routing ospf interface
add passive=yes
add interface=ether1
add interface=ether2
/routing ospf network
add area=backbone network=192.0.2.0/24

# North
/interface bridge
add name=loop0 protocol-mode=none
/ip address
add address=192.0.2.241/32 interface=loop0
/mpls traffic-eng interface
add interface=ether1
add interface=ether2
/routing ospf instance
set [ find default=yes ] router-id=192.0.2.241
/routing ospf interface
add passive=yes
add interface=ether1
add interface=ether2
/routing ospf network
add area=backbone network=192.0.2.0/24

# South
/interface bridge
add name=loop0 protocol-mode=none
/ip address
add address=192.0.2.242/32 interface=loop0
/mpls traffic-eng interface
add interface=ether1
add interface=ether2
/routing ospf instance
set [ find default=yes ] router-id=192.0.2.242
/routing ospf interface
add passive=yes
add interface=ether1
add interface=ether2
/routing ospf network
add area=backbone network=192.0.2.0/24

# East
/interface bridge
add name=loop0 protocol-mode=none
/ip address
add address=192.0.2.243/32 interface=loop0
add address=192.0.2.250/32 interface=loop0
add address=192.0.2.251/32 interface=loop0
/mpls traffic-eng interface
add interface=ether1
add interface=ether2
/routing ospf instance
set [ find default=yes ] router-id=192.0.2.243
/routing ospf interface
add passive=yes
add interface=ether1
add interface=ether2
/routing ospf network
add area=backbone network=192.0.2.0/24
Configurazione di OSPF molto basica, ma funzionale
Per portarci avanti, abbiamo già abilitato RSVP-TE sulle rilevanti interfacce, con il comando /mpls traffic-eng interface add [...]
La configurazione di OSPF è molto basica, utilizziamo la sola area backbone e, per comodità, aggiungiamo come network l'intera /24. L'unica accortezza riguarda le interfacce, le dichiariamo tutte quante passive di default ed abilitiamo solo quelle che ci interessano. Questa è in generale una best practice, che andrebbe sempre applicata 😉

A questo punto verifichiamo che ci siano le rotte in tabella e che tutte le loopback siano raggiungibili:

[admin@West] > ip ro print where ospf dst-address~"/32"
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 ADo  192.0.2.241/32                     192.0.2.2               110
 1 ADo  192.0.2.242/32                     192.0.2.6               110
 2 ADo  192.0.2.243/32                     192.0.2.2               110
                                           192.0.2.6
 3 ADo  192.0.2.250/32                     192.0.2.2               110
                                           192.0.2.6
 4 ADo  192.0.2.251/32                     192.0.2.2               110
                                           192.0.2.6

[admin@West] > ping 192.0.2.241
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.241                                56  64 6ms
    sent=1 received=1 packet-loss=0% min-rtt=6ms avg-rtt=6ms max-rtt=6ms

[admin@West] > ping 192.0.2.242
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.242                                56  64 1ms
    sent=1 received=1 packet-loss=0% min-rtt=1ms avg-rtt=1ms max-rtt=1ms

[admin@West] > ping 192.0.2.243
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.243                                56  63 4ms
    sent=1 received=1 packet-loss=0% min-rtt=4ms avg-rtt=4ms max-rtt=4ms

[admin@West] > ping 192.0.2.250
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.250                                56  63 2ms
    sent=1 received=1 packet-loss=0% min-rtt=2ms avg-rtt=2ms max-rtt=2ms

[admin@West] > ping 192.0.2.251
  SEQ HOST                                     SIZE TTL TIME  STATUS
    0 192.0.2.251                                56  63 1ms
    sent=1 received=1 packet-loss=0% min-rtt=1ms avg-rtt=1ms max-rtt=1ms
Sembra tutto ok ! Sono presenti e raggiungibili tutte le loopback.

A questo punto, le interfacce sono tutte correttamente numerate e funzionanti; OSPF è configurato, le loopback sono tutte quante propagate e correttamente raggiungibili. È il momento di iniziare a configurare i TE tunnels, ma questo lo vedremo nel prossimo post! 👋