Home Network Layer OSPF Version 2 Troubleshooting OSPF Route Installation Explained on Cisco IOS

Troubleshooting OSPF Route Installation Explained on Cisco IOS

In this guide, you learn techniques and Cisco IOS commands used in troubleshooting OSPF route installation issues. I will discuss common reasons that can cause these OSPF problems and show you how to fix each of them.

In this tutorial, we assume there are no neighbor adjacency or route advertisement problems. You can check out the following guides to learn about:

In this blog post, I will be using the following network diagram.

To download the initial router configurations, use these links.

Router R1 Router R2 Router R3
Router R4 Router R5 Router R6

Troubleshooting OSPF Route Installation: Reasons That Cause an OSPF Route to Not Get Installed in The Routing Table

Here are the common possible reasons why an OSPF-enabled router fails to get a particular link/route installed in the global routing table:

  • Incompatible OSPF Network Types.
  • A point-to-point network connection with one endpoint is configured with an unnumbered IP address while the other isn’t.
  • Duplicate OSPF router IDs.
  • A Distribute list is filtering OSPF routes.
  • A Required Type 4 LSA is missing.
  • The router has a better route from another routing source (connected route, static route, EIGRP route, BGP route,…).

Let’s explain each of them.

Incompatible OSPF Network Types

OSPF network types include:

Two OSPF network types are incompatible if one network type supports the DR/BDR election process, while the other type does not. This table lists all OSPF network types and their compatibility with each other.

OSPF Network Types Broadcast Non-broadcast Point-to-point Point-to-multipoint
Broadcast compatible compatible incompatible incompatible
Non-broadcast compatible compatible incompatible incompatible
Point-to-point incompatible incompatible compatible compatible
Point-to-multipoint incompatible incompatible compatible compatible

Two OSPF nodes can build up a full OSPF neighbor relationship even though their neighboring interfaces are using different network types but have identical Hello and Dead intervals.

For example, you can set the network type of one neighboring interface to point-to-point while you set the network type of the other one to broadcast, and still have the routers reaching the Full neighbor state.

However, they won’t install any OSPF route based on the received LSAs from each other, and thus they would have inconsistencies in their OSPF RIB databases.

In general, if one neighboring OSPF interface is configured with a network type that supports OSPF DR and BDR election, and the other interface is not, the OSPF neighbors share LS packets but they don’t add the corresponding routes to their OSPF RIB tables.

Therefore, these OSPF routes don’t get installed in their routing tables.

On the other hand, if both neighboring interfaces support OSPF DR and BDR election, or if both interfaces don’t support DR and BDR election, the neighboring routers install the associated routes learned through LSAs shared between them into their OSPF RIB tables.

These outputs of the show ip ospf interface command indicate that R1 and R3’s neighboring interfaces are using different OSPF network types. R1’s GigabitEthernet 0/3 interface is configured with the point-to-point network type, while the network type of R3’s GigabitEthernet 0/1 interface is broadcast.

Router R1

R1# show ip ospf interface gigabitEthernet 0/3
GigabitEthernet0/3 is up, line protocol is up 
  Internet Address 10.0.13.1/24, Area 13, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

omitted output

Router R3

R3# show ip ospf interface gigabitEthernet 0/1
GigabitEthernet0/1 is up, line protocol is up 
  Internet Address 10.0.13.3/24, Area 13, Attached via Network Statement
  Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 3.3.3.3, Interface address 10.0.13.3
  Backup Designated router (ID) 1.1.1.1, Interface address 10.0.13.1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

omitted output

This example states that R1 and R3 are building a full OSPF neighbor relationship, which means they synchronized their LS databases.

R1# show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:36    10.0.12.2       GigabitEthernet0/2
3.3.3.3           0   FULL/  -        00:00:38    10.0.13.3       GigabitEthernet0/3

The output of the show ip ospf database command indicates that R1 and R3 shared some LSAs in area 13.

R1# show ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 1)


omitted output


                Router Link States (Area 13)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1469        0x80000004 0x000A49 3
3.3.3.3         3.3.3.3         1461        0x80000004 0x00F94A 2

                Net Link States (Area 13)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.13.3       3.3.3.3         1461        0x80000002 0x00AB57

                Summary Net Link States (Area 13)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.23.0       3.3.3.3         1461        0x80000002 0x00B657
