Join Timothy Pintello for an in-depth discussion in this video Understanding DHCP, part of Deploying and Configuring Core TCP/IP Services.
- Now that we've talked about IP address in general, let's go ahead and talk about DHCP. DHCP requires three components to work. The first component is the DHCP server. The DHCP server is a server on the network that issues IP address based on predefined scopes that the administrator assigns to each DHCP server. Along with the DHCP server there also needs to be DHCP clients. A DHCP client is a computer that receives its IP address from DHCP server.
Finally we have the DHCP protocol which is the communications protocol used by both the server and the client to issue and receive IP address along with other information. Dynamic allocation is where the DHCP server assigns IP addresses from a predefined scope of addresses. The scope of addresses a DHCP's allowed to use are set up when the DHCP server is configured.
DHCP servers also assign the IP addresses for specific links of time called a lease. The client must periodically renew their IP address, or they will lose the ability to continue using that IP address. Once a client releases an IP address or fails to renew an IP address the address is returned to the server, and added back into the server's scope so it can then be reassigned to another computer.
In this diagram we have a DHCP client and a DHCP server. We are going to use this diagram to show the different kinds of messages and requests that can be issued back and forth between a DHCP client and its DHCP server. When a client first boots up or first comes onto the network it sends out a DHCPDISCOVER request. This is a request that the client broadcasts to all computers on the network. Once the client broadcasts the DHCPDISCOVER request then a DHCP server will hear that request, and send back an DHCPOFFER to the client.
This offer will consist of a proposed IP address and other information such as default gateway and DNS addresses that the client can use. The client can then take that offer and issue a DHCPREQUEST to the DHCP server asking that it receive the offer the DHCP server made. Alternatively the client can issue a DHCPDECLINE message. The DHCPDECLINE message is basically the client saying, "No thank you, I don't want that offer." This will happen if the DHCP client has, for example, received another offer that has already accepted from a different DHCP server.
Assuming the client goes ahead and issues the DHCPREQUEST the DHCP server will then send a DHCP acknowledgement to the client. This is basically acknowledging to the client that the IP address and other parameters that the DHCP offered have now been assigned to a DHCP client, and the DHCP server will now remove this IP address from possible other assignments. Alternatively, the DHCP server may decide to not acknowledge the request from the client, in which case the DHCP server's basically saying, "No, I've changed my mind, you can't have that IP address." When this happens, the client has to start all over trying to discover an IP address.
Assuming the IP address exchange went back smoothly back and forth, occasionally the client may need additional information that was not in the original DHCP offer from the DHCP server. When that happens the client's able to issue a DHCPINFORM request asking the server for additional information that it needs. Finally when the client is done using an IP address it can issue a DHCPRELEASE request. This is basically the client informed the server that it no longer needs the IP address and is releasing it back to the server so the server can assign that IP address to a different client.
Automatic allocation is very similar to dynamic allocation which we've just discussed. The difference is the assignments are permanent. On a MAC allocation the DHCP server goes through the normal process of issuing an IP address to a client, except in this case the IP address is permanently assigned to the client, and cannot be assigned to any other computer on the network. If a client has received an automatic allocation from the server the only way the client can get a new IP address is if the IP address is manually reconfigured inside the client.
Manual allocation is where an IP address is manually assigned to specific computers. Now if you're assigning a manual IP to a computer then you will not want the DHCP server to assign that same IP address to a different computer. The main situation where a manual assignment occurs is when you assign IP addresses to servers on the network. Generally speaking you do not want your servers to have changeable IP addresses. You want them to have permanent set IP addresses so all the other computers on the network will know where to find them.
When you want to set aside an IP address for a server or something like that on the network you need to set that IP address aside in the DHCP server in something called a reservation so the DHCP server will not try to assign that IP address to another computer on the network. Once an IP address is in a DHCP server's reservation it cannot be assigned via DHCP.
Need to configure simple services for your users, such as file sharing and printers? Check out Configuring Basic Microsoft Services.