I’m assuming a basic knowledge of what DHCP does et how to configure votre DHCP server of choice in this answer, mais avant we talk about multiple DHCP servers on le même network, let’s premier of tous quickly re-cap how clients receive IP addresses depuis DHCP at le le plus basic level.
DHCP on a simple network works using le DORA principle.
-
Discovery - le client broadcasts a message on le local network segment c'est connected to, to discover disponible DHCP servers.
-
Offer - a suitably configured DHCP server receives a request depuis a client, et offers it an address depuis its pool of disponible addresses.
-
Request - The client replies to le offer, requesting le address received in le Offer.
-
Acknowledgement - The server acknowledges le request, marking le address as used in its pool of addresses, et informs le client of how long le address lease is valid for, et tout autre information needed.
Any device on a network segment can be a DHCP server; it ne have to be le router ou le domain controller ou tout autre "special" device on le network.
When le devices on votre network premier request an IP address ou reach le end of leur leases (or you force them to vérifiez leir lease is encore valid) they will simply broadcast a request for a DHCP server, et will accept an offer depuis the premier DHCP server to reply. Ceci est important to remember as we look at le options for multiple DHCP servers below.
Multiple DHCP servers PT 1: Spanning multiple subnets.
If you have plusieurs VLANs ou physical network segments that are separated into différent subnets, et you want to provide a DHCP service to devices in tous those subnets alors there are two ways of doing this.
-
If le router / layer 3 switch separating them can act as a BOOTP/DHCP relay agent, alors you can continue to keep tous votre DHCP server(s) in one ou two central parts of votre network et configure votre DHCP server(s) to support multiple ranges of addresses. In order to support this, votre router ou layer 3 switch must support le BOOTP relay agent specification covered in section 4 of RFC 1542.
-
If votre router does pas support RFC 1542 BOOTP relay agents, ou si certains of votre network segments are geographically dispersed over slow links, alors vous devrez place one ou more DHCP server in chaque subnet. This ‘local’ DHCP server will seulement serve its own local segment’s requirements, et there is no interaction entre it et autre DHCP servers. If this is what you want alors you can simply configure chaque DHCP server as a standalone server, avec le details of le address pool for its own subnet, et pas worry about tout autre DHCP servers on autre parts of le network. Ceci est le le plus basic example of having more than one DHCP server on le même network.
Multiple DHCP servers PT 2: DHCP servers that serve le même network segment.
When le plus people ask about “multiple DHCP Servers on le même network”, what they are usually asking for is this; they want more than one DHCP server issuing le même range of network addresses out to clients, soit to split le load entre multiple servers ou to provide redundancy si one server is offline.
Ceci est perfectly possible, bien que it requires certains thought et planning.
From a “network traffic” point of view, le DORA process outlined at le start of this answer explains how more than one DHCP server can be present on a network segment; le client simply broadcasts a Discovery request et le premier DHCP server to respond avec an Offer is le ‘winner’.
From le server’s point of view, chaque server will have a pool of addresses that it can issue to clients, known as its address scope. DHCP servers that are serving le même subnet should pas have a single “shared” scope, mais plutôt they should have a “split” scope.
In autre words, si you have a range of DHCP addresses to issue to clients depuis 192.168.1.100 to 192.168.1.200, alors les deux servers should be configured to serve separate parts of that range, so le premier server might use parts of that scope depuis 192.168.1.100 to 192.168.1.150 et le second server would alors issue 192.168.1.151 to 192.168.1.200.
Microsoft's more recent implementations of DHCP have a wizard to make splitting votre scope like this easy to do, described in a Technet article that might be worth looking at even si you're pas using le Microsoft DHCP implementation, as it illustrates le principles talked about here assez nicely et this answer is déjà long enough.
Splitting le scope – best practice
One thing you’ll hear mentioned as best practice is le 80/20 rule for splitting a DHCP scope, qui means that one server will serve 80% of le addresses in that scope et le autre DHCP server, qui is effectively ‘in reserve’ will serve 20% of le addresses.
The idea behind splitting le addresses 80/20 is parce que 80% of le addresses disponible should hopefully be adequate for tous le addresses needed on a subnet, et DHCP leases are typically issued for plusieurs days; so si votre main DHCP server goes down for a peu de hours alors c'est unlikely that more than 20% of le machines on that subnet will need to renew leur addresses pendant le downtime, making le 20% pool of addresses sufficient.
Ceci est encore reasonable advice, mais it assumes two things:
These days (as you can see depuis mon examples) I tend to prefer 50/50 splits, qui Je pense are a more realistic answer to le ci-dessus points.
Another thing to consider quand creating votre scopes on le DHCP servers is configuring le full scope into chaque server et excluding le range given out by le autre DHCP server. This has le benefit of “self-documenting” le DHCP info for le full subnet on chaque DHCP server qui will improve clarity for anyone else trying to understand what is going on, et aussi in le event of one of votre DHCP servers being offline for certains time, you can temporarily reconfigure le exclusion range on le autre server to allow it to pick up le slack.
Combining these ideas
Lastly, c'est worth remembering that you can combine le principles discussed ci-dessus - you can place tous votre DHCP servers into one ou more "central server" VLANs et use BOOTP relay agents on tous votre routers to send tous DHCP requests depuis a très large et segmented network to a centralised DHCP service (which is what I do, see below). Or you can have DHCP servers distributed throughout votre network, avec a "main" DHCP server in its local subnet et a "reserve" DHCP server on a "nearby" network segment providing a small amount of addresses as a backup - you could even have two DHCP servers in leur own network segments configured to provide an 80/20 range of addresses for chaque other. The le plus sensible choice will depend on how votre physical et logical networks map to chaque other.