Card 09/ 09
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.
| Layer | Protocol | Tool | Common failure |
|---|---|---|---|
| 7, application | HTTP, DNS | curl -v, dig | 4xx and 5xx responses, NXDOMAIN |
| Security, between 4 and 7 | TLS | openssl s_client | Expired or mismatched certificate, missing intermediate |
| 4, transport | TCP, UDP | nc -vz | Connection refused, idle timeouts |
| 3, network | IP, ICMP | ping, traceroute | No route, timeouts, a TTL that runs out |
| 2, data link | Ethernet, Wi-Fi, ARP | ip neigh | No gateway MAC address, a duplicate IP |
| 1, physical | Cables and radio | Link lights, Wi-Fi signal | No link at all |
← → move through sections and cards