The Open Shortest Path First (OSPF) protocol stores its Link State Advertisement (LSA) in the OSPF database. This document describes how the Cisco IOS® software handles OSPF external (type-5) LSAs that overlap.
You should be familiar with OSPF LSAs as they are used within the Cisco IOS software on Cisco routers. Basic knowledge of IP addressing is also helpful.
An OSPF external LSA contains the information imported into OSPF from other routing processes. This is sample output of an OSPF external LSA.
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
In this example, OSPF uses the Link State ID (which is same as the External Network Number) in order to distinguish different external LSAs.
It is possible to have same network number with different masks imported into OSPF from different routing protocols. That is, two different routes can have the same network number but different masks.
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 this example, OSPF has to install both LSAs in its database. In order to achieve this, OSPF installs the next received LSA as its broadcast number instead of its network number.
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
In this example, LSA 192.168.1.0/24 is withdrawn. Once this LSA is lost, the other LSA (192.168.1.0/25) is not installed with its network number but is installed with a broadcast number.
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
In this example, a new LSA (192.168.1.0/26) is received.
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 this example, LSA 192.168.1.0/24 is withdrawn, and a new LSA (192.168.1.0/26) is received. The new LSA replaces the withdrawn LSA, and OSPF can install the new LSA with its network number.
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
The Cisco IOS software tries to install the LSA as its network number. It may be unable to do so if, for example, the network number is already installed with a different mask. In that case, the Cisco IOS software installs the newly received LSA as its broadcast number instead of its network number.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
11-Nov-2013 |
Initial Release |