Easy Windows XP switch between static IP and DHCP
January 21, 2004 4:04 AM   Subscribe

In Windows XP is there any way to do a quick switch between DHCP and a given IP address? My home network connection uses DHCP - my work uses static. I've tried different hardware profiles with no success.
posted by LukeyBoy to Computers & Internet (5 answers total)
 
The easiest, albeit hardly the cheapest, way is to use two different NICs. Each one gets its own IP configuration.

The next easiest would be to make a couple of batch files like this:

dhcp-on.cmd:
netsh interface ip set address "Local Area Connection" dhcp

dhcp-off.cmd:
netsh interface ip set address "Local Area Connection" static 192.168.1.100 255.255.255.0 192.168.1.1

Substituting static address, netmask, and gateway for the last three values, and the name of your interface for the value in quotes.

Then stick shortcuts on your desktop.
posted by majick at 4:53 AM on January 21, 2004 [1 favorite]


In the Windows XP TCP/IP configuration there is a tab for Alternate Configuration. You put the information in the alternate tab that you want it to use when a DHCP Server is not found.
posted by TuxHeDoh at 5:23 AM on January 21, 2004


Netswitcher has worked nicely for me in the past, if you feel the need to pay something. I like majick's idea best. I'm too impatient to wait 30 seconds for XP to roll over to the alternate configuration.
posted by cairnish at 8:25 AM on January 21, 2004


Majic's solution is the one I've been using for months. I have four work locations, each with a different configuration. The netsh command does the trick beautifully.
posted by five fresh fish at 11:02 AM on January 21, 2004


Excellent answers, thanks. The alternate configuration is the one I'll probably use - although this netsh looks quite cool.
posted by LukeyBoy at 4:05 PM on January 21, 2004


« Older Does anyone have links to good RSS feeds...   |   State of the Union Newer »
This thread is closed to new comments.