Combining two DHCP Servers, same scope

I  have two DHCP Servers on a /16 network. Running 2016. Both have the same scope, but different ranges of exclusions. Example:

DHCP1 - Scope 1 10.10.0.0
10.10.0.0 - 10.10.10.255 For Distribution
10.10.0.0 - 10.10.3.255 excluded
10.10.5.1 - 10.10.7.255 excluded

DHCP2 - Scope 1 10.10.0.0
10.10.0.0 - 10.10.10.255 for Distribution
10.10.4.1 - 10.10.4.255 excluded
10.10.8.1 - 10.10.10.255 excluded

So if you do the mental math there... it's quite messy. As a side note, in the actual environment there is about 30 different exclusions. As far as I can tell, they don't overlap... but it is quite confusing. I want to fix this!

What would be the best way to combine these two DHCP Servers in to one? I want to turn DHCP1 in to my primary, with DHCP2 in to a hot standby. But I want to try my best to not lose the reservations/leases already given out on DHCP2...

I tried a export/import, seeing if I could possibly just edit the export and combine both exports in to one, but it doesn't look like it is plain text.

Any ideas?
inTheKnowSeaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Cliff GaliherCommented:
There really is no good way to do this while preserving the leases. Just let them expire and get new leases. That's rather a major point behind DHCP. Otherwise, might as well just go static.
1
inTheKnowSeaAuthor Commented:
That's what I figured, but thought I would put a feeler out there if anyone had any ideas.

I did do some excel work and have identified all leases that don't exist on both servers, so if I really have to I can make those manually.
0
nociSoftware EngineerCommented:
Two non-windows (ISC-)DHCP server could be  made to cooperate where both can handle ALL requests but only one will answer at a time.
Both will know the leases   Possibly windows DHCP could do the same?

Specification:
https://tools.ietf.org/html/draft-ietf-dhc-failover-12#section-5.3

man page:
https://linux.die.net/man/8/dhcpd
Look for failover...
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

inTheKnowSeaAuthor Commented:
Windows definitely can, I got that part figured out. I am just trying to figure out the best way to get them in a state where I can set up that fail over without causing issues.
0
JustInCaseCommented:
There is a lot of resources how to configure failover with load balancing for DHCP windows server 2012/2016.
DHCP Failover Load Balance Mode
Step by Step DHCP Failover in Windows Server 2016
Step-by-Step: Configure DHCP for Failover  Windows Server 2012
You can find also details in book MCSA Windows Server 2016 Complete Study Guide: Exam 70-740, Exam 70-741
0
nociSoftware EngineerCommented:
@inTheKnowSea: i don't mean by splitting scopes, i mean fully redundant. Where one will do the part of the other if that one fails.
0
Luc FrankenEMEA Server EngineerCommented:
There are some steps involved, but it surely can be done.
Of course, someone else has already done it before. You can use the powershell script from:

http://markgossa.blogspot.co.uk/2015/08/migrate-8020-split-scope-to-dhcp.html

In short what it does.
1) backup the servers and scopes
2) disable the scope on one server
3) copy leases (Get-DhcpServerv4Lease -ComputerName $sourceServer -ScopeId $scopeId | ? {$_.AddressState -notmatch "Reservation"} | Add-DhcpServerv4Lease -ComputerName $destinationServer -ScopeId $scopeId)
4) copy any reservations ($SourceServerReservations = Get-DhcpServerv4Reservation -ComputerName $sourceServer -ScopeId $scopeId | Add-DhcpServerv4Reservation -ComputerName $destinationServer -ScopeId $scopeId -ErrorAction SilentlyContinue)
5) delete the scope from the other server
6) create the failover relationship

Simply run it as
Migrate-DHCPFailover -ScopeId 10.0.1.0 -SourceServer contdc02 -DestinationServer contdc01 -ExclusionRanges 10.0.1.1-10.0.1.1 -SharedSecret Secret1

Open in new window


One thing I found in the script, it has no check if source & destination server are filled in with the same name. Make sure you don't accidentally type two times the same servername as it'll remove the scope from that server without migrating anything.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
inTheKnowSeaAuthor Commented:
So I just did a simple export of all leases on both servers. Did some excel work to find all leases on DHCP2 that did not exist on DHCP1. There wasn't many. From there I added the leases to DHCP1. Deleted everything on DHCP2, setup failover. Quick and easy.

Thanks for all the assistance.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2016

From novice to tech pro — start learning today.