10.0.36.0       3.3.3.3         1461        0x80000002 0x0027D9
10.0.46.0       3.3.3.3         1461        0x80000002 0x00BDB8
10.0.46.6       3.3.3.3         1461        0x80000002 0x008669
10.0.120.0      3.3.3.3         1461        0x80000002 0x00911A
10.0.140.0      3.3.3.3         1461        0x80000002 0x003720
10.0.160.0      3.3.3.3         1461        0x80000002 0x00D7AB


omitted output

However, none of the routes associated with the LSAs originated by router R3 get installed in R1’s OSPF RIB table, and thus they cannot get added to its routing table, as shown in this example. In fact, R1’s OSPF RIB table only includes the connected networks to R1.

R1# show ip ospf rib

            OSPF Router with ID (1.1.1.1) (Process ID 1)


                Base Topology (MTID 0)

OSPF local RIB
Codes: * - Best, > - Installed in global RIB

*   10.0.12.0/24, Intra, cost 1, area 12, Connected
      via 10.0.12.1, GigabitEthernet0/2
*   10.0.13.0/24, Intra, cost 1, area 13, Connected
      via 10.0.13.1, GigabitEthernet0/3
*   10.0.110.0/24, Intra, cost 1, area 13, Connected
      via 10.0.110.1, Loopback0

To fix this problem, we need to configure the interfaces in subnet 10.0.13.0/24 to use the same OSPF network type. In this example, we set the OSPF network type of R3’s GigabitEthernet0/1 interface to point-to-point like R1’s GigabitEthernet0/3 interface.

R3(config)# interface gigabitEthernet 0/1
R3(config-if)# ip ospf network point-to-point

The outputs of the show ip ospf rib and show ip route commands state that R1 installed many routes learned through area 13 LSAs received from router R3.

R1# show ip ospf rib

            OSPF Router with ID (1.1.1.1) (Process ID 1)
                Base Topology (MTID 0)

OSPF local RIB
Codes: * - Best, > - Installed in global RIB

*   10.0.12.0/24, Intra, cost 1, area 12, Connected
      via 10.0.12.1, GigabitEthernet0/2
*   10.0.13.0/24, Intra, cost 1, area 13, Connected
      via 10.0.13.1, GigabitEthernet0/3
*>  10.0.23.0/24, Inter, cost 2, area 13
      via 10.0.13.3, GigabitEthernet0/3
*>  10.0.36.0/24, Inter, cost 2, area 13
      via 10.0.13.3, GigabitEthernet0/3
*>  10.0.46.6/32, Inter, cost 3, area 13
      via 10.0.13.3, GigabitEthernet0/3
*>  10.0.46.0/24, Inter, cost 130, area 13
      via 10.0.13.3, GigabitEthernet0/3
*>  10.0.66.0/24, Inter, cost 3, area 13
      via 10.0.13.3, GigabitEthernet0/3
*   10.0.110.0/24, Intra, cost 1, area 13, Connected
      via 10.0.110.1, Loopback0
*>  10.0.120.0/24, Inter, cost 3, area 13
      via 10.0.13.3, GigabitEthernet0/3
*>  10.0.140.0/24, Inter, cost 67, area 13
      via 10.0.13.3, GigabitEthernet0/3
*>  10.0.160.0/24, Inter, cost 3, area 13
      via 10.0.13.3, GigabitEthernet0/3
*>  10.0.166.0/24, Ext2, cost 20, fwd cost 2, tag 0
      via 10.0.13.3, GigabitEthernet0/3
R1# show ip route ospf

omitted output

      10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks
O IA     10.0.23.0/24 [110/2] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O IA     10.0.36.0/24 [110/2] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O IA     10.0.46.0/24 [110/130] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O IA     10.0.46.6/32 [110/3] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O IA     10.0.66.0/24 [110/2] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O IA     10.0.120.0/24 [110/3] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O IA     10.0.140.0/24 [110/67] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O IA     10.0.160.0/24 [110/3] via 10.0.13.3, 00:08:53, GigabitEthernet0/3
O E2     10.0.166.0/24 [110/20] via 10.0.13.3, 00:08:53, GigabitEthernet0/3

A Point-To-Point Network Connection With One Endpoint is Configured With an Unnumbered IP Address While The Other One isn’t

On point-to-point network mediums, you can configure one side with an unnumbered IP address and configure the other side with a numbered one.

