$RodHat_

Topic · 33 articles

Networking & DNS

"It's the network" is where most debugging stops and most blame starts. It's usually not the network. When it is, the evidence is already sitting in kernel counters, packet captures, and the DNS delegation chain, and none of it needs a vendor login to read.

Start by finding out what's actually listening and what the TCP stack thinks of each connection. Then DNS, packets, and TLS by hand. The Tales are a long list of tables that filled up quietly: conntrack, ephemeral ports, listen backlogs, and one TCP window.

Start here

Read these first, in this order.

  1. 01

    Tip · 2026-07-18

    Stop guessing what's listening on that port

    netstat -an tells you a socket is open. It does not tell you which process opened it, which user owns it, or whether the accept queue is already overflowing. ss and sockstat do, and they take the same three seconds.

  2. 02

    Tip · 2026-08-19

    ss -i shows you what netstat never could: TCP internals live

    Everyone knows ss -tulnp. Almost nobody uses ss -i, which surfaces congestion window size, RTT, retransmit counts, and send/receive buffer fill, directly from the kernel, no tool required.

  3. 03

    Tip · 2026-08-10

    dig +trace, and how to tell whose DNS is actually lying to you

    "It's a DNS problem" is where debugging stops. +trace walks the delegation from the root yourself, +norecurse asks a resolver what it has cached without letting it go fetch, and together they tell you whether the bad answer is the zone, the resolver, or the client.

  4. 04

    Tip · 2026-08-04

    Stop waiting beside tcpdump like it owes you an incident

    Intermittent network failures do not happen while you are watching. Use tcpdump's rotating capture files, size limits, and post-trigger preservation to keep the packets that existed before the pager fired.

  5. 05

    Tip · 2026-07-29

    Debug a TLS handshake by hand with openssl s_client

    "Certificate verify failed" is four different bugs wearing one error message. s_client shows you the chain the server actually sent, in order, with the verify result per link, which is how you find the missing intermediate in about twenty seconds.

  6. 06

    Tip · 2026-08-02

    "Cannot assign requested address" is not a DNS problem. You're out of ports.

    A client making thousands of short-lived outbound connections exhausts the ephemeral range, and every tuple sits in TIME_WAIT for a minute afterwards. Here's how to confirm it in one command and the three fixes, ranked by how much you'll regret them.

The syscalls underneath

Version introduced, sourced from the man page. Full cards in the syscall reference, or check your kernel.

InterfaceSinceWhat it does
SO_REUSEPORTLinux 3.9Let multiple sockets bind one address:port; the kernel spreads traffic across them.
SCM_RIGHTSunknownPass open file descriptors to another process over a UNIX domain socket.

More console tips (7)

Rod's tales (9)

MOTD (11)

Other topics