Windows

Understand the DHCP lease process for Windows 2000 Server

DHCP is a very simple and efficient protocol in Windows 2000 Server. When clients request an IP address and other configuration data from DHCP, they don't have full TCP/IP initialized (because they don't have an IP address), so instead they use broadcasts to find DHCP servers. Get the basics on the DHCP lease process.

DHCP is a very simple and efficient protocol in Windows 2000 Server. When clients request an IP address and other configuration data from DHCP, they don't have full TCP/IP initialized because they don't have an IP address, so instead they use broadcasts to find DHCP servers.

The first packet broadcast is DHCPDiscover. As the name indicates, the client tries to discover all DHCP servers on the network. Because the client doesn't have a valid IP address, it uses 0.0.0.0 as the source address and sends the packet as a broadcast to a local network.

When DHCP servers get this packet and they have an IP address to lease to the client, they reply with DHCPOffer. This contains the IP address and additional configuration information (like subnet mask and default gateway) that the DHCP server can lease to the client.

Sometimes clients might receive multiple DHCPOffer packets from several different DHCP servers. In this case, they select the server that responded first and send it the DHCPRequest packet. This packet confirms which DHCP server (and thus which IP configuration data) was selected. All other DHCP servers rescind their offers, and the chosen one sends a DHCPAck message.

DHCPAck acknowledges the lease and provides additional configuration data. Once clients have this packet, they have all the TCP/IP configuration data they need to communicate with other computers that use the TCP/IP protocol.

Miss a Windows 2000 Server tip?

Check out the Windows 2000 Server archive, and catch up on previous Windows 2000 Server columns.

Want more Windows 2000 Server tips and tricks? Automatically sign up for our free Windows 2000 Server newsletter, delivered each Tuesday!

5 comments
irshadbaba2002
irshadbaba2002

how to configure isa server with win2000 server domain

Chris Saunders
Chris Saunders

...but what happens when two clients request an address at the same time? Surely they'd both pick up the first DHCPOffer they see and both start using the same IP address? Obviously the server would only ack one of them, but how would they know which one was successful and which one wasn't?

InvisibleBoss
InvisibleBoss

As long as the request for an IP lease is sent to the same DHCP server, the server deal with the requests subsequently, even if two units request "at the same time". The IP address is bound to each unit's MAC address, and cant me "mixed" at the DHCP server. Still IP conflicts do happen, but rarely because the DHCP server "misses". The most likely reasons for a conflict are: 1. A unit (PC) has a FIXED IP address set up within the range the DHCP server uses. 2. A unit got a leased IP address, and the DHCP server for some reason shuts down, and restart. In such situation, the server will restart without a lease database. The "started" unit (PC) will maintain the "leased" IP, but the server MIGHT lease the same address to a unit started AFTER this. 3. There are multiple DHCP servers in the network (servers or routers). And they are wrongly set, overlapping each other. Most likely happen when aditional routers are installed in (SOHO) nets, and one forget to disable the DHCP server function.

mmoran
mmoran

... so I'm thinking that if the offer is tagged with the client's MAC then there wouldn't be any confusion. If this isn't the case, hopefully the author or another reader will provide the correct explanation.

rickky
rickky

What is the best lease duration to use on a DHCP server? Our network doesn't change alot, but most servers use 8 hours for a lease. Would it cut down network traffic much to reset the duration to 24 hours or up to a week?