A BGP session needs a port that can carry a frame (#1269) #1270
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1270
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/bgp-link-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A BGP session needs a port that can carry a frame
Fixes #1269.
The bug
Two routers peering over one cable. Pull the cable:
The session went on calling itself Established, kept the prefix it had learned over it, and
show ip routewent on offering aBroute whose next hop could not be reached — the routing table claiming a paththat does not exist. Shutting the far port did the same thing.
_bgpReachable()askediface.enabled— "did somebody shut this port" — and nothing else. Not the cable, notthe link, not the far end. That is exactly the question
show ip interface briefwas answering wronglybefore #1237, and the rule that answers it correctly (
Device.ifaceStatus(iface, topo)) has existed since.Now
_bgpReachable()requires the egress port to carry a frame, and refuses with the reason the faultactually is:
E_LINK_DOWN→cannot carry a frame (link down),(peer shut down),(down: no cable).A port someone shut keeps
E_IFACE_DOWN, because "down on the router" would send the operator to the wrongconfig;
Brow survives a session that is down;restoring the cable brings both back;
show ip bgpnow lists the prefixes it installed — network, next hop, metric, local preference, weight,AS path with origin code, session type — with the prefix length from
net.prefixOf(), the same ruleshow ip routeuses, so the two tables cannot print the same route two ways (#1249);Evidence
test/bgp-session-link-state.test.js— 25 checks:Brow, and a ping across the dead cable fails — the data plane agreeing with the control plane;peer shut downinstead — the same fault from the other end says a different thing,correctly;
Brows agree prefix for prefix including the prefix length;Reverting
engine/simulator.jsfails 8;engine/cli.jsfails 4. The existingbgp-sessionsuite stillpasses (24 checks), so the refusal codes it asserts are unchanged.
docs/CLI.mdgains "Readingshow ip bgp" and both commands in the table.Suite: 148 suites, 6,265 assertions, 0 failed.