how to switch between dhcp address assignment and static alternate conf without rebooting

  • Thread starter Thread starter m0rg4n
  • Start date Start date
M

m0rg4n

Hello from Spain,

I was wondering if there's a way of switching between a dhcp address
assignment and a static alternate configuration without rebooting. Recently
i was configuring and vmware machine and i realised that although i changed
to a new network without dhcp the ipconfig command was still showing the
address aquired by DHCP instead of the static alternate configuration i
preconfigured.

Thanks.



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4305 (20090804) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
This is not usual. The change should apply as soon as the network
control-panel is closed.
 
I was wondering if there's a way of switching between a dhcp
address assignment and a static alternate configuration without
rebooting. Recently i was configuring and vmware machine and i
realised that although i changed to a new network without dhcp the
ipconfig command was still showing the address aquired by DHCP
instead of the static alternate configuration i preconfigured.

You might try bringing up a command prompt and entering the commands:

ipconfig /release
ipconfig /renew

When it tries to renew and can't find a DNS server, it may fall back to
the alternate configuration.

HTH,
John
 
m0rg4n said:
Hello from Spain,

I was wondering if there's a way of switching between a dhcp address
assignment and a static alternate configuration without rebooting.
Recently i was configuring and vmware machine and i realised that although
i changed to a new network without dhcp the ipconfig command was still
showing the address aquired by DHCP instead of the static alternate
configuration i preconfigured.

Thanks.

You can switch between static and dynamic IP addresses either via the
Control Panel or with netsh.exe.
 
How can you renew a static IP address?

You can't. But an alternate static address will only be applied after
the DHCP attempt fails. The attempt to renew a DHCP address when no
DHCP server is available may allow it to roll over to the alternate
static configuration.
 
Hello from Spain,

I was wondering if there's a way of switching between a dhcp address
assignment and a static alternate configuration without rebooting. Recently
i was configuring and vmware machine and i realised that although i changed
to a new network without dhcp the ipconfig command was still showing the
address aquired by DHCP instead of the static alternate configuration i
preconfigured.

Thanks.

Use the "netsh" command to specify the IP configuration. You can type
it a command prompt or include it in a .bat file.

To specify a static address:

netsh interface ip set address <connection> static <ip> <mask>
<gateway> <gateway metric>

For example:

netsh interface ip set address "Local Area Connection" static
192.168.0.100 255.255.255.0 192.168.0.254 10

netsh interface ip set address "Wireless Network Connection" static
10.20.30.100 255.0.0.0 10.0.0.1 20

To specify a DHCP address:

netsh interface ip set address <connection> dhcp

For example:

netsh interface ip set address "Local Area Connection" dhcp
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Desktop Experience)

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
Back
Top