How to configure a static IP on Windows 10 or 11

Windows 11 static IP
Windows 11 static IP (Image credit: Future)

On Windows, the router's Dynamic Host Configuration Protocol (DHCP) server is (usually) responsible for assigning a dynamic Transmission Control Protocol/Internet Protocol (TCP/IP) configuration to every device in the network, including to your computer running Windows 11 or Windows 10.

Although a dynamic IP address is the recommended configuration for most situations, you may need to change to a static IP address if you're thinking about setting up a printer or file sharing, or you have to configure port forwarding on the router to your computer.

The reason is that a dynamic network configuration can change at any time after the lease from the DHCP expires and if the address changes, network resources you may have configured will stop working. Setting a static IP address will always stay the same on the computer, allowing a more reliable experience sharing resources in the network or forwarding ports.

Whatever the reason, on Windows 10 and 11, you have many ways to configure a static TCP/IP address, including using the Settings app and Command Prompt.

This guide will walk you through the different ways to configure a static network configuration on Windows 11 and 10.

How to set a static TCP/IP network configuration on Windows 11

On Windows 11, you can change your computer's dynamic IP configuration to static in at least two ways through the Settings app or commands.

Configure IP from Settings app

To assign a permanent TCP/IP configuration on Windows 11, use these steps:

  1. Open Settings.
  2. Click on Network & internet.
  1. (Optional) Click on Advanced network settings.
  2. Under the "More settings" section, click on Hardware and connection properties.
  3. Note the current IPv4Subnet maskDefault Gateway, and DNS server addresses to determine the new configuration, as it has to be in the same network scope.
  1. Click the Ethernet or Wi-Fi page on the right side from the "Network & internet." page.

(Image credit: Future)
  • Quick note: If you select the Wi-Fi page, you need to click on the connection properties to access the network settings.
  1. Click on the Edit button for the "IP assignment" setting.

