Share via


Switch active and standby DHCP servers in existing failover relationship

Question

Tuesday, May 9, 2017 7:07 PM

Hi all, I have an existing DHCP failover relationship between 2 servers. The relationship is configured in Hot Standby mode. There are approximately 35 scopes. Currently DHCP2.mydomain.com is the Active server, and DHCP1.mydomain.com is the Standby. Management would like me to switch it so that DHCP1.mydomain.com is the active and DHCP2.mydomain.com is the standby server.

Output of Get-DHCPserverv4Failover on DHCP2.mydomain.com below.

Name                : dhcp2.mydomain.com-dhcp1.mydomain.com
PartnerServer       : dhcp1.mydomain.com
Mode                : HotStandby
LoadBalancePercent  :
ServerRole          : Active
ReservePercent      : 5
MaxClientLeadTime   : 01:00:00
StateSwitchInterval :
State               : Normal
ScopeId             : {10.128.4.0, 10.128.7.0, 10.128.155.0, 10.128.153.0...}
AutoStateTransition : False
EnableAuth          : True

Output of Get-DhcpServerv4Failover when run on DHCP1.mydomain.com

Name                : dhcp2.mydomain.com-dhcp1.mydomain.com
PartnerServer       : dhcp2.mydomain.com
Mode                : HotStandby
LoadBalancePercent  :
ServerRole          : Standby
ReservePercent      : 5
MaxClientLeadTime   : 01:00:00
StateSwitchInterval :
State               : Normal
ScopeId             : {10.128.4.0, 10.128.7.0, 10.128.155.0, 10.128.153.0...}
AutoStateTransition : False
EnableAuth          : True

I am thinking I can use the set-dhcpserverv4failover command to make the change I am desiring, but not quite sure of the syntax. Can anyone provide the correct syntax to swap the standby and active servers in an existing DHCP failover relationship? Thanks.

All replies (5)

Tuesday, May 9, 2017 8:44 PM

By the way, I'm aware I could just delete the failover relationship and recreate it with DHCP1 as the primary. However, unless I'm mistaken, when I delete the failover relationship, all the leases are doing to be removed from DHCP1 and then I would need to export them all from DHCP2 to an xml file and import into DHCP1. I would rather not go through that process if possible.


Wednesday, May 10, 2017 8:59 AM

Hi  Subversive99,

>I am thinking I can use the set-dhcpserverv4failover command to make the change I am desiring, but not quite sure of the syntax.

With "set-dhcpserverv4failover command", the** Set-dhcLoadBalancePercent**, MaxClientLeadTime, StateSwitchInterval, AutoStateTransition, and SharedSecret parameters can be specified. While we can't use this command to change the active and hot standby mode:

https://technet.microsoft.com/en-us/library/jj590742%28v=wps.630%29.aspx?f=255&MSPPError=-2147217396

And after researching, seems no command to change the standby and active mode in an existing DHCP failover relationship neither via Commandlet nor DHCP GUI. We need to re-configure the DHCP failover to change it.

>However, unless I'm mistaken, when I delete the failover relationship, all the leases are doing to be removed from DHCP1 and then I would need to export them all from DHCP2 to an xml file and import into DHCP1. I would rather not go through that process if possible.

I tested in my lab, when we re-configure the DHCP failover relationship, the DHCP lease won't be affected. Clients won't discover the changes in DHCP server.

On the original DHCP failover, right click the scope>Deconfigure Failover, refresh the master and the partner server, then configure failover again, this time, choose the partner DHCP server to be active mode.

Best Regards,

Anne

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Wednesday, May 10, 2017 6:14 PM

So I have to do this on each scope?

DHCP1 will retain all the addresses it had when I deconfigure failover?

Thanks.


Monday, May 15, 2017 6:53 AM

Hi Subversive99,

>So I have to do this on each scope?

Based on my research, it seems we need to do so.

>DHCP1 will retain all the addresses it had when I deconfigure failover?

Yes, it is.

Best Regards,

Anne

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Monday, May 29, 2017 6:05 AM

Hi,

Just to check if the above reply could be of help? If yes, you may mark useful reply as answer, if not, welcome to feedback.

Best Regards,

Anne

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].