← Field notes

Reading a TLS handshake from a packet capture

September 2026

Almost all the interesting information in a TLS 1.3 connection sits in the ClientHello, before any key is agreed. Capture one with tcpdump -w and open it in Wireshark: the fields worth reading are SNI, the supported groups list, signature algorithms, and the order of extensions.

Extension order is not random. Browsers emit a fairly stable ordering, and stack fingerprinting tools rely on exactly that. When a client is not a browser, the difference shows up here long before it shows up in behaviour.

$ tcpdump -i eth0 -s0 -w cap.pcap 'tcp port 443 and tcp[tcpflags] & tcp-push != 0'

The second half of the exchange is less useful. Once keys are derived everything after the ServerHello is encrypted, including the certificate — so a capture without the session keys tells you the shape of the handshake and little else.

Anycast is not a CDN feature

July 2026

Announcing the same prefix from several locations means BGP picks a single winner per receiver, usually by shortest AS path. Distance and load are secondary at best. Two consequences follow, and both surprise people:

First, measurements taken from one city say nothing about another. Second, the winner can change mid-connection when a route is withdrawn — which is why long-lived sessions occasionally reset for no visible reason.

Caching is an entirely separate mechanism layered on top. Confusing the two leads to the belief that a given PoP "should" answer, which it never had to do.

Path MTU, black holes, and why small requests hang

May 2026

The classic symptom: ping succeeds, curl to a small endpoint succeeds, and then one specific request stalls until timeout. Nothing in the application logs. Check the largest packet size that gets through:

$ ping -M do -s 1472 -c1 <host>
$ tracepath -n <host>

If 1472 fails but 1400 works, something on the path is not returning ICMP fragmentation-needed — usually a filter dropping ICMP type 3 code 4. Lowering the interface MTU or clamping MSS at the edge is the quick fix; finding the filter is the real one.