DHCP
/ D-H-C-P /
DHCP is what hands a device its network settings automatically the moment it joins a network, so you never have to type an IP address by hand. When your phone connects to Wi-Fi or a laptop is plugged into an office jack, within a second or two it receives an IP address, a subnet mask, a default gateway, and DNS server addresses — all from DHCP. It is like walking into a hotel and the front desk instantly handing you a room key, the floor plan, and the front-desk phone number.
A new host has no IP yet, so it starts by shouting. The exchange is often remembered as DORA: the client broadcasts a DHCP Discover ('any servers out there?'); one or more DHCP servers reply with an Offer ('you can have 192.168.1.50'); the client broadcasts a Request accepting one offer; and the server sends an Acknowledgment confirming the lease. The address is a lease — it is granted for a limited time and the client must renew it before it expires, after which the server can hand that address to someone else. Along with the address, DHCP delivers the subnet mask, the gateway (router) to use for off-LAN traffic, and DNS servers, plus optional extras. Because the initial messages are broadcasts and broadcasts do not cross routers, a DHCP relay agent on each subnet forwards them to a central server.
DHCP is why home and office networks are plug-and-play: no manual addressing, no clashes, and addresses recycled as devices come and go. The honest caveats: an IP from DHCP is temporary and tied to a location, not a permanent name for your device — the same laptop gets different addresses on different networks. And DHCP, like ARP, is unauthenticated, so a rogue DHCP server on a LAN can hand out a malicious gateway or DNS server and quietly intercept traffic.
A laptop joins the office Wi-Fi with no IP. It broadcasts Discover; the server Offers 192.168.1.50 with mask 255.255.255.0, gateway 192.168.1.1, DNS 192.168.1.1, lease 24 hours. The laptop Requests it, the server Acks, and the laptop is online — all in about a second.
DORA: Discover, Offer, Request, Acknowledge — a leased address plus full configuration.
A DHCP address is a time-limited lease tied to a location, not a permanent device identity; and DHCP is unauthenticated, so a rogue server can hand out a malicious gateway or DNS.