Monday, November 19, 2012

DHCP Failover Breaks with Custom Options

I was really itching to try out the new DHCP Failover goodies in Windows Server 2012. I ran into a couple weird issues when trying to configure it- hopefully I can save someone else the trouble.

When I tried to create the partner server relationship and configure failover, I'd get the following error: Configure failover failed. Error: 20010. The specified option does not exist.

We have a few custom scope options defined for our IP phones. Apparently, it won't propagate the custom option configuration during the partner relationship setup- you have to do it manually. I haven't found this step or error message documented anywhere in the context of failover configuration.

Since we only had one custom option, and I knew what it was, I just manually added it. If you don't know which options are custom and need to be copied over, it's not hard to figure out. In the DHCP snap-in on the primary server, right-click the IPv4 container and choose Set Predefined Options, then scroll through values in the Option Name dropdown with the keyboard arrows or mouse wheel until you see the Delete button light up (that'll be a custom value). Hit Edit and copy the values down, then in the same place on the partner server, hit Add and poke in the custom values. If you have lots of custom options, you can use netsh dhcp or PowerShell to get/set the custom option config.

Once the same set of custom options exist on both servers, you can do Configure Failover as normal on the scopes and it should work fine. The values of any custom options defined under the scopes will sync up just fine.

I also had one scope where Configure Failover wasn't an option. I had imported all my scopes from a 2003 DC awhile back, so I'm guessing there was something else corrupted in the scope config- just deleting and recreating the scope fixed the problem (it was on a rarely used network, so no big deal; YMMV).

Thanks for sharing your experience. Please refer to the blog at the below location which specifies the steps. http://blogs.technet.com/b/teamdhcp/archive/2012/09/11/migrating-existing-dhcp-server-deployment-to-windows-server-2012-dhcp-failover.aspxThe specific step mentioned in the blog that you would need to perform to migrate option definitions, user and vendor classes and server level options is -Import-DhcpServer –ComputerName DHCP2.corp.contoso.com –File C:\export\dhcpexp.xml –ServerConfigOnly –verbose –BackupPath C:\dhcp\backup\

Regarding the last issue that is mentioned towards the end of Configure Failover option not being available on one of the scopes, its most likely that the scope type was either BOOTP or BOTH. DHCP Failover is not supported for BOOTP scopes. When you recreated the scope its likely that you created a scope of type DHCP which then allowed you to configure failover for these scopes.

Thanks for sharing your experience. Please refer to the blog at the below location which specifies the steps for migrating an existing DHCP server to DHCP Failover - http://blogs.technet.com/b/teamdhcp/archive/2012/09/11/migrating-existing-dhcp-server-deployment-to-windows-server-2012-dhcp-failover.aspxThe specific step mentioned in the blog that you would need to perform to migrate option definitions, user and vendor classes and server level options is -Import-DhcpServer –ComputerName DHCP2.corp.contoso.com –File C:\export\dhcpexp.xml –ServerConfigOnly –verbose –BackupPath C:\dhcp\backup\

Regarding the last issue that is mentioned towards the end of your blog - Configure Failover option not being available on one of the scopes, its most likely that the scope type was either BOOTP or BOTH. DHCP Failover is not supported for BOOTP scopes. When you recreated the scope its likely that you created a scope of type DHCP which then allowed you to configure failover for these scopes.

I just had this same issue on my new DHCP servers.I think it was because at some point the scope had been imported at some point.Had some custom scopes 128,129 and 130 but the issue remained. After a lot of back and forth realised it was option 60 'PXE Client' that was missing, although it wasn't an option I could delete from the Predefined options window. Just manually created that option on the new server and that seemed to fix it.