How to Set a Static IP Address in Windows 11



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:
- Click the Search icon.
- Type cmd.
- When Command Prompt appears in the results, click Run as Administrator.
- Type ipconfig /all and press Enter.
- Make a note of the following:
- Adapter Name
- IPv4 Address
- Subnet Mask
- Default Gateway
- DNS Servers
- 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]
- 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
- 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]
- For example, using the values from step 4 we would enter:
netsh interface ip set dns name= “Ethernet” static 10.211.55.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:
- Click the Search icon in the taskbar.
- Type cmd and open the Command Prompt app from the results.
- Type ipconfig /all and press Enter.
- Make a note of the following:
- IPv4 Address
- Subnet Mask
- Default Gateway
- DNS Servers
- Close the Command Prompt window.
- Press Win+I to open Settings.
- Select Network & Internet from the left-hand menu.
- Click Properties.
- Next to IP Assignment click Edit.
- Click the drop-down box.
- Select Manual.
- Toggle IPv4 on.
- 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.
- Click Save.
- 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:
- Click the Search icon.
- Enter powershell in the search field.
- Click Run as Administrator.
- Enter Get-NetIPConfiguration and press Enter.
- Make a note of the following:
- InterfaceIndex
- IPv4Address
- IPv4DefaultGateway
- DNSServer
- 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]
- Press Enter.
- 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]
- 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:
- Click the Search icon in the taskbar.
- Type cmd and open the Command Prompt app from the results.
- Type ipconfig /all and press Enter.
- Make a note of the following:
- IPv4 Address
- Subnet Mask
- Default Gateway
- DNS Servers
- Close the Command Prompt window.
- Click the Search icon again.
- Type Control Panel and open the Control Panel app from the results.
- Select Network and Internet.
- Click Network and Sharing Center.
- In the left-hand menu, click Change Adapter Settings.
- Right-click on your network adapter and select Properties.
- Click Internet Protocol Version 4 (TCP/IPv4).
- Click Properties.
- 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.
- 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.
Leave a Reply
Leave a Reply
