WindowsLoop

How to Change IP Address in Command Prompt (Renew IP)

To renew or change the IP address, you can use the netsh command. Here’re the steps to change the IP address in Command Prompt in Windows 10.

When connected to a network, the Windows computer will automatically get a new IP address as long as it is configured to “ Obtain an IP address automatically “. Generally, having the IP address auto-assigned is pretty helpful as you don’t have to configure any extra settings to connect to a network. For instance, you can just plug-in the ethernet cable or connect to a WiFi network and you are ready to go thanks to the auto-config option in Windows 10.

Though Windows can automatically obtain an IP address without any hassle, there might times where you need a specific IP address. For example, to share files in your local network, having a static IP address is really helpful. This eliminates the need to reconfigure the IP address every time you want to access the network drive. In these kinds of cases, you need to change the IP address in Command Prompt .

Thankfully, with just a couple of commands, you change the IP address from Command Prompt. Here are the exact steps you should follow.

Steps to Change IP Address in Command Prompt

To change the IP address from the Windows Command Prompt, there are two major steps. First, you need to know the network interface name and then use it to set the IP address. It is pretty easy. Follow the steps as shown below and you will be good.

  • First, press the Windows key to open the Start menu .
  • Now, type “ Command Prompt ” in the search bar.
  • Right-click on the Command Prompt and select the “ Run as administrator ” option.
  • Execute the below command to get the network interface name. netsh interface ipv4 show config

Change-ip-address-in-command-prompt-040920

  • Once you have the interface name, execute the below command while replacing “IP_Address”, “Subnet_Mask”, and “Gateway” with the actual IP address you want to assign, subnet mask, and gateway respectively. netsh interface ipv4 set address name="Interface_Name" static IP_ADDRESS SUBNET_MASK GATEWAY
  • After assigning the IP address, close the command prompt window .

That is all. It is that simple to change the IP address in the command prompt.

Note: You can get the subnet mask and gateway addresses from the router or from your ISP.

If you want the IP address to be assigned automatically, execute the below command. This will set the network interface from Static IP to DHCP. DHCP will automatically get a new IP address from the router.

That is all. I hope that helps. If you are stuck or need some help comment below and I will try to help as much as possible. If you like this article, check out how to change the network name in Windows 10 .

Leave a Comment Cancel Reply

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

StackHowTo

  • How To Set Static IP Address in Windows 10 using CMD

I n this tutorial, we are going to see how to set static IP address in Windows 10 using CMD . There are several methods to set a static IP address in Windows 10. In this tutorial, we will see together how to set a static IP address from the Command Prompt.

In Windows 10, setting a static IP address for your device is an essential configuration that may be required in a number of scenarios. For example, if you plan to share files or a printer on a local network, or when you try to set up port forwarding.

Using CMD may seem difficult for some users, yet it is one of the fastest ways to assign a static IP address in Windows 10.

how to change ip using cmd

  • IPv4 address
  • Subnet mask
  • Default gateway
  • DNS servers

how to change ip using cmd

  • Types of Ethernet Cable
  • How to Install CAB File in Windows 10 using Command Line
  • How to Change Multiple File Extensions at Once in Windows 10 Using PowerShell
  • How to Make Taskbar Buttons Smaller in Windows 10
  • How to Run AutoHotKey Script on Startup Windows 10
  • How to Remap Keyboard Keys in Windows 10
  • How to Search Files by Size in File Explorer on Windows 10
  • How to Check Internet Data Usage in Windows 10
  • How to Change Folder Background Color in Windows 10
  • How to Turn off Location on Laptop Windows 10
  • How to Disable Sleep Option from Windows 10 Start Menu
  • How to Wake Up Computer From Sleep Mode in Windows 10 with Mouse
  • How to Wake Up Computer From Sleep Mode in Windows 10 with Keyboard
  • Batch File To Display Popup Message in Windows 10
  • How to Display Popup Reminder in Windows 10
  • How to See PC Startup and Shutdown History in Windows 10
  • How to Record Your Screen with VLC on Windows 7/8/10
  • How to Change Paging File Size in Windows 10
  • How to Display Full Path in Title Bar of File Explorer on Windows 10
  • How to Cancel Shutdown on Windows 10
  • How to Schedule Auto Shutdown in Windows 10
  • How to Schedule a Scan in Windows Defender
  • How to Calculate Total Duration of Multiple Video Clips in Windows 10
  • How to Fix Drag and Drop Problems in Windows 10
  • How to Disable Power Throttling in Windows 10
  • How to Run Program as Administrator Without Password Prompt in windows 10
  • How to Limit Windows Defender CPU Usage
  • How to Check if Windows 10 is Activated
  • How to Fix Right Click on Desktop Not Working in Windows 10