The routers can form an OSPF adjacency and synchronize their LSDBs but the router with the numbered interface cannot add any OSPF routes calculated based on the LSAs received from the other neighbor to its OSPF RIB table, which prevents those routes from being installed in the routing table.

The outputs of the show ip interface command indicate that R6’s Serial 1/0 interface is configured with an unnumbered IP address, while R4’s Serial 1/0 interface does not.

Router R4

R4# show ip interface serial 1/0
Serial1/0 is up, line protocol is up
  Internet address is 10.0.46.4/24
  Broadcast address is 255.255.255.255
  Address determined by setup command
  Peer address is 10.0.46.6
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled
  Multicast reserved groups joined: 224.0.0.5
  Outgoing access list is not set

omitted output

Router R6

R6# show ip interface serial 1/0
Serial1/0 is up, line protocol is up
  Interface is unnumbered. Using address of Loopback1 (10.0.46.6)
  Broadcast address is 255.255.255.255
  Peer address is 10.0.46.4
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled

omitted output


Additionally, R4 and R6 build an OSPF neighbor relationship and reach the full state.

R4# show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
6.6.6.6           0   FULL/  -        00:00:39    10.0.46.6       Serial1/0

This example shows that R4 receives several LSAs from R6 via area 0.

R4# show ip ospf database adv-router 6.6.6.6

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
6.6.6.6         6.6.6.6         1141        0x80000010 0x009293 4

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.36.6       6.6.6.6         1913        0x80000007 0x00F5CD

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.66.0       6.6.6.6         1141        0x80000007 0x003B90

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
10.0.46.4       6.6.6.6         1141        0x80000007 0x0080C5 0
10.0.166.0      6.6.6.6         1141        0x80000007 0x007B56 0

Unfortunately, R4 does not install any OSPF routes for the network links advertised via these LSAs in the OSPF RIB or global routing tables, as illustrated in the following outputs of the show ip ospf rib and show ip route commands.

R4# show ip ospf rib

            OSPF Router with ID (1.1.1.1) (Process ID 1)


                Base Topology (MTID 0)

OSPF local RIB
Codes: * - Best, > - Installed in global RIB

*   10.0.46.0/24, Intra, cost 64, area 0, Connected
      via 10.0.46.4, Serial1/0
*   10.0.140.0/24, Intra, cost 1, area 0, Connected
      via 10.0.140.4, Loopback0
R4# show 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, + - replicated route

Gateway of last resort is not set

R4#

The show ip ospf database router command output states that R6 the link data value of its router LSA’s entry, describing the point-to-point link, to 0.0.0.5, the MIB-II ifIndex value of the unnumbered interface.

MIB-II ifIndex is a locally unique number that is greater than zero and it is assigned to each interface for SNMP management purposes.

Besides, R4 sees 0.0.0.5 as R6’s address on the point-to-point link.

R4# show ip ospf database router 6.6.6.6
            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

  Adv Router is not-reachable in topology Base with MTID 0
  LS age: 2013
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 6.6.6.6
  Advertising Router: 6.6.6.6
  LS Seq Number: 8000000F
  Checksum: 0x9492
  Length: 72
  Area Border Router
  AS Boundary Router
  Number of Links: 4

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.46.6
     (Link Data) Network Mask: 255.255.255.255
      Number of MTID metrics: 0
       TOS 0 Metrics: 1
          
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.160.0
     (Link Data) Network Mask: 255.255.255.0
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

    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.5
      Number of MTID metrics: 0
       TOS 0 Metrics: 64

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 10.0.36.6
     (Link Data) Router Interface address: 10.0.36.6
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

On the other hand, router R4 is advertising 10.0.46.4 as its interface address on the point-to-point link to R6.

Since both routers do not use the same fashion to supply their IP addresses on the point-to-point network link to each other, router R4 doesn’t update its OSPF RIB table i.e. routing table, according to the LSAs collected from router R6.

To solve this problem, both neighboring interfaces connecting R4 and R6  should be configured either with numbered or unnumbered IP addresses.

This example removes the loopback1 interface’s IP address and assigns it to R6’s Serial 1/0 interface.

R6(config)# interface loopback 1
R6(config-if)# no ip address
R6(config-if)# exit
R6(config)# interface serial 1/0
R6(config-if)# ip address 10.0.46.6 255.255.255.0

