ping: a bare ping <address> sends five echoes, because the box does #1712

Merged
jaylouisw merged 2 commits from rev/1116-1230 into main 2026-11-16 19:19:30 +00:00
Owner

Salvaged from a PR-less branch. rev/1116-1230 was committed at 13:02 today and never opened a pull request; the 18:00+ reverse-loop iterations branched from main instead, leaving this work reachable only from that ref. Rebased onto 53daa3a4 (clean rebase, no conflicts) and pushed with no content change.

What it does: PING_COUNT_DEFAULT 4 -> 5 for both IPv4 and IPv6, matching the IOS-style Repeat count [5]: prompt and the Sending 5 ... header real gear prints. Adds research/ping-default-repeat-count.md and test/ping-default-count.test.js, and updates docs/CLI.md, docs/ARCHITECTURE.md, the web console default count field, and three existing tests.

Local: rebase clean onto 53daa3a4. Touched-file suites green (ping-default-count 18, ping-ipv6 44, dns-console 32, ui-render 38, cli 8, 0 failed each). test/ping-count.test.js crashes with a loopback ECONNREFUSED on an unmodified main checkout as well, so that is a pre-existing host flake rather than this branch. CI is the authoritative gate.

Salvaged from a PR-less branch. `rev/1116-1230` was committed at 13:02 today and never opened a pull request; the 18:00+ reverse-loop iterations branched from main instead, leaving this work reachable only from that ref. Rebased onto 53daa3a4 (clean rebase, no conflicts) and pushed with no content change. What it does: `PING_COUNT_DEFAULT` 4 -> 5 for both IPv4 and IPv6, matching the IOS-style `Repeat count [5]:` prompt and the `Sending 5 ...` header real gear prints. Adds `research/ping-default-repeat-count.md` and `test/ping-default-count.test.js`, and updates docs/CLI.md, docs/ARCHITECTURE.md, the web console default count field, and three existing tests. Local: rebase clean onto 53daa3a4. Touched-file suites green (ping-default-count 18, ping-ipv6 44, dns-console 32, ui-render 38, cli 8, 0 failed each). `test/ping-count.test.js` crashes with a loopback ECONNREFUSED on an unmodified main checkout as well, so that is a pre-existing host flake rather than this branch. CI is the authoritative gate.
ping: a bare ping <address> sends five echoes, because the box does
All checks were successful
CI / Classify the change (pull_request) Successful in 15s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 21s
CI / Server smoke test (pull_request) Successful in 19s
CI / Test (Node 20) (pull_request) Successful in 52s
CI / Test (Node 18) (pull_request) Successful in 56s
CI / Docker build (pull_request) Successful in 31s
CI / Test (Node 22) (pull_request) Successful in 56s
28a766f36a
The repeat count when nobody types one is five on an IOS-style box. Cisco's
`ping` command reference lists "Repeat count [5]: Number of ping packets that
will be sent to the destination address. Default: 5", every sample in the same
reference opens `Sending 5, 100-byte ICMP Echos to ...`, and the ping/traceroute
note says it in words: "By default, the repeat count is five times, so there
will be five echo requests, and five echo replies." This console sent four and
printed `Sending 4` over `Success rate is 100 percent (4/4)`, so the most-used
command in the lab disagreed with every real transcript by one echo.

The number lived in five places and they had all drifted from the vendor:
PING_COUNT_DEFAULT in engine/simulator.js, a literal in engine/cli.js _ping()
(the one a typed ping actually used, since the console always passes its count
down), a third `opts.count || 4` in ping6(), and three copies in the browser
dialog - its field value, the empty-field value handed to the validator, and
the number actually sent. All of them now read the constant, or say five.

Docs: the CLI reference's two worked examples show five replies now, and the
ping section states the default and cites it; ARCHITECTURE's IPv6 sample
likewise.

Tests: test/ping-default-count.test.js (18 checks) pins the constant, a bare
sim.ping() and sim.ping6(), the console's header/marks/rate/reply-line count,
an explicit count still winning, the dialog's three copies, and that no doc
example still says four. test/ping-count.test.js, test/ping-ipv6.test.js and
test/dns-console.test.js had pinned the four-echo default (including "seq 0..3"
on a five-echo timeout) and now pin five.

Evidence and what stays unresolved: research/ping-default-repeat-count.md.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 19:19:21 +00:00
jaylouisw force-pushed rev/1116-1230 from 28a766f36a
All checks were successful
CI / Classify the change (pull_request) Successful in 15s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 21s
CI / Server smoke test (pull_request) Successful in 19s
CI / Test (Node 20) (pull_request) Successful in 52s
CI / Test (Node 18) (pull_request) Successful in 56s
CI / Docker build (pull_request) Successful in 31s
CI / Test (Node 22) (pull_request) Successful in 56s
to b0a1029573
All checks were successful
CI / Classify the change (pull_request) Successful in 14s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 15s
CI / Test (Node 18) (pull_request) Has been skipped
CI / Test (Node 20) (pull_request) Has been skipped
CI / Test (Node 22) (pull_request) Has been skipped
CI / Server smoke test (pull_request) Has been skipped
CI / Docker build (pull_request) Has been skipped
2026-11-16 19:19:25 +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!1712
No description provided.