Card 09/ 09

RecapDifficulty: Advanced1 min

Recap: The OSI Model and Network Protocols

Every request climbs the same stack, and every failure lives on one layer of it.

A request crosses every layer in order, and a failure stops it at the first one that does not complete.

  • Opening a page runs ARP, DNS, TCP, TLS and HTTP, each needing the one before.
  • Troubleshooting by layer starts where the symptom points and proves one layer at a time, bottom up or top down.
  • Each tool proves one layer: ping and traceroute the network, dig the name, nc the port, openssl the certificate, curl the response.
  • Cloud components work at the layer of the header they read; an application load balancer reports 502, 503 and 504 for faults behind it.
  • A new HTTPS connection costs three round trips before the first byte with TLS 1.3, one when the connection is reused.
The stack as a debugging map
LayerProtocolToolCommon failure
7, applicationHTTP, DNScurl -v, dig4xx and 5xx responses, NXDOMAIN
Security, between 4 and 7TLSopenssl s_clientExpired or mismatched certificate, missing intermediate
4, transportTCP, UDPnc -vzConnection refused, idle timeouts
3, networkIP, ICMPping, tracerouteNo route, timeouts, a TTL that runs out
2, data linkEthernet, Wi-Fi, ARPip neighNo gateway MAC address, a duplicate IP
1, physicalCables and radioLink lights, Wi-Fi signalNo link at all