none
How does the client choose which DHCP server to get an address from?

    Question

  • Hi folks,

    We have 2 DHCP servers. We have split the ranges on the scopes to each dish out half of the range of IP addresses.

    On server 1 the range for distribution is 192.168.85.101 - 192.168.85.250 with .167-.250 excluded.

    On server 2 the range for distribution is 192.168.85.101 - 192.168.85.250 with .101-.166 excluded.

    The router has the 2 server IPs entered as helper addresses.

    My question is, how are the DHCP servers chosen? Is it some kind of round robin technique?

    I ask because on server 2, the scope is 97% used with 2 available, but on server 1 it's 30% used with 46 available.

    Should these 2 servers be better balanced as far as giving out the IP's?

    All of our lease durations are 1 minute if that matters at all.

    Thanks for any help!

     

    Thursday, April 28, 2011 4:37 PM

Answers

  • So, that's a good question.  The answer is that when the client sends out a DHCPDiscover packet (as an example), the Relay Agent (or IP Helper) will send out a unicast packet to all of the DHCP servers you configured in the relay setting.  By default, it just sends the packets out without any delay.  Then (in this case) both DHCP servers will respond (DHCPOffer) to the request.  The first response that the client receives, it will proceed with that request by sending out a DHCPRequest packet.  The server that offered the request will process the packet and send back a DHCPAck or DHCPNack depending on whether the server can in fact assign that IP.

    If you are not seeing a relatively even balance, it could most likely be that one server is more powerful than the other, with regard to being able to process the packets faster, or one is on a faster network link that the other.

    Most DHCP Relay agents have the ability to allow you to include a "delay" so you can try to get one DHCP server to be "favored" over the other.  You'll have to play with those settings.

    In reality, since you have about a 50/50 split in the scope, it really doesnt matter if one server is managing more IPs than the other.  If one server's scope fills up, then it will stop responding to new IP requests.

    The DHCP Process: Negotiating a Lease
    http://www.anitkb.com/2010/04/dhcp-process-negotiating-lease.html


    Visit: anITKB.com, an IT Knowledge Base.
    • Marked as answer by Braul08 Thursday, April 28, 2011 5:27 PM
    Thursday, April 28, 2011 5:14 PM

All replies

  • So, that's a good question.  The answer is that when the client sends out a DHCPDiscover packet (as an example), the Relay Agent (or IP Helper) will send out a unicast packet to all of the DHCP servers you configured in the relay setting.  By default, it just sends the packets out without any delay.  Then (in this case) both DHCP servers will respond (DHCPOffer) to the request.  The first response that the client receives, it will proceed with that request by sending out a DHCPRequest packet.  The server that offered the request will process the packet and send back a DHCPAck or DHCPNack depending on whether the server can in fact assign that IP.

    If you are not seeing a relatively even balance, it could most likely be that one server is more powerful than the other, with regard to being able to process the packets faster, or one is on a faster network link that the other.

    Most DHCP Relay agents have the ability to allow you to include a "delay" so you can try to get one DHCP server to be "favored" over the other.  You'll have to play with those settings.

    In reality, since you have about a 50/50 split in the scope, it really doesnt matter if one server is managing more IPs than the other.  If one server's scope fills up, then it will stop responding to new IP requests.

    The DHCP Process: Negotiating a Lease
    http://www.anitkb.com/2010/04/dhcp-process-negotiating-lease.html


    Visit: anITKB.com, an IT Knowledge Base.
    • Marked as answer by Braul08 Thursday, April 28, 2011 5:27 PM
    Thursday, April 28, 2011 5:14 PM
  • And that is a fantastic answer.

     

    Thanks for your time!

     

    -Braul08

    Thursday, April 28, 2011 5:29 PM
  • great...no problem at all.
    Visit: anITKB.com, an IT Knowledge Base.
    Thursday, April 28, 2011 8:03 PM