Chapter 3

IP and Addressing

The addressing layer: how IPv4 packets are built, how you carve a block into subnets, and how private space, NAT, IPv6, and DHCP make the 32-bit world keep working.

6 topics

Layer 2 moves frames inside one segment. Everything in this chapter is about layer 3: the addresses that let a packet leave its segment and cross the internet, and the machinery that keeps a 32-bit address space — long since exhausted — usable in practice. You start with the IPv4 datagram itself, learn to split a block into subnets with CIDR math, then work through the four mechanisms that paper over IPv4 scarcity: private addressing, NAT, IPv6, and DHCP.

Subnetting is the load-bearing skill here. Every VPC you size, every firewall rule you scope, every route you write depends on getting prefix math right, and overlapping CIDR ranges are one of the few mistakes the network makes genuinely unfixable without renumbering. Get the addressing layer wrong and nothing above it routes — so this is where the careful counting pays off.

How a block nests: /8 carved down to /16 down to /24
/8
10.0.0.0/8 — 16.7M addresses
/16
10.20.0.0/16 — 65,536 addresses
/24
10.20.4.0/24 — 254 usable hosts

Topics in This Chapter