netdiag is a small home-network diagnostic tool for this path:
PC -> WiFi/router -> optical modem/ONT -> ISP -> public internet
It samples each layer with ping, writes CSV, then prints a diagnosis based on packet loss, p95 latency, jitter, and latency increase between layers.
It also writes a self-contained HTML report next to the CSV. The report includes the diagnosis, target list, summary table, p95 bars, and per-sample details.
cd ~/netdiag
go build -o netdiag .cd ~/netdiag
./netdiag -duration 5mBy default it automatically detects your default gateway as the PC -> WiFi/router target and also pings several public DNS IPs.
If your router can reach the optical modem management IP, add it:
./netdiag -duration 10m -modem 192.168.1.1If you know the ISP first-hop gateway, add it too:
./netdiag -duration 10m -modem 192.168.1.1 -isp 10.4.32.1You can usually find the ISP hop with traceroute, mtr, or from your router status page.
- Bad
router: likely PC WiFi signal, WiFi interference, PC wireless card, or router LAN/WiFi side. - Good
routerbut badmodem: likely router-to-optical-modem link, router WAN port/cable, or optical modem LAN side. - Good
router/modembut badisp: likely optical line, PPPoE/access network, or ISP first hop. - Good local hops but bad public targets: likely ISP backbone, peering, DNS/public route, or remote network.
CSV output is written to result/netdiag-<timestamp>.csv unless -out is provided.
HTML output is written to result/netdiag-<timestamp>.html unless -html is provided.