Sunday, December 14, 2008

Easy switching network settings (home & office)

You can easily switch your network settings using the netsh command, instead of installing a lot of unnecessary software. Here are two examples, one for dhcp settings, and one for a static address. You can put it into a .bat file:

netsh interface ip set address "Net" source=dhcp
netsh interface ip set address "Net" static 192.168.0.xx 255.255.255.0 192.168.0.1 1

192.168.0.xx is your ip address, followed by the netmask and gateway. The last 1 is the metric. Optionally you can adjust your DNS values as well using set DNS instead of set address. This command helped me switching easily between my home network settings using dhcp and my office where there is a static address.

No comments:

Your Ad Here