Change the IP address using the command prompt

There are two types of IP addresses that are fairly familiar to many people. This is the public IP that is usually shown when opening a website on the internet. And the other is the local IP which can only be seen by local users or the same router.
If you usually change the local IP, this can easily be done via Network settings, but actually there is an easier way you know and that is through the command prompt. This is very suitable for users who frequently change the IP address for a specific purpose.
Here is shared the procedure for changing the IP address (ipv4) via the command prompt. With that you can change local IP address faster without having to click again. And this method is functionally the same as switching through Network settings, so no need to worry.
Also read: Tutorial on Installing Python on Windows Computers
Change the local IP address using the command prompt
This method can only be used via Elevated prompt or the term runs the command prompt in administrator mode. To get started, please click Search and enter CMD then right click and select Execute as administrator.
Next, watch out for the following command:
netsh interface ip set address name=”Local Area Connection” static 192.168.0.200 255.255.255.0 192.168.0.1
The explanation of the above command is to change the local IP address in the network called “Local Area Connection” to static. So go ahead with the setting manual IP address as “192.168.0.200” and Subnet as “255.255.255.0” and the last one is gate as “192.168.0.1”.
You can change the IP address however you want and the most important thing is not to set it incorrectly Network name Second hand. Because in some cases there are many LAN connections on the computer and end with numbers, for example LAN connection 6.
After setting it up correctly, please run it from the command prompt and it won’t be long before the IP settings change instantly and you can see the results by typing the command ipconfig
and see the currently used IP.
Also read: How to Execute CMD Commands Simultaneously
Reset IP to Dynamic (DHCP)
Setting it as static is like choosing your own IP address to use later. It is different if you set it as dynamic or generally known as DHCP, where the IP is automatically obtained directly from the router.
And to set it back to dynamic, here is the command:
netsh interface ip set address name=”Local Area Connection” source=dhcp
Just like the method above, the command prompt must be run in administrator mode for the command to run successfully. And once again don’t forget to change the network name to the way it is currently in use.
It may be a little difficult to remember the first time you use the command because it is too long. But when you get used to it, it happens very quickly.
Hopefully useful and good luck