Image Resizer on Right-click for Windows 10

  • How to Change Computer Name in Windows 10
  • How to Change Account Picture in Windows 10
  • How to Zoom in and out in CMD and PowerShell
  • How to Lock Screen After Inactivity on Windows 10
  • How to Sync Computer Time With Internet in Windows 10
  • Command To Check Open Ports in Windows
  • How to Keep a Window Always On Top on Windows 10
  • How to Increase Font Size in Windows 10
  • How to Change Cursor Color in Windows 10
  • How to Change Cursor Size in Windows 10
  • How to Change Default PDF viewer on Windows 10
  • How to Disable Security Questions in Windows 10
  • How to Pin Specific Settings to the Start Menu in Windows 10
  • How to Format USB Device When FAT32 Option is Not Available
  • How to Automatically Open a Web Page at a Specific Time
  • How to Restart explorer.exe in Windows 10 Using CMD
  • How to Restart Explorer.exe in Windows 10 [2 Methods]
  • How to Add Program Shortcut to Start Menu in Windows 10
  • Hibernate Option Not Showing In Windows 10
  • How To Delete Previous Version of Windows in Windows 10
  • How to Add Print Option in Right-Click Menu
  • How to Delay Startup Programs in Windows 10/8/7
  • How to Disable Task Manager on Windows 10
  • How to Turn on Network Discovery in Windows 10
  • How to Check if Virtualization is Enabled in Windows 10
  • How to Password Protect a Zip File on Windows 10
  • How To Change User Folder Name in Windows 10
  • How to Restore Drivers in Windows 10
  • How to Backup Drivers using PowerShell Command in Windows 10
  • How to Add Store Apps to Startup in Windows 10
  • How to Enable Fingerprint in Windows 10
  • How to Enable Autocorrect and Predictive Text in Windows 10
  • How To Open a Second File Explorer Window in Windows 10
  • How to Block Websites On Your Computer
  • Check Disk Command in Windows 10
  • How to Activate a Window by Hovering Over it with the Mouse in Windows 10
  • How to Control Volume for Individual Programs in Windows 10
  • How to Schedule Restart in Windows 10
  • How to Change Microsoft Store Region in Windows 10
  • How to Hide the Clock From Windows 10 Taskbar
  • How to Enable Number Pad on Keyboard Windows 10
  • How to Turn Off Taskbar Thumbnail Previews in Windows 10
  • How Can I See All Drives in CMD
  • How to Show All Drives in Windows 10 File Explorer
  • Windows 10 Privacy Settings to Turn Off
  • How to Change Desktop Icons in Windows 10
  • How to Force a Program to Open in Full Screen in Windows 10
  • How to Delete Temporary Files in Windows 10
  • How to Enable Startup Sound in Windows 10
  • How to Reset All Default Apps in Windows 10
  • How to Change Default Action on Connecting a USB Device Windows 10
  • How to Remove Old Drivers From Windows 10
  • Where is the Drivers Folder in Windows 10
  • How to Reset Windows Update in Windows 10
  • How to Format USB Using CMD on Windows 10
  • How To Check WiFi Signal Strength on Windows 10 Using CMD
  • How to Remove “Show Desktop” Button on Windows 10
  • How to Enable Remote Desktop on Windows 10
  • How To Open File Explorer To “This PC”
  • How to Stop the Screen From Turning Off on Windows 10
  • How to Change Default Folder Name in Windows 10
  • How to Display Day of Week in Windows 10 Taskbar
  • How To Display Windows 10 Start Menu in Full Screen
  • How to Create a New Library in Windows 10
  • How to Reset the Settings App in Windows 10
  • How To Disable Startup Programs in Windows 10
  • How to Enable Registry Backup in Windows 10
  • How to Remove Password at Windows 10 Startup
  • How to Reset Windows 10 To Factory Settings
  • How To Enable or Disable Night Light in Windows 10
  • How to Add Clocks to Start Menu on Windows 10
  • How to Disable Bing Web Search Results in Windows 10 Start Menu
  • How to check Bluetooth battery level on Windows 10
  • How To Find Out If a Program is 32 or 64-bit Windows 10
  • How To Check Bios Firmware Version in Windows 10
  • How To Activate Windows 10
  • How to enter UEFI (BIOS) on Windows 10
  • How to Boot From a USB Drive on Windows 10
  • How to Reinstall Microsoft Store in Windows 10
  • How to Enable Ultimate Performance Mode in Windows 10
  • How to Stop Apps From Running in the Background on Windows 10
  • How to Change Another User’s Password in Windows 10
  • How to Delete Local User Account using PowerShell in Windows 10
  • How to Create Local User Account using PowerShell in Windows 10
  • How to Disable User Account Control (UAC) in Windows 10
  • How to Block Inappropriate Websites on Windows 10
  • How to Set Up a Child Account in Windows 10?
  • How to Download Windows 10 ISO file (32 bits and 64 bits)
  • How to Change the Default Save Location in Windows 10
  • How to Add Open Command Prompt Here to right-click Menu in Windows 10
  • Add Open PowerShell Window Here as Administrator in Windows 10
  • How to Mount ISO Images on Windows 10
  • How to Clear DNS Cache on Windows 10
  • How to Change DNS Server in Windows 10
  • How to Change Temp Folder Location in Windows 10
  • How to Reduce the Size of the Search Bar in Windows 10
  • How to Force Close a Program on Windows Without Task Manager
  • How to Force Close a Program with Task Manager
  • How to Speed Up Windows 10 Startup
  • How to Enable Sandbox in Windows 10
  • How to Disable Automatic Installation of Suggested Apps in Windows 10
  • No Sounds on Windows 10? Here’s How to Fix It
  • No Audio Output Device Is Installed in Windows 10 Fix
  • Where is the Location of Startup Folder in Windows 10?
  • How to Create a Windows 10 Bootable USB
  • How To Run Computer Performance Test in Windows 10
  • How To Tell If Your Computer Is 32 Or 64-bit Windows 10
  • How to Remove Recycle Bin From Desktop on Windows 10
  • How to Show My Computer, Recycle Bin Icon on Windows 10
  • How To Enable Screen Saver In Windows 10
  • How to Enable or Disable Updates For Other Microsoft Products on Windows 10
  • How to Disable Windows 10 Startup Delay
  • How To Open Emoji Keyboard on Windows 10
  • How to Turn On File and Printer Sharing in Windows 10
  • How To Optimize Windows 10 For Gaming
  • How to Add Shortcuts to the “Send to” Menu in Windows 10
  • How to Change the Screen Refresh Rate of Your Monitor in Windows 10
  • How to Make a Program Run on Startup in Windows 10
  • How to Turn Off SmartScreen in Windows 10
  • How to Disable Telemetry in Windows 10
  • How to Disable Windows 10 Tracking
  • How to Disable Windows 10 Data Collection
  • How to Free Up Disk Space in Windows 10
  • Fast Way to Delete a Large Folder in Windows 10
  • How to Create a Printer Shortcut on Desktop Windows 10
  • How to Change Audio Output Device Per Application on Windows 10
  • How to Format a Hard Drive or SSD in Windows 10
  • How to Switch Between Windows in Windows 10 using Keyboard
  • How to Download and Install Windows Media Player for Windows 10
  • How to Create a Shortcut on Desktop Windows 10
  • How to Block reopening of Programs on startup Windows 10
  • How To Limit Windows Update Bandwidth in Windows 10
  • How to remove the 3D Objects folder from This PC in Windows 10
  • How to Remove Old User Account Pictures in Windows 10
  • How to Delete the Hibernation File hiberfil.sys
  • How to Show Seconds in System Clock in Windows 10
  • How to Open Files and Folders with Single Click in Windows 10
  • How to Reset Your Microsoft Account Password for Windows 10
  • How to Fix Corrupted Files in Windows 10
  • How To Export And Import Start Menu Layout In Windows 10
  • How to Stop Automatic Restart After Updating Windows 10
  • How to Remove Ads From the Start Menu in Windows 10
  • How to Create a Homegroup Network in Windows 10
  • How to Disable ads in File Explorer in Windows 10
  • How To Fix gpedit.msc Group Policy Editor Missing in Windows 10
  • How to Change the Network Connection Priority in Windows 10
  • How to Watch Videos While Working on Other Tasks on Windows 10 Computer
  • How to Create a System Repair Disk in Windows 10
  • How to Customize the Taskbar in Windows 10
  • How to Change Taskbar Icons in Windows 10
  • How to Show the Control Panel in File Explorer on Windows 10
  • How to Uninstall Updates in Windows 10
  • How to reset all Local Group Policy on Windows 10
  • How To Turn Windows 10 Computer Into a Wi-Fi Hotspot
  • How to Reset Network Settings in Windows 10 Using CMD
  • How to Disable the Game Bar in Windows 10
  • How to Clear Windows 10 Update Cache
  • How to Create an Invisible Folder without Any Name in Windows 10
  • How to Add Open With to Right-click Menu in Windows 10
  • How to Change Default Apps on Windows 10
  • How to Prevent Copying Files From USB to PC
  • How to Find Your WiFi Password on Windows 10
  • How to Hide Your Name and Email Address on Windows Login
  • How to Speed Up File Transfer in Windows 10
  • How to Remove Power or Shutdown Button from Lock Screen in Windows 10
  • How to Start Windows 10 in Safe Mode
  • How to Stop Lock Screen ads in Windows 10
  • How to Enable Guest Account in Windows 10 using CMD
  • How to Restore Windows 10 Image Backup From Hard Drive
  • How to Create a System Image in Windows 10
  • How to Disable Automatic Update on Windows 10
  • How to Stop Programs From Automatically Updating in Windows 10
  • How to Take a Screenshot on Windows 10
  • Windows 10: Start Menu And Taskbar Not Working
  • How to Rebuild a Broken Icon Cache in Windows 10
  • How to Turn Off Windows Security Notifications in Windows 10
  • How to Preview a File Without Opening it in Windows 10
  • How to Permanently Disable Windows Defender on Windows 10
  • How to Disable the Action Center in Windows 10
  • How To Reinstall Microsoft Edge In Windows 10
  • How to Uninstall Microsoft Edge in Windows 10
  • How to Change Start Menu and Taskbar Color in Windows 10
  • How to Get Windows 7 Start Menu on Windows 10 with Classic Shell
  • Why the Start Menu is Slow to Open in Windows 10
  • How to Change Login Screen Background on Windows 10
  • How to Restore Windows Photo Viewer in Windows 10
  • How to Fix Screen Flickering in Windows 10
  • How to Remove Windows 10’s Built-in Apps
  • How to Fix Black Screen on Windows 10
  • How to Remove Search Bar From Taskbar on Windows 10
  • How to Disable Windows 10 Peer-to-Peer Updates
  • How to Downgrade to Windows 7 From Windows 10
  • How to Fix Windows 10 Start Menu And Cortana Not Working
  • How to Backup and Restore Registry in Windows 10
  • How to Change the Default Installation Location on Windows Using Regedit
  • How to Force Restart Windows 10 with Keyboard
  • How to Remove Shortcut Arrow from Desktop Icons on Windows 10
  • How to Find Computer Specs on Windows 10
  • How To Move Your Libraries To Another Drive in Windows 10
  • How to Enable Numlock at Windows Startup
  • How to Change CMD Color in Windows 10
  • How To Increase Font Size In CMD
  • How To Assign Letter To Drive In CMD
  • How To Get MAC Address In CMD
  • How to Open File Explorer Using CMD on Windows 10
  • How To Run Batch File On Windows Startup
  • How To Run EXE From A Batch File
  • How To Run A Python Script From A Batch File
  • How to Run PowerShell Script From A Batch File
  • How to Run Multiple Batch Files From One Batch File
  • Batch File To Copy All Files From One Folder To Another
  • How To Compare Strings In Batch Files
  • How To Concatenate Variables In Windows Batch File
  • How To Clear A Variable In A Batch File
  • For Loop Counting From 1 To N in a Batch File
  • How to Run Batch File Automatically Every X Minutes
  • Batch File To Get and Set System Date
  • Batch File To Set Default Programs in Windows 10
  • Batch File To Get Computer Name
  • Batch File To Get Current Directory
  • Batch File To Get Input From User
  • Batch File To Get IP Address
  • Batch File To Get MAC Address
  • How to Add a Registry Key in a Batch File
  • Batch File To Create Local User Accounts
  • Batch File To Create a Text File
  • Batch File To Create a Folder
  • Batch File To Create Folders From a List
  • Batch File To Write Ping Results To a Text File
  • Batch File To Write Variable To a Text File
  • Batch File To Write To a Text File
  • Batch File To Read XML File
  • Batch File To Read CSV / XLS
  • Batch File To Read Text File Line By Line into A Variable
  • Batch File To List Folder Names
  • Batch File To List Folders and Subfolders
  • Batch File To List Filenames in a Specified Folder
  • Batch File to List All Files in a Folder and Subfolders
  • How to Check Internet Connection using Batch File
  • How to Check the Size of a File in a Windows Batch Script
  • How To Check Batch File Error
  • Batch File To Check If Folder Exists
  • How to Check If a Path is File or Directory using Batch
  • Batch File To Delete Folders Older Than N Days
  • Batch File To Delete All Files in Folder Older Than N Days
  • Batch File To Delete All Files In Folder
  • Batch File To Delete A File If Exists
  • Batch File To Check If Multiple Files Exist
  • Batch File To Check If File Exists
  • Batch File Commands List With Examples
  • 8 Batch File Commands You Should Know
  • How to Create a Batch File in Windows
  • How to Run Batch File in CMD
  • How to Run EXE File in CMD
  • How to Change the MAC Address on Windows 10
  • How to Create a Website Shortcut on Desktop In Windows 10
  • 29 Run Commands in Windows You Should Know
  • How to Ping IP Address in CMD
  • How to Get IP Address Using Ipconfig in CMD
  • How to Delete Folder Using CMD in Windows 10
  • CMD Commands List You Should Know
  • How to Change Lock Screen in Windows 10
  • How to Show My Computer Icon on Desktop in Windows 10
  • How to Change Compatibility Mode in Windows 10
  • How to Uninstall Internet Explorer in Windows 10
  • How to Add or Change Desktop Theme in Windows 10
  • How to Disable Transparency Effects in Windows 10
  • How to Delete and Uninstall Fonts in Windows 10
  • How to Install New Fonts in Windows 10
  • How to Disable Lock Screen on Windows 10 Using Registry
  • How to Customize Action Center in Windows 10
  • How to Disable Cortana in Windows 10 using Registry
  • Battery Icon Missing From Taskbar in Windows 10 [Solved]
  • How to Change Desktop Background in Windows 10
  • How to Increase Battery Life of Windows 10 Laptop
  • How to Turn off Notifications in Windows 10
  • How to Create Keyboard Shortcuts in Windows 10
  • How to Change Desktop Icon Size in Windows 10
  • How to Turn On Dark Mode on Opera
  • How to Turn On Dark Mode on Mozilla Firefox
  • How to Turn On Dark Mode on Google Chrome
  • How to Turn On Dark Mode on Microsoft Edge
  • How to Enable Dark Mode in Windows 10
  • How to Increase Mouse Sensitivity in Windows 10
  • How to Find Which Programs are Slowing Down Your Boot Time in Windows 10
  • How to Defrag the Hard Drive in Windows 10
  • How to Copy and Paste Into Command Prompt in Windows 10
  • How to Enable the On-Screen Keyboard in Windows 10
  • How to Check Laptop Battery Health in Windows 10
  • How to Use Offline Maps in Windows 10
  • How to Calibrate Your Monitor in Windows 10
  • How to Enable God Mode in Windows 10
  • How to Increase Processor Speed in Windows 10
  • How to Pin a Folder to Taskbar in Windows 10
  • How to Pin a Website to Taskbar in Windows 10

How to Switch Between Desktops in Windows 10

  • How to Make Windows 10 Boot Faster
  • How to Stop Windows 10 From Sleeping
  • How to Set an Alarm Clock on Windows 10
  • How to Go Directly to Desktop in Windows 10
  • How to Create a New Folder on Windows 10
  • How to Reduce Blue Light on Computer Screen on Windows 10
  • How to Turn on Speech Recognition in Windows 10
  • How to Sync My Settings in Windows 10
  • How to Change the Screen Resolution on Windows 10
  • How to Create a New User on Windows 10
  • How to Turn Off Tablet Mode in Windows 10
  • How to Uninstall a Program on Windows 10
  • How To Change Password In Windows 10
  • Top Keyboard Shortcuts in Windows 10
  • How to Speed Up Windows 10 Shutdown
  • How to Change Default Browser in Windows 10
  • How to Disable the Lock Screen in Windows 10
  • How to disable User Account Control in Windows 10

How to Hide File Extensions in Windows 10

  • How to Show Hidden Files and File Extensions in Windows 10
  • How to Create a Restore Point with System Protection Enabled in Windows 10
  • How to Delete Browsing History on Firefox in Windows 10
  • How to Delete Browsing History on Microsoft Edge in Windows 10
  • How to Delete Browsing History on Google Chrome in Windows 10

You May Also Like

How to Switch Between Desktops in Windows 10

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

site logo

Change IP Address and DNS Servers using the Command Prompt

Just because it's more fun

Author avatar

The Command Prompt application, sometimes referred to as command shell, is found in most Windows NT-based operating systems. Its purpose is to execute specific commands for troubleshooting or solving specific Windows issues, performing advanced administrative functions, and automating tasks via batch files and scripts.

That said, you can also use it to change your IP address when you want to spoof it to bypass geoblocks or online bans on sites that impose such restrictions on their content, or change your Domain Name System (DNS) servers for troubleshooting reasons or to make surfing more secure and faster.

Change IP Address and DNS Servers using the Command Prompt image 1

In this guide, we’re going to show you how to change your IP address and DNS servers using the Command Prompt in Windows 10.

How To Change IP Address Using Command Prompt

An IP address holds information about your device, location, your internet service provider (ISP), and browser information.

