|

How To Set A Static IP Address In Windows 11 (2026)

Windows 11 gets its IP address automatically unless you tell it otherwise.

Setting a static IP address takes one Settings page and five boxes.

This guide gives the Settings steps, a command-line option, and how to switch back.

Quick answer: how to set a static IP in Windows 11

StepWhat to do
1Open Settings > Network & internet, then Wi-Fi or Ethernet
2Select your connected network and find IP assignment
3Select Edit next to IP assignment and choose Manual
4Turn on IPv4 and fill in the address, subnet mask, gateway and DNS
5Select Save

These steps come from Microsoft’s essential network settings page.

Automatic or manual: what Microsoft recommends

Microsoft says TCP/IP settings control how your PC communicates with other devices on a network.

Microsoft recommends DHCP, which assigns an IP address automatically if your network supports it.

With DHCP you do not need to change anything when you move to another location.

IP assignment optionWho sets the addresses
Automatic (DHCP)Your router or access point sets the IP and DNS server addresses (recommended)
ManualYou enter the IP and DNS server addresses yourself

Gather your numbers first

Microsoft’s older support article says to pick a unique address from your network’s range and to get valid addresses from your network administrator.

The easiest way to see your current values is the ipconfig command, which shows the address, subnet mask and default gateway for each adapter.

Our guide to finding your IP and MAC address on Windows 11 walks through that command.

FieldWhat Microsoft says to enter
IP addressA unique address from your network’s range
Subnet maskYour network’s subnet mask
GatewayThe address of the device that connects your network to other networks or the Internet
Preferred DNSThe server that resolves host names to IP addresses
Alternate DNSA backup DNS server for when the preferred one is unavailable

Set a static IP on Wi-Fi

  1. Select Start > Settings > Network & internet.
  2. Select Wi-Fi > Manage known networks, then choose your network.
  3. Next to IP assignment, select Edit.
  4. Choose Manual and turn on IPv4.
  5. Enter the IP address, Subnet mask and Gateway.
  6. Enter the Preferred DNS and Alternate DNS addresses.
  7. Choose a DNS over HTTPS option and select Save.

Set a static IP on Ethernet

  1. Select Start > Settings > Network & internet.
  2. Select Ethernet, then select your connected network.
  3. Next to IP assignment, select Edit.
  4. Follow steps 4 to 7 from the Wi-Fi list above.

The Ethernet and Wi-Fi pages use the same Edit window, so the fields are identical.

The DNS over HTTPS choices

The Edit window asks you to choose a DNS over HTTPS option, and Microsoft describes four.

OptionWhat it does, per Microsoft
OffDNS queries go to the server unencrypted over HTTP
On (automatic template)Queries are encrypted over HTTPS using default settings or automatic discovery
On (manual template)Queries are encrypted over HTTPS using the template you type in the DNS over HTTPS template box
Fallback to plaintextAvailable with either template; On sends a query unencrypted if HTTPS fails, Off sends nothing

Microsoft says the DNS over HTTPS setting is not available in Windows 10.

To change only your DNS server, see our guide to changing the DNS server in Windows 11.

Set a manual IPv6 address

The same Edit window handles IPv6, with one difference in the fields.

  1. In the Edit window, choose Manual and turn on IPv6.
  2. Enter the IP address, Subnet prefix length and Gateway.
  3. Enter the Preferred DNS and Alternate DNS addresses.
  4. Choose a DNS over HTTPS option and select Save.

IPv6 asks for a subnet prefix length where IPv4 asks for a subnet mask.

Set a static IPv4 address with netsh

Microsoft’s command reference documents netsh interface ipv4 set address for setting a static address.

netsh interface ipv4 set address name="Ethernet" source=static address=192.168.1.50 mask=255.255.255.0 gateway=192.168.1.1

Replace the name, address, mask and gateway with your own values.

ParameterWhat Microsoft says it does
nameThe interface name or index
sourcedhcp turns on DHCP; static turns it off and must be set when you configure an address or gateway
addressThe IPv4 address to add or change
maskThe subnet mask for that address
gatewayThe default gateway address, or none
storeactive lasts until the next restart; persistent survives a restart and is the default

Microsoft says the command removes any previous static addresses and default gateways before it adds the new one.

Set the DNS servers separately with netsh interface ipv4 set dnsservers, which takes the same name and source values.

Set a static IP with PowerShell

Microsoft’s older support article also lists PowerShell commands for current releases of Windows.

New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.1.50 -PrefixLength 24 -DefaultGateway 192.168.1.1 Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 192.168.1.10,192.168.1.11

The article says New-NetIPAddress fails if the interface already has an IPv4 address, so switch to DHCP or remove the old address first.

That page was written for Windows Server and tells readers to verify menu names on their version, so the Settings method above is the safer choice on Windows 11.

Go back to automatic (DHCP)

  1. Open the same network page in Settings and select Edit next to IP assignment.
  2. Choose Automatic (DHCP).
  3. Select Save.

The command-line way back is netsh interface ipv4 set address with source=dhcp.

Microsoft’s older article adds that ipconfig /release and ipconfig /renew request a new lease from the DHCP server.

If the static address does not work

SymptomCause Microsoft gives
Windows says the address is already in useAnother device has that address, so assign an unused one
Cannot reach other computersAn incorrect subnet mask puts the PC on a different logical network
Websites will not load but IP addresses workThe DNS server address is wrong or missing

If IPv4 itself is missing, Microsoft says to open Command Prompt as administrator and run netsh interface ipv4 install.

If the connection is still broken, try our Windows 11 network reset guide.

Sources

Leave a Reply

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