Windows Tutorials

How to Change Your Computers IP Address From the Command Prompt

In this tutorial you will be shown how to change your computers IP address from the command prompt. If you are using third party remote software that has remote CMD access changing the IP Address without interrupting a client while they are working on their computer does come handy.

 

 

Lets start by finding out what our network adapter name is.

Before we can change the IP address we need to find the full name of the network for the interface. To do this, type the following command:

netsh interface ipv4 show config

In my case I will be changing the static IP address for network interface named “Ethernet”.

 

Change Your IP Address, Subnet Mask, and Default Gateway

In this step we will be changing our IP address subnet mask and default gateway. To do this, you’ll issue a command using the following syntax:

netsh interface ipv4 set address name="Ethernet" static 192.168.2.100 255.255.255.0 192.168.2.1

Change Your DNS Settings

Set your DNS settings source to static

set dnsservers name="Ethernet" source=static

You’ll need to use the command twice: once to set your primary DNS server and once to set your secondary, or backup, DNS server. To set your primary DNS server, use the following syntax:

netsh interface ipv4 set dns name="Ethernet" addr="8.8.8.8"

or

set dnsservers "Ethernet" static="8.8.8.8"

To set your secondary DNS server, you’ll use a very similar command:

netsh interface ipv4 set dns name="Ethernet" addr="8.8.4.4" index=2

I hope this article was helpful, if you have any questions please feel free to contact me. If you would like to be notified of when I create a new post you can subscribe to my blog alert.


Discover more from Patrick Domingues

Subscribe to get the latest posts sent to your email.

author avatar
Patrick Domingues

Leave a Comment

Stay Informed

Receive instant notifications when new content is released.