How does a client choose between two DHCP servers in the same network?
Solution 1
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.
Solution 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/
Related videos on Youtube
lor
Updated on September 18, 2022Comments
-
lor over 1 year
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?
-
joeqwerty about 6 years
Does the client choose the one that sends the DHCPOFFER first
- Yes. -
Esa Jokinen about 6 yearsPossible duplicate of Can I have multiple DHCP servers on one network?
-
-
joeqwerty about 6 yearsThe 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.