Another quick one. Today I’m going to cover a simple, but very useful OSPF command: “show ip ospf rib”. This command is similar to “show ip route ospf”, but goes a bit deeper.

 

If you’ve ever done a routing protocol migration, you know how important it can be to see each protocol’s full routing table. Much of the time AD makes this difficult. Administrative Distance (AD) is the believability of a routing protocol on a Cisco device. The default AD values are:

Route Source

Default Distance

Connected Interface 0
Static Route 1
EIGRP Summary 5
eBGP 20
Internal EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120
EGP 140
ODR 160
External EIGRP 170
iBGP 200
Unknown 255

Lower is better. If a router has identical routes from RIP and OSPF, the OSPF routes will be added to the table. If it’s EIGRP versus OSPF, EIGRP will win.

 

Scenario:

Company ATN Solutions is migrating from EIGRP to OSPF. They’ve chosen to run both protocols simultaneously, while leaving the AD values at the default. This will allow both protocols to co-exist without affecting the routing domain. EIGRP routes will stay in the table due to EIGRP’s lower AD. I’m not going through the migrations steps or really any detail related to how this would be performed, just using this to demonstrate the command.

During this migration, we’ll need to verify that all existing EIGRP prefixes are also being learned by OSPF (we’ll use process number 200). If we were masochists, we could look at the LSDB to determine this, but that’s not really ideal. So we’ll use the “show ip ospf 200 rib”. First we’ll look at the existing RIB:

EDGE#sh ip route eigrp
D    192.168.15.0/24 [90/28416] via 192.168.13.1, 00:00:12, FastEthernet0/0
D    192.168.25.0/24 [90/28416] via 192.168.13.1, 00:00:09, FastEthernet0/0
D    192.168.111.0/24 [90/28416] via 192.168.13.1, 00:00:04, FastEthernet0/0
D    192.168.10.0/24 [90/28416] via 192.168.13.1, 00:00:46, FastEthernet0/0
D    192.168.11.0/24 [90/28416] via 192.168.13.1, 00:00:19, FastEthernet0/0
 
EDGE#sh ip route ospf
EDGE#

We see five EIGRP routes and nothing for OSPF.

 

Now let’s try out the command:

EDGE#sh ip ospf 200 rib
OSPF local RIB for Process 200
Codes: * - Best, > - Installed in global RIB
*   192.168.10.0/24, Intra, cost 2, area 0
      via 192.168.13.1, FastEthernet0/0
*   192.168.11.0/24, Intra, cost 2, area 0
      via 192.168.13.1, FastEthernet0/0
*   192.168.15.0/24, Intra, cost 2, area 0
      via 192.168.13.1, FastEthernet0/0
*   192.168.25.0/24, Intra, cost 2, area 0
      via 192.168.13.1, FastEthernet0/0
*   192.168.111.0/24, Intra, cost 2, area 0
      via 192.168.13.1, FastEthernet0/0

And there it is. We see that OSPF is learning the same prefixes as EIGRP. The output is similar to “show ip bgp” in that * = Best, and > = Installed. We could now, theoretically, feel comfortable in taking the next step on our migration path, maybe raising EIGRP’s AD to make OSPF more preferred.

 

That’s all for today. Another quick post to make up for my hiatus. Post any questions in the comments.

Colby

Colby Glass has been in IT since 2002. He is currently a Systems Engineer (presales) with a Cisco Gold partner and holds the CCNP R/S, CCNP DC, CCDP, CCIP, JNCIA-ER.

More Posts