cli: a mask that is not a run of ones is refused in the box's own hex line #2189

Merged
jaylouisw merged 1 commit from rev/1119-1742 into main 2026-11-19 18:14:07 +00:00
Owner

What a mask that is not a run of ones gets

ip address 10.9.9.9 255.0.255.0 answered

% Invalid mask: 255.0.255.0 - a netmask is a run of ones then zeros (255.255.255.0, or 24)

A sentence no IOS prints: it carries the % marker its Bad mask /N siblings do not, spells the mask in the
decimal form the box does not use in this line, and explains a rule the box does not explain. A real box writes
the mask as a hex word, echoes the typed address and stops:

R1(config-if)# ip address 192.168.1.254 255.255.5.0
Bad mask 0xFFFF0500 for address 192.168.1.254

(https://www.n-study.com/en/ip-addressing/cisco-ipaddress-configuration/)

Change

  • the port door (ip address) now refuses a dotted quad that is not contiguous with
    Bad mask 0X<hex> for address <ip> — unmarked, mask in the hex spelling the vendor documents for a netmask
    ("as indicated by the leading 0X (for example, 0XFFFFFF00)", ip netmask-format), no explanation.
  • a mask that is not a dotted quad at all (junk, a prefix length out of range) keeps this console's sentence —
    nothing in hand says what a box prints there.
  • ip route keeps its own sentence too: the only transcript is an ip address line, and a static route's
    refusal for the same mask is not witnessed. The asymmetry is deliberate and commented.

Evidence and what stays open

research/ip-address-bad-mask-hex.md records the transcript, the vendor's hex netmask format, the forum thread
titled Bad mask 0XFFFFF whose screenshot is unreadable, and the one detail still open: zero-padding (a
mask whose first byte is zero — 0.0.0.255 — would print 0X00FFFFFF here; a single paste settles it), the
case of the X (0x in the transcript, 0X in the vendor docs), an IOS XE witness, and the two doors left
alone above.

Tests

test/mask-rule.test.js (31) and test/ip-address-not-a-host.test.js (43) updated to pin the new line, the
unmarked refusal, and the padded zero-high-byte word; full npm test: 382 suites, 12,890 assertions, 0
failed
. node scripts/syntax-check.js OK; check-doc-citations clean (the _help() pointer in
docs/BGP-POLICY.md re-anchored 7304 → 7357 after the shift, as #2171 did before).

## What a mask that is not a run of ones gets `ip address 10.9.9.9 255.0.255.0` answered ``` % Invalid mask: 255.0.255.0 - a netmask is a run of ones then zeros (255.255.255.0, or 24) ``` A sentence no IOS prints: it carries the `%` marker its `Bad mask /N` siblings do not, spells the mask in the decimal form the box does not use in this line, and explains a rule the box does not explain. A real box writes the mask as a hex word, echoes the typed address and stops: ``` R1(config-if)# ip address 192.168.1.254 255.255.5.0 Bad mask 0xFFFF0500 for address 192.168.1.254 ``` (https://www.n-study.com/en/ip-addressing/cisco-ipaddress-configuration/) ### Change - the port door (`ip address`) now refuses a **dotted quad that is not contiguous** with `Bad mask 0X<hex> for address <ip>` — unmarked, mask in the hex spelling the vendor documents for a netmask ("as indicated by the leading 0X (for example, 0XFFFFFF00)", `ip netmask-format`), no explanation. - a mask that is not a dotted quad at all (junk, a prefix length out of range) keeps this console's sentence — nothing in hand says what a box prints there. - `ip route` keeps its own sentence too: the only transcript is an `ip address` line, and a static route's refusal for the same mask is not witnessed. The asymmetry is deliberate and commented. ### Evidence and what stays open research/ip-address-bad-mask-hex.md records the transcript, the vendor's hex netmask format, the forum thread titled `Bad mask 0XFFFFF` whose screenshot is unreadable, and the one detail still open: **zero-padding** (a mask whose first byte is zero — `0.0.0.255` — would print `0X00FFFFFF` here; a single paste settles it), the case of the `X` (`0x` in the transcript, `0X` in the vendor docs), an IOS XE witness, and the two doors left alone above. ### Tests `test/mask-rule.test.js` (31) and `test/ip-address-not-a-host.test.js` (43) updated to pin the new line, the unmarked refusal, and the padded zero-high-byte word; full `npm test`: **382 suites, 12,890 assertions, 0 failed**. `node scripts/syntax-check.js` OK; `check-doc-citations` clean (the `_help()` pointer in docs/BGP-POLICY.md re-anchored 7304 → 7357 after the shift, as #2171 did before).
cli: a mask that is not a run of ones is refused in the box's own hex line
Some checks failed
CI / Classify the change (pull_request) Successful in 12s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 12s
CI / Server smoke test (pull_request) Successful in 11s
CI / Docker build (pull_request) Successful in 21s
CI / Test (Node 20) (pull_request) Failing after 1m2s
CI / Test (Node 22) (pull_request) Successful in 1m2s
CI / Test (Node 18) (pull_request) Successful in 1m7s
CI / Arm auto-merge (pull_request) Successful in 3s
30d55f87ac
`ip address 10.9.9.9 255.0.255.0` answered

  % Invalid mask: 255.0.255.0 - a netmask is a run of ones then zeros (255.255.255.0, or 24)

- a sentence no IOS prints, with the leading marker its `Bad mask /N` siblings do not
carry, the mask in the decimal spelling the box does not use in this line, and an
explanation the box does not offer. A box writes the mask as a hex word instead, names
the address that was typed and stops:

  R1(config-if)# ip address 192.168.1.254 255.255.5.0
  Bad mask 0xFFFF0500 for address 192.168.1.254

The port door now prints `Bad mask 0XFF00FF00 for address 10.9.9.9`, the mask in the
hex spelling the vendor documents for a netmask ("as indicated by the leading 0X (for
example, 0XFFFFFF00)"). A mask that is not a dotted quad at all keeps this console's
own sentence, and `ip route` keeps its own too - neither refusal is witnessed.

research/ip-address-bad-mask-hex.md records the transcript, the hex-format reference,
the one detail still open (zero-padding, which a single `0.0.0.255` paste would settle)
and what would settle the rest.
jaylouisw force-pushed rev/1119-1742 from 30d55f87ac
Some checks failed
CI / Classify the change (pull_request) Successful in 12s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 12s
CI / Server smoke test (pull_request) Successful in 11s
CI / Docker build (pull_request) Successful in 21s
CI / Test (Node 20) (pull_request) Failing after 1m2s
CI / Test (Node 22) (pull_request) Successful in 1m2s
CI / Test (Node 18) (pull_request) Successful in 1m7s
CI / Arm auto-merge (pull_request) Successful in 3s
to 455ac2dd74
All checks were successful
CI / Classify the change (pull_request) Successful in 13s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 11s
CI / Server smoke test (pull_request) Successful in 10s
CI / Test (Node 20) (pull_request) Successful in 55s
CI / Test (Node 22) (pull_request) Successful in 56s
CI / Test (Node 18) (pull_request) Successful in 1m0s
CI / Docker build (pull_request) Successful in 20s
CI / Arm auto-merge (pull_request) Successful in 4s
2026-11-19 18:12:16 +00:00
Compare
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-19 18:13:49 +00:00
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!2189
No description provided.