Change your ip and dns using netsh easily

Sometimes i am connecting different networks at home,school,work or a cafe and every connections are different and needed different  ip configuration some of static other dinamic . if you don’t like in this situation netsh can help you.

you can save save netsh consol command into a batch file and just run it when you needed to change your configuration.

for change ip

Usage:
netsh interface ip set address “Local Area Connection” staticipaddr subnetmask gateway metric

Example:
netsh interface ip set address “Local Area Connection” static 192.168.0.10 255.255.255.0 192.168.0.1 1
netsh interface ip set address “Local Area Connection” dhcp

Change dns example:
netsh interface ip set dns “Local Area Connection” static 192.168.0.200

Change dns as using dhcp
netsh interface ip set dns “Local Area Connection” dhcp

That’s it…

Advertisements