ip routing: a Catalyst does not route until told to, and neither did this one #1869

Merged
jaylouisw merged 1 commit from rev/1117-1601 into main 2026-11-17 16:34:39 +00:00
Owner

show ip route has printed two shapes since the host table landed — the codes legend over a routing table, and Default gateway is not set over the Host/Gateway cache — and which one a device got was decided by the catalogue's l3-forward capability, which no operator can change. A 3560 therefore printed a routing table from the moment it was placed on the board, in the state Cisco says it does not ship in.

Evidence

What changed

  • Device.isL3() is now hasCap('l3-forward') && ipRoutingEnabled(). Every consumer (routing table, IPv6 RAs, installed-route table, L3 data path) already asked isL3(), so one switch moves them together.
  • ip routing / no ip routing in config mode, capability-gated (a 2960 is told it "cannot route between networks: it has no l3-forward capability"), with a receipt, and a trailing word refused rather than ignored.
  • show running-config prints the line only when it differs from Device.routingDefault() — which is why a router's own file never showed it.
  • The flag survives save/reload; a document that says nothing does not grow the field.
  • test/ip-routing.test.js — 37 assertions: platform defaults, both table shapes, the data path (a ping dies on the box, attributed to it), its own addresses still answering, static routes config-only, the printed line, the round trip.
  • docs/CLI.md, docs/ARCHITECTURE.md, CHANGELOG.md, and research/ip-routing-default.md (known / inferred / unresolved / what would settle it).

What remains unresolved

216 non-Cisco l3-switch entries keep the answer they gave before this command existed — the documented default of a C9200 is not evidence about a Huawei S5720 — as do the ten Cisco switch-category models with L3 forwarding (C1000/IE-3300), whose guides were not read. show running-config all is not modelled, so the enabled-by-default state is not visible in the way IOS shows it.

Gates

node scripts/syntax-check.js OK; npm test → 319 suites, 11117 assertions, 0 failed.

`show ip route` has printed two shapes since the host table landed — the codes legend over a routing table, and `Default gateway is not set` over the Host/Gateway cache — and which one a device got was decided by the catalogue's `l3-forward` capability, which no operator can change. A 3560 therefore printed a routing table from the moment it was placed on the board, in the state Cisco says it does not ship in. **Evidence** - Catalyst 3560 Configuration Guide, *Configuring IP Unicast Routing*: "By default, the switch is in Layer 2 switching mode and IP routing is disabled. To use the Layer 3 capabilities of the switch, you must enable IP routing." https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3560/software/release/15-0_2_se/configuration/guide/scg3560/swiprout.html - Catalyst 9300 IP Routing Configuration Guide defaults table: `IP routing | Disabled.` https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/26-x/configuration_guide/rtng/b_26x_rtng_9300_cg/configuring_ip_unicast_routing.html - IOS `ip routing` command reference, Command Default: "IP routing is enabled." (a router) https://www.cisco.com/c/en/us/td/docs/ios/iproute_pi/command/reference/iri_book/iri_pi1.html - `no ip routing` produces exactly the second shape, on a router and on a switch: https://community.cisco.com/t5/switching/cisco-catalyst-4506-default-gateway-doesn-t-work/td-p/1752479 , https://networklessons.com/ip-services/cisco-router-as-host-or-server - Static routes stay in the config and do not install: https://learningnetwork.cisco.com/s/question/0D53i00000KsrT5CAJ **What changed** - `Device.isL3()` is now `hasCap('l3-forward') && ipRoutingEnabled()`. Every consumer (routing table, IPv6 RAs, installed-route table, L3 data path) already asked `isL3()`, so one switch moves them together. - `ip routing` / `no ip routing` in config mode, capability-gated (a 2960 is told it "cannot route between networks: it has no l3-forward capability"), with a receipt, and a trailing word refused rather than ignored. - `show running-config` prints the line only when it differs from `Device.routingDefault()` — which is why a router's own file never showed it. - The flag survives save/reload; a document that says nothing does not grow the field. - `test/ip-routing.test.js` — 37 assertions: platform defaults, both table shapes, the data path (a ping dies on the box, attributed to it), its own addresses still answering, static routes config-only, the printed line, the round trip. - `docs/CLI.md`, `docs/ARCHITECTURE.md`, `CHANGELOG.md`, and `research/ip-routing-default.md` (known / inferred / unresolved / what would settle it). **What remains unresolved** 216 non-Cisco `l3-switch` entries keep the answer they gave before this command existed — the documented default of a C9200 is not evidence about a Huawei S5720 — as do the ten Cisco `switch`-category models with L3 forwarding (C1000/IE-3300), whose guides were not read. `show running-config all` is not modelled, so the enabled-by-default state is not visible in the way IOS shows it. **Gates** `node scripts/syntax-check.js` OK; `npm test` → 319 suites, 11117 assertions, 0 failed.
ip routing: a Catalyst does not route until told to, and neither did this one
All checks were successful
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 15s
CI / Server smoke test (pull_request) Successful in 10s
CI / Test (Node 20) (pull_request) Successful in 48s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 22) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 56s
CI / Arm auto-merge (pull_request) Successful in 8s
fa1d56b23d
`show ip route` has printed two shapes since the host table landed - the codes
legend over a routing table, and `Default gateway is not set` over the
Host/Gateway cache - and which one a box got was decided by the catalogue's
`l3-forward` capability, which no operator can change. A 3560 therefore printed
a routing table from the moment it was placed, in the state Cisco says it does
not ship in: "By default, the switch is in Layer 2 switching mode and IP routing
is disabled" (Catalyst 3560 Configuration Guide); the Catalyst 9300 defaults
table says `IP routing | Disabled`.

`ip routing` / `no ip routing` are now commands, gated on the hardware that can
honour them, and `Device.isL3()` is the capability *and* the switch - so the
routing table, the IPv6 router advertisements, the installed-route table and the
L3 data path cannot disagree about whether a packet is forwarded. The default
follows the platform: a Cisco `l3-switch` starts in Layer 2 mode, every other box
keeps the answer it gave before the command existed, and `show running-config`
prints the line only when it differs from that default.

test/ip-routing.test.js - 37 assertions. research/ip-routing-default.md records
the citations and the four things still unresolved.
jaylouisw force-pushed rev/1117-1601 from fa1d56b23d
All checks were successful
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 15s
CI / Server smoke test (pull_request) Successful in 10s
CI / Test (Node 20) (pull_request) Successful in 48s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 22) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 56s
CI / Arm auto-merge (pull_request) Successful in 8s
to 516ac6aa63
All checks were successful
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 20) (pull_request) Successful in 56s
CI / Test (Node 22) (pull_request) Successful in 59s
CI / Test (Node 18) (pull_request) Successful in 1m5s
CI / Arm auto-merge (pull_request) Successful in 19s
2026-11-17 16:30:51 +00:00
Compare
Sign in to join this conversation.
No reviewers
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!1869
No description provided.