Quickly switch between networks

Most of the laptop users must have faced this problem. You have to switch between DHCP and static IP settings when you switch between different networksat home and in office. There ways to switch profiles but netsh comes in handy if you want to quickly switch networks. On the Windows command prompt, give the following commands for the type of network you want to switch to.


Using DHCP (dynamic IP Address)
-----------------------
netsh interface ip set address name="Local Area Connection" dhcp
netsh interface ip set dns name="Local Area Connection" dhcp


Using Static IP Address
----------------------
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.2 mask=255.255.0.0
netsh interface ip set address name="Local Area Connection" gateway=192.168.0.1 gwmetric=0
netsh interface ip set dns name="Local Area Connection" source=static addr=192.168.0.1
netsh interface ip add dns name = "Local Area Connection" addr = 192.168.0.2

1 comment:

Alex said...

try this one http://www.jitbit.com/netprofileswitch.aspx, also switches proxy settings, printer, network shares etc (along with IP/DNS/gateway of course)