Changing it is useful when you have a malfunctioning router that’s providing addresses used by a different computer on the network or an invalid address is accidentally configured.  It’s also helpful when you want to install a new router and reconfigure your home network to use the default IP address range.

Change IP Address and DNS Servers using the Command Prompt image 2

The first step to changing your IP address is to find the network name for the interface you want to change. 

  • Open an elevated Command Prompt by typing CMD in the search bar and clicking on Run as Administrator .

Change IP Address and DNS Servers using the Command Prompt image 3

  • Next, type netsh interface ipv4 show config in the command prompt window, press Enter, and scroll down to the interface you want.

Change IP Address and DNS Servers using the Command Prompt image 4

In our case, we’ll be modifying the WiFi interface, but you can pick the correct interface for your case. Make note of the interface name.  

  • To change the IP address, type this command: netsh interface ipv4 set address name=”YOUR INTERFACE NAME” static IP_ADDRESS SUBNET_MASK GATEWAY

In our example, this command would look like this: netsh interface ipv4 set address name=”Wi-Fi” static 192.168.0.173 255.255.255.0 192.168.0.0

Change IP Address and DNS Servers using the Command Prompt image 5

This command will use the Wi-Fi interface, set the IP address to 192.168.0.173, set the subnet mask to 255.255.255.0 and set the default gateway to 192.168.0.0.

If you want to switch to using an IP address automatically assigned by a DHCP server instead of a static IP address, use the netsh interface ipv4 set address name=”YOUR INTERFACE NAME” source=dhcp command.

How To Change DNS Servers Using Command Prompt

 A DNS server holds public IP addresses and related hostnames in a database, and is used to resolve or translate the hostnames to IP addresses. The server does this by running special software to communicate with other servers through special protocols based on certain requests from the computer. 

The conversion process is thoroughly vetted and verified, and it happens quickly behind the scenes so as to obtain information corresponding to the server that the computer is looking for, and then tells the original connecting computer where to go so that it can connect to that server.  

Change IP Address and DNS Servers using the Command Prompt image 6

There are several reasons why you’d want to change your default DNS server , but the main ones are:

  • Boost your privacy when getting around a firewall, bypassing geoblocks or ISP blocks on a website
  • Increase security
  • Parental controls like blocking websites from your router
  • Speed your surfing, which your own ISP’s DNS servers may not offer because they’re not always reliable or up-to-date

Note : You can change DNS servers individually for your home network on your router or on computers, smartphone, and Chromebook, among other devices

How To Change DNS Servers With Command Prompt

Follow the steps below to learn how to change DNS servers using Command Prompt.

  • Open an elevated Command Prompt by typing CMD in the search bar, and clicking Run as Administrator .

Change IP Address and DNS Servers using the Command Prompt image 7

  • Type netsh and press Enter .

Change IP Address and DNS Servers using the Command Prompt image 8

  • Next, type interface ip show config and press Enter .

Change IP Address and DNS Servers using the Command Prompt image 9

  • Find the network interface whose DNS server you want to change, and enter the netsh interface ipv4 set dns name=”YOUR INTERFACE NAME” static DNS_SERVER . This will set your primary DNS server.

From our example above, we changed the IP address for the “Wi-Fi” interface, so we’ll use the same example to change DNS servers. 

For purposes of this guide, we’ll use Google’s primary public DNS server, 8.8.8.8. The command will look something like this: netsh interface ipv4 set dns name=”Wi-Fi” static 8.8.8.8

Change IP Address and DNS Servers using the Command Prompt image 10

  • Next, type the netsh interface ipv4 set dns name=”YOUR INTERFACE NAME” static DNS_SERVER index=2 command to set the secondary DNS server. Again, we’ll use Google’s public DNS secondary server, 8.8.8.8  as an example, which will look like this: netsh interface ipv4 set dns name=”Wi-Fi” static 8.8.4.4 index=2.

Change IP Address and DNS Servers using the Command Prompt image 11

Note : You can use the netsh interface ipv4 set dnsservers name”YOUR INTERFACE NAME” source=dhcp command if you want the network interface to automatically pick DNS settings from a DHCP server. Continuing with our example, this command would look like this: netsh interface ipv4 set dnsservers name”Wi-Fi” source=dhcp

Command Prompt is a great tool to use when you want to change IP addresses and DNS servers. It’s faster and saves you the hassle of having to click through several windows and dialog boxes from the Control Panel interface just to get to the IPv4 Properties dialog box to do the same thing. 

Was this guide helpful? Let us know by dropping your comment in the section below.

' src=

Elsie is a technology writer and editor with a special focus on Windows, Android and iOS. She writes about software, electronics and other tech subjects, her ultimate goal being to help people out with useful solutions to their daily tech issues in a simple, straightforward and unbiased style. She has a BCom degree in Marketing and currently pursuing her Masters in Communications and New Media. Read Elsie's Full Bio

Read More Posts:

how to change ip using cmd

How to Configure Windows 10 IP Address with CMD?

' data-src=

Configuring IP address in a Windows with CMD performed using netsh command line utility. The network shell ( netsh ) is a set of commands that help you configure any Windows operating system IP address, Network Interfaces, and Windows Firewall. The usage of the command line is for pro level Windows users. Those who are playing the network infrastructure configuration. But using the command line as normal Windows user indicate your expertise to Windows environment. If you are new to Windows command line, this article “configure IP address with command prompt in Windows 10” will help you begin using command line interface.

Configuring Windows IPv4 Networking with Netsh or Network Shell. Netsh is a command-line utility included in Microsoft’s Windows NT line of operating systems beginning with Windows 2000. It allows local or remote configuration of network devices such as the NICs.

Configure IP Address with Command Prompt in Windows 10

Before setting IP address with cmd in Windows 10, you need to know how to find your IP address on Windows 10. So before everything, you must know the network IP address configuration on your system.

Let’s learn the process of IP configuration step by step. I am going to explain it with an easy pictorial guide. If you don’t understand some part, just kindly comment us and ask your questions.

The process of Changing Windows 10 IP Address with Command Prompt: 

  • Find your IP address in Windows 10.
  • View network interfaces card.
  • Change IP address on Windows 10.
  • Change DNS IP address with the command line.
  • Reset IP address with Command Prompt.

How to Find your IP Address on Windows 10?

There are many options for finding IP address on Windows 10. The easy one is “ ipconfig ” command. To find your IP address on Windows 10, just type “ ipconfig ” in command prompt. To do this process:

  • Press Windows+R keys to open the Run .
  • Type “ cmd ” in the run and press enter.
  • Now type “ ipconfig ” to show the IP address.

The “ ipconfig ” command shows everything about your computer network interfaces. You might have many physical or virtual network interface card.

How to Find Your IP Address on Windows 10 - Technig

Here, I just have one network interface on my Windows 10 computer. The result of ipconfig command shows that the IP 169.254.29.130 with the mask of 255.255.255.0 is my current Windows IP address.

This is a class C “autoconfiguration IPv4”. When your system doesn’t find any DHCP Server or manual IP address, it obtains auto IP address. So let’s change it.

How to C hange  IP Address with  Command Prompt?

For change IP address, open command prompt or PowerShell. Both works the same and you can run all command prompt commends on Powershell as well. Ok, run cmd or Powershell as administrator. Netsh work in both command prompt and Powershell. I’m using Windows Powershell to change IP address on Windows 10 completely. Becuase the user interface and color’s of Powershell is better than Command prompt.

  • Type “ Powershell ” in Windows 10 search box to run Windows Powershell.
  • You need to run Powershell as administrator. Just press Windows+Shift the press enter to run Powershell as administrator. Or right-click the Powershell and click Run as administrator .

PowerShell Guide in Windows 10

To find the network interface with the command line, type the following command on Powershell.

Netsh Command to Check Network Adapter in Windows 10

The result shows two network interfaces. The Loopback and the Ethernet. The Loopback is Windows builtin network loopback interface, but our pointed network interface is the ethernet.

To find your IP address in Windows 10 with netsh command, just type the following command.

How to Find Your IP Address on Windows 10 with Netsh Command - Technig

It displays all the network interface configuration. The output result is clear and better than output result of “ ipconfig ” command on Command prompt. So to find an exact information of the network interface, just add the index ID of the network interface at the end of the command.

How to Find Windows 10 IP address with Command Line - Technig

That’s good. Let’s configure and change Windows 10 IP address with the command line. The command is bit long but easy to understand. No need to remember, just try to understand the netsh command structure.

To change the IP address of the “Ethernet0” network interface, type the following command.

Change IP Address in Windows 10 using Command Line - Technig

Once the command executed successfully, check the result with “ netsh interface ipv4 show config 2 ” command. Yes, the output result shows the exact IP address has set on the “ Ethernet0 ” network interface. Now the Windows IP address is 200.100.10.5 with the mask of 255.255.255.0 and default gateway is 200.100.10.1.

Note : You can’t change the default gateway separately with the following command. It will remove the IP address and just set the default gateway address.

That’s good and enough for IP address configuration in Windows 10 with the command line. Let’s change DNS IP address from the command line.

  • Related :  MCSA Lab Manual Articles .

How to Change DNS IP address from Command Prompt?

DNS IP address is the unique address in the network that resolves computer name to IP address and IP address to the computer name. In the network, finding a computer with a name is easy than 32-bit IPv4 address. To set or change the DNS IP address, just simply do it with the following command.

How to Change DNS IP address from Command Prompt - Technig

You might see some error on a simple local network, because of not having a DNS server. When you don’t have a DNS server, it’s not necessary to set DNS IP address on your computer.

Configure IP Address with command prompt in Windows - Technig

Finally, recheck the result with “ netsh interface ipv4 show config 2 ” command. The output netsh command should be displayed with DNS IP address.

Final World

Configure IP address with command prompt in Windows has tow benefits. The first benefit of working with Windows command line helps get you improve your skills in Windows environment. The second benefit is command line is faster than GUI. If you work with the command line, you will understand the power of command line.

The Windows command line interface has improved a lot in Windows 10. Now you can find some Linux commands that run in Windows 10 and works the same on Linux. Finally, hope you learn how to configure IP address with Command Prompt in Windows operating systems. If you don’t understand, please ask us about how to configure IP address with command prompt in Windows 10?

' data-src=

How to Restore Backup in Windows Server 2022

How to change DNS zone settings in Windows Server 2022?

How to Share Files Over Network (Share Permissions) on Windows 11

Deny Users Access to PC Settings and Control Panel using Group Policy

' data-src=

I am thankful to you for your articles.

' data-src=

i changed my ip address and need it back

' data-src=

You are the greatest! I have been banging my head trying to find information on how to do this. 2 days and the only information I changed was “connected” to “not connected”, thank you so much

Your email address will not be published.

Save my name, email, and website in this browser for the next time I comment.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Welcome, Login to your account.

Recover your password.

A password will be e-mailed to you.

  • All about AI
  • Google Bard
  • Inflection AI Pi Chatbot
  • Anthropic Claude
  • Generative AI
  • AI Image Generation
  • AI Regulation
  • AI Research
  • Large Language Models (LLM)
  • Surface Pro
  • Surface Laptop
  • Surface Book
  • Surface Duo
  • Surface Neo
  • Surface Studio
  • Surface Hub
  • Surface Pen
  • Surface Headphones
  • Surface Earbuds
  • About WinBuzzer
  • Follow Us: PUSH, Feeds, Social
  • Write for Us
  • Cookie Policy and Privacy Policy
  • Terms of Service

