Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic failover from one DHCP server to a backup DHCP server?

Status
Not open for further replies.

Karidian

IS-IT--Management
Mar 28, 2002
14
0
0
US
I have two DC (both 2003) with DHCP service running, but deactivated on one (for obvious reasons!) Is there an easy way to create a situation in which the backup will automatically start issuing IP#s if the primary stops?

Rob Pierce, Systems Administrator
Lipo Chemicals, Inc.
 
You could automate the activation of the scope with netsh, however, you'd have to watch out for false positives, so however you detect that the other server is down, you'd want to be absolutely sure before allowing this command to execute.

netsh dhcp server \\<ServerName> scope <SubnetID> set state 1

This is also assuming that you have conflict detection turned on and all that kind of good stuff.
 
Also, to have 2 DHCP servers running in the same domain, you'll need to have them control different IP scopes. There is no way for one DHCP server to let the other DHCP server know which IP addresses it has issued leases for that I'm aware of.

You would want the SCOPE on each DHCP server to issue different IP addresses but within the same subnet.

We've never had the need for more than one DHCP server here but we have migrated DHCP before.

Good luck.
 
lhuegele, that is correct if both dhcp servers have the same scopes activated, but in Karidian's scenario, he's talking about having an extra dhcp server with the scopes disabled. Perhaps he'll want to consider what you suggest, though. That is the recommended way to do it (redundancy) anyway.
 
Hi chipk, I see what you mean now, but wouldn't you still want to do it that way? I mean even if you have one of the DHCP server disabled, when you bring it online when the primary fails, that DHCP server still has no way to know what leases were assigned by the primary DHCP server, and I think you would still have duplicate IP address conflicts to deal with. In a disaster, I would think you wouldn't want those added headaches. Just my 2 cents. :)

Thanks,
 
That's what server side conflict detection is for, but you're right, you would run into some problems - as you would in almost any scenario where a DHCP server fails, I think unless you're clustering.

Pardon my rambling, and I understand if you stop reading now, but...the "secondary" would detect active IPs for any online computers (and not hand out any active, online IPs, because it would ping first to see if it was active), but it would not detect active *leases* from the "primary" for computers that are offline, and that would result in some conflicts when those offline computers come on and their addresses have been leased.

However, even with the preferred "split scope" method, you still run into problems if your scopes are more than 50% used (because it's not a perfect world). If you've got a class C scope that is split between two servers, and you're handing out 100 addresses from SERVER1, and 100 addresses from SERVER2, you'd have to expand the scope of the server that does not fail to accomodate the additional hosts that need IPs resulting in the exact same behavior as if you did it like Karidian is trying to do.

I think the only 100% safe way would be to use 33% of your scopes, and leave "white space" in the middle to activate in the event of a failure of one of your dhcp servers. That way, you could expand the scope into that white space, making additional, unique addresses available without causing any conflicts whatsoever.

There are probably other ways, but they would involve complicated routing setups, etc.
 
Thanks to all for your insight on this. Currently, one DHCP server should be enough for my needs. I have two configured the same, but one is deactivated. There is usually someone from my IT group on site who can easily activate the second scope if needed.

Rob Pierce, Systems Administrator
Lipo Chemicals, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top