Overview
Curated: · Written: · Reviewed:
Network Troubleshooting
In one line
Find the hop, layer or flow where a working transaction diverges from a failing one, changing one variable at a time against a healthy control. Reach for it when a connectivity or performance fault has no obvious owner.
Key definitions
- Blast radius: the scope of impact (one client, one subnet, one site, one application, everything). It picks the first check.
- Control: a healthy path or host that differs from the failing one in exactly one dimension.
- Observer: the point where a capture was taken. A retransmission proves loss only between that observer and its peer.
- PMTUD: path MTU discovery. It needs ICMP Type 3 Code 4 (IPv4) or ICMPv6 Type 2 (Packet Too Big) to reach the sender, so filtering that ICMP stalls large packets while small ones pass.
- Data plane vs control plane: a route in the table versus a route the kernel or hardware actually forwards on.
- Window-limited throughput: a single TCP flow cannot exceed receive window divided by RTT.
Formulas and complexity
The 127 s figure assumes the Linux default tcp_syn_retries = 6.
How it works
Start from the blast radius and one failing transaction: endpoints, protocol, port, time, expected and observed result. Snapshot neighbor, socket, conntrack and route state before restarting or flushing anything. Check the local view (address, route, neighbor), then test the gateway and go hop by hop against a control that works. The first divergence picks the half of the path to descend into. Capture at both ends of the suspect segment and compare.
A neighbor entry in FAILED or INCOMPLETE means no ARP reply came back. STALE is a cached entry not yet re-verified and usually recovers once traffic is sent. With policy routing, ip rule is evaluated in priority order and the first rule whose table holds a matching route wins. ip route get <dst> from <src> iif <ingress> shows the decision the kernel makes.
When to use and when not to
| Question | Good evidence | Misleading evidence |
|---|---|---|
| Is the service reachable? | TCP connect to the listener and port | Ping succeeds (ICMP only) |
| Is the router forwarding? | Test transit from a host behind it | Ping to the router's own address |
| Is the name at fault? | dig or resolvectl answer, then connect to the returned IP with the name preserved | Connecting to a bare IP (drops SNI and Host) |
| Is loss real? | Matching captures at both ends, counters as deltas | One retransmission at one tap |
| Is the fault a middlebox? | Same flow tuple through and around the box | Success through a different proxy |
| Is it throughput or latency? | Window and RTT arithmetic, then a bulk transfer | A single ping RTT |
| Many hosts or flows? | Per-interface counters, sampled flows | Per-host capture on every machine |
Traps interviewers probe
- A successful ping shows the router's ICMP responder works, and says nothing about forwarding. Fix: test transit with a host on the far side of that router.
- Reading a retransmission as the loss location. Fix: pair the server's arrival and ACK with the client's send. A missing ACK places the loss on the return path between observers.
- Treating an IP connection as an application test. Fix: use curl --resolve so SNI, Host and virtual hosting stay the same.
- Clearing ARP, conntrack or sockets before capturing. Fix: snapshot neighbor, socket and conntrack state first.
- Trusting a capture without its limits. Fix: record snap length, drop counts, promiscuous mode and offload state. Host transmit captures can show oversized segments that never appear on the wire.
Interview tips
Open with scope: 'First I'd establish whether this is one client, one subnet, one site, one application or everything, and when it started. That decides the first check.'
Follow-ups to expect:
- What does a retransmission in your capture prove?
- Why does ping success not show the service works?
- A bulk transfer tops out well below link speed at 80 ms RTT. Why?
- A fault that only hits large responses: where do you look first, and why?
- How do you separate asymmetric routing from a one-way link?
- A connect that hangs for about 127 s versus one refused in milliseconds: what is each?
- How do you tell queueing delay from propagation delay?
At scale: sample flows and read per-interface counters before capturing. A capture on one host of a busy fleet rarely shows the pattern.
30-second outline: Scope the blast radius. Pin the failing transaction. Test the gateway, then divide the path against a healthy control. Name the branch point and the evidence on each side. Change one variable and capture both observers. State what remains uncertain and how you roll back.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.