Changing TCP/IP settings using the GUI property is very easy and simple. But what about if you want to have more fun doing it, and change the IP and DNS properties using the windows command prompt? If you are a Linux guru or a batch scripting wizard this should not be complicated, if you are new to the command prompt, well, today is a good day to start.
We will change the IP address and DNS servers using the built-in utility in Windows called “Netsh” is a nifty utility to change system networking settings, locally or remotely. To run Netsh click on start then RUN and type CMD press ENTER.
When the command prompt comes up type Netsh, now you should be ready to execute commands. Simple huh. Just to warm up type “interface ip show config“ that will show up the TCP/IP network settings.
Now, how you change the IP address and Default Gateway settings? To change the Local Area Connection TCP/IP settings type the following command:
interface ip set address name=”Local Area Connection” static 192.168.10.42 255.255.255.0 192.168.1.1
As you can see, when you use Netsh you need to specify what network properties you need to change, in the example above, we changed the network properties for “Local Area Connection” then we setup a static IP address, Subnet Mask and at the end the default gateway.
Changing the DNS IP address is almost identical as the procedure above, type the following command on the Netsh prompt:
interface ip set dns “Local Area Connection” static 192.168.1.1
To Setup WINS, type the following command:
interface ip set wins “Local Area Connection” static 192.168.1.1
To set the network properties to obtain the IP address from a DHCP server, type the following command:
interface ip set address “Local Area Connection” dhcp
To set DNS to obtain IP address automatically type the following:
netsh interface ip set dns “Local Area Connection” dhcp
There you have it, a useful tool to help you on your network configuration.












I have an IP address conflict and your tips did not end up working. Any other ideas?
Thanks a lot! That was very useful. It works when I have "IP conflict" error message, right? Thank you.
How do I identify whether the IP and DNS are static or obtained automatically using cmd?
I get access is denied at school.
Very helpful article. netsh is a useful tool which solved my IP address conflict problem.
thanks ! this was quite simple and it works!!
Here is an article that does basically the same thing, except it shows you how to do it remotely using psexec.
itswapshop.com/content/how-set-or-change-ip-addresses-gateways-subnet-masks-and-dns-servers-remotely-windows
This is really working! Very helpful article for all network support engineers!