Blame

3fa7ef Francesco 2026-10-15 05:17:10
1
# OSPF Adjacency Troubleshooting — Write-up
2
d1983e Francesco 2026-10-15 05:17:31
3
Writeups for https://www.pingmynetwork.com
4
3fa7ef Francesco 2026-10-15 05:17:10
5
## Topology
6
7
Three Cisco ISR4331 routers in a triangle, all in OSPF area 0:
8
9
```text
10
R1 (1.1.1.1)
11
/ \
12
12.0.0.0/24 13.0.0.0/24
13
/ \
14
R2 (2.2.2.2) --- R3 (3.3.3.3)
15
23.0.0.0/24
16
```
17
18
| Link | Subnet | Endpoints |
19
|------|--------|-----------|
20
| R1-R2 | 12.0.0.0/24 | .1 / .2 |
21
| R1-R3 | 13.0.0.0/24 | .1 / .3 |
22
| R2-R3 | 23.0.0.0/24 | .2 / .3 |
23
24
Loopbacks: R1 = 1.1.1.1/32, R2 = 2.2.2.2/32, R3 = 3.3.3.3/32.
25
26
---
27
28
## Symptoms
29
30
In the initial state, OSPF adjacencies were not forming consistently:
31
32
- **R1** had `ip ospf hello-interval 20` on G0/0 but the default (10s) on G0/1.
33
- **R2** and **R3** used the default hello interval of 10s everywhere.
34
- **R3** had `passive-interface GigabitEthernet0/1` configured, which prevented it from forming any adjacency on the 23.0.0.0/24 link.
35
- All three routers were using the **wildcard `network 0.0.0.0 255.255.255.255 area 0`**, which is sloppy and can cause unintended interfaces to participate in OSPF.
36
37
The combination of a mismatched hello interval on R1's link to R2 and a passive interface on R3's link to R2 meant the full mesh never converged.
38
39
---
40
41
## Troubleshooting Steps
42
43
### 1. R1 - fix the hello-interval mismatch
44
45
R1's G0/0 was set to a 20-second hello interval while R2 was still using the default 10 seconds. OSPF requires hello/dead intervals to match on both ends of a link, so the R1-R2 adjacency stayed down.
46
47
```cisco
48
R1(config)# interface g0/0
49
R1(config-if)# ip ospf hello-interval 20
50
%OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
51
```
52
53
Once R2 also had the matching value (it was already configured with `ip ospf hello-interval 20` on G0/0 in the saved config), the adjacency came up.
54
55
### 2. R1 - replace the catch-all network statement
56
57
R1 was advertising with `network 0.0.0.0 255.255.255.255 area 0`. This was replaced with explicit network statements:
58
59
```cisco
60
R1(config)# router ospf 1
61
R1(config-router)# no network 0.0.0.0 255.255.255.255 area 0
62
R1(config-router)# network 1.1.1.1 255.255.255.255 area 0
63
R1(config-router)# network 12.0.0.0 0.0.0.255 area 0
64
R1(config-router)# network 13.0.0.0 0.0.0.255 area 0
65
R1(config-router)# ^Z
66
R1# wr mem
67
```
68
69
Note: removing the wildcard network statement briefly tore down both adjacencies (the `%OSPF-5-ADJCHG ... from FULL to DOWN` messages), and they re-formed once the specific networks were re-added.
70
71
### 3. R2 - same cleanup, plus an explicit router-id
72
73
R2 also had `network 0.0.0.0 255.255.255.255 area 0`. A couple of typos (`no network 0.0.0.0 ara 0`, `router-id 2.2.22.`) were rejected, then the correct commands were applied:
74
75
```cisco
76
R2(config)# router ospf 1
77
R2(config-router)# router-id 2.2.2.2
78
R2(config-router)# network 12.0.0.0 0.0.0.255 area 0
79
R2(config-router)# no network 0.0.0.0 255.255.255.255 area 0
80
R2(config-router)# network 23.0.0.0 0.0.0.255 area 0
81
R2(config-router)# network 2.2.2.2 255.255.255.255 area 0
82
R2# wr mem
83
```
84
85
After this, R2 saw both neighbors FULL:
86
87
```text
88
Neighbor ID Pri State Dead Time Address Interface
89
3.3.3.3 1 FULL/BDR 00:00:33 23.0.0.3 GigabitEthernet0/1
90
1.1.1.1 1 FULL/BDR 00:01:13 12.0.0.1 GigabitEthernet0/0
91
```
92
93
### 4. R3 - remove the passive interface and clean up networks
94
95
R3 was the main blocker on the 23.0.0.0/24 link because `passive-interface GigabitEthernet0/1` suppressed hellos on that interface.
96
97
```cisco
98
R3(config)# router ospf 1
99
R3(config-router)# no passive-interface gigabitEthernet0/1
100
%OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/1 from LOADING to FULL, Loading Done
101
R3(config-router)# no network 0.0.0.0 255.255.255.255 area 0
102
R3(config-router)# network 3.3.3.3 255.255.255.255 area 0
103
R3(config-router)# network 23.0.0.0 0.0.0.255 area 0
104
R3(config-router)# network 13.0.0.0 0.0.0.255 area 0
105
R3(config-router)# ^Z
106
R3# wr mem
107
```
108
109
Removing the wildcard network statement again caused a brief FULL-to-DOWN-to-FULL cycle, but all adjacencies recovered.
110
111
---
112
113
## Verification
114
115
After the fixes, every router showed a fully meshed OSPF adjacency table.
116
117
**R1:**
118
119
```text
120
Neighbor ID Pri State Dead Time Address Interface
121
3.3.3.3 1 FULL/BDR 00:00:30 13.0.0.3 GigabitEthernet0/1
122
2.2.2.2 1 FULL/DR 00:01:10 12.0.0.2 GigabitEthernet0/0
123
```
124
125
**R2:**
126
127
```text
128
Neighbor ID Pri State Dead Time Address Interface
129
3.3.3.3 1 FULL/BDR 00:00:33 23.0.0.3 GigabitEthernet0/1
130
1.1.1.1 1 FULL/BDR 00:01:13 12.0.0.1 GigabitEthernet0/0
131
```
132
133
**R3:**
134
135
```text
136
Neighbor ID Pri State Dead Time Address Interface
137
2.2.2.2 1 FULL/DR 00:00:38 23.0.0.2 GigabitEthernet0/1
138
1.1.1.1 1 FULL/DR 00:00:38 13.0.0.1 GigabitEthernet0/0
139
```
140
141
R3's `show ip ospf` confirmed a single area (area 0) with `Number of areas in this router is 1. 1 normal 0 stub 0 nssa`.
142
143
---
144
145
## Root Causes Summary
146
147
| Issue | Device | Fix |
148
|-------|--------|-----|
149
| Hello-interval mismatch (20s vs 10s) | R1 G0/0 to R2 G0/0 | Set matching `ip ospf hello-interval 20` on both sides |
150
| Passive interface suppressing hellos | R3 G0/1 | `no passive-interface GigabitEthernet0/1` |
151
| Overly broad `network 0.0.0.0 255.255.255.255 area 0` | All three | Replaced with explicit network statements per interface |
152
| No explicit router-id | R2 | `router-id 2.2.2.2` (also derived from loopback) |
153
154
---
155
156
## Key Takeaways
157
158
1. **Hello and dead intervals must match** on both ends of an OSPF link. A mismatch keeps the neighbor stuck in `INIT`/`DOWN`.
159
2. **`passive-interface` is a silent killer** - the interface still has an IP and is advertised, but no hellos are sent or received, so no adjacency forms.
160
3. **Avoid `network 0.0.0.0 255.255.255.255`** in production. It works, but it enables OSPF on every interface (including ones you may not intend) and makes troubleshooting harder. Use precise network statements or `ip ospf 1 area 0` under the interface.
161
4. Always finish with `write memory` (or `copy run start`) so the working config survives a reload.