OSPF issues typically involve neighbor adjacency failures, routing problems, or configuration mismatches. Here are common scenarios with troubleshooting commands and solutions.
Problem 1: Neighbors Not Forming Adjacency
Symptom:
R1# show ip ospf neighbor
(No output or neighbor stuck in INIT/2WAY state)
Troubleshooting Steps:
R1# show ip ospf interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
Internet Address 10.1.1.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST
Timer intervals configured, Hello 10, Dead 40, Wait 40
R1# debug ip ospf adj
OSPF-1 ADJ Gi0/0: Rcv pkt from 10.1.1.2 : Mismatched hello parameters from 10.1.1.2
OSPF-1 ADJ Gi0/0: Dead timer mismatch
Common Causes and Solutions:
Issue: Mismatched Hello/Dead Timers
R1# show ip ospf interface brief
Interface PID Area IP Address Cost State Nbrs
Gi0/0 1 0 10.1.1.1/24 1 DR 0
R2# show ip ospf interface brief
Interface PID Area IP Address Cost State Nbrs
Gi0/0 1 0 10.1.1.2/24 1 BDR 0
Fix on R2:
R2(config)# interface GigabitEthernet0/0
R2(config-if)# ip ospf hello-interval 10
R2(config-if)# ip ospf dead-interval 40
Issue: Area Mismatch
R1 in Area 0, R2 in Area 1:
R1# show ip ospf interface Gi0/0 | include Area
Internet Address 10.1.1.1/24, Area 0
R2# show ip ospf interface Gi0/0 | include Area
Internet Address 10.1.1.2/24, Area 1
Fix on R2:
R2(config)# router ospf 1
R2(config-router)# no network 10.1.1.0 0.0.0.255 area 1
R2(config-router)# network 10.1.1.0 0.0.0.255 area 0
Issue: Authentication Mismatch
R1# debug ip ospf adj
OSPF-1 ADJ Gi0/0: Send with youngest Key 1
OSPF-1 ADJ Gi0/0: Rcv pkt from 10.1.1.2 : Mismatch Authentication type
Fix on R2:
R2(config)# interface GigabitEthernet0/0
R2(config-if)# ip ospf message-digest-key 1 md5 SECRET_PASS
R2(config-if)# ip ospf authentication message-digest
Problem 2: Routes Not Appearing in Routing Table
Symptom:
R1# show ip route ospf
(Missing expected routes)
Troubleshooting:
R1# show ip ospf database
OSPF Router with ID (1.1.1.1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 1.1.1.1 345 0x80000005 0x00A8B3
2.2.2.2 2.2.2.2 123 0x80000003 0x009A45
R1# show ip ospf database router 2.2.2.2
(Check if expected networks are advertised)
Issue: Network Statement Missing
R2# show ip protocols
Routing Protocol is "ospf 1"
Router ID 2.2.2.2
Routing for Networks:
10.1.1.0 0.0.0.255 area 0
(Missing 10.2.2.0 network)
Fix on R2:
R2(config)# router ospf 1
R2(config-router)# network 10.2.2.0 0.0.0.255 area 0
Issue: Passive Interface Blocking Adjacency
R1# show ip ospf interface
GigabitEthernet0/0 is up, line protocol is up
OSPF not enabled on this interface
Check and Fix:
R1# show ip protocols
Routing Protocol is "ospf 1"
Passive Interface(s):
GigabitEthernet0/0
R1(config)# router ospf 1
R1(config-router)# no passive-interface GigabitEthernet0/0
Problem 3: Stuck in EXSTART State
Symptom:
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Interface
2.2.2.2 1 EXSTART 00:00:35 Gi0/0
Cause: MTU mismatch
Troubleshooting:
R1# show interfaces GigabitEthernet0/0 | include MTU
MTU 1500 bytes
R2# show interfaces GigabitEthernet0/0 | include MTU
MTU 1400 bytes
Fix on R2:
R2(config)# interface GigabitEthernet0/0
R2(config-if)# mtu 1500
Alternative (ignore MTU mismatch):
R2(config)# interface GigabitEthernet0/0
R2(config-if)# ip ospf mtu-ignore
Problem 4: Duplicate Router IDs
R1# show ip ospf
Routing Process "ospf 1" with ID 1.1.1.1
%OSPF-4-DUP_RTRID: Duplicate router ID 1.1.1.1 detected
Fix:
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# end
R2# clear ip ospf process
Reset ALL OSPF processes? [no]: yes
Essential Troubleshooting Commands
R1# show ip ospf neighbor
R1# show ip ospf interface
R1# show ip ospf database
R1# show ip route ospf
R1# show ip protocols
R1# debug ip ospf adj
R1# debug ip ospf hello
R1# debug ip ospf packet
Quick Checklist
- ✓ Interface up/up status
- ✓ IP addresses in same subnet
- ✓ Area ID matches
- ✓ Hello/Dead timers match
- ✓ Authentication configured identically
- ✓ Network types compatible
- ✓ MTU values match
- ✓ Router IDs unique
- ✓ ACLs not blocking OSPF (protocol 89)
- ✓ Not configured as passive interface
Systematic troubleshooting using these commands resolves most OSPF issues efficiently.
No comments:
Post a Comment