cli: a router's own interface address is a row in show ip route #2176
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!2176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1119-1542"
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?
The question
When a router has
ip address 10.1.1.1 255.255.255.252on a port, doesshow ip routecarry a row for the address itself - and if so, what code, what mask, what wording, where, and when does it not appear?Verdict
Two rows, one line apart: the connected subnet (
C 10.1.1.0/30 is directly connected, Ethernet0/0) and the address as a/32local host route (L 10.1.1.1/32 is directly connected, Ethernet0/0). Distance 0, the only job is to be a receive entry, and it is not redistributed byredistribute connected. An address configured with a/32mask prints one row (C only) - the vendor page says so in its next section.Sources: Cisco, Local Host Routes Installed in the Routing Table (doc 116264, IOS 15.0(1)S), Cisco, Configure a Gateway of Last Resort (doc 16448), Cisco, Understand Administrative Distance, IOS XE 16 OSPF guide.
What changed
engine/device.js:routesTable()emits{ code: 'L', type: 'local' }beside each addressed interface whose mask is not/32; the row isdirectlyConnected(so it prints in the connected row's shape), distance 0 viarouteDistance(), and takes its fault note from its port by the same branch the connected row uses.engine/cli.js: legend is nowCodes: L - local, C - connected, S - static, B - BGP, O - OSPF, * - candidate default- the new code first, the rest in the box's order (BbeforeO).research/local-route-in-show-ip-route.md: citations, what is inferred (DHCP-learned addresses; IOS 12.x has noL) and what is unresolved (classful heading lines,/31,routeTo()has no receive verdict).docs/CLI.md: legend samples, the R1 walkthrough (now withLrows) and a paragraph stating the rule.Tests
test/local-route-row.test.js- 23 checks: the pair and its order, wording, distance 0,/32one-row case, shut-port withdrawal, non-routing switch, receive-entry distinction fromrouteTo().route-selection,routes-agreement,show-argument-refusal,show-ip-route-host-table,show-ip-route-prefix-one-field).npm test: 380 suites, 12,876 assertions, 0 failed.node scripts/syntax-check.js: 459 files OK.npm run check:citations: OK.show ip route