Writing criteria for this guide
Every "for Mere Mortals" guide is written to the same nine-point standard, so a reader who trusts one can trust the rest. Here it is, with the verification notes for this particular guide below.
- Fix it first. Reader outcomes lead, not action items: each chapter opens by naming the outcome it delivers, shows a check the reader can run to confirm they got it, and a reasonable reader finishes able to state what was done, what it means, and what to try next.
- Plain language. Short sentences, everyday vocabulary, technical terms defined on first use. No slang, and no idioms that only make sense in one country — the reader may be translating as they go.
- No dead ends. A guide never tells the reader to do something it cannot show them how to verify. Every claim a reader relies on — an install, a command, an output — is something this guide demonstrates or clearly labels documented-only below.
- Live-verified where it matters. Procedures are run for real in the guide's lab wherever the build machine allows it, and the transcripts kept in the repository are the evidence. What could not be run is listed honestly below, never presented as if it had been.
- General audiences. Nothing in this guide — examples, fixtures, names, addresses — is modelled on any particular reader or author's real life, network, or organisations. The lab's traffic is the lab talking to itself.
- Standalone. A reader needs this guide, its lab, and nothing else. Where another guide would genuinely help, it is pointed to once, by name, and the chapter still completes without it.
- Honest about limits. Chapter 12 names what the tool cannot do: it sees traffic metadata and never contents, so no conclusion about what a flow is can come from its screen; its rates are samples over a short window, not measurements, and its totals count attributed traffic, not audited bytes; its process matcher can fail quietly and leave rows unnamed or tunnel traffic wearing the tunnel's name; privilege is a hard gate with no unprivileged mode; resolved hostnames are claims by an address's owner, not identities; and it sees only its own machine, only while it runs.
- The one rule is in the text, early. Chapter 1 and the README state the rule plainly — a name in bandwhich is a match it made, not a proof of who sent the bytes, and a rate is a sample over a short window, not a measurement of a transfer — before any procedure depends on it, and later chapters point back to it where a name could be mistaken for a proof or a rate for a measurement.
- Builds clean. The site builds with MkDocs in strict mode with no warnings, and a fresh reader following the chapters in order reaches the stated outcome of each.
Verification notes for this guide
The build machine is an Ubuntu 24.04 sandbox. bandwhich
0.23.1 was the project's official release binary for Linux
(bandwhich-v0.23.1-x86_64-unknown-linux-gnu.tar.gz from the
imsnif/bandwhich GitHub releases; binary SHA-256
d18d24df363458669b9a54ff247356e953e55fa78220736b85eee2da2052f0df),
run from a scratch folder rather than installed system-wide.
Companions: Python 3.12.3 (fixture server and payload
generator), curl (copied as fixture-fetch, the named
client), wget, and ss.
The sandbox's ceiling, and the lab's detour. In the
sandbox's own network namespace, packet capture is refused to
every process: the kernel capability bounding set
(0x000001fffff7cfff, decoded in transcript t01) does not
contain cap_net_raw, cap_net_admin, or cap_sys_ptrace,
a direct AF_PACKET socket request fails with Operation not
permitted even as root, and bandwhich prints its
insufficient-permissions refusal as root, as the unprivileged
uid 65534, in raw and interactive shapes, and inside a user
namespace that keeps the host network (unshare -Ur). The
lab's captures were therefore made inside a private user +
network namespace (unshare -Urn), where the lab's processes
hold the full capability set (CapEff: 000001ffffffffff) over
their own loopback — same binary, flags, and output format;
the driver scripts are shipped in examples/ so the setup is
inspectable, not asserted. Inside that namespace the sandbox
still refuses every connect() to a non-loopback destination
(proved against a veth pair and against an address aliased onto
loopback itself; transcripts t04 and t04b), so no genuinely
remote traffic could be generated: all captured traffic is
loopback between the lab's own processes.
Run for real, with transcripts as evidence:
- Version, the full
--help, the binary's SHA-256 and file type (t00). No bandwhich package exists in the sandbox's Ubuntu repositories (apt-cache search bandwhichis empty). - The privilege refusal in every shape the lab could produce
it, the capability ceiling decoded, and the invalid
--unit-familyrefusal listing the four legal values (t01). - Raw mode on loopback against the fixture download — 10 MiB
payload (10,485,760 bytes, SHA-256
707d33427940b1f71edf821567c92863077b3a917c500c8288a29d759f9362e2), client--limit-rate 1M, 9.811 s, hash checked at both ends. Attribution topython3(server) andfixture-fetch(client) in all three raw line kinds; server rates climbing 168,148 to a 973,548 peak; all traffic in the "up" column with down at 0; small<UNKNOWN>tail rows (t02, driver t02-t03-driver). - The same download at
--limit-rate=2Munderwget(4.958 s): attribution follows the programs; server peak 2,501,702 B/s (above the limit — the smoothing overshoot); post-exit rows withconnections: 0and decaying rates. Then the burst: no rate limit, the whole payload in 0.060 s, the client<UNKNOWN>in every refresh, and one figure — 4,171,467 B/s — repeated unchanged across four refreshes (t03). - DNS resolution on (no
-n): the peer 127.0.0.1 becomeslocalhost.in connection lines while remote-address lines stay numeric (t05). --total-utilization: cumulative totals for the fixture flow, the server connection ending at 14,099,830 against the 10,485,760-byte payload (t06).--processesin raw mode: process lines only, no connection or remote-address lines (t07).- The manual way during a live transfer:
ss -tnpnaming the client and server, and/proc/net/devloopback counters rising 32,455,758 to 43,109,284 (+10,653,526) across the download (t08). - The interactive display under a real terminal
(
script(1), 44x132): the header line (IF: lo | Total Rate (Up / Down)), the three table titles and their columns, and rendered rates such as 889.31KiB (t09, with the full pty capture kept as t09-tui.raw). - Errors that need no traffic: a nonexistent interface
(
Cannot find interface nosuch0) and the interactive display redirected away from a terminal (Failed to get stdout ... use the --raw flag) (t10). - The matcher's join by hand: the client's socket inode in
/proc/<pid>/fd(socket:[180728]) found in/proc/net/tcp; and thesetcapgrant of the documented four capabilities applied to a binary copy and confirmed withgetcap(t11).
Documented only — described from the project's documentation
or --help text, not run, and the text does not claim
otherwise:
- The
sudoandsetcaproutes succeeding: the setcap command was run and its grant verified on the file (t11), but the sandbox's ceiling strips such grants in its own namespace, and the namespace that allowed capture was already fully privileged. On an ordinary machine these are the project's documented routes. - The package and cargo installation routes (Arch, Homebrew,
Nix, Void, FreeBSD, Fedora COPR,
cargo install): the lab ran the release binary and checked only that Ubuntu's repositories carry no bandwhich package. - The macOS (
lsof) and Windows (WinApi) matching routes, and the Windows build generally. - Traffic to a genuinely remote machine, and with it the normal up/down direction split: the sandbox refuses non-loopback connections outright (t04, t04b). The guide states the loopback direction behaviour from capture and the remote behaviour from the tool's documented method, and never merges the two.
- The tunnel failure mode in chapter 9, and the neighbours
nethogs, iftop, and btop (none installed in the sandbox):
characterised from their documentation, not run;
ssand the/procfiles alone were run as witnesses. --show-dns,--dns-server, and--log-towith--verbose/--quiet: named from the--helptext (t00). The lab's isolated namespace had no reachable resolver to exercise them against.
Fixtures are this guide's own and deliberately generic: a repeating-pattern payload with no content, an HTTP server from Python's standard library, and system download tools under a lab name. The payload's size and hash are stated wherever its rates are quoted. No example is modelled on any real person, network, service, or organisation, and all of the lab's traffic stayed between processes the lab started itself, on loopback, inside the lab's own namespace.