1. Encapsulation and layers
One-liner. Every layer adds a header, and each device only reads the layers it needs.
Memorize
- L2 (Ethernet) frame: MAC addresses + EtherType + payload + FCS.
- L3 (IP) packet: source/dest IP, TTL, protocol, fragmentation fields.
- L4 (TCP/UDP) segment: ports, sequence/ack, flags, window.
- L7 (HTTP/DNS/TLS) message: application semantics.
- Default MTU 1500; IP+TCP headers leave MSS 1460 (1440 with IPv6).
- Switches forward by MAC; routers by IP; load balancers by port (L4) or content (L7).
- Each layer's header is overhead: 14 (Ethernet) + 20 (IP) + 20 (TCP) = 54 bytes per 1500.
Trap. Forgetting the 54 bytes of overhead when sizing throughput — goodput is below line rate. Do this. Compute MSS from MTU, then multiply by packets per second.
Check
With a 1500-byte MTU and IPv4/TCP without options, what is the maximum TCP payload per segment?
Why
1500 − 20 (IP) − 20 (TCP) = 1460; IPv6 subtracts 20 more.