How to easily change the IP address of a computer/Laptop with Command Prompt

2 min read

Firgoos.com-How to change the IP address on your PC/laptop using a command prompt is very easy and quick, different than using a control panel that many clicks require time so it is less efficient. Fo

r fans of Command Prompt, changing the IP address on a PC/laptop can be solved more quickly using Netsh command, which is one kind of a great network utility in Windows. The N

etsh command allows you to configure almost all aspects of a network connection in Windows. To do this, you must open a Command Prompt with administrative privileges.

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

How to view Computer network information B
efore your IP address and related information change, then you should find the full name of the network for the interface that 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. In our example, we will modify the Wi-Fi interface, which on our machine is simply named "Wi-Fi." You will also see other default names that Windows set for the interface, such as "Local Area Connection," "Local Area Connection * 2," and "Ethernet." Just find what you're looking for and note the exact name. You can also copy and paste the name into Notepad and then return to Command Prompt later to simplify. To change the

IP address, Subnet Mask, and Default Gateway After the
computer network information is known, you are ready to change the IP address, Subnet Mask, and Gateway. To do this, you will type the command using the following syntax:

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

For example, your command might look like the following:

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

Where the information will be replaced according to what you want to use. In this example, a description of the command that we use as the following:

  • Using the interface name "Wi-Fi"
  • Set IP address to 192.168.3.1
  • Set the subnet mask to 255.255.255.0
  • Set the default gateway to 192.168.3.1

And if you use a static IP address but want to switch using an IP address that is automatically assigned by a DHCP server-like your router-you can use the following command:

netsh interface ipv4 set address name = "YOUR INTERFACE NAME" Source = DHCP

How to change Your Computer's DNS

settings you can also use the Netsh command to change the DNS server used by the network interface. Third-party DNS servers – such as Google Public DNS and OpenDNS – can become faster and more reliable than the DNS servers provided by your ISP. Like any of your reasons, changing the DNS server can be done on the router thereby affecting all devices that get information from the router or on individual devices. If you want to change the DNS server for only one PC, it is easy to do with the Nets

h command. You must use this command twice: the first to set your primary DNS server and the second to set your secondary or backup DNS server. To s
et up your primary DNS server, use the following syntax:

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

So, for example, your command might look like the following (where we set it to Google's main public DNS server, 8.8.8.8):

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

To set up your secondary DNS server, you will use a very similar command:

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

Continuing with the above example, you can set your secondary DNS as a public Google DNS secondary server, i.e. 8.8.4.4:

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

And as is the case with changing the IP address, you can also change it so that the network interface retrieves its DNS settings automatically from the DHCP server. Just use the following command:

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

How to Defrag hard disk Windows 10

Fragmentation is the process of forming files from blocks of data (fragments) that can be dispersed across multiple locations around the surface of the...
Firdaus Muqarrobin
1 min read

How to activate Windows 10 permanently with ease

Activating Windows 10 is the best way to get the full and original Windows 10 features. Windows 10's not done activation feature is made...
Admin
1 min read

How to remove password PIN and other login options…

How to remove PIN and other login options from Windows 1 0Logo Windows 10 In Windows there is a security PIN feature for laptop/computer...
Admin
3 min read

Leave a Reply

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