cli: a ping ends at the success rate, because a box prints no sentence per echo #2204

Merged
jaylouisw merged 1 commit from rev/1119-2012 into main 2026-11-19 20:40:17 +00:00
Owner

The question

When a Cisco-style box finishes a ping, how is each echo reported - and does it end with a
Reply from <address>: bytes=<n> time=<t> ms line for every echo that came back?

Verdict: no - and this console printed one

IOS reports each echo as one character of the marks line (!, ., U) and closes the run with
Success rate is N percent (n/m), with the round trip on that line as , round-trip min/avg/max = a/b/c ms.
There is no per-echo sentence - neither Reply from ... for an answer nor Request timed out (seq N) for a loss.

The Reply from <addr>: bytes=100 time<1ms TTL=126 shape is Windows ping. Cisco's own Cisco Live deck
(BRKTRS-2811) prints exactly that from a C:\> prompt (ping -l 100, hence bytes=100) beside IOS captures of
!!!!!; Microsoft's ping page defines the form; and Cisco's Learning Network article on ping output says the
host has "4 types" of output (Reply from ...) while "output of ping on router and switch is entirely different
from host" (three: !!!!!, ....., U.U.U, each over a success rate).

So the report was IOS's marks line followed by another operating system's reply lines - a shape neither platform
prints. Four earlier increments had tests counting those lines, which is how it survived.

What changed

  • engine/cli.js: _pingReplyLines(out, count, replies) is the marks line and the success rate only. Both call
    sites (ping, ping6) updated; the now-unused shownTarget parameter removed. Comments explain why, with the
    Windows provenance.
  • test/ping-report-shape.test.js (29 checks): four-line success report, total-loss report plus the console's
    % Echoes lost: explanation, a fabricated 4/5 run (.!!!! + Success rate is 80 percent (4/5), round-trip min/avg/max = 1.4/1.9/3.2 ms and nothing else), IPv6 parity, and no bytes= in any ping.
  • Eight suites that measured the old shape now measure the rule instead: ping-default-count, ping-ipv6,
    ping-own-address, ping-loss-reason (the loss sentence still carries the reason, still after the marks),
    ping-unreachable-letter, dns-console, convergence-timing, ping-round-trip-clause.
  • docs/CLI.md, docs/ARCHITECTURE.md: reply lines dropped from every example; the ping section states the shape.
  • research/ping-report-shape.md: the captures, plus three open points (a possible IOS ICMP-error sentence, NX-OS /
    IOS-XR, and what a ping should say when a path carries no modelled delay - the old time=<hops> fallback has
    nowhere to live now).

Tests

node scripts/syntax-check.js: 465 files OK. Full npm test: 387 suites, 12,999 assertions, 0 failed
(main was 386 / 12,970, 0 failed).

Unresolved

  • Whether any IOS image prints Reply from <router>: Destination host unreachable for a U (the Learning Network
    article attributes Reply from forms to the host; no router transcript in hand shows one).
  • NX-OS / IOS-XR were not re-censused for this note.
## The question When a Cisco-style box finishes a `ping`, how is each echo reported - and does it end with a `Reply from <address>: bytes=<n> time=<t> ms` line for every echo that came back? ## Verdict: no - and this console printed one IOS reports each echo as **one character of the marks line** (`!`, `.`, `U`) and closes the run with `Success rate is N percent (n/m)`, with the round trip on that line as `, round-trip min/avg/max = a/b/c ms`. There is no per-echo sentence - neither `Reply from ...` for an answer nor `Request timed out (seq N)` for a loss. The `Reply from <addr>: bytes=100 time<1ms TTL=126` shape is **Windows** ping. Cisco's own Cisco Live deck (BRKTRS-2811) prints exactly that from a `C:\>` prompt (`ping -l 100`, hence `bytes=100`) beside IOS captures of `!!!!!`; Microsoft's `ping` page defines the form; and Cisco's Learning Network article on ping output says the host has "4 types" of output (`Reply from ...`) while "output of ping on router and switch is entirely different from host" (three: `!!!!!`, `.....`, `U.U.U`, each over a success rate). So the report was IOS's marks line followed by another operating system's reply lines - a shape neither platform prints. Four earlier increments had tests counting those lines, which is how it survived. ## What changed * `engine/cli.js`: `_pingReplyLines(out, count, replies)` is the marks line and the success rate only. Both call sites (`ping`, `ping6`) updated; the now-unused `shownTarget` parameter removed. Comments explain why, with the Windows provenance. * `test/ping-report-shape.test.js` (**29 checks**): four-line success report, total-loss report plus the console's `% Echoes lost:` explanation, a fabricated 4/5 run (`.!!!!` + `Success rate is 80 percent (4/5), round-trip min/avg/max = 1.4/1.9/3.2 ms` and nothing else), IPv6 parity, and no `bytes=` in any ping. * Eight suites that measured the old shape now measure the rule instead: `ping-default-count`, `ping-ipv6`, `ping-own-address`, `ping-loss-reason` (the loss sentence still carries the reason, still after the marks), `ping-unreachable-letter`, `dns-console`, `convergence-timing`, `ping-round-trip-clause`. * `docs/CLI.md`, `docs/ARCHITECTURE.md`: reply lines dropped from every example; the ping section states the shape. * `research/ping-report-shape.md`: the captures, plus three open points (a possible IOS ICMP-error sentence, NX-OS / IOS-XR, and what a ping should say when a path carries no modelled delay - the old `time=<hops>` fallback has nowhere to live now). ## Tests `node scripts/syntax-check.js`: 465 files OK. Full `npm test`: **387 suites, 12,999 assertions, 0 failed** (main was 386 / 12,970, 0 failed). ## Unresolved * Whether any IOS image prints `Reply from <router>: Destination host unreachable` for a `U` (the Learning Network article attributes `Reply from` forms to the *host*; no router transcript in hand shows one). * NX-OS / IOS-XR were not re-censused for this note.
cli: a ping ends at the success rate, because a box prints no sentence per echo
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 10s
CI / Server smoke test (pull_request) Successful in 10s
CI / Test (Node 20) (pull_request) Successful in 1m0s
CI / Test (Node 22) (pull_request) Successful in 1m1s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 18) (pull_request) Successful in 1m6s
CI / Arm auto-merge (pull_request) Successful in 3s
1cf24c4f74
A box reports each echo as one character of the marks line and closes the
run with 'Success rate is N percent (n/m)'. This console appended
'Reply from <addr>: bytes=100 time=...' per answered echo and
'Request timed out (seq N)' per lost one - Windows ping's shape, printed
after IOS's marks line. _pingReplyLines() is now the marks line and the
rate only, for both families; the '% Echoes lost:' explanation stays.
research/ping-report-shape.md cites the captures; 29 new checks.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-19 20:27:29 +00:00
jaylouisw deleted branch rev/1119-2012 2026-11-19 20:40:21 +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!2204
No description provided.