In Windows XP, you could do this. That method does not work in Windows 7; anyone know of a workaround?

For everyone that will be asking why I would want to do this:

On this network we have two IP subnets: and One is DHCP with internet access and the other is static. Currently I need either to change my IP configuration everytime I need to Google something, then change it back (pain in the ass). Get a DHCP address then statically configure that same address along with the other static address (dangerous to do on DHCP).

It is a little strange; but the subnet contains embedded devices that need to be configured how they will be in the field.

2 Answers 2


What a strange setup.

I don't think it can be done without a second NIC.

Having said that, you could make this easier by creating two batch files. The first one would do something like:

netsh interface ip set address name=”Local Area Connection” dhcp

when you want to surf the internet. The second one would do something like:

netsh interface ip set address name=”Local Area Connection” static

when you need your static.

Create the two diff batch files and just double-click them on your desktop when you need them.

  • Nice, that does make it much easier. But not having them both at the same time is annoying. I think dual IP static is easier for now. For other cases, I will definitely be using this to fill in for windows' lack of a ability to save IP settings profiles. Aug 5, 2010 at 14:28

The solution would be to get an dhcp reservation put in place for your computer so that you do not need to use dhcp and then you can use the two ip addresses at the same time.

Is there some reason this is not possible?

The alternative, as you have noted is to convert your dhcp ip address to static. (It is possible to create a batch file that reads the current settings and calls netsh to add the same settings as a static address and then you can add the second ip address)

This isn't recommended but it will work under certain conditions. For example, if you switch your computer off every day and your dchp server gives leases for longer than a day (and I think the default for windows servers is eight days), then that address is effectively yours (and safe to use) for the whole day. However you should change your network settings back to dhcp before you logoff, so that your lease is renewed when you restart. (There used to be Microsoft Knowledge base article that showed a way of running a batch when logging off which may or may not still work)

Even if you start your computer without first setting your network to DCHP, this will still be ok providing the server thinks the ip address you are using is still yours, which it will do unless your lease is up. You could get into ip conflicts if your machine crashes and then you leave it off for nine days, so the dchp server gives your ip address to someone else and then you start up and attempt the use the same address.

  • The simple reason of not to "get a dhcp reservation put in place" is that when you bring your laptop to Starbucks occasionally, it is difficult to request a DHCP reservation in Starbucks wifi server. so you laptop has to be "DHCP" when in the move.
    – Ben Lin
    Jun 19, 2017 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.