The show ip route command output states that R4 installs OSPF routes learned through LSAs received from router R6.

R4# show ip route ospf

omitted output

      10.0.0.0/8 is variably subnetted, 20 subnets, 2 masks
O IA     10.0.13.0/24 [110/66] via 10.0.46.6, 00:01:21, Serial1/0
O IA     10.0.23.0/24 [110/66] via 10.0.46.6, 00:01:21, Serial1/0
O        10.0.36.0/24 [110/65] via 10.0.46.6, 00:01:21, Serial1/0
O IA     10.0.66.0/24 [110/65] via 10.0.46.6, 00:01:21, Serial1/0
O IA     10.0.110.0/24 [110/67] via 10.0.46.6, 00:01:21, Serial1/0
O IA     10.0.120.0/24 [110/67] via 10.0.46.6, 00:01:21, Serial1/0
O        10.0.160.0/24 [110/65] via 10.0.46.6, 00:01:21, Serial1/0
O E2     10.0.166.0/24 [110/20] via 10.0.46.6, 00:01:21, Serial1/0

Duplicate OSPF Router IDs

The OSPF Router ID is a unique 32-bit number assigned to each OSPF-enabled router in order to distinguish it from other routers in the OSPF routing domain.

If two neighboring routers have the same OSPF router ID, they cannot build up a neighbor relationship. Moreover, if a router receives a non-self-originated LSA that includes its router ID, it may install it in the OSPF database but it does not use the routing information in it to add necessary routes to the OSPF RIB table.

Router R1 receives three Type 5 LSAs that advertise IP prefixes 10.0.45.0, 10.0.141.0, and 10.0.150.0, as shown in this example.

R1# show ip ospf database | begin Type-5
                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
10.0.45.0       1.1.1.1         3604        0x80000C4C 0x00D24F 0
10.0.141.0      1.1.1.1         3605        0x80000C4C 0x00AE13 0
10.0.150.0      1.1.1.1         3604        0x80000C4C 0x004B6D 0
10.0.166.0      6.6.6.6         473         0x80000008 0x007957 0

However, as illustrated in these outputs of the show ip ospf rib command, no route is installed in R1’s OSPF RIB table i.e. routing table, for these IP prefixes.

R1# show ip ospf rib 10.0.45.0
%OSPF: Route not in OSPF Base Topology (MTID 0) local RIB

R1# show ip ospf rib 10.0.141.0
%OSPF: Route not in OSPF Base Topology (MTID 0) local RIB

R1# show ip ospf rib 10.0.150.0
%OSPF: Route not in OSPF Base Topology (MTID 0) local RIB

This is due to the fact that the corresponding LSAs are originated by an OSPF node that has an identical OSPF router ID to R1, which is R4 in this case, as shown in this example.

R4# show ip ospf
 Routing Process "ospf 1" with ID 1.1.1.1
 Start time: 00:02:27.932, Time elapsed: 04:34:34.800
 Supports only single TOS(TOS0) routes
 Supports opaque LSA

omitted output

To fix this problem, we set the OSPF router ID of router R4 to 4.4.4.4, which is a unique value within our network topology.

R4(config)# router ospf 1
R4(config-router)# router-id 4.4.4.4
Reload or use "clear ip ospf process" command, for this to take effect
R4(config-router)# end
R4# 
Reset ALL OSPF processes? [no]: y

The show ip ospf rib command output indicates that the external OSPF routes advertised by router R4 are being installed in R1’s OSPF RIB table.

R1# show ip ospf rib | include Ext
*>  10.0.45.0/24, Ext2, cost 20, fwd cost 66, tag 0
*   10.0.141.0/24, Ext2, cost 20, fwd cost 66, tag 0
*   10.0.150.0/24, Ext2, cost 20, fwd cost 66, tag 0
*>  10.0.166.0/24, Ext2, cost 20, fwd cost 2, tag 0

However, the routes to IP prefixes 10.0.141.0/24 and 10.0.150.0/24 are not installed in the routing table since their entries in the previous example do not include the ‘>’ character.

This is because of OSPF route filtering configured on router R1, as we will see in the next point.

A Distribute List is Filtering OSPF Routes

You cannot deny a router from receiving a particular LSA, but you can instruct it to not add a particular OSPF route to the routing table.

You can accomplish this using the distribute-list command in router configuration mode.

