<< Torna agli Approfondimenti Tematici
|
|
Premesse
Con riferimento alla RFC 5185 [OSPF Multi-Area Adjacency], è un requisito comune a molti design quello che un link appartenga ad aree multiple. Questo è dovuto essenzialmente a quelle situazioni in cui si dispone di un link ad alta capacità tra due ABR, nel qual caso è possibile si generino situazioni di routing subottimo.
Con riferimento all’esempio di figura:
Poiché per lo standard di OSPF attuale (RFC2328), un percorso intra area è sempre preferito ad un percorso inter area, il router INT1 per raggiungere la rete 172.16.2.2/32 inoltra il traffico sul link a banda 1Mbit/sec invece che utilizzare il percorso a metrica OSPF minore, che è il percorso INT1-ABR1-ABR2-INT2, che sarebbe preferibile perché composto da una banda minima dei link componenti di 100Mbit/sec. Spostare il link ABR1-ABR2 in area 51 produrrebbe un percorso subottimo per il traffico di area 0 in maniera simmetrica.
Possibile Soluzione
Configurare indirizzi multipli sulle interfacce, ma questo approccio ha diversi svantaggi:
a. Non essere perseguibile su interfacce “unnumbered”
b. Richiede ulteriori indirizzi IP
c. Le tabelle di routing ed il database OSPF crescono conseguentemente
Soluzione Proposta
Estendere il funzionamento di OSPF consentendo agli ABR di instaurare adiacenze multiple su uno stesso link, queste adiacenze multi-area verranno viste come link punto punto. Qundi avremo un’adiacenza standard che verrà instaurata regolarmente e che genererà LSA di tipo 1 all’interno della sua area di appartenenza e LSA di tipo 3 sulle altre aree.
L’adiacenza multipla sulle aree ulteriori genererà invece una LSA di tipo 1 point-to-point con:
Link ID = Router-id remoto
Link Data = id di interfaccia
E’ particolarmente interessante il fatto che per questa LSA di tipo 1 non viene annunciato nessun prefisso di rete, verrà invece utilizzato il link solo a scopo computazionale del percorso intra area, lasciando di fatto alla LSA di tipo 3 generata il ruolo di rendere raggiungibile il link stesso.
Implementazione
Per implementare con un esempio reale questa tecnologia è stata utilizzata la topologia di figura:
ABR1,ABR2 Cisco 12000 con IOS XR 3.9
INT1,INT2,INT3,INT4 Cisco 7204 12.2.33SRE
La scelta di IOS XR nasce dal fatto che al momento in cui è stata effettuata questa implementazione, IOS standard non supporta la funzionalità di adiacenze multi-area, tuttavia va tenuto presente che questa funzionalità è compatibile con le implementazioni standard di OSPF, infatti ci si è avvalsi di IOS XR esclusivamente sugli ABR che devono effettivamente instaurare l’adiacenza multipla, non sulle macchine interne che devono solamente interpretare le LSA che da questa scaturiscono.
Logiche di assegnazioni degli indirizzi e router-id
Per facilitare l’interpretazione degli output si è fatto riferimento alla seguente logica
ID dispositivi: si è assegnato un identificativo numerico ad ogni dispositivo secondo la seguente logica:
INT1 -> 1 |
INT2 -> 2 |
INT3 -> 3 |
INT4 -> 4 |
ABR1 -> 11 |
ABR2 -> 12 |
Link fisici: 10.X.Y.0/24 ad ogni link fisico, dove X ed Y sono gli ID dei dispositivi da questo link collegate, con X<Y
Indirizzi di Loopback: 172.16.X.X dove X è l’ID del dispositivo d’ appartenenza
Router-id OSPF: X.X.X.X dove X è l’ID del dispositivo d’ appartenenza
Configurazione iniziale con percorso subottimo
I router INT sono stati configurati rispettivamente ai propri id come di seguito, è stata variata la banda di riferimento per consentire di apprezzare la differenza di metrica tra le interfacce 100Mbit/sec e 1Gbit/sec:
INT1#sh run | sec router ospf router ospf 100 [sp=2]router-id 1.1.1.1 [sp=2]log-adjacency-changes [sp=2][hl]auto-cost reference-bandwidth 1000[/hl] [sp=2]network 10.1.2.1 0.0.0.0 area 51 [sp=2]network 10.1.11.1 0.0.0.0 area 51 [sp=2]network 172.16.1.1 0.0.0.0 area 51
IN3#sh run | sec router ospf router ospf 100 [sp=2]router-id 3.3.3.3 [sp=2]log-adjacency-changes [sp=2][hl]auto-cost reference-bandwidth 1000[/hl] [sp=2]network 10.3.4.3 0.0.0.0 area 0 [sp=2]network 10.3.11.3 0.0.0.0 area 0 [sp=2]network 172.16.3.3 0.0.0.0 area 0
Per i due ABR la configurazione iniziale in IOS XR è coerente a quella implementata sui router INT, il costo delle interfacce verso i router INT è stato manualmente impostato a 10 perché fosse coerente con il costo assegnato sulle interfacce fast ethernet dei router INT, infatti anche se non essenziale in topologia, gli ABR sono connessi ai router INT attraverso switch MetroEthernet.
RP/0/0/CPU0:ABR1#sh run router ospf Wed Nov 13 07:12:07.442 UTC router ospf 100 [sp=2]router-id 11.11.11.11 [sp=2][hl]auto-cost reference-bandwidth 1000[/hl] [sp=2]area 0 [sp=4]interface GigabitEthernet0/1/0/1 [sp=6][hl]cost 10[/hl] [sp=6]network point-to-point [sp=4]! [sp=4]interface GigabitEthernet0/1/0/2 [sp=6]network point-to-point [sp=4]! [sp=2]! [sp=2]area 51 [sp=4]interface GigabitEthernet0/1/0/0 [sp=6][hl]cost 10[/hl] [sp=6]network point-to-point [sp=4]! [sp=2]!
Da notare che le interfacce dei link multiaccess sono state poste ad OSPF Network Type point-to-point come ottimizzazione e per semplificare la lettura del database OSPF, si noti che il link che connette ABR1 ed ABR2 è appartenente all’area di backbone:
RP/0/0/CPU0:ABR1#show ospf int br[br] Wed Nov 13 07:14:42.345 UTC[br] [br] * Indicates MADJ interface[br] [br] Interfaces for OSPF 100[br] [br] [table class="intable" w=100%] [tr] [th w=14%]Interface[/th] [th w=8%]PID[/th] [th w=10%]Area[/th] [th w=28%]IP Address/Mask[/th] [th w=12%]Cost[/th] [th w=12%]State[/th] [th w=16%]Nbrs F/C[/th] [/tr][tr] [td]Gi0/1/0/1[/td] [td]100[/td] [td]0[/td] [td]10.3.11.11/24[/td] [td]10[/td] [td][hl]P2P[/hl][/td] [td]1/1[/td] [/tr][tr] [td]Gi0/1/0/2[/td] [td]100[/td] [td][hl]0[/hl][/td] [td]10.11.12.11/24[/td] [td]1[/td] [td][hl]P2P[/hl][/td] [td]1/1[/td] [/tr][tr] [td]Gi0/1/0/0[/td] [td]100[/td] [td]51[/td] [td]10.1.11.11/24[/td] [td]10[/td] [td][hl]P2P[/hl][/td] [td]1/1[/td] [/tr] [/table]
RP/0/3/CPU0:ABR2#show ospf int br[br] Wed Nov 13 07:15:17.360 UTC[br] [br] * Indicates MADJ interface[br] [br] Interfaces for OSPF 100[br] [br] [table class="intable" w=100%] [tr] [th w=14%]Interface[/th] [th w=8%]PID[/th] [th w=10%]Area[/th] [th w=28%]IP Address/Mask[/th] [th w=12%]Cost[/th] [th w=12%]State[/th] [th w=16%]Nbrs F/C[/th] [/tr][tr] [td]Gi0/4/0/1[/td] [td]100[/td] [td]0[/td] [td]10.4.12.12/24[/td] [td]10[/td] [td][hl]P2P[/hl][/td] [td]1/1[/td] [/tr][tr] [td]Gi0/4/0/2[/td] [td]100[/td] [td][hl]0[/hl][/td] [td]10.11.12.12/24[/td] [td]1[/td] [td][hl]P2P[/hl][/td] [td]1/1[/td] [/tr][tr] [td]Gi0/4/0/0[/td] [td]100[/td] [td]51[/td] [td]10.2.12.12/24[/td] [td]10[/td] [td][hl]P2P[/hl][/td] [td]1/1[/td] [/tr] [/table]
Il link che connette INT1 ed INT2 è stato configurato con una banda di 1Mbit/sec con conseguente costo OSPF 1000:
INT1#show int | inc BW|Fast FastEthernet0/0 is up, line protocol is up [sp=2]MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, FastEthernet1/0 is up, line protocol is up [sp=2]MTU 1500 bytes, [hl]BW 1000[/hl] Kbit/sec, DLY 100 usec,
INT2#show int | inc BW 100|Fast FastEthernet0/0 is up, line protocol is up [sp=2]MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, FastEthernet1/0 is up, line protocol is up [sp=2]MTU 1500 bytes, [hl]BW 1000[/hl] Kbit/sec, DLY 100 usec,
INT1#show ip ospf int brief[br] [br] [table class="intable" w=100%] [tr] [th w=14%]Interface[/th] [th w=8%]PID[/th] [th w=10%]Area[/th] [th w=28%]IP Address/Mask[/th] [th w=12%]Cost[/th] [th w=12%]State[/th] [th w=16%]Nbrs F/C[/th] [/tr][tr] [td]Lo0[/td] [td]100[/td] [td]51[/td] [td]172.16.1.1/32[/td] [td]1[/td] [td]LOOP[/td] [td]0/0[/td] [/tr][tr] [td]Fa0/0[/td] [td]100[/td] [td]51[/td] [td]10.1.11.1/24[/td] [td]10[/td] [td]P2P[/td] [td]1/1[/td] [/tr][tr] [td]Fa1/0[/td] [td]100[/td] [td]51[/td] [td]10.1.2.1/24[/td] [td][hl]1000[/hl][/td] [td]P2P[/td] [td]1/1[/td] [/tr] [/table]
Secondo queste impostazioni vengono quindi instaurate le adiacenze come atteso:
INT1#show ip ospf nei[br] [br] [table class="intable" w=100%] [tr] [th w=18%]Neighbor ID[/th] [th w=8%]Pri[/th] [th w=15%]State[/th] [th w=20%]Dead Time[/th] [th w=19%]Address[/th] [th w=20%]Interface[/th] [/tr][tr] [td]11.11.11.11[/td] [td]0[/td] [td]FULL/ -[/td] [td]00:00:31[/td] [td]10.1.11.11[/td] [td]FastEthernet0/0[/td] [/tr][tr] [td]2.2.2.2[/td] [td]0[/td] [td]FULL/ -[/td] [td]00:00:34[/td] [td]10.1.2.2[/td] [td]FastEthernet1/0[/td] [/tr] [/table]
RP/0/0/CPU0:ABR1#show ip ospf neig[br] Wed Nov 13 07:14:19.940 UTC[br] [br] * Indicates MADJ interface[br] [br] Neighbors for OSPF 100[br] [br] [table class="intable" w=100%] [tr] [th w=18%]Neighbor ID[/th] [th w=6%]Pri[/th] [th w=13%]State[/th] [th w=18%]Dead Time[/th] [th w=17%]Address[/th] [th w=28%]Interface[/th] [/tr][tr] [td]3.3.3.3[/td] [td]1[/td] [td]FULL/ -[/td] [td]00:00:32[/td] [td]10.3.11.3[/td] [td]GigabitEthernet0/1/0/1[/td] [/tr][tr] [td w=100% colspan=6][sp=4]Neighbor is up for 00:07:42[/td] [/tr][tr] [td]12.12.12.12[/td] [td]1[/td] [td]FULL/ -[/td] [td]00:00:37[/td] [td]10.11.12.12[/td] [td]GigabitEthernet0/1/0/2[/td] [/tr][tr] [td w=100% colspan=6][sp=4]Neighbor is up for 00:08:35[/td] [/tr][tr] [td]1.1.1.1[/td] [td]1[/td] [td]FULL/ -[/td] [td]00:00:37[/td] [td]10.1.11.1[/td] [td]GigabitEthernet0/1/0/0[/td] [/tr][tr] [td w=100% colspan=6][sp=4]Neighbor is up for 00:07:47[/td] [/tr] [/table][br] Total neighbor count: 3
Andando a guardare il database OSPF per l’area di backbone e l’area 51 si nota che nell’area zero sono presenti le LSA di tipo 3 derivanti dalle LSA di tipo 1 di area 51 nelle quali non è presente il link 10.11.12.0, mentre questo è presente come LSA di tipo 3 nel database di area 51. Si ricorda che per la natura stessa di un protocollo link state il database di un’area è identico per ognuno dei dispositivi facenti parte dell’area.
RP/0/0/CPU0:ABR1#show ospf database[br] Wed Nov 13 07:17:04.070 UTC[br] [br] [table class="intable" w=100%] [tr] [td colspan=6 center]OSPF Router with ID (11.11.11.11) (Process ID 100)[br][br][/td] [/tr][tr] [td][/td] [td colspan=5 left]Router Link States (Area 0)[br][br][/td] [/tr][tr] [th w=21%]Link ID[/th] [th w=21%]ADV Router[/th] [th w=7%]Age[/th] [th w=18%]Seq#[/th] [th w=17%]Checksum [/th] [th w=20%]Link count[/th] [/tr][tr] [td]3.3.3.3[/td] [td]3.3.3.3[/td] [td]623[/td] [td]0x80000005[/td] [td]0x0065f4[/td] [td]5[/td] [/tr][tr] [td]4.4.4.4[/td] [td]4.4.4.4[/td] [td]629[/td] [td]0x80000005[/td] [td]0x008abf[/td] [td]5[/td] [/tr][tr] [td]11.11.11.11[/td] [td]11.11.11.11[/td] [td]357[/td] [td]0x80000004[/td] [td]0x00557a[/td] [td]4[/td] [/tr][tr] [td]12.12.12.12[/td] [td]12.12.12.12[/td] [td]313[/td] [td]0x80000004[/td] [td]0x001fa2[/td] [td]4[/td] [/tr][tr] [td][/td] [td colspan=5 left][br]Summary Net Link States (Area 0)[br][br][/td] [/tr][tr] [th]Link ID[/th] [th]ADV Router[/th] [th]Age[/th] [th]Seq#[/th] [th]Checksum [/th] [th][/th] [/tr][tr] [td]10.1.2.0[/td] [td]11.11.11.11[/td] [td]356[/td] [td]0x80000002[/td] [td]0x0030dc[/td] [td][/td] [/tr][tr] [td]10.1.2.0[/td] [td]12.12.12.12[/td] [td]313[/td] [td]0x80000003[/td] [td]0x0010f7[/td] [td][/td] [/tr][tr] [td]10.1.11.0[/td] [td]11.11.11.11[/td] [td]356[/td] [td]0x80000002[/td] [td]0x009857[/td] [td][/td] [/tr][tr] [td]10.1.11.0[/td] [td]12.12.12.12[/td] [td]313[/td] [td]0x80000003[/td] [td]0x0011e3[/td] [td][/td] [/tr][tr] [td]10.2.12.0[/td] [td]11.11.11.11[/td] [td]356[/td] [td]0x80000002[/td] [td]0x001add[/td] [td][/td] [/tr][tr] [td]10.2.12.0[/td] [td]12.12.12.12[/td] [td]313[/td] [td]0x80000002[/td] [td]0x006386[/td] [td][/td] [/tr][tr] [td]172.16.1.1[/td] [td]11.11.11.11[/td] [td]356[/td] [td]0x80000002[/td] [td]0x001036[/td] [td][/td] [/tr][tr] [td]172.16.1.1[/td] [td]12.12.12.12[/td] [td]313[/td] [td]0x80000003[/td] [td]0x002431[/td] [td][/td] [/tr][tr] [td]172.16.2.2[/td] [td]11.11.11.11[/td] [td]356[/td] [td]0x80000003[/td] [td]0x002d2a[/td] [td][/td] [/tr][tr] [td]172.16.2.2[/td] [td]12.12.12.12[/td] [td]313[/td] [td]0x80000003[/td] [td]0x00da64[/td] [td][/td] [/tr][tr] [td][/td] [td colspan=5 left][br]Router Link States (Area 51)[br][br][/td] [/tr][tr] [th]Link ID[/th] [th]ADV Router[/th] [th]Age[/th] [th]Seq#[/th] [th]Checksum [/th] [th]Link count[/th] [/tr][tr] [td]1.1.1.1[/td] [td]1.1.1.1[/td] [td]631[/td] [td]0x80000004[/td] [td]0x00a122[/td] [td]5[/td] [/tr][tr] [td]2.2.2.2[/td] [td]2.2.2.2[/td] [td]629[/td] [td]0x80000004[/td] [td]0x00c6ec[/td] [td]5[/td] [/tr][tr] [td]11.11.11.11[/td] [td]11.11.11.11[/td] [td]357[/td] [td]0x80000004[/td] [td]0x005326[/td] [td]2[/td] [/tr][tr] [td]12.12.12.12[/td] [td]12.12.12.12[/td] [td]315[/td] [td]0x80000005[/td] [td]0x0077ef[/td] [td]2[/td] [/tr][tr] [td][/td] [td colspan=5 left][br]Summary Net Link States (Area 51)[br][br][/td] [/tr][tr] [th]Link ID[/th] [th]ADV Router[/th] [th]Age[/th] [th]Seq#[/th] [th]Checksum [/th] [th][/th] [/tr][tr] [td]10.3.4.0[/td] [td]11.11.11.11[/td] [td]312[/td] [td]0x80000004[/td] [td]0x002eba[/td] [td][/td] [/tr][tr] [td]10.3.4.0[/td] [td]12.12.12.12[/td] [td]315[/td] [td]0x80000002[/td] [td]0x0014d2[/td] [td][/td] [/tr][tr] [td]10.3.11.0[/td] [td]11.11.11.11[/td] [td]356[/td] [td]0x80000002[/td] [td]0x00806d[/td] [td][/td] [/tr][tr] [td]10.3.11.0[/td] [td]12.12.12.12[/td] [td]359[/td] [td]0x80000002[/td] [td]0x006c7c[/td] [td][/td] [/tr][tr] [td]10.4.12.0[/td] [td]11.11.11.11[/td] [td]312[/td] [td]0x80000002[/td] [td]0x007377[/td] [td][/td] [/tr][tr] [td]10.4.12.0[/td] [td]12.12.12.12[/td] [td]315[/td] [td]0x80000002[/td] [td]0x004b9c[/td] [td][/td] [/tr][tr] [td class=highlight]10.11.12.0[/td] [td class=highlight]11.11.11.11[/td] [td class=highlight]689[/td] [td class=highlight]0x80000001[/td] [td class=highlight]0x00bc32[/td] [td][/td] [/tr][tr] [td class=highlight]10.11.12.0[/td] [td class=highlight]12.12.12.12[/td] [td class=highlight]688[/td] [td class=highlight]0x80000001[/td] [td class=highlight]0x009e4c[/td] [td][/td] [/tr][tr] [td]172.16.3.3[/td] [td]11.11.11.11[/td] [td]356[/td] [td]0x80000003[/td] [td]0x00e35d[/td] [td][/td] [/tr][tr] [td]172.16.3.3[/td] [td]12.12.12.12[/td] [td]359[/td] [td]0x80000003[/td] [td]0x00cf6c[/td] [td][/td] [/tr][tr] [td]172.16.4.4[/td] [td]11.11.11.11[/td] [td]312[/td] [td]0x80000002[/td] [td]0x00da64[/td] [td][/td] [/tr][tr] [td]172.16.4.4[/td] [td]12.12.12.12[/td] [td]315[/td] [td]0x80000002[/td] [td]0x00b289[/td] [td][/td] [/tr] [/table]
Andando ad analizzare il dettaglio della LSA di tipo 3 di area 51 relativa alla rete del link ABR1-ABR2:
INT1#show ip ospf database summary 10.11.12.0 [div w=100% class=center]OSPF Router with ID (1.1.1.1) (Process ID 100)[/div] [div w=100% class=center]Summary Net Link States (Area 51)[/div] [br] Routing Bit Set on this LSA in topology Base with MTID 0[br] LS age: 770[br] Options: (No TOS-capability, DC, Upward)[br] LS Type: Summary Links(Network)[br] [hl]Link State ID: 10.11.12.0[/hl] (summary Network Number)[br] Advertising Router: 11.11.11.11[br] LS Seq Number: 80000001[br] Checksum: 0xBC32[br] Length: 28[br] Network Mask: /24[br] [sp=6]MTID: 0[sp=8]Metric: 1 [br] [br] LS age: 770[br] Options: (No TOS-capability, DC, Upward)[br] LS Type: Summary Links(Network)[br] [hl]Link State ID: 10.11.12.0[/hl] (summary Network Number)[br] Advertising Router: 12.12.12.12[br] LS Seq Number: 80000001[br] Checksum: 0x9E4C[br] Length: 28[br] Network Mask: /24[br] [sp=6]MTID: 0[sp=8]Metric: 1
Mentre lo stesso link è presente nel database di area zero come LSA di tipo 1, generato da ABR1 e da ABR2, (in output le LSA di tipo 1 generate da ABR1)
IN3#show ip ospf database router 11.11.11.11 [div w=100% class=center]OSPF Router with ID (3.3.3.3) (Process ID 100)[/div] [div w=100% class=center]Router Link States (Area 0)[/div] [br] Routing Bit Set on this LSA in topology Base with MTID 0[br] LS age: 515[br] Options: (No TOS-capability, DC)[br] LS Type: Router Links[br] Link State ID: 11.11.11.11[br] Advertising Router: 11.11.11.11[br] LS Seq Number: 80000004[br] Checksum: 0x557A[br] Length: 72[br] Area Border Router[br] Number of Links: 4[br] [br] [sp=4]Link connected to: another Router (point-to-point)[br] [sp=6](Link ID) Neighboring Router ID: 3.3.3.3[br] [sp=6](Link Data) Router Interface address: 10.3.11.11[br] [sp=8]Number of MTID metrics: 0[br] [sp=10]TOS 0 Metrics: 10[br] [br] [sp=4]Link connected to: a Stub Network[br] [sp=6](Link ID) Network/subnet number: 10.3.11.0[br] [sp=6](Link Data) Network Mask: 255.255.255.0[br] [sp=8]Number of MTID metrics: 0[br] [sp=10]TOS 0 Metrics: 10[br] [br] [sp=4]Link connected to: another Router (point-to-point)[br] [sp=6](Link ID) Neighboring Router ID: 12.12.12.12[br] [sp=6][hl](Link Data) Router Interface address: 10.11.12.11[/hl][br] [sp=8]Number of MTID metrics: 0[br] [sp=10]TOS 0 Metrics: 1[br] [br] [sp=4]Link connected to: a Stub Network[br] [sp=6](Link ID) Network/subnet number: 10.11.12.0[br] [sp=6](Link Data) Network Mask: 255.255.255.0[br] [sp=8]Number of MTID metrics: 0[br] [sp=10]TOS 0 Metrics: 1[br]
Da un punto di vista del data plane i pacchetti verranno inoltrati coerentemente alla tabella di routing, che mostra come INT1 per raggiungere la rete 172.16.2.2/32 selezioni l’interfaccia F1/0 selezionando quindi un percorso subottimo a metrica 1001, che però viene preferito data la sua natura intra area, confermato anche dai risultati del traceroute
INT1#show ip route ospf | beg Gateway Gateway of last resort is not set [sp=6]10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks O[sp=8]10.2.12.0/24 [110/1010] via 10.1.2.2, 00:08:50, FastEthernet1/0 O IA[sp=5]10.3.4.0/24 [110/30] via 10.1.11.11, 00:08:09, FastEthernet0/0 O IA[sp=5]10.3.11.0/24 [110/20] via 10.1.11.11, 00:08:50, FastEthernet0/0 O IA[sp=5]10.4.12.0/24 [110/21] via 10.1.11.11, 00:08:09, FastEthernet0/0 O IA[sp=5]10.11.12.0/24 [110/11] via 10.1.11.11, 00:13:26, FastEthernet0/0 [sp=6]172.16.0.0/32 is subnetted, 4 subnets [hl]O[sp=8]172.16.2.2 [110/1001] via 10.1.2.2, 00:08:50, FastEthernet1/0[/hl] O IA[sp=5]172.16.3.3 [110/21] via 10.1.11.11, 00:08:50, FastEthernet0/0 O IA[sp=5]172.16.4.4 [110/22] via 10.1.11.11, 00:08:09, FastEthernet0/0
INT1#traceroute 172.16.2.2 Type escape sequence to abort. Tracing the route to 172.16.2.2 [sp=2]1 10.1.2.2 4 msec * 0 msec
Configurazione con OSPF Multi-Area Adjacency
Andando a modificare la topologia introducendo adiacenze multi-area sul link che collega ABR1-ABR2, come in figura:
Avvalendosi del comando multi-area-interface disponibile in IOS XR, che sostanzialmente attiva una adiacenza multipla aggiungendo a quella già esistente di area zero la nuova di area 51. Da notare che non vi è necessità di imporre il network type, in quanto l’adiacenza multi-area viene sempre annunciata come LSA di tipo 1 point-to-point
RP/0/3/CPU0:ABR2(config)#router ospf 100 RP/0/3/CPU0:ABR2(config-ospf)# area 51 RP/0/3/CPU0:ABR2(config-ospf-ar)# [hl]multi-area-interface GigabitEthernet0/4/0/2[/hl] RP/0/3/CPU0:ABR2(config-ospf-ar-mif)# RP/0/3/CPU0:ABR2(config-ospf-ar-mif)#commit
RP/0/0/CPU0:ABR1(config)#router ospf 100 RP/0/0/CPU0:ABR1(config-ospf)# area 51 RP/0/0/CPU0:ABR1(config-ospf-ar)# [hl]multi-area-interface GigabitEthernet0/1/0/2[/hl] RP/0/0/CPU0:ABR1(config-ospf-ar-mif)# ! RP/0/0/CPU0:ABR1(config-ospf-ar-mif)#commit
I due ABR vedono l’unico link che li collega associato a due diverse aree:
RP/0/0/CPU0:ABR1#show ip ospf int br[br] Wed Nov 13 07:25:34.287 UTC[br] [br] * Indicates MADJ interface[br] [br] Interfaces for OSPF 100[br] [br] [table class="intable" w=100%] [tr] [th w=14%]Interface[/th] [th w=8%]PID[/th] [th w=10%]Area[/th] [th w=28%]IP Address/Mask[/th] [th w=12%]Cost[/th] [th w=12%]State[/th] [th w=16%]Nbrs F/C[/th] [/tr][tr] [td]Gi0/1/0/1[/td] [td]100[/td] [td]0[/td] [td]10.3.11.11/24[/td] [td]10[/td] [td]P2P[/td] [td]1/1[/td] [/tr][tr] [td class=highlight]Gi0/1/0/2[/td] [td class=highlight]100[/td] [td class=highlight]0[/td] [td class=highlight]10.11.12.11/24[/td] [td class=highlight]1[/td] [td class=highlight]P2P[/td] [td class=highlight]1/1[/td] [/tr][tr] [td class=highlight]Gi0/1/0/2*[/td] [td class=highlight]100[/td] [td class=highlight]51[/td] [td class=highlight]10.11.12.11/24[/td] [td class=highlight]1[/td] [td class=highlight]P2P[/td] [td class=highlight]1/1[/td] [/tr][tr] [td]Gi0/1/0/0[/td] [td]100[/td] [td]51[/td] [td]10.1.11.11/24[/td] [td]10[/td] [td]P2P[/td] [td]1/1[/td] [/tr] [/table]
RP/0/3/CPU0:ABR2#show ospf int br[br] Wed Nov 13 07:26:18.652 UTC[br] [br] * Indicates MADJ interface[br] [br] Interfaces for OSPF 100[br] [br] [table class="intable" w=100%] [tr] [th w=14%]Interface[/th] [th w=8%]PID[/th] [th w=10%]Area[/th] [th w=28%]IP Address/Mask[/th] [th w=12%]Cost[/th] [th w=12%]State[/th] [th w=16%]Nbrs F/C[/th] [/tr][tr] [td]Gi0/4/0/1[/td] [td]100[/td] [td]0[/td] [td]10.4.12.12/24[/td] [td]10[/td] [td]P2P[/td] [td]1/1[/td] [/tr][tr] [td class=highlight]Gi0/4/0/2[/td] [td class=highlight]100[/td] [td class=highlight]0[/td] [td class=highlight]10.11.12.12/24[/td] [td class=highlight]1[/td] [td class=highlight]P2P[/td] [td class=highlight]1/1[/td] [/tr][tr] [td class=highlight]Gi0/4/0/2*[/td] [td class=highlight]100[/td] [td class=highlight]51[/td] [td class=highlight]10.11.12.12/24[/td] [td class=highlight]1[/td] [td class=highlight]P2P[/td] [td class=highlight]1/1[/td] [/tr][tr] [td]Gi0/4/0/0[/td] [td]100[/td] [td]51[/td] [td]10.2.12.12/24[/td] [td]10[/td] [td]P2P[/td] [td]1/1[/td] [/tr] [/table]
Guardando il dettaglio delle interfacce viene esplicitamente riportata la natura multi area:
RP/0/0/CPU0:ABR1#show ospf int g0/1/0/2 Wed Nov 13 07:25:57.395 UTC GigabitEthernet0/1/0/2 is up, line protocol is up [sp=2]Internet Address 10.11.12.11/24, Area 0 [sp=2]Process ID 100, Router ID 11.11.11.11, Network Type POINT_TO_POINT, Cost: 1 [sp=2]Transmit Delay is 1 sec, State POINT_TO_POINT, MTU 1500, MaxPktSz 1500 [sp=2]Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 [sp=4]Hello due in 00:00:09 [sp=2]Index 2/3, flood queue length 0 [sp=2]Next 0(0)/0(0) [sp=2]Last flood scan length is 2, maximum is 5 [sp=2]Last flood scan time is 0 msec, maximum is 0 msec [sp=2]LS Ack List: current length 0, high water mark 6 [sp=2]Neighbor Count is 1, Adjacent neighbor count is 1 [sp=4]Adjacent with neighbor 12.12.12.12 [sp=2]Suppress hello for 0 neighbor(s) [sp=2][hl]Multi-area interface Count is 1[/hl] [sp=4][hl]Multi-Area interface exist in area 51 Neighbor Count is 1[/hl]
Conseguentemente anche l’adiacenza, come previsto è multipla sulle aree 0 e 51:
RP/0/3/CPU0:ABR2#show ospf neig[br] Wed Nov 13 07:26:34.473 UTC[br] [br] * Indicates MADJ interface[br] [br] Neighbors for OSPF 100[br] [br] [table class="intable" w=100%] [tr] [th w=18%]Neighbor ID[/th] [th w=8%]Pri[/th] [th w=15%]State[/th] [th w=20%]Dead Time[/th] [th w=19%]Address[/th] [th w=20%]Interface[/th] [/tr][tr] [td]4.4.4.4[/td] [td]1[/td] [td]FULL/ -[/td] [td]00:00:34[/td] [td]10.4.12.4[/td] [td]GigabitEthernet0/4/0/1[/td] [/tr][tr] [td colspan=6][sp=4]Neighbor is up for 00:19:57[/td] [/tr][tr] [td class=highlight]11.11.11.11[/td] [td class=highlight]1[/td] [td class=highlight]FULL/ -[/td] [td class=highlight]00:00:31[/td] [td class=highlight]10.11.12.11[/td] [td class=highlight]GigabitEthernet0/4/0/2[/td] [/tr][tr] [td colspan=6][sp=4][hl]Neighbor is up for 00:20:50[/hl][/td] [/tr][tr] [td class=highlight]11.11.11.11[/td] [td class=highlight]1[/td] [td class=highlight]FULL/ -[/td] [td class=highlight]00:00:33[/td] [td class=highlight]10.11.12.11[/td] [td class=highlight]GigabitEthernet0/4/0/2*[/td] [/tr][tr] [td colspan=6][sp=4][hl]Neighbor is up for 00:04:12[/hl][/td] [/tr][tr] [td]2.2.2.2[/td] [td]1[/td] [td]FULL/ -[/td] [td]00:00:32[/td] [td]10.2.12.2[/td] [td]GigabitEthernet0/4/0/0[/td] [/tr][tr] [td colspan=6][sp=4]Neighbor is up for 00:19:58[/td] [/tr] [/table] [br] Total neighbor count: 4
RP/0/3/CPU0:ABR2#show ospf int br[br] Wed Nov 13 07:26:18.652 UTC[br] [br] * Indicates MADJ interface[br] [br] Interfaces for OSPF 100[br] [br] [table class="intable" w=100%] [tr] [th w=14%]Interface[/th] [th w=8%]PID[/th] [th w=10%]Area[/th] [th w=28%]IP Address/Mask[/th] [th w=12%]Cost[/th] [th w=12%]State[/th] [th w=16%]Nbrs F/C[/th] [/tr][tr] [td]Gi0/4/0/1[/td] [td]100[/td] [td]0[/td] [td]10.4.12.12/24[/td] [td]10[/td] [td]P2P[/td] [td]1/1[/td] [/tr][tr] [td class=highlight]Gi0/4/0/2[/td] [td class=highlight]100[/td] [td class=highlight]0[/td] [td class=highlight]10.11.12.12/24[/td] [td class=highlight]1[/td] [td class=highlight]P2P[/td] [td class=highlight]1/1[/td] [/tr][tr] [td class=highlight]Gi0/4/0/2*[/td] [td class=highlight]100[/td] [td class=highlight]51[/td] [td class=highlight]10.11.12.12/24[/td] [td class=highlight]1[/td] [td class=highlight]P2P[/td] [td class=highlight]1/1[/td] [/tr][tr] [td]Gi0/4/0/0[/td] [td]100[/td] [td]51[/td] [td]10.2.12.12/24[/td] [td]10[/td] [td]P2P[/td] [td]1/1[/td] [/tr][/table]
Andando nuovamente ad analizzare i database di area zero ed area 51 non si notano differenze evidenti a livello di data base description, ma si noti che in ogni caso la rete 10.11.12.0/24 non viene inoltrata in area zero con LSA di tipo 3.
RP/0/0/CPU0:ABR1#show ospf database [br] Wed Nov 13 07:24:43.908 UTC[br] [br] [table class="intable" w=100%] [tr] [td colspan=6 center]OSPF Router with ID (11.11.11.11) (Process ID 100)[br][br][/td] [/tr][tr] [td][/td] [td colspan=5 left]Router Link States (Area 0)[br][br][/td] [/tr][tr] [th w=21%]Link ID[/th] [th w=21%]ADV Router[/th] [th w=7%]Age[/th] [th w=18%]Seq#[/th] [th w=17%]Checksum [/th] [th w=20%]Link count[/th] [/tr][tr] [td]3.3.3.3[/td] [td]3.3.3.3[/td] [td]1082[/td] [td]0x80000005[/td] [td]0x0065f4[/td] [td]5[/td] [/tr][tr] [td]4.4.4.4[/td] [td]4.4.4.4[/td] [td]1088[/td] [td]0x80000005[/td] [td]0x008abf[/td] [td]5[/td] [/tr][tr] [td]11.11.11.11[/td] [td]11.11.11.11[/td] [td]816[/td] [td]0x80000004[/td] [td]0x00557a[/td] [td]4[/td] [/tr][tr] [td]12.12.12.12[/td] [td]12.12.12.12[/td] [td]773[/td] [td]0x80000004[/td] [td]0x001fa2[/td] [td]4[/td] [/tr][tr] [td][/td] [td colspan=5 left][br]Summary Net Link States (Area 0)[br][br][/td] [/tr][tr] [th w=21%]Link ID[/th] [th w=21%]ADV Router[/th] [th w=7%]Age[/th] [th w=18%]Seq#[/th] [th w=17%]Checksum [/th] [th w=20%][/th] [/tr][tr] [td]10.1.2.0[/td] [td]11.11.11.11[/td] [td]816[/td] [td]0x80000002[/td] [td]0x0030dc[/td] [td][/td] [/tr][tr] [td]10.1.2.0[/td] [td]12.12.12.12[/td] [td]773[/td] [td]0x80000003[/td] [td]0x0010f7[/td] [td][/td] [/tr][tr] [td]10.1.11.0[/td] [td]11.11.11.11[/td] [td]816[/td] [td]0x80000002[/td] [td]0x009857[/td] [td][/td] [/tr][tr] [td]10.1.11.0[/td] [td]12.12.12.12[/td] [td]142[/td] [td]0x80000004[/td] [td]0x008068[/td] [td][/td] [/tr][tr] [td]10.2.12.0[/td] [td]11.11.11.11[/td] [td]142[/td] [td]0x80000003[/td] [td]0x008962[/td] [td][/td] [/tr][tr] [td]10.2.12.0[/td] [td]12.12.12.12[/td] [td]773[/td] [td]0x80000002[/td] [td]0x006386[/td] [td][/td] [/tr][tr] [td]172.16.1.1[/td] [td]11.11.11.11[/td] [td]816[/td] [td]0x80000002[/td] [td]0x001036[/td] [td][/td] [/tr][tr] [td]172.16.1.1[/td] [td]12.12.12.12[/td] [td]142[/td] [td]0x80000004[/td] [td]0x00f747[/td] [td][/td] [/tr][tr] [td]172.16.2.2[/td] [td]11.11.11.11[/td] [td]142[/td] [td]0x80000004[/td] [td]0x000140[/td] [td][/td] [/tr][tr] [td]172.16.2.2[/td] [td]12.12.12.12[/td] [td]773[/td] [td]0x80000003[/td] [td]0x00da64[/td] [td][/td] [/tr][tr] [td][/td] [td colspan=5 left][br]Router Link States (Area 51)[br][br][/td] [/tr][tr] [th w=21%]Link ID[/th] [th w=21%]ADV Router[/th] [th w=7%]Age[/th] [th w=18%]Seq#[/th] [th w=17%]Checksum [/th] [th w=20%]Link count[/th] [/tr][tr] [td]1.1.1.1[/td] [td]1.1.1.1[/td] [td]1091[/td] [td]0x80000004[/td] [td]0x00a122[/td] [td]5[/td] [/tr][tr] [td]2.2.2.2[/td] [td]2.2.2.2[/td] [td]1089[/td] [td]0x80000004[/td] [td]0x00c6ec[/td] [td]5[/td] [/tr][tr] [td]11.11.11.11[/td] [td]11.11.11.11[/td] [td]142[/td] [td]0x80000005[/td] [td]0x0071ae[/td] [td]3[/td] [/tr][tr] [td]12.12.12.12[/td] [td]12.12.12.12[/td] [td]143[/td] [td]0x80000006[/td] [td]0x00ed23[/td] [td]3[/td] [/tr][tr] [td][/td] [td colspan=5 left][br]Summary Net Link States (Area 51)[br][br][/td] [/tr][tr] [th w=21%]Link ID[/th] [th w=21%]ADV Router[/th] [th w=7%]Age[/th] [th w=18%]Seq#[/th] [th w=17%]Checksum [/th] [th w=20%][/th] [/tr][tr] [td]10.3.4.0[/td] [td]11.11.11.11[/td] [td]772[/td] [td]0x80000004[/td] [td]0x002eba[/td] [td][/td] [/tr][tr] [td]10.3.4.0[/td] [td]12.12.12.12[/td] [td]775[/td] [td]0x80000002[/td] [td]0x0014d2[/td] [td][/td] [/tr][tr] [td]10.3.11.0[/td] [td]11.11.11.11[/td] [td]816[/td] [td]0x80000002[/td] [td]0x00806d[/td] [td][/td] [/tr][tr] [td]10.3.11.0[/td] [td]12.12.12.12[/td] [td]819[/td] [td]0x80000002[/td] [td]0x006c7c[/td] [td][/td] [/tr][tr] [td]10.4.12.0[/td] [td]11.11.11.11[/td] [td]772[/td] [td]0x80000002[/td] [td]0x007377[/td] [td][/td] [/tr][tr] [td]10.4.12.0[/td] [td]12.12.12.12[/td] [td]775[/td] [td]0x80000002[/td] [td]0x004b9c[/td] [td][/td] [/tr][tr] [td]10.11.12.0[/td] [td]11.11.11.11[/td] [td]1148[/td] [td]0x80000001[/td] [td]0x00bc32[/td] [td][/td] [/tr][tr] [td]10.11.12.0[/td] [td]12.12.12.12[/td] [td]1148[/td] [td]0x80000001[/td] [td]0x009e4c[/td] [td][/td] [/tr][tr] [td]172.16.3.3[/td] [td]11.11.11.11[/td] [td]816[/td] [td]0x80000003[/td] [td]0x00e35d[/td] [td][/td] [/tr][tr] [td]172.16.3.3[/td] [td]12.12.12.12[/td] [td]819[/td] [td]0x80000003[/td] [td]0x00cf6c[/td] [td][/td] [/tr][tr] [td]172.16.4.4[/td] [td]11.11.11.11[/td] [td]772[/td] [td]0x80000002[/td] [td]0x00da64[/td] [td][/td] [/tr][tr] [td]172.16.4.4[/td] [td]12.12.12.12[/td] [td]775[/td] [td]0x80000002[/td] [td]0x00b289[/td] [td][/td] [/tr][/table]
Andando ad analizzare il dettaglio del database, per le LSA di tipo 3 per l’area 51 non vi sono differenze rispetto alla topologia precedente:
INT1#show ip ospf database summary 10.11.12.0 [div w=100% class=center]OSPF Router with ID (1.1.1.1) (Process ID 100)[/div] [div w=100% class=center]Summary Net Link States (Area 51)[/div] [br] Routing Bit Set on this LSA in topology Base with MTID 0[br] LS age: 1374[br] Options: (No TOS-capability, DC, Upward)[br] LS Type: Summary Links(Network)[br] [hl]Link State ID: 10.11.12.0 (summary Network Number)[/hl][br] Advertising Router: 11.11.11.11[br] LS Seq Number: 80000001[br] Checksum: 0xBC32[br] Length: 28[br] Network Mask: /24[br] [sp=6]MTID: 0[sp=8]Metric: 1 [br] [br] LS age: 1374[br] Options: (No TOS-capability, DC, Upward)[br] LS Type: Summary Links(Network)[br] [hl]Link State ID: 10.11.12.0 (summary Network Number)[/hl][br] Advertising Router: 12.12.12.12[br] LS Seq Number: 80000001[br] Checksum: 0x9E4C[br] Length: 28[br] Network Mask: /24[br] [sp=6]MTID: 0[sp=8]Metric: 1
Analizzando però il database relativamente alle LSA di tipo 1 del database di area 51, si trova, come specificato nella RFC 5185, un nuovo link che descrive il collegamente ABR1 ABR2:
Link ID = Router-id remoto
Link Data = id di interfaccia
INT1#show ip ospf database router 11.11.11.11 [div w=100% class=center]OSPF Router with ID (1.1.1.1) (Process ID 100)[/div] [div w=100% class=center]Router Link States (Area 51)[/div] [br] Routing Bit Set on this LSA in topology Base with MTID 0[br] LS age: 330[br] Options: (No TOS-capability, DC)[br] LS Type: Router Links[br] Link State ID: 11.11.11.11[br] Advertising Router: 11.11.11.11[br] LS Seq Number: 80000005[br] Checksum: 0x71AE[br] Length: 60[br] Area Border Router[br] Number of Links: 3[br] [br] [sp=4]Link connected to: another Router (point-to-point)[br] [sp=6][hl](Link ID) Neighboring Router ID: 12.12.12.12[/hl][br] [sp=6][hl](Link Data) Router Interface address: 0.0.0.25[/hl][br] [sp=8]Number of MTID metrics: 0[br] [sp=10]TOS 0 Metrics: 1[br] [br] [sp=4]Link connected to: another Router (point-to-point)[br] [sp=6](Link ID) Neighboring Router ID: 1.1.1.1[br] [sp=6](Link Data) Router Interface address: 10.1.11.11[br] [sp=8]Number of MTID metrics: 0[br] [sp=10]TOS 0 Metrics: 10[br] [br] [sp=4]Link connected to: a Stub Network[br] [sp=6](Link ID) Network/subnet number: 10.1.11.0[br] [sp=6](Link Data) Network Mask: 255.255.255.0[br] [sp=8]Number of MTID metrics: 0[br] [sp=10]TOS 0 Metrics: 10[br]
Il data plane in virtù della nuova adiacenza viene gestito prediligendo un percorso intra area che però questa volta è ottimale e a metrica 22:
INT1#show ip route 172.16.2.2 255.255.255.255 Routing entry for 172.16.2.2/32 [sp=2]Known via "ospf 100", distance 110, [hl]metric 22[/hl], type [hl]intra area[/hl] [sp=2]Last update from 10.1.11.11 on [hl]FastEthernet0/0[/hl], 00:00:28 ago [sp=2]Routing Descriptor Blocks: [sp=2]* 10.1.11.11, from 2.2.2.2, 00:00:28 ago, via FastEthernet0/0 [sp=4]Route metric is 22, traffic share count is 1
INT1#traceroute 172.16.2.2 Type escape sequence to abort. Tracing the route to 172.16.2.2 [sp=2]1 10.1.11.11 4 msec 0 msec 4 msec [sp=2]2 10.11.12.12 0 msec 4 msec 0 msec [sp=2]3 10.2.12.2 0 msec * 0 msec
Ricapitolando, l’implementazione proposta nella RFC 5185 consente di ottenere un percorso ottimo da un punto di vista della metrica senza incorrere nella assegnazione di indirizzi multipli alle interfacce.
Di seguito le configurazioni finali OSPF per gli ABR e le configurazioni complete di tutti i dispositivi utilizzati in questa implementazione:
RP/0/0/CPU0:ABR1#sh run router ospf Wed Nov 13 07:31:05.142 UTC router ospf 100 [sp=2]router-id 11.11.11.11 [sp=2]auto-cost reference-bandwidth 1000 [sp=2]area 0 [sp=4]interface GigabitEthernet0/1/0/1 [sp=6]cost 10 [sp=6]network point-to-point [sp=4]! [sp=4]interface GigabitEthernet0/1/0/2 [sp=6]network point-to-point [sp=4]! [sp=2]! [sp=2]area 51 [sp=4]multi-area-interface GigabitEthernet0/1/0/2 [sp=4]! [sp=4]interface GigabitEthernet0/1/0/0 [sp=6]cost 10 [sp=6]network point-to-point
RP/0/3/CPU0:ABR2#sh run router ospf Wed Nov 13 07:31:33.200 UTC router ospf 100 [sp=2]router-id 12.12.12.12 [sp=2]auto-cost reference-bandwidth 1000 [sp=2]area 0 [sp=4]interface GigabitEthernet0/4/0/1 [sp=6]cost 10 [sp=6]network point-to-point [sp=4]! [sp=4]interface GigabitEthernet0/4/0/2 [sp=6]network point-to-point [sp=4]! [sp=2]! [sp=2]area 51 [sp=4]multi-area-interface GigabitEthernet0/4/0/2 [sp=4]! [sp=4]interface GigabitEthernet0/4/0/0 [sp=6]cost 10 [sp=6]network point-to-point