To renew or alter the Ip, you can use the netsh command. Here’re the steps to change the Ip in Command Prompt in Windows 10.
When connected to a network, the Windows computer will automatically get a new Ip as long as it is configured to “Obtain an Ip automatically”. Generally, having the IP address auto-assigned is pretty helpful as you don’t have to configure any extra settings for connecting to a network. For example, you can easily plug-in the ethernet cable or connect with a WiFi network and you are ready to go thanks to the auto-config option in Windows 10.
Though Windows can automatically get the IP address without any hassle, there might times where you require a specific Ip. For instance, to talk about files inside your local network, using a static Ip is really helpful. This eliminates the need to reconfigure the IP address every time you want to access the network drive. During these kinds of cases, you have to change the Ip in Command Prompt.
Thankfully, with just a couple of commands, you change the IP address from Command Prompt. Listed here are the precise steps you should follow.
Steps to alter Ip in Command Prompt
To change the Ip from the Windows Command Prompt, there’s two major steps. First, you should know the network interface name after which utilize it to set the Ip. It is pretty easy. Stick to the steps as shown below and you will be good.
First, press the Windows key to open the Start menu.
Now, type “Command Prompt” within the search bar.
Right-click around the Command Prompt and choose the “Run as administrator” option.
Execute the below command to obtain the network interface name.
netsh interface ipv4 show config
If you’ve multiple network interfaces, make a note of the interface reputation for which you want to change the IP address.
Once you have the interface name, execute the below command while replacing “IP_Address”, “Subnet_Mask”, and “Gateway” with the actual Ip 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, close the command prompt window.
That’s all. It is that simple to alter the Ip within the command prompt.
Note: You can get the subnet mask and gateway addresses from the router or out of your ISP.
If you want the IP address to become assigned automatically, execute the below command. This can set the network interface from Static IP to DHCP. DHCP will automatically customize the Ip from the router.
netsh interface ipv4 set address name=”Interface_Name” source=dhcp