Is it possible to configure a static IP alternative for all adapters using the registry?

0

I was reading the alternative configuration documentation, and thought I'd try to setup a fallback static IP to simplify my setup:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters

"IPAutoconfigurationEnabled"=dword:0
"EnableDHCP"=dword:0
"DefaultGateway"="192.168.99.1"
"IpAddress"="192.168.99.199"
"Subnetmask"="255.255.255.0"

The auto configuration is disabled, but the static IP never takes effect. Is there something I'm missing here?

Paul Sweatte

Posted 2013-08-16T17:36:19.603

Reputation: 613

Yes, it works via the GUI, but I can't find those values in the registry. Never takes effect means the default DHCP connection fails after a minute and I get no address. – Paul Sweatte – 2013-08-16T18:10:19.540

Answers

2

As described in the documentation, you should enter the alternate static ip address via the GUI. It turns out that the ip, mask, gateway, DNS server data of the alternate configuration are not saved in "clear text", but rather under HKLM\SYSTEM\CurrentControlSet\Services\DHCP\Configurations\Altenate_{GUID of the NIC} as a REG_BINARY key named Options and a reference to that is placed within HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID of the NIC} in key ActiveConfigurations.

You might give it a try with putting your registry settings inside the interface specific key instead of the global TCP/IP paramaters. Or, to get the effect for all adapters, maybe move the reference I described from a specific adapter up to th eglobal TCP/IP parameters. I haven't tried either of these, but you never know.

Hagen von Eitzen

Posted 2013-08-16T17:36:19.603

Reputation: 548