Why Are Some OSPF Routes in the Database but Not in the Routing Table?

Reason1: interface network type mismatch

Reason2: Wrong address Assignment in dual serial link setup

Reason 1: Network Type Mismatch

Let's use the following network diagram as an example:

R4-4K R1-7010
interface Loopback0 ip address 172.16.33.1 255.255.255.255interface Serial2 ip address 172.16.32.1 255.255.255.0 ip ospf network broadcastrouter ospf 20 network 172.16.0.0 0.0.255.255 area 0 interface Loopback0 ip address 172.16.30.1 255.255.255.255!interface Serial1/0 ip address 172.16.32.2 255.255.255.0 clockrate 64000router ospf 20 network 172.16.0.0 0.0.255.255 area 0
R4-4K(4)# 
show ip ospf interface serial 2

Serial2 is up, line protocol is up 
  Internet Address 172.16.32.1/24, Area 0 
  Process ID 20, Router ID 172.16.33.1, 
Network Type BROADCAST
, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1 
  Designated Router (ID) 172.16.33.1, Interface address 172.16.32.1
  Backup Designated router (ID) 172.16.32.2, Interface address 172.16.32.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
  Neighbor Count is 1, Adjacent neighbor count is 1 
    Adjacent with neighbor 172.16.32.2  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

R1-7010(5)# 
show ip ospf interface serial 1/0

Serial1/0 is up, line protocol is up 
  Internet Address 172.16.32.2/24, Area 0 
  Process ID 20, Router ID 172.16.32.2, 
Network Type POINT_TO_POINT
, Cost: 64
  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:02
  Neighbor Count is 1, Adjacent neighbor count is 1 
    Adjacent with neighbor 172.16.33.1
  Suppress hello for 0 neighbor(s)

As you can see above, Router R4-4K is configured for broadcast, and Router R1-7010 is configured for point-to-point. This kind of network type mismatch makes the advertising router unreachable.

R4-4K(4)# 
show ip ospf database router 172.16.32.2
Adv Router is not-reachable

  LS age: 418
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 172.16.32.2

Advertising Router
: 172.16.32.2
  LS Seq Number: 80000002
  Checksum: 0xFA63
  Length: 60
   Number of Links: 3


    Link connected to: another Router (point-to-point)

    (Link ID) Neighboring Router ID: 172.16.33.1
    (Link Data) Router Interface address: 172.16.32.2
    Number of TOS metrics: 0
    TOS 0 Metrics: 64

    Link connected to: a Stub Network
    (Link ID) Network/subnet number: 172.16.32.0
    (Link Data) Network Mask: 255.255.255.0
    Number of TOS metrics: 0
    TOS 0 Metrics: 64

R1-7010(5)# 
show ip ospf database router 172.16.33.1
 Adv Router is not-reachable

  LS age: 357
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 172.16.33.1

  Advertising Router: 172.16.33.1

  LS Seq Number: 8000000A
  Checksum: 0xD4AA
  Length: 48
   Number of Links: 2


     Link connected to: a Transit Network

     (Link ID) Designated Router address: 172.16.32.1
     (Link Data) Router Interface address: 172.16.32.1
     Number of TOS metrics: 0
     TOS 0 Metrics: 64

You can see that for subnet 172.16.32.0/24, Router R1-7010 is generating a point-to-point link and Router R4-4K is generating a transit link. This creates a discrepancy in the link-state database, which means no routes are installed in the routing table.

R1-7010(5)# 
show ip route

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.32.0/24 is directly connected, Serial1/0
C       172.16.30.1/32 is directly connected, Loopback0

Solution

To solve this problem, configure both routers for the same network type. You can either change the network type of Router R1-7010 to broadcast, or change Router R4-4K's serial interface to point-to-point.

Note: If you have a situation where one side is a multipoint interface and the other side is a sub-interface then change the network type to broadcast on both sides.

In this example we have removed the "network-type broadcast" statement on R4-4K because both sides are point-to-point High-Level Data Link Control (HDLC) encapsulated interfaces.

