Information to Monitor | Command | Example |
Status of OSPF interfaces | show ospf interface | user@host> show ospf interface brief Intf State Area DR ID BDR ID Nbrs at-5/1/0.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 ge-2/3/0.0 DR 0.0.0.0 192.168.4.16 192.168.4.15 1 user@host> show ospf interface detail Interface State Area DR ID BDR ID Nbrs ge-1/0/0.0 DR 0.0.0.0 10.10.20.103 10.10.20.102 1 Type LAN, address 10.10.20.18, mask 255.255.255.248, MTU 1500, cost 1 DR addr 10.10.20.18, BDR addr 10.10.20.17, adj count 1 Hello 10, Dead 40, ReXmit 5, Not Stub |
Link-state database entries | show ospf database | user@host> show ospf database brief OSPF link state database, area 0.0.0.0 Type ID Adv Rtr Seq Age Cksum Len Router 10.250.240.8 10.250.240.8 0x800001fc 2388 0x3684 36 Router 10.250.240.17 10.250.240.17 0x80000217 1835 0x444c 36 Network 192.168.254.230 10.250.240.8 0x800001cc 117 0xab67 40 Summary 10.1.2.0 10.250.240.17 0x80000216 1535 0x1729 28 Summary 10.1.3.34 10.250.240.8 0x8000013a 2217 0x842f 28 Summary 10.1.3.34 10.250.240.35 0x800001a3 800 0x0f20 28 |
Remove link-state database entries | clear ospf database | user@host> clear ospf statistics user@host> show ospf statistics user@host> |
OSPF routing table entries | show ospf route | user@host> show ospf route Prefix Route/Path Type Metric Next hop i/f Next hop addr 1.1.1.0/24 Ext2 Network 0 fxp0.0 10.10.0.16 1.1.1.1/32 Intra AS BR 1 fxp0.0 10.10.0.16 user@host> show ospf route detail Prefix Route/Path Type Metric Next hop i/f Next hop addr 1.1.1.0/24 Ext2 Network 0 fxp0.0 10.10.0.16 area 0.0.0.0, options 0x0, origin 1.1.1.1 1.1.1.1/32 Intra AS BR 1 fxp0.0 10.10.0.16 area 0.0.0.0, options 0x0, origin 1.1.1.1 |
Adjacent routers | show ospf neighbor | user@host> show ospf neighbor brief Address Intf State ID Pri Dead 192.168.254.225 fxp3.0 2Way 10.250.240.32 128 36 192.168.254.230 fxp3.0 Full 10.250.240.8 128 38 user@host> show ospf neighbor detail Address Intf State ID Pri Dead 192.168.254.225 fxp3.0 2Way 10.250.240.32 128 35 area 0.0.0.0, opt 0x2, DR 192.168.254.230, BDR 192.168.254.229 Up 1w5d 18:09:18 |
Clear adjacent routers | clear ospf neighbor | user@host> clear ospf neighbor user@host> show ospf neighbor user@host> |
SPF log | show ospf log | user@host> show ospf log When Type Elapsed 1w4d 17:25:58 Stub 0.000017 1w4d 17:25:58 SPF 0.000070 1w4d 17:25:58 Stub 0.000019 1w4d 17:25:58 Interarea 0.000054 1w4d 17:25:58 External 0.000005 1w4d 17:25:58 Cleanup 0.000203 1w4d 17:25:58 Total 0.000537 |
OSPF statistics | show ospf statistics | user@host> show ospf statistics Packet type Total Last 5 seconds Sent Received Sent Received Hello 505739 990495 4 5 DbD 20 26 0 0 LSReq 6 5 0 0 LSUpdate 27060 15319 0 0 LSAck 10923 52470 0 0 LSAs retransmitted: 16, last 5 seconds: 0 Receive errors: 862 no interface found 115923 no virtual link found |
Clear OSPF statistics | clear ospf statistics | user@host> clear ospf statistics user@host> show ospf statistics user@host> show ospf statistics Packet type Total Last 5 seconds Sent Received Sent Received Hello o 0 o 0 DbD 0 0 0 0 LSReq 0 0 0 0 LSUpdate 0 0 0 0 LSAck 0 0 0 0 LSAs retransmitted: o, last 5 seconds: 0 Receive errors: 0 no interface found 0 no virtual link found |