Networking Fundamentals · beginner · ~10 min
Explain how hosts get addresses (DHCP) and how private networks reach the internet (NAT).
DHCP auto-assigns IP/mask/gateway/DNS via the DORA exchange. NAT lets many private hosts share one public IP by rewriting addresses/ports at the router.
NAT explains reachability: private hosts aren't directly attackable from the internet, shaping how you plan external vs internal testing. DHCP lease data helps inventory an internal network.
DORA. Discover, Offer, Request, Acknowledge. Lease. IP plus mask, gateway, DNS, with an expiry. NAT/PAT. Router rewrites source IP+port so many hosts share one public IP. Consequence. Inbound connections to private hosts need NAT rules or a foothold.
Two services make everyday networking work without manual configuration.
When a device joins a network it doesn't know its IP. DHCP (Dynamic Host Configuration Protocol) hands one out in a four-step exchange — DORA:
NAT (Network Address Translation) lets a whole private network share one public IP. The router rewrites the source address (and port) of outgoing packets to its public IP, remembers the mapping, and reverses it for replies. This is PAT/"NAT overload" — the common home-router behaviour.
NAT is why an internal host with a 192.168.x.x address can't be reached directly from outside — you need a foothold or a port-forward. DHCP logs and lease tables are useful during internal engagements to map what's on the network.
DHCP gives hosts their addressing automatically (DORA); NAT multiplexes a private network onto one public IP. Together they explain why internal hosts are reachable from inside but not directly from the internet.