# OSPF：接口GigabitEthernet0/1上的邻居10.0.0.3卡在INIT状态

- **ID:** `networking/ospf-neighbor-stuck-init`
- **领域:** networking
- **类别:** routing
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

OSPF路由器已收到邻居的Hello数据包，但邻居未看到此路由器的Hello，通常是由于OSPF参数不匹配（例如区域ID、认证、子网掩码）或单向链路。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Cisco IOS 15.x-17.x | active | — | — |
| Juniper Junos 21.x-24.x | active | — | — |
| FRRouting 8.5-10.0 | active | — | — |
| Quagga 1.2-1.3 | active | — | — |
| Arista EOS 4.28-4.32 | active | — | — |

## 解决方案

1. ```
   Verify OSPF configuration on both routers: `show ip ospf interface GigabitEthernet0/1` on Cisco to check area, network type, and authentication. Ensure both use the same area ID and authentication settings.
   ```
2. ```
   Check for mismatched subnet masks: both interfaces must be in the same subnet. Use `show running-config interface GigabitEthernet0/1` to compare.
   ```
3. ```
   If using authentication, ensure the key and type match: on Cisco, `ip ospf message-digest-key 1 md5 <key>` on both sides.
   ```

## 无效尝试

- **Resetting the OSPF process without checking configuration mismatches** — The misconfiguration (e.g., area mismatch) persists, so the neighbor remains stuck in INIT after the reset. (90% 失败率)
- **Increasing OSPF hello/dead intervals on one side only** — Mismatched timers can cause the neighbor to stay in INIT or EXSTART; both sides must have consistent values. (80% 失败率)
- **Assuming the link is Layer 1 down and replacing cables** — The link is up (Hello received), but the issue is at Layer 3 (OSPF config); replacing hardware does not fix it. (70% 失败率)