R4-4K(4)# 
configure terminal

R4-4K(4)(config)# 
interface serial 2 

R4-4K(4)(config-if)# 
no ip ospf network broadcast 

R4-4K(4)(config-if)# 
end


R4-4K(4)# 
show ip ospf interface serial 2

 Serial2 is up, line protocol is up 
  Internet Address 172.16.32.1/24, Area 0 
  Process ID 20, Router ID 172.16.33.1, 
Network Type POINT_TO_POINT
, Cost: 64
  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:04
  Neighbor Count is 1, Adjacent neighbor count is 1 
  Adjacent with neighbor 172.16.32.2
  Suppress hello for 0 neighbor(s)

Consider this network diagram as an example:

R4-4K R1-7010
interface loopback 0 ip address 172.16.35.1 255.255.255.255interface Serial2 ip address 172.16.29.1 255.255.255.0!interface Serial3 ip address 172.16.32.1 255.255.255.0router ospf 20 network 172.16.0.0 0.0.255.255 area 0 interface loopback 0 ip address 172.16.30.1 255.255.255.255interface Serial1/0 ip address 172.16.32.2 255.255.255.0 clockrate 64000!interface Serial1/1 ip address 172.16.29.2 255.255.255.0 clockrate 38400router ospf 20 network 172.16.0.0 0.0.255.255 area 0

You can see that the IP addresses are flipped in the above configurations, which causes a discrepancy in the OSPF database. However, the routers still form neighbors in Cisco IOS version earlier than 12.1 because on a point-to-point link, OSPF routers don't verify that the neighboring router is on the same subnet.

R4-4K(4)# 
show ip ospf neighbor


Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.32.2       1   FULL/  -        00:00:37    172.16.32.2     Serial2
172.16.32.2       1   FULL/  -        00:00:31    172.16.29.2     Serial3

From the above output, you can see that Serial2 is forming neighbors with IP address 172.16.32.2, which isn't in the same subnet. Although neighbors are formed, no routes are installed in the routing table:

R1-7010(5)# 
show ip route

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.32.0/24 is directly connected, Serial1/0
C       172.16.29.0/24 is directly connected, Serial1/1
C       172.16.30.1/32 is directly connected, Loopback0

Solution

To solve this problem, either correctly assign the IP addresses or switch the serial cables. Here we have corrected the IP addresses:

R4-4K R1-7010
interface loopback 0 ip address 172.16.35.1 255.255.255.255interface Serial2 ip address 172.16.32.1 255.255.255.0!interface Serial3 ip address 172.16.29.1 255.255.255.0router ospf 20 network 172.16.0.0 0.0.255.255 area 0 interface loopback 0 ip address 172.16.30.1 255.255.255.255interface Serial1/0 ip address 172.16.32.2 255.255.255.0 clockrate 64000!interface Serial1/1 ip address 172.16.29.2 255.255.255.0 clockrate 38400router ospf 20 network 172.16.0.0 0.0.255.255 area 0
R4-4K(4)# 
show ip ospf neighbor


Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.32.2       1   FULL/  -        00:00:36    172.16.32.2     Serial2
172.16.32.2       1   FULL/  -        00:00:39    172.16.29.2     Serial3

Now it shows the correct neighbor address on the Serial 2 interface. The routes are also in the routing table:

R1-7010(5)# 
show ip route

172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C       172.16.32.0/24 is directly connected, Serial1/0

O       172.16.35.1/32 [110/65] via 172.16.32.1, 00:03:12, Serial1/0
[110/65] via 172.16.29.1, 00:03:12, Serial1/1

C       172.16.29.0/24 is directly connected, Serial1/1
C       172.16.30.1/32 is directly connected, Loopback0

Consider this network diagram as an example:

This situation creates exactly the same behavior as the Wrong Address Assignment in Dual Serial Link Setup. To solve the problem, assign IP addresses in the same subnet on both routers.

results matching ""

    No results matching ""