1.10 Troubleshoot OSPFv2 and OSPFv3
ENARSI 300-410 v1.1 · 1.0 Layer 3 Technologies
OSPF is the link-state protocol most enterprise networks run. ENARSI goes past CCNA and ENCOR: OSPFv3 for IPv6 (and IPv4) with address families, authentication, every network type and area type, virtual links, and the exact order in which OSPF chooses a path.
What you must know
- Configure OSPFv3 with address families for IPv4 and IPv6.
- Fix adjacency faults: area, subnet, timers, network type, MTU, authentication, stub flags.
- Explain network types and area types (stub, totally stubby, NSSA, totally NSSA), router roles and virtual links.
- Predict the path OSPF chooses: intra-area, inter-area, E1, E2, then cost.
OSPFv2 and OSPFv3 address families
| OSPFv2 | OSPFv3 | |
|---|---|---|
| Carries | IPv4 | IPv6, and IPv4 with address families |
| Enable | network or ip ospf 1 area 0 | ospfv3 1 ipv6 area 0 (or the old ipv6 ospf 1 area 0) per interface |
| Neighbours over | The interface's subnet | Link-local addresses; subnets need not match |
| Router ID | From an IPv4 address | Must be set if the router has no IPv4 address |
| Authentication | In the OSPF header (plain, MD5, SHA) | IPsec (AH/ESP) or the RFC 7166 trailer |
| New LSAs | – | Type 8 (link) and 9 (intra-area prefix); type 3 is "inter-area prefix" |
ipv6 unicast-routing
router ospfv3 1
router-id 1.1.1.1
address-family ipv6 unicast
exit-address-family
address-family ipv4 unicast
exit-address-family
!
interface GigabitEthernet0/0
ipv6 address 2001:db8:12::1/64
ospfv3 1 ipv6 area 0
ospfv3 1 ipv4 area 0
R1# show ospfv3 neighbor
OSPFv3 1 address-family ipv6 (router-id 1.1.1.1)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:36 3 Gi0/0Neighbours and authentication
- Same area and same subnet and mask (OSPFv2 on multi-access links).
- Same hello and dead timers.
- Compatible network types (see the next section).
- Same stub/NSSA flag for the area.
- Same MTU, or the neighbours stick in EXSTART/EXCHANGE.
- Unique router IDs.
- Matching authentication type and key (per interface or per area).
interface GigabitEthernet0/0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 Cisco123
! or SHA with a key chain (IOS 15.4+):
key chain OSPF-SHA
key 1
key-string Cisco123
cryptographic-algorithm hmac-sha-256
interface GigabitEthernet0/0
ip ospf authentication key-chain OSPF-SHA
R1# debug ip ospf adj
OSPF-1 ADJ Gi0/0: Rcv pkt from 10.0.12.2 : Mismatched Authentication Key - Message Digest Key 1Network types, area types, roles and virtual links
| Network type | DR/BDR | Hello/dead | Neighbours |
|---|---|---|---|
| broadcast (Ethernet) | Yes | 10/40 | Automatic |
| point-to-point | No | 10/40 | Automatic |
| non-broadcast | Yes | 30/120 | neighbor statements |
| point-to-multipoint | No | 30/120 | Automatic; /32 host routes |
| point-to-multipoint non-broadcast | No | 30/120 | neighbor statements |
Broadcast on one side and point-to-point on the other does form FULL (the timers match) but the routes fail: one side expects a DR and a network LSA, the other does not. Fix the type, don't just look at the neighbour state.
| Area type | Blocks | Gets instead | ASBR inside? |
|---|---|---|---|
| Stub | Type 5 | Default (type 3) | No |
| Totally stubby | Types 3 (except the default), 4, 5 | Default only | No |
| NSSA | Type 5 | Type 7 from its own ASBR, turned into type 5 by the ABR | Yes |
| Totally NSSA | Types 3, 4, 5 | Default + its own type 7 | Yes |
ABR1(config-router)# area 1 virtual-link 2.2.2.2
ABR2(config-router)# area 1 virtual-link 1.1.1.1
ABR2# show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 1.1.1.1 is up
Run as demand circuit
Transit area 1, via interface GigabitEthernet0/0Routes from area 2 cross into the backbone through the virtual link (1). Router roles: an internal router has all interfaces in one area, a backbone router has one in area 0, an ABR joins area 0 to another area, and an ASBR redistributes external routes.
Which path wins
- Intra-area (O) beats inter-area (O IA), whatever the cost.
- Inter-area beats external.
- E1 (and N1) beats E2 (and N2).
- Within one type, the lowest total cost wins (for E2 at equal cost: the lowest forward metric to the ASBR).
- Equal costs load-share (4 paths by default).
Cost = reference bandwidth / interface bandwidth, with a default reference of 100 Mbit/s, so Fast Ethernet, Gigabit and 10 Gigabit all cost 1. Set auto-cost reference-bandwidth 100000 on every router, or set ip ospf cost per interface.
Commands
show ip ospf neighbor / show ospfv3 neighbor | Adjacency state and role per neighbour. |
show ip ospf interface [brief] | Area, cost, network type, timers, authentication. |
show ip ospf database [type] | The LSDB; check LSA types per area. |
show ip ospf virtual-links | Virtual link state and transit area. |
debug ip ospf adj | Why an adjacency fails (authentication, MTU, mismatches). |
show ip ospf border-routers | ABRs and ASBRs this router knows. |
Exam traps
- MTU mismatch shows as EXSTART/EXCHANGE, not as a missing neighbour.
- Broadcast vs point-to-point forms FULL but breaks routes.
- An inter-area route never beats an intra-area route, even with a lower cost.
- A virtual link cannot cross a stub area, and both ends use router IDs, not addresses.
- OSPFv3 needs a manual router ID on a router with no IPv4 address.
- Changing the reference bandwidth on one router only skews path selection.
Check yourself
- Neighbours stuck in EXSTART. Most likely cause?
- An MTU mismatch.
- What does an NSSA ABR do with a type 7 LSA?
- It translates it into a type 5 LSA for the rest of the domain.
- Area 3 connects only to area 1. What joins it to the backbone?
- A virtual link across area 1 between the two ABRs.
- An O IA route costs 5, an O route costs 50 for the same prefix. Which wins?
- The O (intra-area) route.
- Which LSA types does a totally stubby area block?
- Types 3 (except the default), 4 and 5.
Labs
- OSPF troubleshooting: hello timers, MD5, MTU and network types
- OSPF areas: a virtual link, an NSSA, a totally NSSA and SHA authentication
- OSPFv3: both configuration styles, a router ID and a totally stubby area
Try it live: OSPF troubleshooting: hello timers, MD5, MTU and network types
More topics in 1.0 Layer 3 Technologies
- 1.1 Troubleshoot administrative distance across every routing source
- 1.2 Troubleshoot route maps in any routing protocol: attributes, tags and filters
- 1.3 Troubleshoot routing loop prevention: filters, tags, split horizon and poisoned routes
- 1.4 Troubleshoot redistribution between routing protocols and other route sources
- 1.5 Troubleshoot manual and automatic route summarization
- 1.6 Configure and verify policy-based routing
- 1.7 Configure and verify VRF-Lite
- 1.8 Describe how Bidirectional Forwarding Detection works