Il protocollo OSPF (Open Shortest Path First) archivia il relativo LSA (Link State Advertisement) nel database OSPF. In questo documento viene descritto come il software Cisco IOS® gestisce le LSA esterne (tipo-5) OSPF che si sovrappongono.
Le licenze OSPF LSA devono essere familiari in quanto vengono utilizzate nel software Cisco IOS sui router Cisco. Sono utili anche le conoscenze di base sull'indirizzamento IP.
Un LSA esterno OSPF contiene le informazioni importate in OSPF da altri processi di routing. Di seguito viene riportato un esempio di output di un LSA esterno OSPF.
R1#sh ip ospf database external 192.168.1.0
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 924
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000003
Checksum: 0x29D4
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Nell'esempio, OSPF utilizza l'ID dello stato del collegamento (corrispondente al numero di rete esterna) per distinguere le diverse LSA esterne.
È possibile avere lo stesso numero di rete con maschere diverse importate in OSPF da diversi protocolli di routing. In altre parole, due percorsi diversi possono avere lo stesso numero di rete ma maschere diverse.
R1#sh ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
The gateway of last resort is not set.
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O 10.1.23.0/24 [110/20] via 10.1.12.2, 00:24:06, Ethernet0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
O E2 192.168.1.0/24 [110/1] via 10.1.12.2, 00:20:57, Ethernet0/0
O E2 192.168.1.0/25 [110/1] via 10.1.12.2, 00:00:11, Ethernet0/0
In questo esempio, OSPF deve installare entrambi gli LSA nel proprio database. Per ottenere questo risultato, OSPF installa il successivo LSA ricevuto come numero di broadcast invece del suo numero di rete.
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 53
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000003
Checksum: 0x29D4
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 428
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number ) <----Broadcast Number
of 192.168.1.0/25
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Nell'esempio, LSA 192.168.1.0/24 viene ritirato. Una volta persa questa LSA, l'altra LSA (192.168.1.0/25) non viene installata con il suo numero di rete ma con un numero di broadcast.
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1066
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Nell'esempio, viene ricevuta una nuova LSA (192.168.1.0/26).
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 51
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x2DD2
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 7
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.63 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x39C6
Length: 36
Network Mask: /26
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1198
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
In questo esempio, LSA 192.168.1.0/24 viene ritirata e viene ricevuta una nuova LSA (192.168.1.0/26). La nuova LSA sostituisce la LSA ritirata e OSPF può installare la nuova LSA con il suo numero di rete.
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 2
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000003
Checksum: 0xAD8F
Length: 36
Network Mask: /26
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1362
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Il software Cisco IOS cerca di installare l'LSA come numero di rete. Potrebbe non essere possibile, ad esempio, se il numero di rete è già installato con una maschera diversa. In questo caso, il software Cisco IOS installa l'LSA appena ricevuta come numero di broadcast invece che come numero di rete.
Revisione | Data di pubblicazione | Commenti |
---|---|---|
1.0 |
11-Nov-2013 |
Versione iniziale |