Bookmark and Share

19

Apr

2010

I run my laptop on several different networks when testing/trialling things. Some of them have different subnets, some of them have DHCP, some of them don’t.

Constantly jumping into the Control Panel to change my network settings when I change subnet was taking awhile, and another NIC isn’t an option here, so I made these quick .bat files that I can run when I need to update things

Set-IP-DHCP.bat:

netsh interface ip set address name="Local Area Connection 2" dhcp
netsh interface ip set dns name="Local Area Connection 2" dhcp

Set-IP-Static.bat:

netsh interface ip set address name="Local Area Connection 2" source=static addr=10.99.88.3 mask=255.255.255.240
netsh interface ip set dns name="Local Area Connection 2" source=static addr=10.99.88.5  
netsh interface ip add dns name = "Local Area Connection 2" addr = 10.99.88.5

Comments (0)

No comments yet! Why not write the first?

Post a comment

Post comments to this article by filling in your details below.