How to Change Your IP Address on Windows 10 (3 Methods)

We show you how to change your IP address in Windows 10 using the Settings app, Control Panel, and Command Prompt.

Featured - 3 ways to change the IP address in Windows 10

  • 1 How to Change IP Address in Windows 10 via Settings
  • 2 How to Change your Windows 10 IP Address in Control Panel
  • 3 How to Change IP in CMD (Command Prompt)

IP addresses are one of the primary ways services identify a user. Though your IP address may change automatically from time to time, if you've been assigned the wrong IP by your router or want something more static, you need to know how to change your IP address on Windows 10 manually.

What is an IP address?

An IP address is a series of numbers that identifies your device and therefore allows information to be sent between devices. Without IP addresses, computers on the internet and your local network would not be able to differentiate between different devices, routers, websites, etc.

However, IP addresses also come with some downsides. For starters, somebody may be able to use your IP address to get a general idea of your location. Services may also utilize your IP address to track you across the web.

Unfortunately, changing your IP address will with the methods outlined below will not disguise your location. As the IP address will still be connected to your ISP, it can still be traced to their nearest networking hub. It will also not help if you have been banned by a service – you're only changing the IP address on your local network, not the one the internet sees. For that kind of protection, you should consider using Tor or a VPN.

That said, if you do want to change IP address on Windows 10, you'll need to have access to your administrator account. If you do have access, you can learn how to change IP by following the steps below:

How to Change IP Address in Windows 10 via Settings

Unsurprisingly, the simplest way to change your IP address in Windows 10 is via the in-built settings app, but there are a few things you need to look out for when it comes to choosing your new IP:

Press the Start button, then click the settings cog, above the power button. Alternatively, press Windows + I .

Windows 10 - Open Settings

If your IP address is currently set manually and you're running into issues, you can change the dropdown in “Edit network IP settings” to “Automatic (DHCP)” and press “Save” .

Windows 10 - Settings - Network & Internet - Wifi - Edit IP Assignment - Automatic

When you change your IP address, it's important to make sure the information you enter is correct. Before you start, it's useful to gather:

– Your current IP address – Your subnet mask – Your gateway (router IP)

If you don't know these details, you can run the ipconfig command in Command Prompt to obtain them.

Ideally, your new IP address should be of the same format as your old one. For example, if your current IP address is 10.0.0.1, you'll probably want to keep the 10.0.0.x format. Make sure you don't set your IP to the same as your gateway or other devices on your network.

Once you're done, press “Save” .

Windows 10 - Settings - Network & Internet - Wifi - Edit IP Assignment - Manual - Fill it

How to Change your Windows 10 IP Address in Control Panel

If you prefer the old-school way of doing things, the Control Panel may be better suited to you. In some ways, its interface is easier to navigate when it comes to IP editing. Here's how you can use it for that purpose:

Press Start and then type “Control Panel” . Click the top result.

Windows 10 - Open Control Panel

At this point, you'll likely have to authenticate yourself as an administrator.

Windows 10 - Control Panel - View Network Status and Tasks - Wi-Fi Status - Properties

If your IP address is currently manually assigned and you're running into issues, you can tick “Obtain an IP address automatically” here instead and click “Save” .

Windows 10 - Control Panel - View Network Status and Tasks - Wi-Fi Status - Properties - Check Internet Protocol Version 4 - IP Automatically

Once you're done, press “OK” . You can leave the DNS fields blank, though it's worth noting that there are advantages to changing them.

Windows 10 - Control Panel - View Network Status and Tasks - Wi-Fi Status - Properties - Check Internet Protocol Version 4 - IP Manual

How to Change IP in CMD (Command Prompt)

The command-line is often the fastest way to get things done, and this is no exception. You can change your IP in Command Prompt in under a minute if you need to. Here's how:

Press Start and type “Command Prompt” , then click “Run as administrator” on the right-hand side.

Windows 10 - Open Elevated Command Prompt

Before you change your IP, you need to know the name of your interface. This will likely be “Wi-Fi” if you're on a Wi-Fi network or “Ethernet” if you're on Ethernet.

You can check yours with netsh interface IP show config . While you're there, note down its default gateway and subnet mask.

Windows 10 - Elevated Command Prompt - Enter the Command - Identify the Network Adapter

If you set your manual IP previously, you can revert it to automatic assignment via DHCP with the following command:

Remember to replace “Wi-Fi” with whatever your interface is called.

Windows 10 - Elevated Command Prompt - Command for Dinamic IP

If you'd rather set your IP address manually, you can instead use the following command:

Windows 10 - Elevated Command Prompt - Command for Static IP

Now that you know how to change your IP address on Windows 10, you may be interested in learning more about your network. Here's how you can change your network name or disable a Wi-Fi or Ethernet adapter .

  • Change IP address
  • how to change ip address on pc
  • how to change ip address on windows 10
  • how to find ip address windows 10
  • windows 10 change ip address

Recent News

how to change ip using cmd

Nvidia Introduces Chat with RTX: A New Era of Personal AI...

how to change ip using cmd

OpenAI Unveils Memory Enhancement for ChatGPT, Aiming for Personalized Interactions

how to change ip using cmd

OpenAI Co-founder Andrej Karpathy Announces Departure to Pursue New AI Project

how to change ip using cmd

Slack Integrates Generative AI to Optimize Workspace Efficiency

Subscribe to WinBuzzer on Google News

how to change ip using cmd

  • PRO Courses Guides New Tech Help Pro Expert Videos About wikiHow Pro Upgrade Sign In
  • EDIT Edit this Article
  • EXPLORE Tech Help Pro About Us Random Article Quizzes Request a New Article Community Dashboard This Or That Game Popular Categories Arts and Entertainment Artwork Books Movies Computers and Electronics Computers Phone Skills Technology Hacks Health Men's Health Mental Health Women's Health Relationships Dating Love Relationship Issues Hobbies and Crafts Crafts Drawing Games Education & Communication Communication Skills Personal Development Studying Personal Care and Style Fashion Hair Care Personal Hygiene Youth Personal Care School Stuff Dating All Categories Arts and Entertainment Finance and Business Home and Garden Relationship Quizzes Cars & Other Vehicles Food and Entertaining Personal Care and Style Sports and Fitness Computers and Electronics Health Pets and Animals Travel Education & Communication Hobbies and Crafts Philosophy and Religion Work World Family Life Holidays and Traditions Relationships Youth
  • Browse Articles
  • Learn Something New
  • Quizzes Hot
  • This Or That Game New
  • Train Your Brain
  • Explore More
  • Support wikiHow
  • About wikiHow
  • Log in / Sign up
  • Computers and Electronics
  • Operating Systems

How to Change Your IP Address (Windows)

Last Updated: March 13, 2020 Tested

This article was written by Stan Kats and by wikiHow staff writer, Jack Lloyd . Stan Kats is the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology & cybersecurity solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan has over 7 years of cybersecurity experience, holding senior positions in information security at General Motors, AIG, and Aramark over his career. Stan received a BA in International Relations from The University of Southern California. The wikiHow Tech Team also followed the article's instructions and verified that they work. This article has been viewed 2,538,075 times.

This wikiHow teaches you how to change both your public IP address and your private IP address on a Windows computer. Your public IP address is the address that your computer broadcasts to other networks, while your private IP address is your computer's specific address within your own wireless network. Changing either of these may fix connection issues.

Step 1 Unplug your router and modem.

  • You may want to check your current IP address before doing this.
  • Simply unplugging the router and modem from the wall will work.

Step 2 Disable your computer's Wi-Fi.

  • Click Wi-Fi in the pop-up window.

Step 3 Wait for five minutes.

  • You may want to check your IP address again to make sure it has changed.

Step 6 Contact your ISP.

Renewing the Address

Step 1 Open Start icon.

  • If you aren't an administrator on your current computer, you won't have this option and thus won't be able to renew your computer's IP address.

Step 5 Click Yes when prompted.

Changing the Address