The output of the show running-config command states that R1 is filtering OSPF routes matching access control list 1.

R1# show running-config | begin router ospf
router ospf 1
 router-id 1.1.1.1
 network 10.0.12.1 0.0.0.0 area 12
 network 10.0.13.1 0.0.0.0 area 13
 network 10.0.110.1 0.0.0.0 area 13
 distribute-list 1 in

The show ip access-list command indicates that standard ACL 1 is blocking IP prefixes 10.0.141.0/24 and 10.0.150.0/24.

R1# show ip access-list 1
Standard IP access list 1
    10 deny   10.0.141.0, wildcard bits 0.0.0.255 (1 match)
    20 deny   10.0.150.0, wildcard bits 0.0.0.255 (1 match)
    30 permit any (12 matches)

To solve this problem, we remove the distribute-list statement from the OSPF configuration on router R1.

R1(config)# router ospf 1
R1(config-router)# no distribute-list 1 in

This example states that R1 installed the routes to IP prefixes 10.0.141.0/24 and 10.0.150.0/24 in its routing table.

R1# show ip route 10.0.141.0
Routing entry for 10.0.141.0/24
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 66
  Last update from 10.0.13.3 on GigabitEthernet0/3, 00:00:11 ago
  Routing Descriptor Blocks:
  * 10.0.13.3, from 4.4.4.4, 00:00:11 ago, via GigabitEthernet0/3
      Route metric is 20, traffic share count is 1

R1# show ip route 10.0.150.0
Routing entry for 10.0.150.0/24
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 66
  Last update from 10.0.13.3 on GigabitEthernet0/3, 00:00:16 ago
  Routing Descriptor Blocks:
  * 10.0.13.3, from 4.4.4.4, 00:00:16 ago, via GigabitEthernet0/3
      Route metric is 20, traffic share count is 1

Before continuing, we shut down R1’s GigabitEthernet 0/3 interface connected to R3. This way, R1’s OSPF neighbor is router R2.

R1(config)# interface gigabitEthernet 0/3
R1(config-if)# shutdown

The Required Type 4 LSA is Missing

For a router to be able to reach an external network, it must have the related Type 5 LSA and know how to reach the forwarding address in the LSA.

If the forwarding address is set to 0.0.0.0, the router should have a way to reach the LSA’s originating router.

The show ip ospf database external command output states that R1’s LSDB includes Type 5 LSAs for IP prefixes 10.0.45.0, 10.0.141.0, 10.0.150.0, and 10.0.166.0.

R1# show ip ospf database | begin Type-5
                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
10.0.45.0       4.4.4.4         665         0x80000003 0x00F75F 0
10.0.141.0      4.4.4.4         665         0x80000003 0x00D323 0
10.0.150.0      4.4.4.4         665         0x80000003 0x00707D 0
10.0.166.0      6.6.6.6         1808        0x8000000A 0x007559 0

However, none of these IP prefixes has a route installed in the OSPF RIB and routing tables of R1.

R1# show ip ospf rib 10.0.45.0
%OSPF: Route not in OSPF Base Topology (MTID 0) local RIB
R1#
R1# show ip ospf rib 10.0.141.0
%OSPF: Route not in OSPF Base Topology (MTID 0) local RIB
R1#
R1# show ip ospf rib 10.0.150.0
%OSPF: Route not in OSPF Base Topology (MTID 0) local RIB
R1#
R1# show ip ospf rib 10.0.166.0
%OSPF: Route not in OSPF Base Topology (MTID 0) local RIB
R1#
R1#
R1# show ip route 10.0.45.0    
% Subnet not in table
R1#
R1# show ip route 10.0.141.0
% Subnet not in table
R1#
R1# show ip route 10.0.150.0
% Subnet not in table
R1#                        
R1# show ip route 10.0.166.0
% Subnet not in table

Besides, the forwarding address in those Type 5 LSAs is 0.0.0.0. Here is an example.

R1# show ip ospf database external 10.0.45.0

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  LS age: 1178
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 10.0.45.0 (External Network Number )
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000003
  Checksum: 0xF75F
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address: 0.0.0.0
        External Route Tag: 0

Therefore, R1 should have LSAs that tell it to reach the originating routers, which are R4 and R6 in our case. Since the advertising routers are not within the attached OSPF area to R1, R1 must have a Type 4 LSA that tells it how to reach R4 and R6.

