How To Change Your IP Address Using the Command Prompt

Learn How to Change Your IP Address using Command Prompt In Windows in 2023 with our easy to follow step step by step guide.

Do you want to Change Your IP Address From the Command Prompt But don’t know How to do it? Then You are at the right article. In this article, you are going to learn how to Change Your IP Address From the Command Prompt.

Some people want to change their IP Address for pretty different reasons, and it’s actually not that hard to do so. You can do it by using a VPN, automatically updating it from the OS, or using a command prompt. If you want to change your IP Address using a command prompt, there are some ways you can do it.

The method will revolve around netsh commands, but we’ll explain more about that later. First, we should understand what an IP address actually is.

What’s An IP Address?

In simple terms, an IP address is a unique collection of numbers with the function of identifying various devices on a network. This series of numbers contains data related to location that can help routers, devices, and websites to identify and transmit information.

Computer/laptop users must have surely heard this term often. The IP address is useful for establishing communication using both the Internet and other networks. For this reason, the IP address is also called the home address for sending and delivering various data.

Why Does The IP Address Need To Be Changed?

Before going into how to set the IP Address, many people are wondering why it is necessary to change this address. There are many benefits underlying changing IP addresses, including:

  • Access to blocked websites – Authorities in a country regulate website access. To get access to the blocked websites, you need to change your IP address.
  • Maintain information – Changing the IP address is the same as hiding the true address. This can prevent various risks, like data misuse and hacker reconnaissance.
  • Resolve network issues – Router problems are often caused by an incorrect IP address. To overcome this, the IP address can be manually updated so that it can function properly again.
  • Accessing foreign content – Some content cannot be accessed because it originates in another nation. This access can be reopened by changing the IP address.

How to Change Your IP Address From the Command Prompt

To change the Windows IP Address from CMD, first we need to open the CMD application. So, to open the CMD application, there are several methods you can use.

Method 1: Type Windows key + R –> type CMD –> Enter

Method 2: Click Start or the Windows button to open the Start Menu, then type CMD and hit Enter.

Checking The Network Configuration

Before you can change the Windows IP Address via CMD, you’ll need to find the full name of the network for the interface you want to change. To do this, please type the command below in the CMD window:

netsh interface ipv4 show config
How to Change Your IP Address

Scroll down until you find the interface you want. In our example, we’ll change the Wi-Fi interface, which is called “Wi-Fi”. You will also see other names that your windows assign the interface like “Loopback Pseudo-Interface,” “Local Area Connection,” and “Ethernet.” Find the one you are looking for and copy the exact name.

How to Change Windows IP Address Using Command Prompt

Now, to change the IP address of a Windows computer using CMD, you must first execute the previous command given above to see the name of the interface whose IP address you want to change. Then, enter the next commands in the same format in the CMD:

netsh interface ipv4 set address name="YOUR INTERFACE NAME" static IP_ADDRESS SUBNET_MASK GATEWAY

For example, your command should look like this:

netsh interface ipv4 set address name="Wi-Fi" static 192.168.1.10 255.255.255.0 192.168.1.1

Then press enter. If an error message appears on the CMD screen, please double-check the command you entered, and ensure that it matches the format/syntax as in the example above.

After the command has been successfully executed and no error message appears, please try pinging the gateway or IP on the Internet, for example pinging 8.8.8.8. If successful, it means the command you entered is correct. If you have difficulty doing it, then easily use one of the VPNs for Windows, which is way easier to do. All you have to do is enable the VPN connection, and you’re good to go.

How to Add Windows Server DNS IP Using CMD

Using netsh command in CMD, we can also use it to change or add DNS server IP settings in Windows. To change/add DNS server IP on Windows with CMD, please enter the command with the following format/syntax:

netsh interface ipv4 set dns name="YOUR INTERFACE NAME" static IP_DNS_SERVER

For example, your command should look like this:

netsh interface ipv4 set dns name="Wi-Fi" static 8.8.8.8

If an error message appears on the CMD screen, please double-check the command you entered, and ensure that it matches the format/syntax as in the example above.

After executing the command and no error message appears, please try pinging a domain, like google.com. If the ping is successful, it means the command you entered is correct.

How to Set Windows DHCP IP Address Using Command Prompt

If your network uses a DHCP server to automatically obtain IP on client computers, then the above method cannot be used. To be able to automatically obtain the IP address, subnet mask, gateway, and DNS server configuration from the DHCP server, we have to use another command, as follows:

netsh interface ipv4 set dnsservers name"YOUR INTERFACE NAME" source=dhcp

Please change the interface name in the command above to the name of the interface whose settings you want to change in the DHCP client.

If the command has been executed successfully, the IP Address, Subnet Mask, Gateway, and IP DNS Server settings. Your computer will get the IP Address and DNS configuration automatically from the DHCP Server on your network.

Conclusion

So, That’s it. This article provides a full step-by-step guide on how to change your IP address using Command Prompt on a Windows computer. Additionally, the article also explains how to add DNS server IP settings and how to set a Windows DHCP IP address using the Command Prompt.

If you also want to format your pen drive or fix your corrupted pen drive using the command prompt, then we have also written a detailed guide on this. So you must check that article using the link given above.

Was this article helpful?

Yes
No
Thanks for your feedback!

Altaf Hassan a tech and gaming enthusiast with over 4 years of experience. He likes writing about tech, games, android tips, and how-to's. He loves playing games and learning new things about tech. That's why he created this website to share information.

Leave a Comment

Share via
Copy link