An OSPF adjacency forms across a cable that is not there, and show ip route cannot say a next hop is unreachable #1271

Closed
opened 2026-11-09 20:42:25 +00:00 by jaylouisw · 0 comments
Owner

What happens

Two routers, OSPF on the shared segment, one LAN behind r1. With the cable in, r2 installs the LAN as an
O route. Pull the cable:

O  192.168.9.0    /24  [110/0] via 10.0.0.1  Gi0      <- unchanged

The route survives, pointing at a next hop that answers nothing, and a ping to the LAN fails with
no ARP reply from 10.0.0.1 — the data plane knowing the path is gone while the control plane went on
believing it.

computeOspf() collected interfaces that were enabled and addressed and then formed an adjacency for every
topology link between two such interfaces. A topology link exists while its state is down, and nothing
asked. Hellos need a wire that can carry them: a pulled cable, a down link, or a shut far port forms no
adjacency. BGP had exactly this defect one iteration earlier (#1269); OSPF had no link-state check at all.

A second, wider symptom

show ip route cannot say that any installed route's next hop is unreachable. A static route or a connected
route over a port with no cable reads exactly like a working path:

C   192.168.9.0    /24  is directly connected, Gi0/0/0
S  172.20.0.0     /16  [1/0] via 10.0.0.1

Expected

  • an OSPF adjacency requires both ends to be able to carry a frame, so a pulled cable or a shut far port
    withdraws the route — a learned route is withdrawn, not annotated;
  • a route that stays installed (a connected route, a static route — configuration, not learned state) says
    why its egress cannot be used, in the same words show arp and show mac address-table already use for
    the same port;
  • nothing is marked when nothing is wrong.

Scope

The existing OSPF adjacency computation and the existing show ip route output. No new commands, no new
config surface.

## What happens Two routers, OSPF on the shared segment, one LAN behind `r1`. With the cable in, `r2` installs the LAN as an `O` route. **Pull the cable:** ``` O 192.168.9.0 /24 [110/0] via 10.0.0.1 Gi0 <- unchanged ``` The route survives, pointing at a next hop that answers nothing, and a ping to the LAN fails with `no ARP reply from 10.0.0.1` — the data plane knowing the path is gone while the control plane went on believing it. `computeOspf()` collected interfaces that were `enabled` and addressed and then formed an adjacency for every topology link between two such interfaces. A topology link exists while its state is `down`, and nothing asked. Hellos need a wire that can carry them: a pulled cable, a down link, or a shut far port forms no adjacency. BGP had exactly this defect one iteration earlier (#1269); OSPF had no link-state check at all. ## A second, wider symptom `show ip route` cannot say that any installed route's next hop is unreachable. A static route or a connected route over a port with no cable reads exactly like a working path: ``` C 192.168.9.0 /24 is directly connected, Gi0/0/0 S 172.20.0.0 /16 [1/0] via 10.0.0.1 ``` ## Expected * an OSPF adjacency requires both ends to be able to carry a frame, so a pulled cable or a shut far port withdraws the route — a learned route is withdrawn, not annotated; * a route that stays installed (a connected route, a static route — configuration, not learned state) says why its egress cannot be used, in the same words `show arp` and `show mac address-table` already use for the same port; * nothing is marked when nothing is wrong. ## Scope The existing OSPF adjacency computation and the existing `show ip route` output. No new commands, no new config surface.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#1271
No description provided.