Type 4 LSA are generated but ABRs only. In this case, router R2 has to generate such an LSA and flood it to R1 for router R1 to be able to install routes to IP prefixes 10.0.45.0, 10.0.141.0, 10.0.150.0, and 10.0.166.0.

The show ip ospf database asbr-summary command output indicates that R1 does not have Type 4 LSAs in its area 12’s LSDB, meaning router R2 either does not produce or send them to R1.

R1# show ip ospf database asbr-summary

            OSPF Router with ID (1.1.1.1) (Process ID 1)
R1#

Additionally, router R2’s OSPF database includes Type 4 LSAs in area 23 only.

R2# show ip ospf database asbr-summary

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Summary ASB Link States (Area 23)

  LS age: 31
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 4.4.4.4 (AS Boundary Router address)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0x7F6B
  Length: 28
  Network Mask: /0
        MTID: 0         Metric: 65 

  LS age: 31
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 6.6.6.6 (AS Boundary Router address)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0x1601
  Length: 28
  Network Mask: /0
        MTID: 0         Metric: 1 

Therefore, router R2 does not generate Type 4 LSAs for R4 and R6 in area 12, containing R1 and R2; thus router R1 cannot install routes to the external destinations advertised by those routers.

R2 is not a true ABR, even though it is connected to areas 12 and 23, as illustrated in this example.

R2# show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Gi0/1        1     12              10.0.12.2/24       1     DR    1/1
Lo0          1     23              10.0.120.2/24      1     P2P   0/0
Gi0/3        1     23              10.0.23.2/24       1     BDR   1/

Router R2 must be connected to the backbone area in order to originate Type 4 LSAs. As a result, we can solve this problem by configuring an OSPF virtual link via area 23 between R2 and R3, which is already in area 0.
Router R2

R2(config)# router ospf 1
R2(config-router)# area 23 virtual-link 3.3.3.3

Router R3

R3(config)# router ospf 1
R3(config-router)# area 23 virtual-link 2.2.2.2

The show ip ospf virtual-links command output states that the virtual link is working.

R3# show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 23, via interface GigabitEthernet0/2
 Topology-MTID    Cost    Disabled     Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:00
    Adjacency State FULL (Hello suppressed)
    Index 1/2/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

The output of the show ip ospf database asbr-summary command indicates that R1 received two Type 4 LSAs originated by router R2 that will be used to reach routers with OSPF router IDs 4.4.4.4 and 6.6.6.6.

R1# show ip ospf database asbr-summary

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Summary ASB Link States (Area 12)

  LS age: 206
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 4.4.4.4 (AS Boundary Router address)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x1DC4
  Length: 28
  Network Mask: /0
        MTID: 0         Metric: 66 

  LS age: 206
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 6.6.6.6 (AS Boundary Router address)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x3EDB
  Length: 28
  Network Mask: /0
        MTID: 0         Metric: 2 

These LSAs tell R1 that it has to use the OSPF node with router ID 2.2.2.2 as a next-hop router in order to reach the external network advertised by R4 and R6.

Finally, R1 installed routes to IP prefixes 10.0.45.0, 10.0.141.0, 10.0.150.0, and 10.0.166.0 in its routing table, as shown in this example.

R1# show ip route ospf | include E2
       E1 - OSPF external type 1, E2 - OSPF external type 2
O E2     10.0.45.0/24 [110/20] via 10.0.12.2, 00:09:17, GigabitEthernet0/2
O E2     10.0.141.0/24 [110/20] via 10.0.12.2, 00:09:17, GigabitEthernet0/2
O E2     10.0.150.0/24 [110/20] via 10.0.12.2, 00:09:17, GigabitEthernet0/2
O E2     10.0.166.0/24 [110/20] via 10.0.12.2, 00:09:17, GigabitEthernet0/2

Before continuing, we re-enable R1’s GigabitEthernet 0/3 interface connected to R3.

R1(config)# interface gigabitEthernet 0/3
R1(config-if)# no shutdown

The Router Has A Better Route From Another Routing Source (Connected Route, Static Route, EIGRP Route, BGP Route,…)

It is enough for an OSPF route to be installed in the OSPF RIB table in order to get added to the router’s routing table.

If a router has a better route than a particular OSPF route, it ignores the OSPF route and installs what it thinks is the most reliable route, the non-OSPF one.

