How To Assign a Static IP Address in Windows 10/11

 


How To Assign a Static IP Address In Windows 10 or 11.

The DHCP server will immediately assign the PC a dynamic IP address as soon as it is networked. As suggested by the name (Dynamic IP), changing the IP address only requires a restart or a few minor settings adjustments. In the end, it may result in problems with remote desktop or port forwarding. However, if your computer has a static IP address, it will always keep the same IP address, which makes it perfect for the network services. Now that you're aware, a static IP address is one that never changes until you explicitly modify it. This indicates that it will become a popular choice for transferring files, printing locally, configuring ports for remote control, and other tasks. How can a static IP address be assigned in Windows 11 or 10 is the query.


According to the following list, there are four ways to assign a static IP address in Windows.


  1. Use CMD To set a static IP address.
  2. Another tool for assigning a static IP address is PowerShell.
  3. Control panel, a dated technique for setting a static IP address.
  4. Finally, you can use the settings app to set a static IP address.

Use any of these techniques to assign a static IP address that you are comfortable with.


Use CMD to assign a Static IP Address.

When the search for CMD returns, click Run CMD as Administrator from the taskbar's search icon.


Type ipconfig /all in the CMD panel and hit Enter.


When the results are displayed, pick the Network Adapter for which a static IP address should be set first. I will set up the Ethernet adapter in my case. Find the IPV4, Subnet Mask, Default Gateway, and DNS Server under the network adaptor.


When you discover these specifics, remember them or transcribe them into a notepad. Remember that my computer's current IP address is 192.168.10.13 as well.


Use the CMD command listed below to assign a static IP address.

  • Instead of “Ethernet” in command, replace it with the adapter that you want to configure.
  • 192.168.10.12 is the IP that I want to Set for this computer, you have to type the IP that you want.
  • 255.255.255.0 is the subnet mask that you are getting from the router.
  • 192.168.10.1 is the default Gateway of my router.
netsh interface ip set address name="Ethernet" static 192.168.10.11 255.255.255.0 192.168.10.1
To configure a DNS server and an alternative DNS for the adapter, issue the commands shown below.
netsh interface ip set dns name="Ethernet" static 192.168.10.1
netsh interface ip add dns name="Ethernet" 8.8.8.8 index=2
Using ping, check whether you have access to the Internet when everything is finished.


Using PowerShell, set a Static IP Address
Utilizing PowerShell is the alternative approach for assigning a static IP address in Windows 11. Every IT user needs to be aware of it because it is also quite strong.

Launch PowerShell as Administrator as the first step.



You have to asses the current network settings and configuration. Just as you typed IPconfig /all in the CMD, you have to execute the below command in the PowerShell.

Get-NetIPConfiguration

You can also use the ipconfig but it is good to evolve over time.

Once the above command is executed, Find the Adapter that to set a Static IP address for it. After finding the Adapter, you have to gather following information and copy them into Notepad.

  • Adapter: Ethernet
  • InterfaceIndex: 3
  • IPv4Address: 192.168.10.11
  • IPv4DefaultGateway: 192.168.10.1
  • DNSServer: 192.168.10.1
  • AlterDNS: 8.8.8.8 (If available)

After acquiring the necessary information, modify the command below and run it in PowerShell.

In the below command:

  • Replace 3 with your Interface Index ID.
  • Instead of the 192.168.10.15 type your own IP Address.
  • Replace the DefaultGateway IP address too.
New-NetIPAddress -InterfaceIndex 3 -IPAddress 192.168.10.15 -PrefixLength 24 -DefaultGateway 192.168.10.1





Note: If you face the below error on the PowerShell, execute the below command

New-NetIPAddress -InterfaceIndex 3 -IPAddress 192.168.10.15 -PrefixLength 24


Also by executing the below commands you can set a new DNS Server for your machine.

Set-DnsClientServerAddress -InterfaceIndex 10 -ServerAddresses 10.1.4.1
Set-DnsClientServerAddress -InterfaceIndex 10 -ServerAddresses 10.1.4.1, 8.8.8.8

Set a New DNS Server

Assign a Static IP Address using Control Panel

It is still possible to assign a static IP address using the control panel's outdated procedure. In actuality, it is one of the easiest ways to give any machine, even the server, an IP address.
Without wasting lot of time let’s begin and set a static IP address through the control panel. For the first step you have to press Windows + R on the keyboard, this is going to open the run dialog box. In the run dialog box, you have to type ncpa.cpl and press enter.

Once the network connections are opened, you have to right click on the adapter that you want to set a static IP address for it. In my case the Ethernet is the one which has to be set with the static IP address. Double-click or right-click on the adapter and choose Properties.

Access Network Properties

On the next window double click on the “Internet Protocol Version 4 (TCP/IPv4)“> after choose “Use the following IP Address“. There you have to insert the details regarding to the static IP Address.

Assign a Static IP Address

Configure Static IP Address in Windows

Set a Static IP Address using Settings

Utilizing the settings application is the final way to set a static IP address in Windows. In actuality, the settings app offers more functionality and options than the control panel, CMD, and PowerShell.

To assign a static IP address in windows 11 through the windows settings app, you have to open the settings. Then go to network and Internet category, after that you have to choose Ethernet or Wi-Fi. I will go with Ethernet.

Assign a Static IP Address

Access Ethernet Settings

Find the IP assignment> Infront of it click on the edit.

Assign a Static IP Address

Edit

A new window will open, by default the automatic DHCP is selected, you have to change it to manual.

Assign a Static IP Address

Manual

Toggle the IPv4 to turn it on.


Now Enter your IP address, Subnet Mask, Default Gateway, chosen DNS, and, if you want to encrypt it, also your desired level of encryption.Once you are done with configuring the settings> save the changes.
Assign a Static IP Address

Enter Your IP Details

Now have a look at the changes that you brought the network.

Assign a Static IP Address

Static IP Address Set

Conclusion:

When using a network and trying to share files, access a remote desktop, use a printer, and other things, a static IP address is quite handy. However, a simple restart can result in numerous issues, thus the dynamic IP address is not very helpful.




Next Post Previous Post