How-To

How to Set a Static IP Address in Windows 11

how to set a static ip in windows 11 featured image

Do you need to assign a static IP address to your computer? Learn how to set a static IP address in Windows 11 using this guide.

By default, the devices on your home network are automatically assigned dynamic IP addresses that will change when the router restarts or devices join and leave the network. Sometimes, however, you might prefer for your computer to have a static IP address that is fixed and won’t change.

It’s possible to set a static IP for your computer directly through Windows. Here’s how to set a static IP address in Windows 11.

What is an IP Address?

An Internet Protocol address (IP address) is a string of numbers used to identify a device that is connected to the internet or a local network. Just like the address of your home, an IP address can be used to uniquely identify one specific device, but an IP address can also identify an entire network.

At home, for example, you probably have multiple devices connected to the internet through your router. Your Internet Service Provider (ISP) will assign a unique public IP address to your router. This address uniquely identifies your home network, a bit like the town or zip code in a postal address.

Your router will then assign local IP addresses to all of the devices in your network. These can be the same as the local IP addresses on other people’s networks, just as there will be lots of homes with the address 201 Main Street, but only one in your specific town or zip code.

What is a Static IP Address?

There are two types of IP addresses: dynamic and static. As the names suggest, a dynamic IP address is one that changes. A static IP address always remains the same.

Your ISP assigns your public IP address, and by default, you have little control over this. It may stay the same forever, but it is likely to change over time. You can opt to have a static IP address, but many ISPs will charge for the service.

The local IP addresses assigned by your router to all of the devices in your network can also be dynamic or static. By default, these are usually dynamic; the local IP addresses will change as devices drop off and join the home network. However, you can opt to give your devices static IP addresses. This means that the local IP address for a specific device will always be the same.

Why Would You Want a Static IP Address?

Most of the time, IP address do their work behind the scenes, and you don’t need to worry about whether they’re dynamic or static at all. However, there are some instances where having a static IP address is favorable or even necessary.

For example, if you’re hosting a server on your local network, a static IP makes it simple for other devices on the network to access that server. It might also be beneficial to assign a static IP to a device on the network (such as a printer) so that other devices can always access it using the same IP address.

If you want to give specific devices a static IP address, you can usually assign them through your router. If you’re running Windows 11, you can also set a static IP address for your computer. There are several ways to do this.

How to Set a Static IP on Windows 11 Using the Command Prompt

If you want to set a static IP, the simplest way to do so is to set the current IP address assigned to your computer as the static IP. There are a few pieces of information you’re going to need. The easiest way to quickly get this information is by using the command prompt.

Once you’ve got this information, you can also set your static IP directly through the command prompt.

To set a static IP through Command Prompt:

  1. Click the Search icon.
    windows 11 search
  2. Type cmd.
  3. When Command Prompt appears in the results, click Run as Administrator.
    windows 11 run command prompt as administrator
  4. Type ipconfig /all and press Enter.
    windows 11 ipconfig
  5. Make a note of the following:
  • Adapter Name
  • IPv4 Address
  • Subnet Mask
  • Default Gateway
  • DNS Servers
    windows 11 powershell details
  1. Type the following command, replacing the sections in square brackets (and the square brackets themselves) with the values you noted down in step 4:
netsh interface ip set address name= “[Adapter Name]” static [IPv4 address] [Subnet Mask] [Default Gateway]
  1. For example, for the values shown in step 4, we would enter:
netsh interface ip set address name= “Ethernet” static 10.211.55.4 255.255.255.0 10.211.55.1

windows 11 netsh command

  1. To set the DNS server, enter the following, replacing the square brackets as before:
    netsh interface ip set dns name = “[Adapter Name] static [First DNS Server]
  2. For example, using the values from step 4 we would enter:
netsh interface ip set dns name= “Ethernet” static 10.211.55.1

windows 11 netsh set dns command

  1. Your static IP address is now set.

How to Set a Static IP on Windows 11 Using Windows Settings

If you’re not confident using Command Prompt to make changes to your computer, you can set a static IP address for your computer directly through Windows 11 settings. You’ll still need to get the current settings using Command Prompt, however.

