DHCP stands for Dynamic Host Configuration Protocol.
I can hear you thinking, “Thanks a bunch, but … what’s that?”
In a nutshell, DHCP is all about the request that your computer makes and the response that it receives when assigning a “dynamic” IP address.
Let’s look at that a little more closely.
Become a Patron of Ask Leo! and go ad-free!
Internet IP addressing
First, a refresher. Every computer on the internet has an address. That address is just a number, but that number uniquely identifies that computer; no other computer on the internet can have the same address. If your computer is behind a router, then it’s not attached directly to the internet, but the router is, so the IP address of the router on the internet is unique.
There are two types of IP addresses: static and dynamic.
Static IP addresses are just that – unchanging. They refer to a particular computer, whether that computer is turned on or not, connected or not. Typically, domain names like “askleo.com” map to a single static IP address which is assigned to a specific server on the internet. ISPs and other service providers on the internet manage and assign static IP addresses manually.
Dynamic IP addresses are assigned on-the-fly. Originally, the most common scenario was a dial-up connection. When you dialed your ISP to connect to the internet, part of the initial conversation between your computer and the ISP was your computer asking for an IP address. The ISP would then assign it one of the addresses that it had that wasn’t currently in use. On disconnect, that IP address was returned to the list of available addresses and could be reused by someone else.
Because most home users tend to turn their computers off, even broadband connections, such as DSL and cable, continue to use dynamic addresses. If your computer is off, you don’t need an IP address so someone else might get to use it.
Local IP addressing
As I said, when your computer is connected to the internet via a router, it isn’t directly connected to the internet. In fact, it’s connected to a local network or LAN that’s set up and managed by your router. Your router then also handles all of the data that’s going between the computers on your LAN (even if there’s only one computer) and the servers that you access out on the internet.
Routers also use dynamic addresses when setting up that local network. Each computer that you connect to your router will also ask for an IP address and that router will respond with an IP address that’s available within your LAN. (Routers can also be configured to ask for an IP address when they connect to the internet, but that’s unrelated to how it manages the local network.)
The DHCP protocol
The actual DHCP protocol is fairly simple.
The computer in need of an IP address broadcasts a request. In other words, it sends a message out on the network to anyone that says, “Hello? Anyone? I need an IP address!” On any network, there’s one (and only one) device whose job it is to listen for those requests and answer back, “Sure, here ya go. Have this one.” That’s the DHCP server.
With that answer, the DHCP server usually includes additional information, such as the machines to ask for domain name look-ups (the DNS server) and the address of the device that’s handling all outgoing (internet) network traffic (the gateway address).
In Windows, if your computer asks for an IP address, but doesn’t get a response from a DHCP server within a certain amount of time, it kind of ‘gives up.’ What that really means is that it typically reverts to trying again every so often. In the meantime, it may “make up” an answer of its own as well. For example, if the IP address of a computer begins with “169.”, the DHCP server didn’t assign an IP address so Windows temporarily made one up. When that happens, it doesn’t really help much because it’s a usually a symptom of a larger problem – your networking and internet probably won’t work.