DNS, DHCP & NAT
Follow address configuration, name resolution and common home-router translation.
Obtaining an address and resolving a name
DHCP can provide a client with an IP address, subnet configuration, default gateway and DNS resolver. DNS maps names to records such as A (IPv4) and AAAA (IPv6). A recursive resolver may answer from cache or query other DNS servers; DNS records have a cache lifetime (TTL).
A DNS name can return multiple addresses. DNS resolution does not itself establish a TCP connection or download the web page.
Sharing an external address
A home router often translates several private IPv4 client addresses and ports to one public IPv4 address and distinct external ports. It keeps state so replies are sent back to the right client. NAT affects address visibility but does not replace authorization or a firewall.
DNS, DHCP and NAT solve different problems: names, configuration and address translation.
Check your understanding
Which service commonly supplies a new laptop with a gateway address?
