Instructions to change IP address from Command Prompt

To change the IP address on the computer is not difficult, you can use Control Panel. However, you may not know that using Command Prompt can also change the IP address. Especially using the Command Prompt to change the IP address is much faster than using Control Panel.

Instructions to change IP address from Command Prompt Picture 1

The netsh command allows you to configure some settings of the network connection on the Windows operating system. However, this process requires Command Prompt under Admin.

To open the Command Prompt under Admin:

On Windows 10 or Windows 8.1, right-click the Start button on the Taskbar or press the Windows + X key combination to open Power User Menu, here you click Command Prompt (Admin).

On previous versions, you enter the command prompt into the Search box on the Start Menu, then on the search results list, right-click the Command Prompt and select Run as Administrator.

View network connection information:

Before proceeding to change the IP address and related information, you need to find the full name of the network connection you want to change. To do this you use the command:

netsh interface ipv4 show config

Instructions to change IP address from Command Prompt Picture 2

Scroll down to find it until you find the interface you want to find. In the example above, Network Administrator modifies Wifi interface, so we proceed to find Wifi. Also see other default names that Windows assigns on interfaces, such as Local Area Connection, Local Area Connections * 2 and Ethernet.

Just find the correct network connection name and copy and paste it into Notepad to use in the next steps.

Change IP address, Subnet Mask and Default Gateway:

To change the IP address, Subnet Mask and Default Gateway , you use the command:

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

Suppose you enter the statement as:

netsh interface ipv4 set address name = "Wi-Fi" static 192.168.3.8 255.255.255.0 192.168.3.1

In the command in the example above, replace the information:

- Interface name is Wifi

- Set IP address to 192.168.3.1

- Set the Subnet mask to 255.255.255.0

- Set the Default Gateway to 192.168.3.1

And if you use a static IP address but you want to switch using an IP address automatically assigned by the DHCP server, such as a router, you can use the following command:

netsh interface ip4 set address name = 'YOUR INTERFACE NAME' source = dhcp

Change DNS Settings:

Alternatively, you can use the netsh command to change DNS servers. Third-party DNS Server applications such as Google Public DNS and OpenDNS can support faster and more reliable DNS servers provided by ISPs.

Whatever the purpose of changing your DNS server, you can do it on the router. If you want to change the DNS server of a computer, you can easily do so with the netsh command.

You will have to use two commands: a command to set up the primary DNS server and a command to set up a secondary DNS server or backup a DNS server .

To set up a primary DNS server , use the command:

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

Suppose if you set Google's primary public DNS server, 8.8.8.8 you use the command:

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

To set up a secondary DNS Server , use the command:

netsh interface ipv4 set dns name = "YOUR INTERFACE NAME" static DNS_SERVER index = 2

Suppose if you wanted to set the secondary DNS of the Google Public DNS secondary server to 8.8.4.4 you would use the command:

netsh interface ipv4 set dns name = "Wi-Fi" static 8.8.4.4 index = 2

With IP address, you can change to set DNS automatically. Use the command:

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

Refer to some of the following articles:

  1. Disable IPv6 to troubleshoot Internet connectivity issues on Windows computers
  1. Here's how to check if your IP address is static or dynamic
  1. Conflict of IP address error when connecting to Wifi on iPhone, iPad, this is a fix

Good luck!

3.9 ★ | 15 Vote

May be interested

  • The most complete and easy way to use CMD (Command Prompt)The most complete and easy way to use CMD (Command Prompt)
    instructions on how to use the cmd command line tool cmd (command prompt) from a to z. the most basic knowledge about the cmd tool that you need to know
  • How to change the IP address for the phoneHow to change the IP address for the phone
    there are many reasons users want to change their ip address and there are many types of user ip addresses that can be changed. it is important to find out what kind of address you want to change before continuing.
  • How to open Command Prompt on Windows 10, 8, 7, Vista and XPHow to open Command Prompt on Windows 10, 8, 7, Vista and XP
    command prompt is one of the command line interface programs used to execute commands in the windows operating system. the article will guide you how to open command prompt on windows 10, 8, 7, vista and xp.
  • How to Make Command Prompt Appear at SchoolHow to Make Command Prompt Appear at School
    this wikihow teaches you how to access command prompt on a windows 10 school computer. although you may be able to open command prompt if only the file path to command prompt is blocked, there is no way to bypass an administrator lock on...
  • 6 Best Command Prompt Alternatives for Windows6 Best Command Prompt Alternatives for Windows
    do you find the command prompt a bit complicated and feel you need a tool that is easier to use? this is where other terminal emulators come into play!
  • How to use Xcopy command in Command PromptHow to use Xcopy command in Command Prompt
    knowing how to use xcopy command in command prompt, you will easily use commands in cmd professionally. in particular, the xcopy command is extremely useful for those who copy and copy data on the computer.
  • 6 Cool Tricks You Can Do in Windows Command Prompt6 Cool Tricks You Can Do in Windows Command Prompt
    command prompt has a ton of capabilities, and many people doubt they know what a few lines of code can do. next time you're bored with your pc, try these cool command prompt tricks for yourself.
  • How to Change Your Computer's Date and Time Using Command PromptHow to Change Your Computer's Date and Time Using Command Prompt
    today's tipsmake will show you how to change the date and time on a computer running windows operating system through the command prompt application. if you don't have administrator access, you won't be able to change the date and time.
  • How to fix IP 169 address errorHow to fix IP 169 address error
    when you cannot connect to the internet and your computer seems to have an ip address starting with 169, the computer has an ip address error 169. this type of error occurs when a windows computer requests an ip address but does not receive.
  • All Frequency Restart, Shutdown, Remote Off ... with Command PromptAll Frequency Restart, Shutdown, Remote Off ... with Command Prompt
    often users often turn off the computer, restart the computer ... using the shutdown options on the start menu. however, few of us know that using command prompt can also shutdown, restart the computer, schedule a computer shutdown or enable hibernation, ... and even if you have admin rights you can turn off other computers remotely.