Debug OSPF

22 Apr 2011 - Lab-Rat

The following must match to become neighbors:

Default Network types:

debug ip routing
- should produce no output in a stable network. If routes are constantly flapping it can be a route feedback, or an OSPF RID issue.

debug ip packet and debug frame-relay packet
- will show a missing frame-relay map statement

debug ip ospf monitor
- will show flapping LSAs.

show ip ospf
- Will show if a router is an ABR (ie connected to area 0 and another area), also shows the number of times spf has executed.

show ip ospf neighbor
- show adjacent neighbors and state

show ip ospf int f0/0
- shows ospf status on that interface (blank if ospf not enabled), also shows layer 1/2 status. Will show a passive interface (doesn’t send hellos, no adjacencies). Shows network type (ie NON_BROADCAST, etc).

show ip ospf int f0/0 brief
- Shows the PID, area, state, and neighbor count

show ip int s0/0
- shows mtu size

debug ip ospf adj
- will show mismatched hellos, mismatched mtus, areas, stubs, etc.

show ip ospf database router
- Shows the router LSAs (type 1), can be used to identify if an interface isn’t enabled for OSPF.

show ip ospf database summary
- Shows the summary LSAs (type 3)

show ip ospf data asbr-summary
- shows the ASBR LSAs (type 4). An ASBR must have a connection to Area 0 to generate type 4 LSAs.

show ip ospf database external [x.x.x.x]
-Shows the external LSAs (type 5), as well as forward address for external routes. Note: When redistributing and external route into OSPF, make sure it has an intra or inter area route to the external route. If not, and the forwarding address is also an external route, OSPF WILL NOT install the route in the routing table.

show ip ospf database nssa-external
- Shows the NSSA external LSAs (type 7)

show ip route x.x.x.x
- shows details on the route in the routing table for route x.x.x.x, will also tell you if the route is missing with a “%Network not in table.” message. If you use, you can see if there is a default route present as well.

show ip route ospf
- shows OSPF routes in the database.

show ip ospf border-routers
- show routes to ABRs and ASBRs

- check unicast connectivity, can also use extended ping to test failures to send packets about a certain size.
access-list 101 permit ip host
debug ip packet 101 detail
- will show access denied if ospf blocked by ACL, and encapsulation failures for missing broadcast statements in frame-relay map statements.

Additional Reading:
OSPF Design Guide
Troubleshooting IP Routing Protocols
OSPF Point to Multipoint