Dynamic Host Configuration Protocol (DHCP) automatically assigns IP addresses and network settings to devices.
When your laptop connects to WiFi, it doesn't know what IP address to use. DHCP solves this. A DHCP server on your network hands out IP addresses, subnet masks, default gateways, and DNS server addresses.
DHCP operates on UDP. Clients send requests on port , and servers respond on port . The protocol follows a specific four-message exchange that I'll break down next.