All cheat sheets
🌐
Computer Networks
OSI/TCP-IP, protocols, HTTP, and networking interview favorites.
Layers
| OSI 7 | Physical → Data Link → Network → Transport → Session → Presentation → App. |
|---|---|
| TCP/IP 4 | Link → Internet → Transport → Application (practical model). |
| IP | Network layer addressing & routing; best-effort delivery. |
| MAC | Data link hardware address; local network delivery. |
Transport
| TCP | Reliable, ordered, congestion control, connection-oriented. |
|---|---|
| UDP | Fast, connectionless, no guarantees — DNS, streaming, games. |
| 3-way handshake | SYN → SYN-ACK → ACK to establish TCP. |
| Ports | Process demux: 80/443 HTTP(S), 53 DNS, 22 SSH. |
Web & DNS
| HTTP vs HTTPS | HTTPS = HTTP + TLS encryption & authenticity. |
|---|---|
| DNS | Name → IP resolution; recursive/iterative queries. |
| CDN | Edge caches closer to users for latency & load. |
| Cookie/session | Client stores cookie; server maps session for auth state. |