cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2035
Views
5
Helpful
6
Replies

OSPF: Networks in database but not in routing table

Nikolaos Milas
Level 1
Level 1

Hello,

We are running OSPF among three routers (two 3825 and one 3640) and we are facing issues with some networks not advertised in the routing table.

Here is the topology:

Communication between the routers seems fine; The problem I am facing is that some routes, although they exist in the OSPF database, they are not included in the OSPF routing table.

For example, in R3 (THI) all main networks known from R1 (marked in red below) are missing from the OSPF routing table:

thi# show ip route ospf
     194.177.195.0/24 is variably subnetted, 3 subnets, 3 masks
O       194.177.195.128/27
           [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       194.177.195.0/25
           [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O    192.168.93.0/24 [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O    192.168.95.0/24 [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
     172.16.0.0/30 is subnetted, 9 subnets
O       172.16.1.32 [110/30] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       172.16.1.20 [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       172.16.1.12 [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O    195.251.203.0/24
           [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
     195.251.202.0/24 is variably subnetted, 5 subnets, 5 masks
O       195.251.202.176/28
           [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       195.251.202.152/29
           [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       195.251.202.0/25
           [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
     10.0.0.0/8 is variably subnetted, 14 subnets, 3 masks
O       10.201.10.0/23
           [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       10.201.8.0/23
           [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       10.201.12.0/23
           [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       10.201.43.0/24
           [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       10.201.42.0/24
           [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       10.201.44.0/24
           [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O       10.201.60.0/23
           [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O    192.168.96.0/24 [110/110] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8
O    192.168.97.0/24 [110/20] via 172.16.1.17, 03:03:03, GigabitEthernet0/1.8

thi# show ip ospf database router 195.251.202.169

            OSPF Router with ID (195.251.204.254) (Process ID 120)

                Router Link States (Area 0)

  LS age: 867
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 195.251.202.169
  Advertising Router: 195.251.202.169
  LS Seq Number: 80000007
  Checksum: 0xCF97
  Length: 132
  Number of Links: 9

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

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 195.251.202.168
     (Link Data) Network Mask: 255.255.255.252
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 195.251.202.192
     (Link Data) Network Mask: 255.255.255.192
      Number of TOS metrics: 0
       TOS 0 Metrics: 100

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.16.1.12
     (Link Data) Network Mask: 255.255.255.252
      Number of TOS metrics: 0
       TOS 0 Metrics: 100

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.16.1.4
     (Link Data) Network Mask: 255.255.255.252
      Number of TOS metrics: 0
       TOS 0 Metrics: 100

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 195.251.204.254
     (Link Data) Router Interface address: 172.16.1.26
      Number of TOS metrics: 0
       TOS 0 Metrics: 40

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.16.1.24
     (Link Data) Network Mask: 255.255.255.252
      Number of TOS metrics: 0
       TOS 0 Metrics: 40

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 195.251.204.250
     (Link Data) Router Interface address: 172.16.1.22
      Number of TOS metrics: 0
       TOS 0 Metrics: 10

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.16.1.20
     (Link Data) Network Mask: 255.255.255.252
      Number of TOS metrics: 0
       TOS 0 Metrics: 10

Can you please help me identify the reason why these routes are unavailable (and correct it)?

The OSPF configuration of routers is as follows:

R1:

interface Loopback0
 ip address 195.251.202.169 255.255.255.252
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip ospf message-digest-key 10 md5 ********************
 ip ospf network point-to-point

router ospf 120
 log-adjacency-changes
 auto-cost reference-bandwidth 10000
 area 0 authentication message-digest
 passive-interface default
 no passive-interface Ethernet0/0.4
 no passive-interface FastEthernet1/0.133
 no passive-interface FastEthernet1/0.134
 no passive-interface Loopback0
 network 10.201.0.0 0.0.255.255 area 0
 network 172.16.1.0 0.0.0.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
 network 195.251.202.168 0.0.0.3 area 0
 network 195.251.202.192 0.0.0.63 area 0

R2:

interface Loopback0
 ip address 195.251.204.250 255.255.255.252
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip virtual-reassembly
 ip ospf message-digest-key 10 md5 ********************
 ip ospf network point-to-point
 ipv6 address 2001:648:2011:20::1/64
 ipv6 enable
 ipv6 ospf 120 area 0

router ospf 120
 log-adjacency-changes
 auto-cost reference-bandwidth 10000
 area 0 authentication message-digest
 passive-interface default
 no passive-interface GigabitEthernet0/0.4
 no passive-interface GigabitEthernet0/0.8
 no passive-interface GigabitEthernet0/0.133
 no passive-interface GigabitEthernet0/0.135
 no passive-interface Loopback0
 network 10.201.0.0 0.0.255.255 area 0
 network 172.16.1.0 0.0.0.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
 network 194.177.194.0 0.0.1.255 area 0
 network 195.251.202.0 0.0.1.255 area 0
 network 195.251.204.0 0.0.0.255 area 0

R3:

interface Loopback0
 ip address 195.251.204.254 255.255.255.252
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip virtual-reassembly
 ip ospf message-digest-key 10 md5 7 ****************************
 ip ospf network point-to-point
 ipv6 address 2001:648:2011:8020::1/64
 ipv6 enable
 ipv6 ospf 120 area 0

router ospf 120
 router-id 195.251.204.254
 log-adjacency-changes
 auto-cost reference-bandwidth 10000
 area 0 authentication message-digest
 passive-interface default
 no passive-interface GigabitEthernet0/0.134
 no passive-interface GigabitEthernet0/0.135
 no passive-interface GigabitEthernet0/1.8
 no passive-interface Loopback0
 network 10.201.0.0 0.0.255.255 area 0
 network 172.16.1.0 0.0.0.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
 network 194.177.194.0 0.0.0.255 area 0
 network 195.251.204.254 0.0.0.0 area 0
 network 195.251.204.0 0.0.0.255 area 0

I have researched the problem to an extent but I am stuck (mostly due to lack of experience).

Please advise.

Thanks,
Nick

(PS. This thread describes the implementation of a design discussed earlier at: https://supportforums.cisco.com/discussion/12496866/ospf-configuration-over-p2p-vlans)

1 Accepted Solution

Accepted Solutions

Hi Nick

The routes will not appear in the routing table from OSPF as
the routing table is built from the best admin distances.

You static routes have an admin distance of "1"

thi# show ip route 192.168.94.0
Routing entry for 192.168.94.0/24
Known via "static", distance 1, metric 0
Routing Descriptor Blocks: * 172.16.1.26 Route metric is 0, traffic share count is 1


By default OSPF has an admin distance of "110"


You could in a quiet period demote the static route by changing its admin distance
to say 200 (worse that both STATIC & OSPF)


something like

!
ip route 192.168.94.0 255.255.255.0 "NEXTHOP ADD"  200
!

Your OSPF route should now kick in

Check with show ip route 192.168.94.0

If you need to revert

!
no ip route 192.168.94.0 255.255.255.0 "NEXTHOP ADD"  200
ip route 192.168.94.0 255.255.255.0 "NEXTHOP ADD"
!


Regards
Alex

Regards, Alex. Please rate useful posts.

View solution in original post

6 Replies 6

Krishnendu AR
Level 1
Level 1

Hello Nikolaos,

Can you please post the output of below commands:

sh ip route 192.168.94.0

sh ip route 195.251.202.168

sh ip route 195.251.202.192

We need to find whether this router is learning those networks from any other protocols.

Krishna

Thank you for the reply,

Please note that all internal routing is currently being done using static routes.

OSPF has just been implemented and is in testing mode. No OSPF routes are currently being used in production. We need to make sure that things work fine with OSPF first, and then stop using static routes.

So, below follows the output you requested; you will see that all routes are static.

The question is why there are no OSPF routes (for these networks) available at all. As far as I know, "show ip route ospf" includes all OSPF-derived routes, used or unused.

thi# show ip route 195.251.202.168
Routing entry for 195.251.202.168/30
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 172.16.1.26
      Route metric is 0, traffic share count is 1

thi# show ip route 195.251.202.192
Routing entry for 195.251.202.192/26
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 172.16.1.26
      Route metric is 0, traffic share count is 1

thi# show ip route 192.168.94.0   
Routing entry for 192.168.94.0/24
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 172.16.1.26
      Route metric is 0, traffic share count is 1

Again, thank you for your kind assistance. Please let me know of anything you can think of.

Nick

Hi Nick

The routes will not appear in the routing table from OSPF as
the routing table is built from the best admin distances.

You static routes have an admin distance of "1"

thi# show ip route 192.168.94.0
Routing entry for 192.168.94.0/24
Known via "static", distance 1, metric 0
Routing Descriptor Blocks: * 172.16.1.26 Route metric is 0, traffic share count is 1


By default OSPF has an admin distance of "110"


You could in a quiet period demote the static route by changing its admin distance
to say 200 (worse that both STATIC & OSPF)


something like

!
ip route 192.168.94.0 255.255.255.0 "NEXTHOP ADD"  200
!

Your OSPF route should now kick in

Check with show ip route 192.168.94.0

If you need to revert

!
no ip route 192.168.94.0 255.255.255.0 "NEXTHOP ADD"  200
ip route 192.168.94.0 255.255.255.0 "NEXTHOP ADD"
!


Regards
Alex

Regards, Alex. Please rate useful posts.

As far as I know, "show ip route ospf" includes all OSPF-derived routes, used or unused.

This is true for a very similar looking command: show ip ospf route  (and show ip ospf rib)

It was introduced with the OSPF RIB feature in IOS 12.4(15)T, so it might not be applicable on your routers.

Example output:

R2#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 172.16.12.1
      Route metric is 0, traffic share count is 1

R2#show ip route ospf

R2#show ip ospf route

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

    Area BACKBONE(0)

    Intra-area Route List
*   172.16.12.0/24, Intra, cost 64, area 0, Connected
      via 172.16.12.2, Serial0/0
*   1.1.1.1/32, Intra, cost 65, area 0
      via 172.16.12.1, Serial0/0

 

HTH

Rolf

Thank you all for your prompt and truly helpful replies.

I confirm you are right: If I remove static routes, OSPF routes appear in the routing table.

Rolf, I am afraid you are right: Our IOS version is 12.4(9)T.

Case closed.

All the best,
Nick

marco.vindell
Level 1
Level 1

Thank you very much, I had this same confusion myself. Was troubleshooting and decided to test a theory by deleting the static route and it appeared in OSPF almost instantly. I then looked online and found this thread, very helpful! I also was wondering by the OSPF DB looked ok but I didn't see the networks in the OSPF routing table.

This is true for a very similar looking command: show ip ospf route  (and show ip ospf rib)

It was introduced with the OSPF RIB feature in IOS 12.4(15)T, so it might not be applicable on your routers

 

Thank you for that!

Review Cisco Networking for a $25 gift card