Interpreting the OSPF LSDB and Routing Table
This section explains the relationship between and how to interpret the OSPF LSDB and routing table. The two types of OSPF external costs are described, as is the OSPF LSDB overload protection feature.
OSPF LSDB
Example 3-21 illustrates output from the show ip ospf database command, used to get information about an OSPF LSDB, on an ABR. In this output, the router link states are type 1 LSAs, the net link states are type 2 LSAs, the summary net link states are type 3 LSAs, the summary ASBR link states are type 4 LSAs, and the external link states are type 5 LSAs. This output is from the R1 router in Figure 3-31.
R1#show ip ospf database
OSPF Router with ID (10.0.0.11) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.0.0.11 10.0.0.11 485 0x80000004 0x002EE5 2
10.0.0.12 10.0.0.12 540 0x80000002 0x0046CB 2
10.0.0.21 10.0.0.21 494 0x80000042 0x00F8E1 1
10.0.0.22 10.0.0.22 246 0x80000042 0x00F6E0 1
200.200.200.200 200.200.200.200 485 0x800001CB 0x00E504 6
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.1.0.0 10.0.0.11 486 0x8000001A 0x00C92A
10.1.0.0 10.0.0.12 541 0x8000001A 0x00C32F
10.1.1.0 10.0.0.11 486 0x8000001A 0x002BD6
10.1.1.0 10.0.0.12 521 0x8000001C 0x00BE30
10.1.2.0 10.0.0.11 486 0x8000001A 0x00BD33
10.1.2.0 10.0.0.12 521 0x8000001C 0x0016E7
10.1.3.0 10.0.0.11 487 0x8000001A 0x00B23D
10.1.3.0 10.0.0.12 527 0x80000001 0x00DE29
10.2.0.0 10.0.0.21 1759 0x8000003F 0x00378C
10.2.0.0 10.0.0.22 856 0x8000003F 0x003191
10.2.1.0 10.0.0.21 1861 0x80000041 0x00943B
10.2.1.0 10.0.0.22 856 0x8000003F 0x003090
10.2.2.0 10.0.0.21 1861 0x80000049 0x00179F
10.2.2.0 10.0.0.22 1359 0x80000044 0x007D4D
10.2.3.0 10.0.0.21 1861 0x8000003F 0x00209F
10.2.3.0 10.0.0.22 1359 0x80000041 0x0016A6
10.11.0.0 10.0.0.11 589 0x80000018 0x005596
10.11.0.0 10.0.0.12 619 0x80000001 0x007D84
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
10.0.0.11 10.0.0.11 613 0x80000006 0x000CF1 5
10.0.0.12 10.0.0.12 614 0x80000006 0x00F205 5
10.200.200.13 10.200.200.13 639 0x80000005 0x0006B4 3
10.200.200.14 10.200.200.14 635 0x80000005 0x00882C 3
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.1.1.1 10.0.0.11 640 0x80000001 0x00D485
10.1.2.2 10.0.0.12 635 0x80000001 0x00D183
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
172.31.11.1 10.0.0.11 616 0x80000001 0x002F21
172.31.11.1 10.0.0.12 576 0x80000001 0x0064CA
172.31.11.2 10.0.0.11 576 0x80000001 0x0060CE
172.31.11.2 10.0.0.12 670 0x80000001 0x001F2F
172.31.11.4 10.0.0.11 576 0x80000001 0x00AE8E
172.31.11.4 10.0.0.12 630 0x80000001 0x00A893
172.31.22.4 10.0.0.11 576 0x80000001 0x0035FC
172.31.22.4 10.0.0.12 630 0x80000001 0x002F02
Summary ASB Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
200.200.200.200 10.0.0.11 576 0x80000001 0x00688B
200.200.200.200 10.0.0.12 631 0x80000001 0x006290
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.254.0.0 200.200.200.200 451 0x8000019D 0x00DADD 0
R1#
The columns displayed in the OSPF database in Example 3-21 are described as follows:
-
ADV Router— Advertising router—the LSA’s source router.
-
Age— The maximum age counter in seconds. The maximum age is 1 hour, or 3600 seconds.
-
Seq#— The LSA’s sequence number. It begins at 0x80000001 and increases with each update of the LSA.
-
Checksum— Checksum of the individual LSA to ensure reliable receipt of that LSA.
-
Link count— Used only on router LSAs, this is the total number of directly attached links. The link count includes all point-to-point, transit, and stub links. Point-to-point serial links count as two. All other links, including Ethernet links, count as one.
Because Router R1 in Figure 3-31 is an ABR, it includes an LSDB for both of the areas it is attached to, area 0 and area 1. In area 0, only type 1 and type 3 LSAs exist. Area 1 has 5 LSA types. Router BBR2 is an ASBR, which creates a type 5 LSA to advertise the route to 10.254.0.0 into OSPF. The type 5 LSA is flooded into all areas by default. The ABR for area 1, Router R1, creates a type 4 LSA describing how to reach the ASBR, Router BBR2.
Notice that R1 is advertising all the area 1 subnets as Type 3 LSAs (Summary net link states) in area 0, and R1 is advertising all the area 0 subnets as Type 3 LSAs in area 1.
OSPF Routing Table and Types of Routes
The show ip route command output shown in Example 3-22 displays the IP routing table on a router.
RouterB>show ip route
Table 3-14 describes each of the routing table designators for OSPF.
|
| |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Router and network LSAs describe the details within an area.
When an ABR receives summary or external LSAs, it adds them to its LSDB and regenerates and floods them into the local area. The internal routers then assimilate the information into their databases.
The SPF algorithm is then run against the LSDB to build the SPF tree, which is used to determine the best paths. The following is the order in which the best paths are calculated:
-
All routers calculate the best paths to destinations within their area (intra-area) and add these entries to the routing table. These are the type 1 and type 2 LSAs, which are noted in the routing table with a routing designator of O (OSPF).
-
All routers calculate the best paths to the other areas in the internetwork. These best paths are the interarea route entries, the type 3 and type 4 LSAs. They are noted with a routing designator of O IA (interarea).
-
All routers (except those that are in the form of a stub area) calculate the best paths to the external autonomous system (type 5) destinations. These routes are either external type 1 (E1), indicated with an O E1 in the routing table, or external type 2 (E2), indicated with an O E2 in the routing table, depending on the configuration.
At this point, a router can communicate with any network within or outside the OSPF autonomous system.
Calculating the Costs of E1 and E2 Routes
The cost of an external route varies, depending on the external type configured on the ASBR, as shown in Figure 3-32.
The following external cost types can be configured:
-
E1— Type O E1 external routes calculate the cost by adding the external cost to the internal cost of each link the packet crosses. Use this type when multiple ASBRs are advertising an external route to the same autonomous system, to avoid suboptimal routing.
-
E2 (default)— The external cost of O E2 packet routes is always the external cost only. Use this type if only one ASBR is advertising an external route to the autonomous system.
In the lower part of Figure 3-32, the E2 cost to the route in the external AS1 is always 1785. For example, if there were multiple paths to the external route, and E2 costs were used, there would be no distinction between the paths.
In the upper part of part of Figure 3-32, E1 costs are used, so the cost increases at each router as the internal cost is added to the external cost. This allows the optimal path to be selected if multiple paths are available.
The output in the earlier Example 3-22 is from Router B in Figure 3-33. The last entry (O E2) in Example 3-22 is an external route from the ASBR (Router E), via the ABR (Router A). The two numbers in brackets [110/50] are the administrative distance and the total cost of the route to the specific destination network, respectively. In this case, the administrative distance is the default for all OSPF routes of 110, and the E2 cost of the route has been calculated as 50.
Configuring OSPF LSDB Overload Protection
If other routers are misconfigured, causing, for example, a redistribution of a large number of prefixes, large numbers of LSAs can be generated. These excessive LSAs can drain local CPU and memory resources. OSPF LSDB overload protection can be configured to protect against this issue with Cisco IOS Software Release 12.3(7)T and later (and some specific earlier releases) by using the max-lsa maximum-number [threshold-percentage] [warning-only] [ignore-time minutes] [ignore-count count-number] [reset-time minutes] router configuration command.
Table 3-15 lists the parameters of the max-lsa command.
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
When this feature is enabled, the router keeps count of the number of received (non-self-generated) LSAs that it keeps in its LSDB. An error message is logged when this number reaches a configured threshold number, and a notification is sent when it exceeds the threshold number.
If the LSA count still exceeds the threshold after 1 minute, the OSPF process takes down all adjacencies and clears the OSPF database. This is called the ignore state. In this ignore state, no OSPF packets are sent or received by interfaces that belong to that OSPF process.
The OSPF process remains in the ignore state for the time that is defined by the ignore-time parameter. The ignore-count parameter defines the maximum number of times that the OSPF process can consecutively enter the ignore state before remaining permanently down and requiring manual intervention.
If the OSPF process remains normal for the time that is defined by the reset-time parameter, the ignore state counter is reset to 0.
0 comments
Post a Comment