Step 1 Open the Settings...

  • IP address - Usually, your device's IP address will be "192.168.1.X" (or a similar set of numbers), wherein "X" is specific to your device. Change the "X" value to a number between 1 and 100. Make sure you don't use the same IP address as another device on your network (e.g., your phone).
  • Subnet prefix length - This depends on your IP address, but will usually be "255.255.255.X".
  • Gateway - This is your router's IP address.
  • Preferred DNS - Your preferred DNS address (for example: "208.67.222.222" for the OpenDNS server, or "8.8.8.8" for Google's server).
  • Alternate DNS - A secondary DNS address (for example: "208.67.220.220" for the OpenDNS server, or "8.8.4.4" for Google's server).

Step 9 Click Save.

Expert Q&A

Stan Kats

  • You'd change your public IP address in the event that you were kicked out of a gaming service (e.g., Steam), while you'd change your private IP address to fix website loading errors. Thanks Helpful 1 Not Helpful 0
  • Using a proxy server will not change your IP address in the traditional sense, but it will alter the IP address that others can see. Thanks Helpful 0 Not Helpful 0
  • You can also use a browser like Tor to hide your IP address, though such browsers can be dangerous and are often slower than average. Thanks Helpful 0 Not Helpful 0

how to change ip using cmd

  • If you choose an in-use IP address for your computer when changing its private IP address, the device that is currently using that address will get kicked off of the network. Thanks Helpful 0 Not Helpful 0

You Might Also Like

Surf the Web Anonymously with Proxies

  • ↑ http://www.whatismyip.com/ip-faq/how-to-change-your-ip-address/

About This Article

Stan Kats

1. Unplug your router and modem. 2. Disable your Wi-Fi. 3. Wait 5 minutes. 4. Plug the router and modem back in. 5. Re-enable Wi-Fi. Did this summary help you? Yes No

  • Send fan mail to authors

Is this article up to date?

Am I a Narcissist or an Empath Quiz

Featured Articles

How to Make Friends in Your 20s after College

Trending Articles

Everything You Need to Know to Rock the Corporate Goth Aesthetic

Watch Articles

Cook Fresh Cauliflower

  • Terms of Use
  • Privacy Policy
  • Do Not Sell or Share My Info
  • Not Selling Info

wikiHow Tech Help:

Tech troubles got you down? We've got the tips you need

How to change computer's IP address from command line

  • 17 June 2019

How to change computer's IP address from command line - images/logos/windows.jpg

In Windows, to change the IP address from Control Panel is quite easy, but when the IP needs to be changed often then it goes back on the command line because is easy to be saved as a .bat or .cmd file and can be executed as many times as needed.

The command line tool used to change the IP is netsh which allows you to configure just about any aspect of your network connections in Windows. In order to use the tool the command line needs to be started as Administrator:

  • in Windows 10 or 8.1, right-click the Start menu (or press Windows+X on your keyboard) and choose " Command Prompt (Admin). "
  • In previous versions of Windows, search Start for "command prompt" and then right-click the result and choose " Run as Administrator. "

Additionally, to this, you might also need to change the DNS settings .

Step 1 - View Your Network Information

To change the IP address first you need to find the full name of the network for the interface you want to do the change. For this, type the following command:

The result of the command will display all the network interfaces available on the computer.

How to change computer's IP address from command line - /images/IPAddress001.jpg

In my case, I am looking for the "Local Area Connection" . My current IP address is 192.168.66.129.

Step2 - Change IP Address, Subnet Mask, and Default Gateway

The syntax to change the IP is:

For my case:

Note: to still have internet connectivity I will use the same Default Gateway.

If you need to change the IP to automatic run the following command:

Step 3 - Check the Configuration

To check the configuration we check again the settings by running the show config command:

How to change computer's IP address from command line - /images/IPAddress002.jpg

You can notice the change of the IP address for the "Local Area Connection" interface.

Step 4 - Add the commands in a .bat file(optional)

The .bat file will contain the command to change the IP followed by the show config command to see the changes directly on the console. For the .bat file to be successfully executed needs also to be under Administrator rights.

Note: the ping command is just to wait 3 seconds until the show config command is called. without it, you might not have all the info. Running again the show config command will display the info correctly.

  • Netsh manual
  • How to change DNS settings from command line

How to install OpenSSH on Windows - images/logos/windows.jpg

  • Software developer jobs
  • DataGeneratorTools.com
  • DataConverterTools.com

More Recovery Products

  • Partition Manager     Partition Master Personal disk manager   Partition Master Enterprise Business disk optimizer   Edition Comparison Partition Master Versions Comparison   Disk Copy Hard drive cloning utility Partition Master Free Partition Master Pro

Centralized Solutions

MSPs Service

Screen Capture

Video Toolkit

Audio Tools

Transfer Products

File Management

iOS Utilities

More Products

  • Support     Support Center Guides, License, Contact   Download Download installer   Chat Support Chat with a Technician   Pre-Sales Inquiry Chat with a Sales Rep   Premium Service Solve fast and more

How to Change Your IP Address on Computer

how to change ip using cmd

Daisy updated on Jan 11, 2024 | Home > Computer Instruction

This article will introduce 3 methods to change IP addresses in Windows 10.

An IP address is a string that uniquely identifies a device on the network. Computers use IP addresses to communicate and carry location information that helps routers and websites identify themselves and exchange information.

Changing your IP address is not illegal, as some think; aside from that, it strengthens your system security. Whether you use a VPN (Virtual Private Network) or not, you should learn how to do it yourself.

Within a few steps, you can save a lot of money and avoid paying some computer professionals for such minute things. As you read on, you will learn how to change the IP address in Windows 10 .

Let's begin with how to change the IP address on Windows.

Method 1. How to Change IP Address on Windows via Control Panel

Some Windows PCs have IP addresses set up to remain unchanging; this might not help when you need higher security or access some applications that are not easily accessible in your location.

Here's how to go about it:

Step 1. Open the Control Panel , and select 'Networking and Sharing Center'. If you don't see it, select 'Network and Internet'.

select Network and Internet

Step 2. Choose 'Change adapter settings'.

change adapter settings

Step 3. Double-click the specific connection whose IP address you want to change.

Step 4. Then, select Properties.

select Properties

Step 5. Choose 'Internet Protocol Version 4 (TCP/IPv4)'.

Step 6. Then, select 'Obtain an IP address automatically' or alter it manually. Doing it makes the IP address static while choosing the automatic option makes the router assign an IP address to the computer automatically.

select obtain an ip address automatically

If the content of the article is useful, share it on social media platforms to help more people.

Method 2. How to Change IP Address in Windows 10 via Settings

You can also change your IP address using the Settings App. Follow the steps below to change IP addresses via Settings.

Step 1. Press the Windows key and I to open the Settings App. Then select 'Network & Internet'.

press the Windows key + I

Step 2. Select Wi-Fi, as seen in the screenshot below, and select the network you are connected to.

select Wi-Fi

Step 3. Under 'IP assignment', click on 'Edit', and you can also change DNS settings here.

click on Edit

Step 4. To set the IP address automatically, select 'Automatic (DHCP)' as a dropdown in 'Edit network IP Settings'. Then click Save.

select ‘Automatic (DHCP)'

Step 5. Toggle on the IPv4 switch.

Toggle on the IPv4 switch

Step 6. Enter the information of your new IP address, which are your current IP address, subnet mask, and gateway (router IP). Then click Save.

enter the information

Method 3. How to Change IP in CMD (Command Prompt)

Alternatively, if you are a fan of the black screen, you can also change your IP address from the Command Prompt. You can boot Command Prompt in Windows 10 and change the IP address in CMD. The steps below will help you achieve this successfully.

Step 1. Press the Windows key and R, and type in 'cmd'. Then press Enter. A black screen comes up.

Step 2. Type 'ipconfig', then press Enter to check the current IP address of your computer.

Type ‘ipconfig’ and then press Enter

Step 3. Type 'Netsh' to assign an IP to your computer and press Enter. Then enter 'Interface IP' to change the console from 'netsh>' to 'netsh interface ipv4'.

Type ‘Netsh’

Step 4. Type 'set address "Ethernet0" static 192.168.1.10 255.255.255.0 192.168.1.1'. The general format is 'set address "Ethernet0" static IP_address Subnet_mask Gateway'.

type Ethernet0

Step 5. In addition, type 'set dnsservers "Ethernet0" static 192.168.1.10 primary' to define the DNS information.

set dnsservers

Step 6. Type 'Exit', then press Enter to leave the netsh interface.

type exit

Step 7. Type 'ipconfig/all' to confirm that the static IP address, gateway, subnet mask, and DNS server IP have changed.

Type ‘ipconfig/all’

Until now, changing IP address seems like a superhuman skill. You can now see that changing your IP address is a simple thing to do. This skill will be handy in enhancing your security and privacy. In addition, knowing how to change an IP address on a computer saves and hides all your activity from hackers.

Perhaps you have more questions on how to change an IP address on a computer; our FAQ section might help.

1. Can you change your IP address location?

Yes, but you can only achieve this using a Virtual Private Network (VPN). This is because a VPN gives you a unique IP address anywhere on earth.

2. Is changing an IP address dangerous or illegal?

Changing an IP address is not illegal. People change IP addresses for many good reasons, like making their online security robust. However, setting this up can cause headaches if you don't read through our guide to understanding how to tamper with System specific IP addresses.

Was This Page Helpful?

how to change ip using cmd

Updated by Daisy 

Daisy is the Senior editor of the writing team for EaseUS. She has been working at EaseUS for over ten years, starting as a technical writer and moving on to being a team leader of the content group. As a professional author for over ten years, she writes a lot to help people overcome their tech troubles.

Read full bio

Related Articles

How to Restore Backup From Google Drive to Every Device You Want

author icon

Safari Not Working on Mac | 7 Proven Ways to Fix It

author icon

How to Fix Outlook Rules Not Working [8 Ways Included]

author icon

Fixed: File System Check Exit Code Is 8 | Multiple Plans

author icon

EaseUS Data Recovery Services

Request a free evaluation >>

EaseUS data recovery experts have uneaqualed expertise to repair disks/systems and salvage data from all devices like RAID, HDD, SSD, USB, etc.

how to change ip using cmd

Copyright ©   EaseUS. All rights reserved.

how to change ip using cmd

Command Prompt

How to Change Your IP Address Using Command Prompt (CMD)

Are you looking to change your IP address but don’t know how? Whether you want to improve your online privacy or bypass geo-restrictions, changing your IP address can help. In this blog post, we’ll show you how to change your IP address using Command Prompt (CMD) on a Windows computer.

Step 1: Open Command Prompt as an Administrator The first step to changing your IP address is to open Command Prompt as an administrator. To do this, right-click on the Windows start menu icon and select “Command Prompt (Admin)”.

how to change ip using cmd

Step 2: Once the Command Prompt window opens, type “ipconfig” and press Enter. This command will display your computer’s network configuration information. Here we can see the current IP address, this method is especially useful if you need to quickly retrieve your IP address without having to go through several settings or menus.

how to change ip using cmd

Step 3: Release Your Current IP Address Once you have opened Command Prompt, you need to release your current IP address. Type the following command: “ipconfig /release” and press enter. This will release your current IP address and disconnect you from the internet.

how to change ip using cmd

Step 4: Renew Your IP Address After releasing your IP address, you need to renew it to get a new one. Type the following command: “ipconfig /renew” and press enter. This will request a new IP address from your Internet Service Provider (ISP). Wait a few seconds for the process to complete.

Step 5: Verify Your New IP Address To verify that your IP address has been changed, type the following command: “ipconfig” and press enter. This will display your network information, including your new IP address.

how to change ip using cmd

In summary, changing your IP address using CMD involves releasing your current IP address and renewing it to get a new one. Remember to open Command Prompt as an administrator and verify your new IP address after the process is complete.

Share this:

how to change ip using cmd

Leave a Reply Cancel reply

Discover more from.

Subscribe now to keep reading and get access to the full archive.

Type your email


Continue reading

  • 90% Refund @Courses
  • Trending Now
  • Data Structures & Algorithms
  • Foundational Courses
  • Data Science
  • Practice Problem
  • Machine Learning
  • System Design
  • DevOps Tutorial
  • Web Development
  • Web Browser

Related Articles

  • Coding for Everyone
  • Global Unicast Address in CCNA
  • Configuring RIP Versions 1 and 2 in Cisco
  • What is IPv6 Stateless Address Autoconfiguration ?
  • How to Configure IPv6 on CISCO Router?
  • How to Find Your Default Gateway IP Address?
  • Configure IP Address For an Interface in Cisco
  • Link Local Address
  • IPv6 EUI-64 (Extended Unique Identifier)
  • Configuring a Loopback Interface in Cisco
  • Setting IP Address Using GUI
  • Difference Between Source Port and Destination Port
  • Configure IP Address for Interface in Cisco Switches
  • IPv6 Addressing Scheme in Cisco Router
  • How to Simulate Heavy Traffic on Packet Tracer?
  • What is Hyperconvergence?
  • OSPF Implementation
  • Private IP Addresses in Networking
  • Email Protocols
  • What is an Endpoint in Security?

Setting IP Address Using ipconfig Command

Setting up an IP address using the ipconfig command is a simple process that can be performed from any computer with an internet connection. This article aims to provide a step-by-step guide on setting up an IP address using the default gateway and the DNS server. This can be useful if you cannot access the internet or need to change your IP address. It is also useful if you are unsure of what your current IP address is.

Steps to Configure IP address in devices using ipconfig command in Cisco packet tracer:

Step 1: Open the Cisco packet tracer desktop and create a network topology peer-to-peer connection between two PCs as shown below:

how to change ip using cmd

Step 2: Configure PC0 and PC1 using the ipconfig command:

  • First, click on PC0 and go to the command prompt terminal.
  • Then, type the ipconfig command and configure the PC0 as shown below the image.
  • and verify the IP address by again typing only ipconfig in the terminal.

how to change ip using cmd

Similarly with PC1:

  • First, click on PC1 and go to the command prompt terminal.

how to change ip using cmd

Step 3: Verifying connection by pinging the IP address of PC1 in the PC0 terminal:

how to change ip using cmd

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now !

Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about!

Please Login to comment...

author

  • CCNA IP Addressing
  • Top 12 AI Testing Tools for Test Automation in 2024
  • 7 Best ChatGPT Plugins for Converting PDF to Editable Formats
  • Microsoft is bringing Linux's Sudo command to Windows 11
  • 10 Best AI Voice Cloning Tools to be Used in 2024 [Free + Paid]
  • 10 Best IPTV Service Provider Subscriptions

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

Windows Server 2012 Training, Citrix Training, VMWare Training

How to change IP Address from command prompt

How to change ip address from command prompt.

In this post we’ll learn the steps to assign an IP address to Windows Server 2012 R2 from command prompt. We’ll use Netsh command to change an IP. IP (Internet Protocol) is an identify of your Computer. It is required for computers to communicate with teach other. There are multiple ways to change the IP address, in addition to that you can either assign static IP address to your Computer or Dynamic IP address to your Computer. DHCP Server is required if you want Dynamic IP Address to be assigned to your Server.

1. Right click on start and select the command prompt (admin).

ChangeIPAddressFromCommandPrompt

2. On User Account Control window click on “Yes” to open command prompt.

ChangeIPAddressFromCommandPrompt

3. Type command “ ipconfig ” to check an IP address of your computer. This shows an APIPA IP address . APIPA is “ Automatic Private IP Addressing “, this concludes that our computer is not able to communicate with DHCP Server as currently we don’t have any DHCP in our environment.

ChangeIPAddressFromCommandPrompt

4. To assign an IP to our computer type “ Netsh “. It will show “ netsh> ” console. Then type “ Interface   IP ” this will change the console to “ netsh interface ipv4 “.

ChangeIPAddressFromCommandPrompt

5. Type the command “ set address “Ethernet0” static 192.168.1.10 255.255.255.0 192.168.1.1 “. In this command “Ethernet0” is the name of our Ethernet Adapter. As we are assigning static IP address therefore we need to mention an IP address and a subnet mask. 192.168.1.10 is an IP address that we want to assign and 255.255.255.0 is a subnet mask. In addition to IP we are also assigning Gateway to this computer after subnet mask we can define the gateway which is 192.168.1.1 in this example.

ChangeIPAddressFromCommandPrompt

6. Moreover we need to define DNS information. Type a command “ set dnsservers “Ethernet0” static 192.168.1.10 primary ” to define the primary DNS. Here, “Ethernet0” is the name of our network adapter and 192.168.1.10 is the IP of DNS.

ChangeIPAddressFromCommandPrompt

7. Type “ Exit ” to exit from netsh interface ipv4 console.

ChangeIPAddressFromCommandPrompt

8. Type “ ipconfig /all ” to verify that static IP address, subnet mask, default gateway and DNS server IP is assigned.

ChangeIPAddressFromCommandPrompt

If you are not fond of commands then you can change IP address from GUI .

Related articles:

  • How to promote Domain Controller
  • Change IP address using GUI mode
  • How to rename computer
  • How to Change IP Address in Windows Server 2012 R2 (GUI)
  • How to promote Domain Controller 2012 R2
  • Gotta Get It: Hot Tech Deals at Target
  • Hands On: Samsung Galaxy S24 Ultra

Release and Renew Your IP Address in Microsoft Windows

Use the IPconfig command to fix common networking errors

  • Massachusetts Institute of Technology
  • University of Illinois

how to change ip using cmd

  • Western Governors University
  • The Ultimate Laptop Buying Guide

What to Know

  • Release an IP address: Open Command Prompt , enter ipconfig /release , and press Enter .
  • Renew an IP address: Open Command Prompt , enter ipconfig /renew , and press Enter .

Releasing and renewing the IP address on a computer with the Windows operating system resets the underlying IP connection, which often eliminates common IP-related issues, at least temporarily. It works in a few steps to disengage the network connection and refresh the IP address. Instructions apply to Windows 10, Windows 8.1, Windows 8, and Windows 7.

Windows: Release and Renew IP Addresses 

Under normal conditions, a device can use the same IP address indefinitely. Networks usually reassign correct addresses to devices when they first join. However, technical glitches with DHCP and network hardware can lead to IP conflicts and other problems that prevent the networking system from working correctly.

When to Release and Renew the IP Address

Scenarios in which releasing the IP address and then renewing it might be beneficial include:

  • When connecting a computer to a modem.
  • When physically moving a computer from one network to another, such as from an office network to home or home to a hotspot.
  • When experiencing an unexpected network outage.

Release and Renew an IP Address With Command Prompt

Here's how to release and renew the address of any computer running the Windows operating system.

Open Command Prompt . The quickest method is to press Win + R to open the Run box dialog, enter cmd , and then press Enter .

Enter ipconfig /release and press Enter .

In the command results, the IP address line shows 0.0.0.0 as the IP address. This is normal because the command releases the IP address from the network adapter . During this time, your computer has no IP address and cannot access the internet.

Enter ipconfig /renew and press Enter to get a new address.

When the command is finished, a new line appears at the bottom of the Command Prompt screen that contains an IP address.

More Information About IP Release and Renew

Windows may receive the same IP address after renewal as it had before. This phenomenon is normal. The desired effect of deleting the old connection and starting a new one occurs independently of which address numbers are involved.

Attempts to renew the IP address may fail. One possible error message may read:

  • An error occurred while renewing interface [interface name]: unable to contact your DHCP server. Request has timed out.

This error indicates that the DHCP server may be malfunctioning or is unreachable. Reboot the client device or the server before proceeding.

Windows also provide a troubleshooting section in Network and Sharing Center and Network Connections. These troubleshooting tools run diagnostics that include an equivalent IP renewal procedure if it detects that it's needed.

Get the Latest Tech News Delivered Every Day

  • How to Find Your IP Address on Windows 10
  • How to Find an IP Address in Command Prompt
  • How to Find the MAC Address of Your Laptop
  • How to Delete Old Computer Name From Network in Windows 10
  • How to Find a Modem's IP Address
  • How to Find Your IP Address in Windows
  • What Is an IP Address?
  • How to Find Your IP and MAC Addresses in Windows
  • How to Change the IP Address on Your Android
  • How to Identify Network Hardware IP Addresses on a Local Network
  • How to Resolve Limited or No Connectivity Errors in Windows
  • How to Fix a 169 IP Address Error
  • DNS Servers: What Are They and Why Are They Used?
  • Cisco Default Password List
  • What It Means When You See the 0.0.0.0 IP Address
  • What Is an IP Address Conflict?

How-To Geek

How to find your ip address from cmd (command prompt).

To find your local IP address from the CMD Command prompt, simply type "ipconfig" into the prompt.

Quick Links

Which ip do you want local (private) ip vs external (public) ip, get local (private) ip address from cmd (command prompt), get public (external) ip address from cmd (command prompt) or powershell, get public ip address from powershell, get public ip address from the bash shell, key takeaways.

  • Public IP addresses are associated with your internet router and are the same for all devices connected to the internet from your house, while private IP addresses are specific to each adapter on your computer.
  • To find your local (or private) IP address, run the "ipconfig" command in the Command Prompt.
  • To find your public IP address, run the "curl ifcfg.me" command or alternative methods like "curl icanhazip.com" or "nslookup myip.opendns.com". PowerShell and Bash shell have similar commands for finding your public IP address.

Like most things in Windows there are dozens of ways to get something done, so today we're showing you multiple different techniques to find your public or private IP address from the Command Prompt.

Why would you want to get your IP address from the command line when you can easily look it up in the GUI in Windows 10 or Windows 11 ? If you're an old-school kind of geek, using the command line to do things comes naturally, so you might find it easier to type in a quick command instead of clicking a whole bunch of settings. The real reason, though, is that you're probably going to automate it in a script, and you just need to figure out the right command for the job.

Before we show you how to find your IP address we need to talk about the difference between public and private IP addresses .

Each network that you're connected to will have an IP address associated with it — if your computer is connected via Wi-Fi as well as Ethernet, both of the adapters will have their own IP addresses, and your local TCP/IP routing table is responsible for figuring out which one ends up getting used for which requests. Most of the time, though, you're just connected to your Wi-Fi router , so your local computer connecting to your local network has a single IP address.

The Settings app annotated to show which device has a public IP and which has a private IP.

Your internet router, however, is always connected to two separate networks: your local (private) network in your house, and the external (public) network of your ISP. The router translates the request from your computer using NAT (Network Address Translation) to allow everything in your network to share a single public IP address .

When your Windows PC, iPhone, or Raspberry Pi connect to the internet from your house, the server that they connect to will see them as the same IP address: the external (public) IP on your router.

To find your local or private IP address from the Command Prompt in any version of Windows, simply open up the Start Menu, search for the Command Prompt, open it up, and type the following command:

Windows will output a lot of details, but the line you're looking for is the one that says "IPv4 Address" which will display your local / private IP address for the adapter that is connected to your Wi-Fi or Ethernet network.

The results of running ipconfig in the Windows Terminal.

Some people will have more than one adapter in the list, and if you've got Virtual machine software installed or WSL you might see a lot of extra stuff, so you'll need to check for the adapter that's connected to the network you're trying to find the address for. In our case, the WSL adapter is listed first, and we marked with a blue box. The result we want — our physical ethernet adapter — is marked in red.

Keep in mind this is your private IP address, not the public address that websites will see your traffic coming from. For your public IP address, keep reading.

To find your public / external IP address from the Command Prompt or PowerShell, you have a lot of different options, but perhaps the easiest one is to simply type the following command (assuming you've already opened Command Prompt from the Start Menu):

curl ifcfg.me

This command will instantly output your current public IP address right there on the command line. It works by using the curl command to download the contents of ifconfig.me, which is a very simple website that somebody set up to output nothing but your public IP address. If you plug that domain name into your browser, you'll see the same thing.

It's worth noting that Windows 10 and 11 have the curl command built right in, but if you're using an earlier version of Windows you probably will need to download a copy of curl for Windows . Curl should work from within the regular Windows CMD prompt, but you can also use it from within the Bash shell inside of Windows 10 or 11 as well.

There are also a number of alternative methods for pulling up your public IP address from the Command Prompt. Here is one we've used for a long time, just in case the first one stops working:

curl icanhazip.com

That last one weirdly includes an extra line break, which might not work very well if you're using this in a script .

Perhaps our favorite method uses OpenDNS and the trusty nslookup command that's been on every version of Windows since forever:

nslookup myip.opendns.com. resolver1.opendns.com

Get your public IP address via curl or nslookup.

Now that you've had tons of fun reading about how to do all this from the Command Prompt I should probably point out that you can also just type "what is my ip" into Google and it'll tell you. But it's just not as much fun that way.

Want to get more complicated? Did you know that you can actually change your IP address from the Command Prompt ? You can also edit the Windows Registry , lock your PC , change a password , start Excel or Word , map network drives , shut down your PC , uninstall programs , compare files , find files , locate your Windows product key , and even use all sorts of keyboard shortcuts from the old-school Windows Command Prompt.

If you're ready to really have fun, here's how to find your public IP address from a more powerful PowerShell prompt (or script , for that matter). Just type this into your PowerShell terminal:

(Invoke-WebRequest -UseBasicParsing -URI ifconfig.me ).Content

It'll instantly return your IP address just like all the other examples above. You can also split it out into multiple lines if you're going to be using it in a script:

$myip = Invoke-WebRequest -UseBasicParsing -URI ifconfig.me

$myip.Content

This will create the $myip variable and put the contents of the request into it, and then you can use $myip.Content to spit out the value or use it elsewhere in a script if you need to. You can replace the ifconfig.me site with any of the other examples that we showed you earlier, just in case that site isn't working at some point in the future.

Your public IP highlighted.

If you're using the Bash shell from within Windows , you'll probably be happy to know that getting your public IP address is just as simple as from the Command Prompt. Just type the following command:

curl ifconfig.me

It should work exactly the same way as the command did in the regular CMD prompt, but you can do so much more with the Bash shell than the Command Prompt.

Ready to find more IP address information? You can find your IP address using the GUI in Windows 10 or Windows 11 , or look up the IP of your iPhone , Roku , printer , your Wi-Fi router , or any other device . Once you're an expert, you can graduate to seeing what is listening on TCP/IP ports and setting up static IP routes .

How to configure a static IP on Windows 10 or 11

Do you need to switch from a dynamic to a static IP address configuration on Windows 11 or 10? Here's how.

Windows 11 static IP

  • Windows 11 static IP
  • Windows 10 static IP

On Windows, the router's Dynamic Host Configuration Protocol (DHCP) server is (usually) responsible for assigning a dynamic Transmission Control Protocol/Internet Protocol (TCP/IP) configuration to every device in the network, including to your computer running Windows 11 or Windows 10.

Although a dynamic IP address is the recommended configuration for most situations, you may need to change to a static IP address if you're thinking about setting up a printer or file sharing, or you have to configure port forwarding on the router to your computer.

The reason is that a dynamic network configuration can change at any time after the lease from the DHCP expires and if the address changes, network resources you may have configured will stop working. Setting a static IP address will always stay the same on the computer, allowing a more reliable experience sharing resources in the network or forwarding ports.

Whatever the reason, on Windows 10 and 11, you have many ways to configure a static TCP/IP address, including using the Settings app and Command Prompt.

This guide will walk you through the different ways to configure a static network configuration on Windows 11 and 10.

How to set a static TCP/IP network configuration on Windows 11

On Windows 11, you can change your computer's dynamic IP configuration to static in at least two ways through the Settings app or commands.

Configure IP from Settings app

To assign a permanent TCP/IP configuration on Windows 11, use these steps:

  • Open  Settings .
  • Click on  Network & internet .
  • (Optional) Click on Advanced network settings .
  • Under the "More settings" section, click on Hardware and connection properties.
  • Note the current IPv4 ,  Subnet mask ,  Default Gateway , and  DNS server addresses to determine the new configuration, as it has to be in the same network scope.
  • Click the  Ethernet  or  Wi-Fi  page on the right side from the "Network & internet." page.
  • Quick note:  If you select the Wi-Fi page, you need to click on the connection properties to access the network settings.
  • Click on the  Edit  button for the "IP assignment" setting.
  • Select the  Manual  option from the drop-down menu.
  • Turn on the  IPv4  toggle switch.
  • Confirm the IP address for the computer – for example, 10.1.4.90.
  • Confirm the subnet mask for the configuration – for example, 255.255.255.0.
  • Confirm the default gateway address (usually your router's IP) – for example, 10.1.4.1.
  • Confirm the preferred DNS address – for example, 10.1.4.1.
  •   Quick note:  In a home network, you may also be able to use the router's IP address for the DNS configuration. You can also use third-party DNS services like Google Public DNS, Cloudflare, Cisco's OpenDNS, and others. 
  • (Optional) Select the  "On (automatic template)"  option for the "DNS over HTTPS" setting and leave the  "Fallback to plaintext"  option disabled unless you want to encrypted as well as unencrypted traffic or you're troubleshooting connectivity.
  • Quick note:  DNS over HTTPS (DoH) is a feature that encrypts the DNS queries over the HTTPS protocol to improve security and privacy on the internet. You only want to enable this feature if the DNS server supports this feature.
  • Confirm the alternate DNS address (if applicable).
  • (Optional) Select the  "On (automatic template)"  option for the "DNS over HTTPS" setting and leave the  "Fallback to plaintext"  option disabled.
  • Click the  Save  button.

Once you complete the steps, the computer will start using the static network configuration. If everything has been configured correctly, you should be able to open the web browser to access the internet.

If you entered an address (such as the DNS address) and then changed it, you probably won't be able to save the settings. If this is the case, cancel the configuration, start over, enter the correct configuration, and then try to save the settings.

Configure IP from Command Prompt

To set a static TCP/IP configuration on Windows 11, use these steps:

  • Open  Start .
  • Search for  Command Prompt , right-click the top result, and select the  Run as administrator  option.
  • Type the following command to see your current networking configuration and press  Enter : ipconfig /all
  • Confirm the name of the adapter and the networking configuration, including the IPv4 , Subnet mask , Default Gateway , and DNS Servers .
  • Type the following command to configure a static TCP/IP address and press  Enter :  netsh interface ip set address name= "ADAPTER-NAME" static IP-ADDRESS SUBNET-ADDRESS DEFAULT-GATEWAY-ADDRESS

In the above command, replace  ADAPTER-NAME  with the name of your network adapter. Change  IP-ADDRESS SUBNET-ADDRESS    DEFAULT-GATEWAY-ADDRESS  with the device IP address, subnet mask, and default gateway addresses you want. For example, this command sets the 10.1.4.90, 255.255.255.0, 10.1.4.1 configuration:  netsh interface ip set address name="Ethernet 10Gb" static 10.1.4.90 255.255.255.0 10.1.4.1

  • Type the following command to set a DNS server address and press  Enter :  netsh interface ip set dns name="ADAPTER-NAME" static DNS-ADDRESS  

In the command, change  ADAPTER-NAME  with your adapter's name and  DNS-ADDRESS  with the DNS server address of the network. For example, this command sets the local router as the DNS server:  netsh interface ip set dns name="Ethernet 10Gb" static 10.1.4.1

  • Type the following command to set an alternate DNS server address and press  Enter :  netsh interface ip add dns name="ADAPTER-NAME" DNS-ADDRESS index=2

In the command, change  ADAPTER-NAME  with the adapter's name and  DNS-ADDRESS  with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet 10Gb" 1.1.1.1 index=2

After you complete the steps, the commands will set a static network configuration on Windows 11.

How to set a static TCP/IP network configuration on Windows 10

On Windows 10, you can also use the Settings app and Command Prompt to set up a static IP network configuration.

To assign a permanent TCP/IP configuration on Windows 10, use these steps:

  • Click on  Ethernet  or  Wi-Fi .
  • Click on the active connection on the right side.
  • Click the  Edit  button for the "IP assignment" setting.
  • Select the  Manual  option.
  • Confirm the subnet prefix length (subnet mask) for the configuration – for example, 24 to specify the 255.255.255.0 subnet mask.
  • Quick tip:  It's important to use the number that represents the network instead of the subnet mask. Otherwise, the configuration won't save. If you don't know the subnet prefix length for your subnet mask, you can use any  online subnet calculator  to find out.

Once you complete the steps, Windows 10 will start using the static IP configuration. If you lose network connectivity, restart the computer to regain access to the local network and internet.

To change from dynamic to static IP address with commands on Windows 10, use these steps:

In the command, change  ADAPTER-NAME  with your adapter's name and  DNS-ADDRESS  with the DNS server address of the network. For example, this command sets the local router as the DNS server:  netsh interface ip set dns name=" Ethernet 10Gb" static 10.1.4.1

In the command, change  ADAPTER-NAME  with the adapter's name and  DNS-ADDRESS  with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet0" 1.1.1.1 index=2

After you complete the steps, the network configuration will switch from dynamic to static on Windows 10.

Get the Windows Central Newsletter

All the latest news, reviews, and guides for Windows and Xbox diehards.

Mauro Huculak

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

  • 2 Early MSI Claw benchmarks don't look great versus the seemingly superior ROG Ally — Will Intel's Core Ultra CPU be a mistake for portable PC gaming handhelds?
  • 3 One of the largest Esports organizations is suing Activision for monopolistic practices with the Call of Duty League
  • 4 Alan Wake 2 is Remedy's fastest-selling game of all time
  • 5 One of my favorite PowerToys utilities is getting native support on Windows 11

how to change ip using cmd

How to change from static to dynamic IP address on Windows 10

Are you using a static IP address? Here are four ways to switch to a dynamic configuration on Windows 10.

Avatar for Mauro Huculak

On Windows 10, you can configure a network adapter to use a static IP address manually, or you can use an automatically assigned configuration using the local Dynamic Host Configuration Protocol (DHCP) server.

Although using a static IP address is recommended for devices that provide services to network users, as its configuration never changes, it may come a time when you may no longer need this configuration, and a dynamically assigned network configuration will be more suited.

If you use a static IP address and need to switch to a dynamic configuration, it’s possible to perform this task in several ways, including using the Settings app, Control Panel, Command Prompt, and even PowerShell.

In this guide , you’ll learn the steps to remove a static IP address configuration to obtain a dynamic configuration from the DHCP server on Windows 10 .

Change to dynamic IP address (DHCP) from Settings

Change to dynamic ip address (dhcp) from command prompt, change to dynamic ip address (dhcp) from powershell, change to dynamic ip address (dhcp) from control panel.

To enable DHCP to obtain a TCP/IP configuration automatically on Windows 10, use these steps:

Open Settings on Windows 10.

Click on Network & Internet .

Click on Ethernet or Wi-Fi .

Click the network connection.

Under the “IP settings” section, click the Edit button.

Edit IP settings on Windows 10

Use the Edit IP settings drop-down menu and select the Automatic (DHCP) option.

Enable automatic (DHCP) IP address using Settings app

Click the Save button.

Once you complete the steps, the networking stack configuration will reset, and your device will request an IP address from the DHCP server (usually your router).

To switch from a static TCP/IP configuration to a dynamically assigned configuration using DHCP with Command Prompt, use these steps:

Open Start .

Search for Command Prompt , right-click the top result, and select the Run as administrator option.

Type the following command to note the name of the network adapter and press Enter

Network adapter name using Command Prompt

Type the following command to configure the network adapter to obtain its TCP/IP configuration using DHCP and press Enter :

In the command, make sure to change “Ethernet1” for the adapter’s name that you want to configure.

Enable DHCP on Windows 10 using Command Prompt

After completing the steps, the network adapter will stop using a static IP address, and it’ll obtain a configuration automatically from the DHCP server.

To remove a static IP and DNS addresses to use a dynamic configuration using PowerShell, use these steps:

Search for PowerShell , right-click the top result, and select the Run as administrator option.

Type the following command to note the “InterfaceIndex” number for the network adapter and press Enter :

Network interface information using PowerShell

Type the following command to enable the network adapter to obtain its TCP/IP configuration using DHCP and press Enter :

In the command, make sure to change “Ethernet0” for the adapter’s name that you want to configure.

Type the following command to enable the network adapter to obtain its DNS configuration using DHCP and press Enter :

In the command, change “3” for the InterfaceIndex for the adapter to configure.

Enable DHCP for dynamic IP assignment using PowerShell

Once you complete the steps, the IP and DNS addresses will be reset from the adapter, and your computer will receive a new dynamic configuration from DHCP.

To configure a network adapter to use a dynamic IP address using Control Panel, use these steps:

Open Control Panel .

Click on Network and Internet .

Click on Network and Sharing Center .

On the left pane, click the “Change adapter settings” option.

Network and Sharing Center in Control Panel

Right-click the network adapter and select the  Properties option.

Select the “Internet Protocol Version 4 (TCP/IPv4)” option.

Click the Properties button.

Ethernet1 Properties on Windows 10

Select the “Obtain an IP address automatically” option.

Select the “Obtain the following DNS server address automatically” option.

Enable dynamic IP address (DHCP) using Control Panel

Click the OK button.

After completing the steps, the statically assigned TCP/IP configuration will no longer be available, and the computer will automatically request a dynamic network configuration from the network.

Avatar for Mauro Huculak

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He is also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter) , YouTube , LinkedIn and About.me .

  • Windows Subsystem for Android gets January 2023 update
  • How to access Advanced startup (WinRE) on Windows 10

We hate spam as much as you! Unsubscribe any time Powered by follow.it ( Privacy ), our Privacy .

How to find the IP address in CMD using hostname?

command prompt to find hostname ip address

In networking, each system has its own identity denoted by a few numerical digits known as IP address, however, remembering them can be a difficult task, especially when there are a large number of systems. For example, each website running on the Internet has an IP address, so that other systems can call them whenever needed but do you think it is feasible to remember the long series of numbers for each website we visit?

The answer is “No”, hence corresponding to each IP address we can set a human-readable label. That’s the reason why when we need to visit Google we use its domain name Google.com instead of its IP address. Similarly, in our local networks, we have hostnames for each PC alongside IP addresses. This hostname allows us to connect PC if we don’t know the IP address.

However, if you don’t know the IP address corresponding to some hostname and want to find that, here in this tutorial we learn how to use the Command prompt or PowerShell to translate a hostname or Domain name to its corresponding IP address.

Step 1: Open Command Prompt

Well, as the title of this tutorial suggests we are going to use the command line on Windows to find the IP address associated with a hostname. Therefore, open the command prompt or PowerShell, click on the Windows Start button search for “ CMD ” as it appears click to run the same.

Alternatively , we can use the Windows key + R to open the Run dialog, typing “ cmd ,” and pressing Enter to access the Command prompt.

Rus as administrator command prompt

Also, learn – how to find a Wi-Fi password using the command prompt in Windows 11.

Step 2: Ping and NSLookUp

There are two common commands that we can use to find the IP address associated with a hostname, one is PING , and the other is NsLookUP , let’s see how to use them.

Ping Command to find the hostname IP

On your command prompt, and those are use PowerShell, run the “ ping ” command along with the hostname of the PC or device that IP address you want to identify. For example, our local hostname is “h2smedia” then the command to find its IP address:

ping hostname or domain

If you want to get IPv4 then add the ‘ -4 ‘ parameter in the above command, it will be like this:

Similarly, we can use any domain name to find its corresponding IP:

Using NSLookUp

Like ping, we can use the NSLookUp which is a specialized command line tool for querying Domain Name System to obtain the mapping between domain name and IP address:

nslookup hostname or domain

Step 3: View the IP Address

Well, the ping command as you run it, the system will start pinging the remote system or device to send packets to the mentioned hostname and in return will display the IP address along with information on whether the remote or local system is in reach or not. To identify the IP address just look for the line that starts with “Reply from” followed by the IP address.

Similarly, in the NSlokup command, you will directly have the Ip-address value as output, instead of confirming whether the host is reachable or not.

command prompt to find hostname ip address

Step 4: Note the IP Address

Once you have the IP address on the command prompt display, you can start using it to either connect the device available in your network or perform any troubleshooting task with the help of any third-party software such as Wireshark .

Other Articles:

  • Check if Virtualization is Enabled via Command Prompt (CMD)
  • Install PHP on Windows 10 | 11 using the Command prompt
  • How to start Firefox in safe mode with the command prompt?
  • How to create multiple folders in the Windows command prompt?

Inside Kodak TV Factory: A Glimpse into the Manufacturing Process

How to Reset Windows 11: A Step-by-Step Guide to Restore Your PC to Factory Setting

Related posts.

What is the DPC watchdog violation on Windows 11

What is the DPC watchdog violation on Windows 11? Why this is caused and the possible fixes

Reinstall Windows step by step to Factory settings

How to Check if Virtualization is Enabled via Command Prompt (CMD)

Install Virt viewer on Windows 11

Single Command to Install Virt-viewer on Windows 11 or 10

Enable nested VTXAmd-V option

How to enable Virtualbox nested VTX/Amd-V on Windows or Linux

Leave a comment cancel reply.

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Reach out to us for sponsorship opportunities or suggestions

Problems are meant to be solved.

© 2024 H2S Media

IMAGES

  1. How to Change IP Address in Command Prompt (Renew IP)

    how to change ip using cmd

  2. How to change the IP address in Windows 10 using Command Prompt (CMD

    how to change ip using cmd

  3. How To Change IP Using CMD Command

    how to change ip using cmd

  4. How to change IP Address from Command Prompt

    how to change ip using cmd

  5. How To Change IP Address Using CMD (Command Prompt)

    how to change ip using cmd

  6. How to Change IP Address Using Command Prompt (CMD)

    how to change ip using cmd

COMMENTS

  1. How to Change Your IP Address From the Command Prompt in Windows

    View Your Network Information with Command Prompt. Before you change your IP address and related information, you'll need to find the full name of the network for the interface you want to change. To do this, type the following command: netsh interface ipv4 show config. Scroll down until you see the interface you're looking for.

  2. How to Change IP Address in Command Prompt (Renew IP)

    Right-click on the Command Prompt and select the " Run as administrator " option. Execute the below command to get the network interface name. netsh interface ipv4 show config. If you have multiple network interfaces, note down the interface name for which you want to change the IP address.

  3. How To Set Static IP Address in Windows 10 using CMD

    Using CMD may seem difficult for some users, yet it is one of the fastest ways to assign a static IP address in Windows 10. Step 1: There are two ways to open the command line. Click on the Start menu, type CMD in the search box, then right-click on it and select Run as administrator.

  4. How to change the IP address in Windows 10 and Windows 11 (4 ways)

    In both Windows 11 and Windows 10, you can also change your IP address from the Control Panel. Open the Control Panel and click or tap on "View network status and tasks" under "Network and Internet.". In the Network and Sharing Center, click or tap on your internet connection from the "View your active networks" area.

  5. Change IP Address and DNS Servers using the Command Prompt

    The first step to changing your IP address is to find the network name for the interface you want to change. Open an elevated Command Prompt by typing CMD in the search bar and clicking on Run as Administrator. Next, type netsh interface ipv4 show config in the command prompt window, press Enter, and scroll down to the interface you want.

  6. How to Configure Windows 10 IP Address with CMD?

    To find your IP address on Windows 10, just type " ipconfig " in command prompt. To do this process: Press Windows+R keys to open the Run. Type " cmd " in the run and press enter. Now type " ipconfig " to show the IP address. The " ipconfig " command shows everything about your computer network interfaces.

  7. How to Change Your IP Address on Windows 10 (3 Methods)

    Open Settings. Press the Start button, then click the settings cog, above the power button. Alternatively, press Windows + I. Click "Network & Internet". Click "Wi-Fi" in the sidebar and ...

  8. How to change the IP address in Windows 10 using Command ...

    How to change the IP address in Windows 10 using Command Prompt (CMD)you're a command-line fan, and want to learn how to change the IP address in Windows 10 ...

  9. How to Change Your IP Address

    Key Takeaways. The simplest way to change your IP address is to power off your router, wait at least 10 seconds, then power it back on. If that doesn't fix your problem, you may want to set a static IP address instead. Changing your IP address is a simple fix for a number of networking issues. However, there's more than one way to cook that ...

  10. How to Change Your IP Address (Windows)

    in the bottom-right corner of the screen. Click Wi-Fi in the pop-up window. 3. Wait for five minutes. Some ISPs will assign a new IP address in as little as five minutes; if doing this doesn't work, however, you may need to leave your router unplugged overnight (or for around eight hours). 4.

  11. How to change computer's IP address from command line

    Step 1 - View Your Network Information. To change the IP address first you need to find the full name of the network for the interface you want to do the change. For this, type the following command: netsh interface ipv4 show config. The result of the command will display all the network interfaces available on the computer.

  12. How to Change Your IP Address on Computer

    Then press Enter. A black screen comes up. Step 2. Type 'ipconfig', then press Enter to check the current IP address of your computer. Step 3. Type 'Netsh' to assign an IP to your computer and press Enter. Then enter 'Interface IP' to change the console from 'netsh>' to 'netsh interface ipv4'. Step 4.

  13. How to Change Your IP Address Using Command Prompt (CMD)

    To do this, right-click on the Windows start menu icon and select "Command Prompt (Admin)". Step 2: Once the Command Prompt window opens, type "ipconfig" and press Enter. This command will display your computer's network configuration information. Here we can see the current IP address, this method is especially useful if you need to ...

  14. Setting IP Address Using ipconfig Command

    192.168..1. Step 2: Configure PC0 and PC1 using the ipconfig command: command : ipconfig <ip address> <subnet mask> <default gateway>. First, click on PC0 and go to the command prompt terminal. Then, type the ipconfig command and configure the PC0 as shown below the image. and verify the IP address by again typing only ipconfig in the terminal.

  15. How to Change Your Computers IP Address From the Command Prompt

    In this tutorial, you will be shown how to change your computer's IP address from the command prompt. If you are using third-party remote software that has r...

  16. How to change IP Address from command prompt

    DHCP Server is required if you want Dynamic IP Address to be assigned to your Server. 1. Right click on start and select the command prompt (admin). 2. On User Account Control window click on "Yes" to open command prompt. 3. Type command " ipconfig " to check an IP address of your computer. This shows an APIPA IP address.

  17. Release and Renew Your IP Address in Microsoft Windows

    Here's how to release and renew the address of any computer running the Windows operating system. Open Command Prompt. The quickest method is to press Win + R to open the Run box dialog, enter cmd, and then press Enter . Enter ipconfig /release and press Enter . In the command results, the IP address line shows 0.0.0.0 as the IP address.

  18. How to Find Your IP Address From CMD (Command Prompt)

    To find your local (or private) IP address, run the "ipconfig" command in the Command Prompt. To find your public IP address, run the "curl ifcfg.me" command or alternative methods like "curl icanhazip.com" or "nslookup myip.opendns.com". PowerShell and Bash shell have similar commands for finding your public IP address.

  19. How to Change IP Address in Windows Using CMD (Command Prompt) In 3

    Changing IP Address in Windows Using CMD (Command Prompt) In 3 Easy Steps. đŸ€“Heres the Basic Code:netsh interface ipv4 set address name="YOUR INTERFACE NAME"...

  20. Release and renew an IP address

    Windows 10. To access and renew your IP address, you'll need to open a command prompt. Right-click the Start menu and select Command Prompt (Admin). Enter your admin username and password, if prompted. A command prompt window will open. At the flashing cursor, type ipconfig /release. This will release your IP address.

  21. How to configure a static IP on Windows 10 or 11

    To change from dynamic to static IP address with commands on Windows 10, use these steps: Open Start. Search for Command Prompt, right-click the top result, and select the Run as administrator ...

  22. How to change from static to dynamic IP address on Windows 10

    To enable DHCP to obtain a TCP/IP configuration automatically on Windows 10, use these steps: Open Settings on Windows 10. Click on Network & Internet. Click on Ethernet or Wi-Fi. Click the network connection. Under the "IP settings" section, click the Edit button. Use the Edit IP settings drop-down menu and select the Automatic (DHCP) option.

  23. How to change IP address using script on Windows?

    Look in your control panel for the correct name. 2) The IP you want to set is 192.168..101, change this to whatever IP to want to use. 3) The default gateway and dns are the same IP. If you are using some kind of router they usually are. Change this to match your network config found with the command ipconfig /all.

  24. How to find the IP address in CMD using hostname?

    Step 1: Open Command Prompt. Well, as the title of this tutorial suggests we are going to use the command line on Windows to find the IP address associated with a hostname. Therefore, open the command prompt or PowerShell, click on the Windows Start button search for "CMD" as it appears click to run the same.