show ip route lists two routes for one prefix and says nothing: a shadowed route reads as installed #1407

Closed
opened 2026-11-11 01:08:31 +00:00 by jaylouisw · 0 comments
Owner

Found by asking whether a report's own summary matches the table under it. Two surfaces failed the same way.

show ip route printed every candidate the device held, as equals:

C   10.0.12.0      /24  is directly connected, Gi0
B  10.0.12.0      /24  [20/0] via 10.0.12.2  Gi0

Two rows, one destination. routeTo() — the lookup that actually forwards — has always chosen by longest prefix then
lowest distance, so the engine knew which route was installed; the table did not say it. The same shape covers
static-over-connected, OSPF-over-BGP and BGP-over-OSPF, all reachable in a two-router lab.

And show ip bgp summary said "3 prefix(es) installed from BGP" when only 1 was installed, because it counted what the
peer sent rather than what survived selection — the word "installed" over a count of "received".

What must be true instead

  • the table marks which row for a prefix is installed, and its mark agrees with the forwarding lookup;
  • a losing route is still listed, with the row that beat it named — dropping it would hide what the peer sent;
  • a route that is merely not selected is not styled as a fault (its port is fine);
  • show ip bgp summary counts installed prefixes and accounts for the rest.
Found by asking whether a report's own summary matches the table under it. Two surfaces failed the same way. `show ip route` printed every candidate the device held, as equals: ``` C 10.0.12.0 /24 is directly connected, Gi0 B 10.0.12.0 /24 [20/0] via 10.0.12.2 Gi0 ``` Two rows, one destination. `routeTo()` — the lookup that actually forwards — has always chosen by longest prefix then lowest distance, so the engine knew which route was installed; the table did not say it. The same shape covers static-over-connected, OSPF-over-BGP and BGP-over-OSPF, all reachable in a two-router lab. And `show ip bgp summary` said "3 prefix(es) installed from BGP" when only 1 was installed, because it counted what the peer sent rather than what survived selection — the word "installed" over a count of "received". ## What must be true instead * the table marks which row for a prefix is installed, and its mark agrees with the forwarding lookup; * a losing route is still listed, with the row that beat it named — dropping it would hide what the peer sent; * a route that is merely not selected is **not** styled as a fault (its port is fine); * `show ip bgp summary` counts installed prefixes and accounts for the rest.
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#1407
No description provided.