Cisco IOS hints and tricks: Display OSPF SPF tree
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