This document looks into the Open Shortest Path First (OSPF) Database and the Routing table when OSPF runs across two areas.
There are no specific requirements for this document.
This document is not restricted to specific software and hardware versions.
For more information on document conventions, see the Cisco Technical Tips Conventions.
In this section, you are presented with the information to configure the features described in this document.
Note: To find additional information on the commands used in this document, use the Command Lookup Tool (registered customers only) .
This document uses the network setup shown in the diagram below.
This document uses these configurations.
Router 1.1.1.1 |
---|
Current configuration: hostname r1.1.1.1 interface Loopback0 ip address 1.1.1.1 255.0.0.0 interface Ethernet2/0/0 ip address 4.0.0.1 255.0.0.0 interface Serial2/1/0 ip unnumbered Ethernet2/0/0 router ospf 1 network 4.0.0.0 0.255.255.255 area 0 end |
Router 2.2.2.2 |
---|
Current configuration: hostname r2.2.2.2 interface Loopback0 ip address 2.2.2.2 255.0.0.0 interface Ethernet0/0/4 ip address 6.0.0.2 255.0.0.0 interface Serial0/1/0 ip unnumbered Ethernet0/0/4 interface ATM1/0.20 point-to-point ip address 200.0.0.2 255.255.255.0 router ospf 2 network 6.0.0.0 0.255.255.255 area 0 network 200.0.0.0 0.255.255.255 area 1 end |
Router 3.3.3.3 |
---|
Current configuration: hostname r3.3.3.3 interface Loopback0 ip address 3.3.3.3 255.0.0.0 interface ATM2/0.20 point-to-point ip address 200.0.0.3 255.255.255.0 router ospf 2 network 200.0.0.0 0.255.255.255 area 1 end |
This section provides information you can use to confirm your configuration is working properly.
Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.
show ip ospf database —Displays a list of the Link State Advertisements (LSAs) in the link state database. This list shows only the information in the LSA header.
show ip ospf database [router] [link-state-id]—Displays the content of the Router LSA (Type-1 LSA) in the database. Router LSAs are produced by every router, and these fundamental LSAs list all the of router's links, or interfaces, along with the states and outgoing costs of the links. They are flooded only within the area in which they originate.
show ip ospf database summary <link-state id> —Displays the area border router (ABR) summary links.
Since Router 2.2.2.2 is the ABR, it has the database for both areas that it is connected to. That makes it the best place to see the OSPF database, using the show ip ospf database command.
r2.2.2.2#show ip ospf database OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 697 0x80000040 0x5A21 2 2.2.2.2 2.2.2.2 696 0x80000045 0xEE82 2 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 200.0.0.0 2.2.2.2 352 0x80000001 0x2546 Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 2.2.2.2 2.2.2.2 351 0x8000000B 0xCA9D 2 3.3.3.3 3.3.3.3 354 0x80000006 0x71F7 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 4.0.0.0 2.2.2.2 689 0x80000001 0xFFE6 6.0.0.0 2.2.2.2 700 0x80000001 0x63C1 r2.2.2.2#show ip ospf database router 1.1.1.1 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) LS age: 773 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 1.1.1.1 !--- For router links, Link State Id is always the same as the !--- Advertising Router (next line). Advertising Router: 1.1.1.1 !--- This is the router ID of the router that created this LSA. LS Seq Number: 80000040 Checksum: 0x5A21 Length: 48 Number of Links: 2 Link connected to: another Router (point-to-point) !--- This line shows that Router 1.1.1.1 is a neighbor !--- with Router 2.2.2.2. (Link ID) Neighboring Router ID: 2.2.2.2 (Link Data) Router Interface address: 0.0.0.12 !--- The link is unnumbered, so the address starts with !--- zero. In the case of unnumbered links, the interface address !--- displays the MIB II IfIndex value that usually starts with 0. Number of TOS metrics: 0 TOS 0 Metrics: 64 !--- This is the OSPF cost of the link that connects !--- the two routers. Link connected to: a Stub Network !--- This line represents the Ethernet segment 4.0.0.0/8. (Link ID) Network/subnet number: 4.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 r2.2.2.2#show ip ospf database router 2.2.2.2 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) !--- This is the router LSA for 2.2.2.2 in area 0. LS age: 789 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 2.2.2.2 Advertising Router: 2.2.2.2 LS Seq Number: 80000045 Checksum: 0xEE82 Length: 48 Area Border Router !--- Bit B is set in the router LSA. !--- It indicates that this router is an ABR. Number of Links: 2 !--- There are two links in area 0. Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 1.1.1.1 (Link Data) Router Interface address: 0.0.0.10 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 6.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 Router Link States (Area 1) !--- This is the router LSA for !--- Router 2.2.2.2 in area 1. LS age: 445 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 2.2.2.2 Advertising Router: 2.2.2.2 LS Seq Number: 8000000B Checksum: 0xCA9D Length: 48 Area Border Router Number of Links: 2 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 3.3.3.3 (Link Data) Router Interface address: 200.0.0.2 Number of TOS metrics: 0 TOS 0 Metrics: 1 Link connected to: a Stub Network (Link ID) Network/subnet number: 200.0.0.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 1 r2.2.2.2#show ip ospf database router 3.3.3.3 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 1) LS age: 465 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 3.3.3.3 Advertising Router: 3.3.3.3 LS Seq Number: 80000006 Checksum: 0x71F7 Length: 48 Number of Links: 2 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 2.2.2.2 (Link Data) Router Interface address: 200.0.0.3 Number of TOS metrics: 0 TOS 0 Metrics: 1 Link connected to: a Stub Network (Link ID) Network/subnet number: 200.0.0.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 1
To advertise routes from one area into another, the ABR creates summary links, which you can see using the show ip ospf database summary <link-state id> command.
r2.2.2.2#show ip ospf database summary 200.0.0.0 OSPF Router with ID (2.2.2.2) (Process ID 2) Summary Net Link States (Area 0) LS age: 487 Options: (No TOS-capability, DC, Upward) !--- The Upward keyword indicates that this is not an LSA imported !--- from a VPN backbone (from a PE to a CE). LS Type: Summary Links(Network) Link State ID: 200.0.0.0 (summary Network Number) !--- 200.0.0.0/24 is advertised into area 0 by the !--- ABR (Router 2.2.2.2). Advertising Router: 2.2.2.2 LS Seq Number: 80000001 Checksum: 0x2546 Length: 28 Network Mask: /24 TOS: 0 Metric: 1 r2.2.2.2#show ip ospf database summary 4.0.0.0 OSPF Router with ID (2.2.2.2) (Process ID 2) Summary Net Link States (Area 1) LS age: 840 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 4.0.0.0 (summary Network Number) !--- 4.0.0.0/8 is advertised into area 1 by !--- the ABR (Router 2.2.2.2). Advertising Router: 2.2.2.2 LS Seq Number: 80000001 Checksum: 0xFFE6 Length: 28 Network Mask: /8 TOS: 0 Metric: 74 r2.2.2.2#show ip ospf database summary 6.0.0.0 OSPF Router with ID (2.2.2.2) (Process ID 2) Summary Net Link States (Area 1) LS age: 861 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 6.0.0.0 (summary Network Number) !--- 6.0.0.0/8 is advertised into area 1 by the !--- ABR (Router 2.2.2.2). Advertising Router: 2.2.2.2 LS Seq Number: 80000001 Checksum: 0x63C1 Length: 28 Network Mask: /8 TOS: 0 Metric: 10
This section calculates the shortest path from the perspective of Router 3.3.3.3.
Router 3.3.3.3 looks in its own LSA and sees that Router 2.2.2.2 is a neighbor. Router 3.3.3.3 then looks at Router 2.2.2.2's LSA to verify that Router 2.2.2.2 sees Router 3.3.3.3 as a neighbor. If both routers see each other as neighbors, they are considered reachable.
Each router also checks its local neighbor table (which you can see using the show ip ospf neighbor command) to verify that its and the neighbor's interfaces are on a common IP subnet.
Note: This check is not performed on an unnumbered interface.
If the interfaces are on a common subnet, the routers install routes for any stub networks listed in their neighbor's LSA. In this example, 200.0.0.0/24 is the only stub network listed in Router 2.2.2.2's LSA, to which Router 3.3.3.3 is already directly connected.
After all the reachable router LSAs in area 1 are examined, Router 3.3.3.3 looks at summary LSAs in the database. It finds summary LSAs for 4.0.0.0/8 and 6.0.0.0/8. If Router 3.3.3.3 knows how to reach the advertising router that created the summary LSA, it installs the route in its routing table. In this example, the advertising router is Router 2.2.2.2. Since Router 3.3.3.3 knows how to reach Router 2.2.2.2, it installs routes for 4.0.0.0/8 and 6.0.0.0/8 in its routing table. The metric for these routes is the metric to reach the advertising router plus the metric of the summary LSA. The metric of the summary LSA is calculated from the cost to reach the intra- or inter-area route for which the summary LSA is generated.
Note: Routers use the Type-1 LSA to advertise the networks and other routers to which they are directly connected in a area, which is flooded within the same area. So, all the routers within the same area have the complete topology information for their own area. As a result, ABRs maintain complete topology information about all areas to which they are directly attached. However, when ABRs advertise a network that belongs to one area into a second area, they advertise only the prefix and mask of the network by using the Type-3 LSA. The routers in the second area do not know about the topology information of other areas, but they have reachability information for the networks in other areas.
This output shows the OSPF routes in the routing table of each router described above.
r1.1.1.1# show ip route ospf O IA 200.0.0.0/24 [110/65] via 6.0.0.2, 00:09:00, Serial2/1/0 O 6.0.0.0/8 [110/74] via 6.0.0.2, 00:14:41, Serial2/1/0 r2.2.2.2#show ip route ospf O 4.0.0.0/8 [110/74] via 4.0.0.1, 00:09:16, Serial0/1/0 r3.3.3.3#show ip route ospf O IA 4.0.0.0/8 [110/75] via 200.0.0.2, 00:09:27, ATM2/0.20 O IA 6.0.0.0/8 [110/11] via 200.0.0.2, 00:09:27, ATM2/0.20
For information on troubleshooting OSPF when information in the database is missing from the Routing Table, refer to Why Are Some OSPF Routes in the Database but Not in the Routing Table? For general OSPF troubleshooting information, refer to Troubleshooting OSPF.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
28-Mar-2005 |
Initial Release |