ip address: a word after the mask is refused by name, not applied as a replacement #1874

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

ip address 10.0.0.2 255.255.255.0 secondary on a port holding 10.0.0.1/24 replaced the primary and answered IP address set. A box adds a second address and leaves the primary where it was - Cisco's ip address reference gives the syntax ip address ip-address mask [secondary] and its worked example prints the primary beside two secondary lines; any other word is a parse error. The refusal now names secondary (one address per port is all this model holds) and names any other word, writing nothing. ip address dhcp 5 and no ip address foo were silent the same way and are refused with it.

Evidence and the open questions (the caret line, secondary vrf, no ip address <a> <m> secondary) are in research/ip-address-trailing-word.md.

Tests: new test/ip-address-trailing-word.test.js (30 assertions), the sweep in test/no-command-swallows-a-word.test.js gains the ip address case, docs/CLI.md gains the rule, and two docs/BGP-POLICY.md anchors are re-aimed at _help() after the insert shifted them. Full suite: 320 suites, 11,147 assertions, 0 failed.

`ip address 10.0.0.2 255.255.255.0 secondary` on a port holding 10.0.0.1/24 replaced the primary and answered `IP address set`. A box adds a second address and leaves the primary where it was - Cisco's `ip address` reference gives the syntax `ip address ip-address mask [secondary]` and its worked example prints the primary beside two `secondary` lines; any other word is a parse error. The refusal now names `secondary` (one address per port is all this model holds) and names any other word, writing nothing. `ip address dhcp 5` and `no ip address foo` were silent the same way and are refused with it. Evidence and the open questions (the caret line, `secondary vrf`, `no ip address <a> <m> secondary`) are in `research/ip-address-trailing-word.md`. Tests: new `test/ip-address-trailing-word.test.js` (30 assertions), the sweep in `test/no-command-swallows-a-word.test.js` gains the `ip address` case, `docs/CLI.md` gains the rule, and two `docs/BGP-POLICY.md` anchors are re-aimed at `_help()` after the insert shifted them. Full suite: 320 suites, 11,147 assertions, 0 failed.
ip address: a word after the mask is refused by name, not applied as a replacement
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 8s
CI / Docker build (pull_request) Successful in 30s
CI / Test (Node 20) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 1m0s
CI / Test (Node 22) (pull_request) Successful in 56s
CI / Arm auto-merge (pull_request) Successful in 9s
79284f72cb
`ip address <ip> <mask> secondary` on a port holding 10.0.0.1/24 set 10.0.0.2/24 and
answered "IP address set": the word was dropped and the primary replaced, where a box ADDS
a second address and leaves the primary alone (Cisco ip address command reference, whose own
example prints the primary beside two `secondary` lines). Any other word was dropped the
same way. The line is refused now - `secondary` by name, because one address per port is
all this model holds, everything else with the word quoted - and nothing is written.
`ip address dhcp 5` and `no ip address foo` were silent in the same way and are refused
with it. research/ip-address-trailing-word.md has the evidence and what is left open.
jaylouisw force-pushed rev/1117-1700 from 79284f72cb
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 8s
CI / Docker build (pull_request) Successful in 30s
CI / Test (Node 20) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 1m0s
CI / Test (Node 22) (pull_request) Successful in 56s
CI / Arm auto-merge (pull_request) Successful in 9s
to 78bbd3c6ef
All checks were successful
CI / Classify the change (pull_request) Successful in 10s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 7s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 27s
CI / Test (Node 20) (pull_request) Successful in 53s
CI / Test (Node 22) (pull_request) Successful in 58s
CI / Test (Node 18) (pull_request) Successful in 1m2s
CI / Arm auto-merge (pull_request) Successful in 21s
2026-11-17 17:14:37 +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!1874
No description provided.