Skip to content

Lesson 7 of 9 · 23m

Diagnostic Methodology: Prove the Layer Before You Fix It

A production-grade troubleshooting loop: scope the failure, establish directionality, inspect each layer once, and keep evidence instead of collecting superstition.

The worst networking incident response is a sequence of confident guesses. Restart the service, reload the firewall, toggle the interface, reboot the host, and now you have two problems: the original fault and the evidence you destroyed. A senior operator moves slower at the start and faster overall because every test has a hypothesis.

Define the failure precisely

'Network is down' is not a fault statement. A useful statement is directional, scoped, and reproducible:

From app01 to db03:5432, TCP connects time out.
ICMP succeeds. SSH to db03 succeeds.
Failure began after 14:20 deployment. Other app nodes can connect.

That statement already eliminates layers and populations. Notice what it does not do: assign blame.

Walk the packet path once

For outbound traffic, inspect in order:

ip route get 10.24.16.20
ip -brief address; ip -brief link; ip neigh show
nft list ruleset; ss -tanp | head

For inbound traffic, reverse the logic: is the packet arriving, is it accepted, is a socket listening, does the reply choose a sane route?

Do not interpret this as a rigid checklist where every command is mandatory. It is a path. Start at the layer your evidence points to, then move one step up or down per test.

Separate reachability, transport, and application

  • ping tests IP reachability when ICMP is permitted — nothing more.
  • nc -vz host 5432 or curl -v tests whether TCP establishes.
  • openssl s_client -connect host:443 -servername host tests TLS separately from HTTP.
  • Application logs test authentication, schema, query, and backend behavior.

A failed HTTP health check does not mean routing is broken. A successful ping does not mean PostgreSQL is reachable. Keep the layers distinct in both directions.

Capture facts, then change one variable

Record the output before changing state:

date -Is; ip route get 10.24.16.20 | tee /root/netdiag-route.txt
nft list ruleset > /root/netdiag-nft-before.txt

Then make one controlled change and repeat the smallest failing test. If you change MTU, firewall rules, and a route at once, you have no idea which variable mattered. Worse, partial improvement can conceal the actual fault.

Know when to stop local analysis

Some failures are not yours to solve from the host. If inbound packets never appear in a capture on the receiving interface, the host firewall cannot be the primary cause. At that point your job shifts to producing precise evidence for the network owner: timestamps, source and destination tuples, interface names, captures, and counter deltas.

Field notes

  • Write down the exact failing command and exact error. timeout and connection refused mean different things.
  • DNS failures impersonate network failures. Resolve names explicitly before testing paths.
  • Test from the correct source namespace, interface, and user context; your shell may not match the application's environment.
  • Do not flush firewall rules 'to test.' Capture first, use targeted counters, and restore a known-good ruleset.
  • A good incident note is a timeline of hypotheses and results, not a transcript of everything typed.

Was this lesson helpful?

Sign in to rate