A better route means a route with a lower administrative distance than the current OSPF route. The route may be learned from another routing source (connected route, static route, EIGRP route, BGP route,…).

The output of the show ip ospf rib command indicates that R2 installs routes to IP prefixes 10.0.141.0/24 and 10.0.150.0/24 in its OSPF RIB table.

R2# show ip ospf rib | include Ext
*>  10.0.45.0/24, Ext2, cost 20, fwd cost 66, tag 0
*   10.0.141.0/24, Ext2, cost 20, fwd cost 66, tag 0
*   10.0.150.0/24, Ext2, cost 20, fwd cost 66, tag 0
*>  10.0.166.0/24, Ext2, cost 20, fwd cost 2, tag 0

However, router R2 is not using these routes to forward IP packets to those destinations, as illustrated in this example.

R2# show ip route 10.0.141.0
Routing entry for 10.0.141.0/24
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 10.0.12.1, via GigabitEthernet0/1
      Route metric is 0, traffic share count is 1

R2#

R2# show ip route 10.0.150.0
Routing entry for 10.0.150.0/24
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 10.0.12.1, via GigabitEthernet0/1
      Route metric is 0, traffic share count is 1

In fact, router R2 is using two static routes instead.

R2# show ip route static

omitted output

      10.0.0.0/8 is variably subnetted, 20 subnets, 2 masks
S        10.0.141.0/24 [1/0] via 10.0.12.1, GigabitEthernet0/1
S        10.0.150.0/24 [1/0] via 10.0.12.1, GigabitEthernet0/1

To solve this problem, we can remove the static routes completely or remove them add them again with an administrative distance greater than the one of OSPF.

In this way, the OSPF routes for IP prefixes 10.0.141.0/24 and 10.0.150.0/24 are installed in the routing table, and the static routes are still maintained in the router’s configuration, serving as backup routes for these IP prefixes.

In this example, we re-configure the static routes on R2 with an administrative distance of 120.

R2(config)# no ip route 10.0.141.0 255.255.255.0 GigabitEthernet0/1 10.0.12.1
R2(config)# no ip route 10.0.150.0 255.255.255.0 GigabitEthernet0/1 10.0.12.1
R2(config)# ip route 10.0.141.0 255.255.255.0 GigabitEthernet0/1 10.0.12.1 120
R2(config)# ip route 10.0.150.0 255.255.255.0 GigabitEthernet0/1 10.0.12.1 120

The show ip route command output states that R2 is using OSPF routes to reach IP prefixes 10.0.141.0/24 and 10.0.150.0/24.

R2# show ip route | include E2
       E1 - OSPF external type 1, E2 - OSPF external type 2
O E2     10.0.45.0/24 [110/20] via 10.0.23.3, 00:40:40, GigabitEthernet0/3
O E2     10.0.141.0/24 [110/20] via 10.0.23.3, 00:00:19, GigabitEthernet0/3
O E2     10.0.150.0/24 [110/20] via 10.0.23.3, 00:00:19, GigabitEthernet0/3
O E2     10.0.166.0/24 [110/20] via 10.0.23.3, 00:40:40, GigabitEthernet0/3

Useful Cisco IOS Commands for Troubleshooting OSPF Route Installation

Here are the Cico IOS commands we used in this guide in order to troubleshoot OSPF route installation problems:

  • show ip access-list
  • show ip interface
  • show ip interface brief
  • show ip ospf
  • show ip ospf database
  • show ip ospf database router
  • show ip ospf database asbr-summary
  • show ip ospf database external
  • show ip ospf interface
  • show ip ospf interface brief
  • show ip ospf neighbor
  • show ip ospf rib
  • show ip ospf virtual-links
  • show ip route
  • show ip route ospf
  • show ip route static
  • show running-config

Related Lessons to Troubleshooting OSPF Route Installation

Conclusion

I hope this blog post helps you learn something.
Now I’d like to turn it over to you:
What did you like about this tutorial?
Or maybe you have an excellent idea that you think I need to add.
Either way, let me know by leaving a comment below right now.

Mohamed Ouamer is a computer science teacher and a self-published author. He taught networking technologies and programming for more than fifteen years. While he loves to share knowledge and write, Mohamed's best passions include spending time with his family, visiting his parents, and learning new things.

Exit mobile version