In this guide, we will look at different ways that can help you to assign a static IP address on Windows 11/10 PC. Before we dive into how to perform this task, let’s first understand what differs between Static or Automatic IP addressing.

If you had not configured your IP address, your device must be assigned automatically via your router using a protocol named “Dynamic Host Configuration Protocol (DHCP)”. This is quite useful as you don’t require to manually feed in the numbers inside the IPv4 setting. The only downside to this is that it might change from time to time. 

Assign a Static IP Address in Windows

Should I assign a static IP address?

Most of the time, your device doesn’t require a static or unchanging IP address. However, this may change if you meet one of the conditions below –

  • To recognize your own device using an IP address: This might be a case if you or your friends want to locate your PC using its IP address. Setting a fixed IP even helps in troubleshooting network-related errors.
  • To let apps connect to your network device: If you have certain apps that can only connect to a network device only using its IP address.  

There might be a few additional reasons because of which you are looking to make your IP address static. Well, whatever is the reason in your case, assigning this is not a difficult task. 

Ways to Set a Static IP Address 0n Windows 11/10

If you want to assign a static IP address to your Windows 11/10 or older operating systems, go through all possible ways, and apply the one that seems applicable to your device –

Assign a Static IP Address via Settings (Win 11/10)

This is the easiest of all four methods discussed in this guide. All you require is to visit the Ethernet/Wireless setting page, and set a static IP address there. Here’s how to configure this setting –

  • Press Win + I to open the Settings page.
  • Select Network & Internet and head over to the right section.
  • If you are on a wired network, select Ethernet else WiFi.
  • Select the device that you are using to establish a network connection.

Assign a Static IP Address in Windows - Select WiFi Properties

  • Click the Edit button available next to IP Assignment.

Assign a Static IP Address in Windows - Edit IP Assignment

  • A pop-up window will appear next. Use the drop-down and select Manual.
  • Enable the IPv4 toggle switch and put a static IP address.
  • Fill in the other areas like Subnet prefix length to ’24’ and Gateway to ‘10.1.2.1’. 
  • If you do have some preferred DNS address, use that in the respective blanks. Else, leave it blank.
  • Similarly, enter the Alternate DNS address if you have any.
  • In the end, hit Save, and restart File Explorer.

Open your default web browser and check if you can browse over the internet. 

2] Use PowerShell (All versions)

If you love doing things via PowerShell/CMD the most, here’s how to assign a static IP address using PowerShell –

  • Right-click on the Windows icon and select Windows Terminal (Admin).
  • The default interface setting on the Terminal is of the Windows PowerShell. If not, use the drop-down menu and select the same. You may also press “Ctrl+Shift+1” to start PowerShell inside Windows Terminal.
  • Copy/paste the below code and hit Enter to see your current network configuration. 

Get-NetIPConfiguration

  • Running this command will display the current configuration on your device. 

Assign a Static IP Address in Windows - PowerShell

  • Note down the following details from the list of the available information –

InterfaceIndex

IPv4Address

IPv4DefaultGateway

DNSServer

  • After you have noted down the values of the above items, run this code –

New-NetIPAddress -InterfaceIndex 5 -IPAddress 192.168.202.149 -PrefixLength 24 -DefaultGateway 192.168.202.15

Note: Make sure to replace the InterfaceIndex, IPAddress, and DefaultGateway values in the above code. By default, the PrefixLength (subnet mask) remains 24 for a home network. So, change it only when the same varies on your device.

  • If you want to assign a static DNS server to your network, run this code – 
  • Set-DnsClientServerAddress -InterfaceIndex 5 -ServerAddresses 192.168.202.15
  • To add a secondary DNS server address, run the above command including an extra address separating with a comma. 

Set-DnsClientServerAddress -InterfaceIndex 5 -ServerAddresses 192.168.202.15, 8.8.8.8

That’s it, your IP address and associated server addresses have become now static. Open your web browser and see if everything is working alright. 

3] Set a Static IP Address via CMD (Win 10 and Below)

Command Prompt also provides a way that you can use to set a static IP address on the computer. However, this method might not work on the latest versions of Windows including Windows Server 2012. 

  • Launch Command Prompt as an administrator.
  • When it opens up, type the code below and press Enter –

ipconfig /all

  • Running this command will display the current configuration on your device. 
  • Go to the Network Adapter (Wireless/Wired), and note down the following details –

IPv4
Subnet mask
Default Gateway
DNS Servers

  • After you have noted down the values of the above items, run this code – 

netsh interface ip set address name ="Interface Name" static IP_Address Subnet Mask Gateway

For example – netsh interface ip set address name=”Wi-Fi” static 192.168.202.149 255.255.255.0 192.168.202.15

In the example above, “Wi-Fi” is the interface name while the others are IP address, Subnet Mask, and default gateway address.

  • If you want to assign a static DNS server address to your device, execute the command below –

netsh interface ip set dns name=”Your DNS Name” static Your_DNS_Server_Address

Now that you have assigned a static IP address, DNS server to your device, open your default web browser and check if everything is working alright. 

Note: Netsh command is deprecated on Windows Server 2012, Windows latest versions. Instead of using the Network Shell command, you can still use the NetTPIP networking module offered by PowerShell.

4] Via Control Panel (Win 8.1/8/7)

Though the PowerShell method will work on all older versions of Windows, if you are not comfortable with running codes, you may use the Control Panel method –

  • First of all, open Control Panel.
  • Select Network & Internet > Network and Sharing Center.
  • On the left navigation pane, hit Change adapter settings.

Network and Sharing Center Control Panel

  • Right-click on the Current Adapter (Wireless/Ethernet), and hit the option – Properties.

Network Connections

  • On the subsequent pop-up window, double-click on the option – Internet Protocol Version 4 (TCP/IPv4).
  • Enable the “Use the following IP address” radio button, and fill in all the necessary details like – Your IP address, Subnet Mask, and default gateway.
  • Next, tick the “Use the following DNS server addresses” checkbox, and type your preferred DNS server, and the Alternate DNS server. The computer will try connecting to the alternate server in case the preferred DNS is not reaching.
  • In the end, hit OK and keep doing so on the prior opened windows as well.
  • After you close all windows, restart your PC.

Sign back into your PC and check if you can surf effectively on your default web browser. 

I hope you now know how to assign a static IP address to your device.

Add Comment

Previous Post Next Post