cli: a ping ends at the success rate, because a box prints no sentence per echo #2204
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2204
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1119-2012"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The question
When a Cisco-style box finishes a
ping, how is each echo reported - and does it end with aReply from <address>: bytes=<n> time=<t> msline 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 withSuccess 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 norRequest timed out (seq N)for a loss.The
Reply from <addr>: bytes=100 time<1ms TTL=126shape is Windows ping. Cisco's own Cisco Live deck(BRKTRS-2811) prints exactly that from a
C:\>prompt (ping -l 100, hencebytes=100) beside IOS captures of!!!!!; Microsoft'spingpage defines the form; and Cisco's Learning Network article on ping output says thehost has "4 types" of output (
Reply from ...) while "output of ping on router and switch is entirely differentfrom 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 callsites (
ping,ping6) updated; the now-unusedshownTargetparameter removed. Comments explain why, with theWindows 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 msand nothing else), IPv6 parity, and nobytes=in any ping.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 hasnowhere to live now).
Tests
node scripts/syntax-check.js: 465 files OK. Fullnpm test: 387 suites, 12,999 assertions, 0 failed(main was 386 / 12,970, 0 failed).
Unresolved
Reply from <router>: Destination host unreachablefor aU(the Learning Networkarticle attributes
Reply fromforms to the host; no router transcript in hand shows one).