Building network automation solutions

9 module online course

Start now!

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 ( (Process ID 1)
    Area 1
    Intra-area Route List
*, Intra, cost 1, area 1, Connected
      via, Loopback0
*>, Intra, cost 65, area 1
      via, Serial1/0
    Intra-area Router Path List
i [64] via, Serial1/1, ABR, Area 1, SPF 3
i [64] via, Serial1/0, ABR, Area 1, SPF 3
    Inter-area Route List
*>, Inter, cost 65, area 1
      via, Serial1/1
*>, Inter, cost 129, area 1
      via, Serial1/1
    Inter-area Router Path List
I [128] via, Serial1/1, ASBR, Area 1, SPF 3
I [164] via, Serial1/0, ASBR, Area 1, SPF 3
I [128] via, Serial1/0, ASBR, Area 1, SPF 3
    External Route List
*>, Ext2, cost 20, tag 1
      via, Serial1/0
      via, Serial1/1


  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.

  2. I'm running 12.4(15)T. Looks like this command is part of the OSPFv2 Local RIB feature.
  3. Just checked it out and it doesn't work with "c3640-jk9o3s-mz.124-13a.bin"
  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 :)
  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.
Add comment