(Image credit: Future)
  1. Select the Manual option from the drop-down menu.
  2. Turn on the IPv4 toggle switch.
  3. Confirm the IP address for the computer – for example, 10.1.4.90.
  4. Confirm the subnet mask for the configuration – for example, 255.255.255.0.
  5. Confirm the default gateway address (usually your router's IP) – for example, 10.1.4.1.
  6. Confirm the preferred DNS address – for example, 10.1.4.1.

(Image credit: Future)
  •  Quick note: In a home network, you may also be able to use the router's IP address for the DNS configuration. You can also use third-party DNS services like Google Public DNS, Cloudflare, Cisco's OpenDNS, and others. 
  1. (Optional) Select the "On (automatic template)" option for the "DNS over HTTPS" setting and leave the "Fallback to plaintext" option disabled unless you want to encrypted as well as unencrypted traffic or you're troubleshooting connectivity.
  • Quick note: DNS over HTTPS (DoH) is a feature that encrypts the DNS queries over the HTTPS protocol to improve security and privacy on the internet. You only want to enable this feature if the DNS server supports this feature.
  1. Confirm the alternate DNS address (if applicable).
  2. (Optional) Select the "On (automatic template)" option for the "DNS over HTTPS" setting and leave the "Fallback to plaintext" option disabled.
  3. Click the Save button.

Once you complete the steps, the computer will start using the static network configuration. If everything has been configured correctly, you should be able to open the web browser to access the internet.

If you entered an address (such as the DNS address) and then changed it, you probably won't be able to save the settings. If this is the case, cancel the configuration, start over, enter the correct configuration, and then try to save the settings.

Configure IP from Command Prompt

To set a static TCP/IP configuration on Windows 11, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to see your current networking configuration and press Enter: ipconfig /all
  4. Confirm the name of the adapter and the networking configuration, including the IPv4, Subnet mask, Default Gateway, and DNS Servers.

(Image credit: Future)
  1. Type the following command to configure a static TCP/IP address and press Enternetsh interface ip set address name= "ADAPTER-NAME" static IP-ADDRESS SUBNET-ADDRESS DEFAULT-GATEWAY-ADDRESS

In the above command, replace ADAPTER-NAME with the name of your network adapter. Change IP-ADDRESS SUBNET-ADDRESS  DEFAULT-GATEWAY-ADDRESS with the device IP address, subnet mask, and default gateway addresses you want. For example, this command sets the 10.1.4.90, 255.255.255.0, 10.1.4.1 configuration: netsh interface ip set address name="Ethernet 10Gb" static 10.1.4.90 255.255.255.0 10.1.4.1

(Image credit: Future)
  1. Type the following command to set a DNS server address and press Enternetsh interface ip set dns name="ADAPTER-NAME" static DNS-ADDRESS 

In the command, change ADAPTER-NAME with your adapter's name and DNS-ADDRESS with the DNS server address of the network. For example, this command sets the local router as the DNS server: netsh interface ip set dns name="Ethernet 10Gb" static 10.1.4.1

  1. Type the following command to set an alternate DNS server address and press Enternetsh interface ip add dns name="ADAPTER-NAME" DNS-ADDRESS index=2

In the command, change ADAPTER-NAME with the adapter's name and DNS-ADDRESS with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet 10Gb" 1.1.1.1 index=2

After you complete the steps, the commands will set a static network configuration on Windows 11.

How to set a static TCP/IP network configuration on Windows 10

On Windows 10, you can also use the Settings app and Command Prompt to set up a static IP network configuration.

Configure IP from Settings app

To assign a permanent TCP/IP configuration on Windows 10, use these steps:

  1. Open Settings.
  2. Click on Network & internet.
  3. Click on Ethernet or Wi-Fi.
  4. Click on the active connection on the right side.

Network properties

(Image credit: Future)
  1. Click the Edit button for the "IP assignment" setting.

(Image credit: Future)
  1. Select the Manual option.
  2. Turn on the IPv4 toggle switch.
  3. Confirm the IP address for the computer – for example, 10.1.4.90.
  4. Confirm the subnet prefix length (subnet mask) for the configuration – for example, 24 to specify the 255.255.255.0 subnet mask.

(Image credit: Future)
  • Quick tip: It's important to use the number that represents the network instead of the subnet mask. Otherwise, the configuration won't save. If you don't know the subnet prefix length for your subnet mask, you can use any online subnet calculator to find out.
  1. Confirm the default gateway address (usually your router's IP) – for example, 10.1.4.1.
  2. Confirm the preferred DNS address – for example, 10.1.4.1.
  •  Quick note: In a home network, you may also be able to use the router's IP address for the DNS configuration. You can also use third-party DNS services like Google Public DNS, Cloudflare, Cisco's OpenDNS, and others. 
  1. Confirm the alternate DNS address (if applicable).
  2. Click the Save button.

Once you complete the steps, Windows 10 will start using the static IP configuration. If you lose network connectivity, restart the computer to regain access to the local network and internet.

Configure IP from Command Prompt

To change from dynamic to static IP address with commands on Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to see your current networking configuration and press Enter: ipconfig /all
  4. Confirm the name of the adapter and the networking configuration, including the IPv4, Subnet mask, Default Gateway, and DNS Servers.

(Image credit: Future)
  1. Type the following command to configure a static TCP/IP address and press Enternetsh interface ip set address name= "ADAPTER-NAME" static IP-ADDRESS SUBNET-ADDRESS DEFAULT-GATEWAY-ADDRESS

In the above command, replace ADAPTER-NAME with the name of your network adapter. Change IP-ADDRESS SUBNET-ADDRESS  DEFAULT-GATEWAY-ADDRESS with the device IP address, subnet mask, and default gateway addresses you want. For example, this command sets the 10.1.4.90, 255.255.255.0, 10.1.4.1 configuration: netsh interface ip set address name="Ethernet 10Gb" static 10.1.4.90 255.255.255.0 10.1.4.1

(Image credit: Future)
  1. Type the following command to set a DNS server address and press Enternetsh interface ip set dns name="ADAPTER-NAME" static DNS-ADDRESS 

In the command, change ADAPTER-NAME with your adapter's name and DNS-ADDRESS with the DNS server address of the network. For example, this command sets the local router as the DNS server: netsh interface ip set dns name=" Ethernet 10Gb" static 10.1.4.1

  1. Type the following command to set an alternate DNS server address and press Enternetsh interface ip add dns name="ADAPTER-NAME" DNS-ADDRESS index=2

In the command, change ADAPTER-NAME with the adapter's name and DNS-ADDRESS with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet0" 1.1.1.1 index=2

After you complete the steps, the network configuration will switch from dynamic to static on Windows 10.

Mauro Huculak

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.