Static IP and DHCP on the same network adapter in Windows 7
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 172.19.8.10 255.255.255.0 172.19.8.1
when you need your static.
Create the two diff batch files and just double-click them on your desktop when you need them.
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.