Easy Way To Change IP Address Through Command Prompt [CMD]

By the following simple commands we can change IP address easily through Command Prompt [CMD]

so lets begin and open cmd command prompt by pressing windows button + R and type CMD on the prompted dialox Box


Changing IP Address:-


There are two requirements for changing your IP address, One for your IP address, Subnet Mask, and Default Gateway and another for DNS settings. We are going to use netsh command for changing the IP address So you the following exact command as it is given 🙂

netsh interface ip set address name  = ” Local Area Connection ” static 192.168.0.1 255.255.255.0 192.168.0.254

The above IP address will take place as in:

  • Local Area Network is the name of the interface that we want to change the IP address.
  • We want to assign statistically an IP address of 192.168.0.1
  • We want to set the subnet mask of 255.255.255.0
  • We want to set default geteway of 192.168.0.254

with the above information we can easily switch the settings that are suited for our network.  you might be thinking how can we go with the static IP that is already in use for getting and address from DHCP…so in that case we have to look for following command  :-

netsh interface ip set address name=”Local Area Connection” Source=dhcp


Change DNS Settings:-


For DNS modification we have to change only two Settings, Primary and Socondary DNS server, to set primary DNS server we will use the following command :-

netsh interface ip set dns name=”Local Area Connection” static 192.168.0.250

The above Command address will reflect as:-

  • Local Area Network is the name of the interface of which we want to change the primary DNS setting.
  • 192.168.0.250 is the IP address of the DNS server.
  • specify the following Index Parameter to change the IP address of the secondary DNS server:

netsh interface ip add dns name=”Local Area Connection” 8.8.8.8 index=2

The above command wil set your network adapter named Local Area Connection to use Secondary DNS server address of 8.8.8.8{Its a Google’s public DNS server} now the last step is to set our DNS setting to be assigned dynamically which can be done by the following command:-

netsh interface ip set dnsservers name=”Local Area Connection” source=dhcp

That’s all 🙂 !!!!

About Bingout

Hey guys welcome to my blog, i m self made geeky about tech and i wanted to help people learn the technology education, the purpose of this blog is to serve as much as technology information related to desktops,laptops,windows operating system. new category will be added eventually. what makes this blog unique? One-stop for windows operating solution make this blog unique cos many people who want to know anything related to their windows operating system they either they google it or visit some forums, for them this blog will one stop for solution,though many articles will come up as time goes but stick around this blog and you will worth your time to learn some or to share some from this blog. Whats make special this blog? Taking into consideration most of the worldwide users are Windows operating system users so this make he specialty of this blog more articles based on windows troubleshooting issues, including windows 7,8,8.1,10 and many more articles will come eventually. Enjoy your stay on my blog and subscribe my blog with your email address to get informative articles to keep your desktop or laptops cleans and safe.
This entry was posted in How To, PC Maitainance and tagged , , , . Bookmark the permalink.

Reply