What is DHCP?
Why Interviewers Ask This
Foundational questions like this help interviewers calibrate the rest of the interview. A confident, accurate answer signals that you have solid Networking basics — a prerequisite for any developer role.
Answer
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses and other network configuration parameters to devices on a network, eliminating the need for manual IP configuration. When a device connects to a network, it broadcasts a DHCP Discover message. A DHCP server responds with an Offer containing an available IP address. The client sends a Request, and the server sends an Acknowledgment confirming the lease. This process is known as DORA (Discover, Offer, Request, Acknowledge). DHCP assigns: IP address, subnet mask, default gateway, and DNS server addresses. Leases are temporary — the client must renew before expiry. DHCP is running on your home router, giving each device a local IP from the 192.168.x.x range automatically.
Pro Tip
Demonstrate both theoretical understanding and practical experience. Say what it is, then give an example of how you actually used it in a Networking codebase.