Display OSPF SPF tree

I did some double-checking of the ideas I wrote about in my EIGRP-to-OSPF migration article and accidentally typed show ip ospf route instead of show ip route ospf. The results were amazing: this undocumented command displays the per-area topology calculated by the SPF algorithm, including intra-area routes, inter-area routes, ABRs, ASBRs and external routes.A sample printout from one of my routers is included below:

POP#show ip ospf route
 
            OSPF Router with ID (10.1.0.3) (Process ID 1)
 
    Area 1
 
    Intra-area Route List
* 10.1.0.3/32, Intra, cost 1, area 1, Connected
      via 10.1.0.3, Loopback0
*> 10.1.0.17/32, Intra, cost 65, area 1
      via 10.7.1.1, Serial1/0
 
    Intra-area Router Path List
i 10.0.1.2 [64] via 10.7.1.5, Serial1/1, ABR, Area 1, SPF 3
i 10.0.1.1 [64] via 10.7.1.1, Serial1/0, ABR, Area 1, SPF 3
 
    Inter-area Route List
*> 10.0.1.2/32, Inter, cost 65, area 1
      via 10.7.1.5, Serial1/1
*> 10.0.5.2/32, Inter, cost 129, area 1
      via 10.7.1.5, Serial1/1
 
    Inter-area Router Path List
I 10.0.5.2 [128] via 10.7.1.5, Serial1/1, ASBR, Area 1, SPF 3
I 10.0.5.2 [164] via 10.7.1.1, Serial1/0, ASBR, Area 1, SPF 3
I 10.0.5.1 [128] via 10.7.1.1, Serial1/0, ASBR, Area 1, SPF 3
 
    External Route List
*> 0.0.0.0/0, Ext2, cost 20, tag 1
      via 10.7.1.1, Serial1/0
      via 10.7.1.5, Serial1/1

5 comments:

  1. Which IOS version are you running? 'cause it isn't working here . . .

    c2610b#sh ve | inc IOS
    Cisco IOS Software, C2600 Software (C2600-ADVSECURITYK9-M), Version 12.4(17), RELEASE SOFTWARE (fc1)
    c2610b#sh ip ospf route
    ^
    % Invalid input detected at '^' marker.

    c2610b#sh ospf route
    ^
    % Invalid input detected at '^' marker.

    c2610b#

    ReplyDelete
  2. I'm running 12.4(15)T. Looks like this command is part of the OSPFv2 Local RIB feature.

    ReplyDelete
  3. Just checked it out and it doesn't work with "c3640-jk9o3s-mz.124-13a.bin"

    ReplyDelete
  4. That's because 12.4(15)T is the latest and greatest IOS version from Cisco, bill :)

    Ivan here is on the bleeding edge :)

    ReplyDelete
  5. Last I checked 12.4(13a) was the highest image my 32MB Flash 3640's could handle.

    I'll have to flash up my 1841 to play with this command.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.