To set a static IP through Windows 11 settings:

  1. Click the Search icon in the taskbar.
    windows 11 search
  2. Type cmd and open the Command Prompt app from the results.
    windows 11 run command prompt as administrator
  3. Type ipconfig /all and press Enter.
    windows 11 ipconfig
  4. Make a note of the following:
    • IPv4 Address
    • Subnet Mask
    • Default Gateway
    • DNS Servers
      windows 11 ip details
  1. Close the Command Prompt window.
  2. Press Win+I to open Settings.
  3. Select Network & Internet from the left-hand menu.
    windows 11 network and internet settings
  4. Click Properties.
    windows 11 network properties
  5. Next to IP Assignment click Edit.
    windows 11 ip assignment
  6. Click the drop-down box.
    windows 11 ip settings dropdown
  7. Select Manual.
    windows 11 manual ip settings
  8. Toggle IPv4 on.
    windows 11 ipv4 toggle
  9. Enter the IP Address, Subnet Mask, Gateway, Preferred DNS that you copied down in step 4 in the appropriate fields, as well as an Alternate DNS if you want to use one.
    windows 11 ipv4 settings
  10. Click Save.
  11. You now have a static IP address.

How to Set a Static IP on Windows 11 Using PowerShell

You can also set a static IP address using PowerShell, a configuration management tool that is included with Windows 11. Using this method, you can’t set the current IP address to be static, so when you make a note of the IPv4Address in step 5, you’ll need to change the last digit to something else in order for this method to work.

To set a static IP using PowerShell:

  1. Click the Search icon.
    windows 11 search
  2. Enter powershell in the search field.
  3. Click Run as Administrator.
    windows 11 run powershell
  4. Enter Get-NetIPConfiguration and press Enter.
    windows 11 powershell get ip configuration
  5. Make a note of the following:
    • InterfaceIndex
    • IPv4Address
    • IPv4DefaultGateway
    • DNSServer
      windows 11 ip details
  1. Type the following command, replacing the sections in square brackets with the values you just noted down, except for IPv4Address which should have a different last digit:
    New-NetIPAddress -InterfaceIndex [InterfaceIndex] -IPAddress [IPv4Address] -PrefixLength 24 -DefaultGateway [IPv4DefaultGateway]
    windows 11 set static ip
  2. Press Enter.
  3. To set the DNS server, enter following, once again replacing the sections in square brackets with the values you noted in step 5:
    Set-DnsClientServerAddress -InterfaceIndex [InterfaceIndex] -ServerAddresses [DNSServer]
    windows 11 set dns
  4. Your static IP is now set.

How to Set a Static IP on Windows 11 Using the Control Panel

The final method of setting a static IP involves using the Control Panel.

To set a static IP from the Control Panel:

  1. Click the Search icon in the taskbar.
    windows 11 search
  2. Type cmd and open the Command Prompt app from the results.
    windows 11 run command prompt as administrator
  3. Type ipconfig /all and press Enter.
    windows 11 ipconfig
  4. Make a note of the following:
    • IPv4 Address
    • Subnet Mask
    • Default Gateway
    • DNS Servers
      windows 11 ip details
  1. Close the Command Prompt window.
  2. Click the Search icon again.
  3. Type Control Panel and open the Control Panel app from the results.
    windows 11 run command prompt
  4. Select Network and Internet.
    windows 11 network and internet
  5. Click Network and Sharing Center.
    windows 11 network sharing center
  6. In the left-hand menu, click Change Adapter Settings.
    windows 11 change adapter settings
  7. Right-click on your network adapter and select Properties.
    windows 11 network adapter properties
  8. Click Internet Protocol Version 4 (TCP/IPv4).
    windows 11 ipv4 settings
  9. Click Properties.
    windows 11 ipv4 properties
  10. Select Use the Following IP Address and enter the IP Address, Subnet Mask, Default Gateway, and DNS Servers that you noted down in step 4.
    windows 11 set ipv4 details
  11. Click OK and your static IP is set.

Managing Your Windows 11 PC

Knowing how to set a static IP address in Windows 11 ensures that your computer always keeps the same local IP address. There are plenty of other ways to take control of your Windows 11 PC, too.

You can learn how to create a pin to sign in to Windows 11 more quickly. You might decide that you want to disable PowerShell on Windows 11. And if you’re doing a lot of tinkering behind the scenes, you can learn how to make Windows 11 apps always run as an administrator.

Click to comment

Leave a Reply

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

 

To Top