Cisco IOS hints and tricks: Display a summary of OSPF interfaces
Display a summary of OSPF interfaces
When I was lab-testing the ideas for my article on EIGRP-to-OSPF migration, I had to check the OSPF interface cost ... and complained immensely at the amount of information produced by the show ip ospf interface command. Luckily I've double-checked before starting to write a Tcl script and realized that a brief keyword was added in IOS release 12.3, producing exactly the printout I was looking for.
On my test router, the show ip ospf interfaces brief command produced this nicely-tabulated printout:
a1#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 172.16.0.11/32 1 LOOP 0/0
Se0/0/0.100 1 0 172.16.1.1/30 50 P2P 1/1
Fa0/0 1 0 10.0.0.5/24 1 BDR 1/1
Fa0/1 1 11 10.1.2.1/24 1 DR 0/0
The netmask-format of your line has to be set to bit-count for this command to work properly, otherwise the columns will be shifted to the right.