2

I read on netacad that there may be more than one DHCP servers in the same network and I was wondering, how does the client choose between them?

Does the client choose the one that sends the DHCPOFFER first or there is something else?

lor
  • 21
  • 1
  • 1
  • 2
  • 4
    `Does the client choose the one that sends the DHCPOFFER first` - Yes. – joeqwerty Mar 22 '18 at 15:46
  • 2
    Possible duplicate of [Can I have multiple DHCP servers on one network?](https://serverfault.com/questions/368512/can-i-have-multiple-dhcp-servers-on-one-network) – Esa Jokinen Mar 22 '18 at 15:47

2 Answers2

4

DHCP is first-come, first-serve. You should not have two competing DHCP servers on the same network without some form of fail-over or HA between them, otherwise you run the risk of having duplicate IP's on the same network.

Andrew
  • 2,057
  • 2
  • 16
  • 25
  • 5
    The key phrase in this answer is "competing DHCP servers", meaning two or more DHCP servers configured with the same Scope IP address range. It's perfectly normal to have multiple DHCP servers servicing clients so long as they are configured in such a way as to not assign ip addresses in a manner that would create an ip address conflict. As you mentioned, some form of HA, fail-over, or split-scope is perfectly acceptable. – joeqwerty Mar 22 '18 at 15:53
2

You are correct, DHCP is first-to-answer as far as the client is concerned. This doesn't mean you can't (or shouldn't) have multiple DHCP servers for a given subnet; it just requires planning.

I prefer to use a primary and a secondary DHCP server with split scoping. The details of an example subnet:

  • Subnet is 192.168.1.0/24
  • The overall scope is configured to distribute 192.168.1.3 to .254
  • Primary DHCP server is configured with 0ms delay in responding, and is set to exclude 192.168.1.201 to .254
  • Secondary DHCP server is configured with 1000ms delay, excludes 192.168.1.3 to .200

For doing this with a Windows environment, this link discusses this in greater depth - https://blogs.technet.microsoft.com/teamdhcp/2009/01/22/how-to-configure-split-scope-using-wizard/

Rob Pearson
  • 419
  • 2
  • 12