IP and Routing
IPv4 and IPv6 addresses, subnets and CIDR, private ranges, the IP header and TTL, routing tables and longest-prefix match, ICMP and traceroute, autonomous systems, BGP and its failures, internet exchanges, anycast, and fragmentation and path MTU discovery.
Addresses, subnets and routes
CIDR in one example 10.20.0.0/16 → 10.20.0.0 - 10.20.255.255 (65,536 addresses) a VPC 10.20.4.0/24 → 10.20.4.0 - 10.20.4.255 (256 addresses) a subnet in it private ranges: 10.0.0.0/8 · 172.16.0.0/12 · 192.168.0.0/16 (not routed on the internet) IPv6: 2001:db8:abcd::/48 → enough /64 subnets for a whole company; no NAT needed ip route # Linux routing table traceroute -n api.bank.example # each hop via TTL expiry (ICMP) mtr api.bank.example # traceroute + loss and latency per hop, continuously
Anycast and path MTU
Anycast: the same IP prefix is announced from many locations; BGP delivers each user to the nearest one. CDNs and public DNS resolvers (1.1.1.1, 8.8.8.8) use it, which is why a single address can be "close" to everyone.
Fragmentation and path MTU: if a packet is larger than a link's MTU, IPv4 can fragment it (slow, fragile) unless "don't fragment" is set, in which case routers return ICMP "fragmentation needed" and the sender lowers its packet size (path MTU discovery). Firewalls that block that ICMP cause connections that hang on large responses: the classic MTU black hole (Backend Debugging part 5).