All cheat sheets
🌐

Computer Networks

OSI/TCP-IP, protocols, HTTP, and networking interview favorites.

Layers

OSI 7Physical → Data Link → Network → Transport → Session → Presentation → App.
TCP/IP 4Link → Internet → Transport → Application (practical model).
IPNetwork layer addressing & routing; best-effort delivery.
MACData link hardware address; local network delivery.

Transport

TCPReliable, ordered, congestion control, connection-oriented.
UDPFast, connectionless, no guarantees — DNS, streaming, games.
3-way handshakeSYN → SYN-ACK → ACK to establish TCP.
PortsProcess demux: 80/443 HTTP(S), 53 DNS, 22 SSH.

Web & DNS

HTTP vs HTTPSHTTPS = HTTP + TLS encryption & authenticity.
DNSName → IP resolution; recursive/iterative queries.
CDNEdge caches closer to users for latency & load.
Cookie/sessionClient stores cookie; server maps session for auth state.