Go to Settings > Network & internet, click your adapter (Wi-Fi or Ethernet), open the connection properties, click Edit next to IP assignment, switch to Manual, enable IPv4, enter the address, subnet prefix length, gateway, and DNS, then Save. That covers the entire process on Windows 11. The sections below explain how to gather the right values before you touch any settings, what each field means, the command-line alternative, and how to undo the change if anything breaks.

Why a static IP is necessary in the first place

By default, Windows gets its IP address from a DHCP server — usually the router — and that address can change: when the DHCP lease expires, when the router reboots, or when another device joins the network and claims the old lease. For general browsing that does not matter. For anything that needs to reach your PC at a predictable address, it becomes a problem that surfaces at the worst possible moment.

The situations that drive most people to set a static IP, ranked by frequency:

  1. Port forwarding rules — your router can forward an inbound port to only one specific IP. If that IP changes, the rule silently stops working. This is by far the most common reason.
  2. Local servers — a Plex server, game server, home automation hub, or development environment that other devices connect to by IP address.
  3. Mapped drives and network printers — Windows maintains these connections by IP. A DHCP reassignment severs the mapping without any error message at the time it happens.
  4. Remote desktop — RDP shortcuts and VPN split-tunnel routes that hard-code the machine's LAN address break when the address changes.
  5. Troubleshooting isolation — removing IP assignment as a variable when diagnosing intermittent connectivity problems.

Step 0: gather your current network values

You need three values before touching any settings: your subnet, your default gateway, and a safe address to assign. Open Command Prompt (search for cmd in Start) and run:

ipconfig /all

Find your active adapter — the one showing a valid IPv4 address. Valid private LAN addresses fall in the ranges 10.x.x.x, 172.16–31.x.x, or 192.168.x.x. If the address shows as 169.254.x.x, stop: that is an APIPA self-assigned address, which means the PC cannot get a DHCP lease from the router at all. Setting a static IP on top of a broken DHCP situation will not restore connectivity — fix the DHCP failure first.

From the ipconfig /all output, record:

  • IPv4 Address — your current assigned address (e.g., 192.168.1.105)
  • Subnet Mask — typically 255.255.255.0 on home and small office networks
  • Default Gateway — the router's IP. Common defaults include 192.168.1.1, 192.168.0.1, 10.0.0.1, and 192.168.2.1, but read your own output rather than assuming.
  • DNS Servers — what you are currently using, often the same address as the gateway

Keep this window open while you work through the configuration steps.

Choosing a safe static address

You need an address in the same subnet that the router's DHCP server will not also hand to another device. The cleanest approach: log into the router's admin panel by opening a browser and navigating to the gateway address (e.g., 192.168.1.1). Find the DHCP settings section and locate the address pool range — listed as a start address and an end address. Any address outside that range but within the subnet is safe for static assignment.

For a typical home network with a DHCP pool running from 192.168.1.100 to 192.168.1.200, addresses from .2 to .99 and from .201 to .254 are free to use. Do not use the gateway address itself (.1 in this example), the network address (.0), or the broadcast address (.255).

If you cannot log into the router, choose a high address like .240 or .250. Most consumer routers default their DHCP pool to start at .100 or .2, leaving the upper addresses free — but this varies by manufacturer and firmware version, so checking the router directly is always the safer approach.

Before assigning the address, confirm it is not already in use:

ping 192.168.1.10 -n 4

Four request-timeout replies indicate the address is probably free. Actual replies mean another device holds it — choose a different one. Note that some devices, particularly IoT equipment, do not respond to ICMP pings, so this check is a useful filter rather than an absolute guarantee, but it catches the most common conflicts.

Tip: After any IP or DNS change, run a quick check with the DNS Propagation Checker to confirm that external name resolution is working correctly from your connection. This is particularly useful when you change both the static IP and the DNS server at the same time.

Method 1: Windows 11 Settings (GUI)

This is the recommended method for configuring a single machine. The path is consistent across Windows 11 builds from 21H2 onward.

  1. Press Win + I to open Settings, or right-click Start and choose Settings.
  2. In the left sidebar, select Network & internet.
  3. Click Wi-Fi or Ethernet depending on which adapter you are configuring. For Wi-Fi, click the name of your connected network to open its properties page.
  4. Locate the IP assignment row — it shows "Automatic (DHCP)." Click the Edit button to the right of it.
  5. In the dropdown, change the selection to Manual.
  6. Toggle the IPv4 switch on. Four input fields appear.
  7. Fill in each field:
    • IP address — the address you chose (e.g., 192.168.1.10)
    • Subnet prefix length — enter 24 for a standard 255.255.255.0 home network. If your subnet mask from ipconfig is different, convert it: 255.255.0.0 = 16, 255.255.255.128 = 25. For virtually all home and small office networks, 24 is correct.
    • Gateway — the default gateway from ipconfig (e.g., 192.168.1.1). Do not leave this blank.
    • Preferred DNS — see the DNS section below for options.
    • Alternate DNS — optional backup server. Leave blank if you only want one.
  8. Click Save.

Windows applies the settings immediately. The connection may drop for a second or two while the adapter reconfigures. Afterward, verify with ipconfig /all that the new address appears correctly in the output.

Choosing a DNS server

The DNS field is easy to overlook, but leaving it blank after switching to Manual means name resolution fails even though the IP address and routing are configured correctly — websites will not load even though pinging IP addresses works. Three practical options:

  • Your router's gateway address (e.g., 192.168.1.1) — the path of least resistance. The router forwards DNS queries upstream to your ISP. Works for most home setups and preserves local hostname resolution for LAN devices.
  • Google Public DNS — 8.8.8.8 preferred, 8.8.4.4 alternate. Fast, globally anycast, and supports DNS over HTTPS. Full documentation at developers.google.com/speed/public-dns.
  • Cloudflare — 1.1.1.1 preferred, 1.0.0.1 alternate. Privacy-focused and typically among the fastest resolvers in independent benchmarks. Cloudflare commits to not using query data for ad targeting or profiling.

For most users setting a static IP for port forwarding or a local server: enter the gateway address as DNS — it is the option with the fewest moving parts. If you want to take the opportunity to switch to a faster or more private resolver, 1.1.1.1 or 8.8.8.8 are solid choices that are well-documented and reliably available.

Method 2: netsh command line

Use netsh when you need to script the configuration, when the Settings app is blocked by group policy, or when you simply prefer the command line. Open an elevated Command Prompt or Terminal by right-clicking Start and choosing Terminal (Admin) or Command Prompt (Admin).

Get the exact interface name first:

netsh interface show interface

Copy the value from the Name column — typically "Ethernet" or "Wi-Fi." Use this name verbatim in subsequent commands.

Set the static address:

netsh interface ip set address name="Ethernet" static 192.168.1.10 255.255.255.0 192.168.1.1

The arguments after static are: IP address, subnet mask, then gateway. Note that netsh takes the full dotted-decimal mask (255.255.255.0) — not the prefix length number (24) used in the Settings UI. The two interfaces use different formats for the same value.

Set the preferred DNS server:

netsh interface ip set dns name="Ethernet" static 8.8.8.8

Add a secondary DNS server:

netsh interface ip add dns name="Ethernet" 8.8.4.4 index=2

Changes take effect immediately with no confirmation prompt. Confirm with ipconfig /all before closing the terminal.

Verifying the change worked

Run three checks immediately after applying any static IP configuration:

Confirm the address assigned:

ipconfig /all

IPv4 Address, Subnet Mask, Default Gateway, and DNS Servers should all match what you entered. If the address shows as 0.0.0.0 or has reverted to 169.254.x.x, the settings did not apply — reboot and re-enter the values carefully.

Confirm the gateway is reachable:

ping 192.168.1.1

Use your actual gateway address. Four successful replies confirm the adapter is on the network and local routing is working. A failure here typically means the subnet prefix length or gateway value was entered incorrectly.

Confirm DNS is resolving:

nslookup google.com

The response should show the DNS server you configured and return IP addresses for google.com. A timeout means the DNS entry is wrong — either a mistyped address or a server that is not reachable from the machine.

Tip: Use the DNS Lookup tool to verify that a domain resolves correctly from external resolvers after changing your DNS settings — useful for confirming that the DNS server you entered is actually functional and returning correct results from outside your local network.

How to revert to automatic DHCP

If anything breaks or you no longer need the static address, reversing the change is straightforward.

In Settings: follow the same path back to the connection properties, click Edit next to IP assignment, switch to Automatic (DHCP), and Save.

From the command line (elevated prompt required):

netsh interface ip set address name="Ethernet" dhcp netsh interface ip set dns name="Ethernet" dhcp

If the adapter does not acquire a DHCP lease within a few seconds, release and renew manually:

ipconfig /release ipconfig /renew

Run ipconfig /all after the renew completes to confirm a valid lease-based address has been assigned.

DHCP reservation: a cleaner alternative for many setups

If you are setting a static IP purely to keep a port-forward rule valid, consider a DHCP reservation instead. A reservation — sometimes called a static lease — tells the router to always hand out the same IP to a specific device identified by its MAC address. The device continues to use DHCP normally; it simply always receives the same address.

Advantages over a client-side static address: management stays centralized in the router rather than spread across individual machines, the device still gets a proper DHCP lease so there is no risk of a misconfigured subnet mask or missing gateway, and you can change the address later by editing only the router. The tradeoff is that it requires access to the router admin panel and router support for reservations — which most modern consumer routers provide.

The two approaches are not mutually exclusive. For a home server that must always be at the same address regardless of DHCP state, setting both a client-side static IP and a router reservation gives belt-and-suspenders reliability: if DHCP fails entirely, the static address keeps the machine reachable on the LAN.

Common mistakes and misdiagnoses

Entering the dotted subnet mask in the prefix length field. The Windows 11 Settings UI expects a number like 24, not the dotted notation 255.255.255.0. Entering the wrong format either triggers a validation error or creates a silently broken configuration. Use the number.

Leaving the gateway blank. Without a gateway entry, the static IP is applied but the machine has no route off the local subnet. Internet access stops completely while the adapter status looks fine. Always copy the gateway value from ipconfig /all and enter it explicitly — never leave it empty.

Choosing an address in the wrong subnet. The first three octets of the static IP must match the rest of the LAN. If your network is 192.168.1.0/24 and you enter 192.168.0.10 by mistake, the machine configures the address but cannot reach the gateway and traffic goes nowhere. Double-check the subnet against ipconfig output before saving.

Configuring the inactive adapter. A machine with both Wi-Fi and Ethernet active routes traffic through the adapter with the lower routing metric — usually Ethernet when both are plugged in. Changing IP settings on the wrong adapter has no visible effect on the live connection. Check ipconfig /all and identify which adapter shows the default gateway; configure that one.

DNS field left empty after switching to Manual. The Settings UI does not carry over the DHCP-assigned DNS server when you switch to Manual — the field starts blank. Saving without filling it in leaves the machine with working IP connectivity but no name resolution. Always fill in DNS explicitly and run nslookup google.com immediately to confirm it works.

Picking an address inside the DHCP pool. If the chosen address falls within the router's active DHCP range, the router may eventually assign it to another device. When that device wakes up, Windows detects the IP conflict and shows a yellow warning icon on the adapter — symptoms look like random intermittent connectivity drops. Choosing addresses outside the DHCP pool, confirmed by checking the router's range settings, eliminates this class of problem entirely.

IPv6 and 2026 considerations

Setting a manual IPv4 address does not disable IPv6. Windows 11 continues to receive an IPv6 address from the router via SLAAC or DHCPv6 and will prefer IPv6 for connections to dual-stack destinations. In most home setups this coexistence is harmless. If you are configuring port forwarding, note that your public IPv6 address is typically directly routable from the internet — unlike IPv4 behind NAT — so confirm that the router's IPv6 firewall rules are in order before exposing any service.

Windows 11 supports DNS over HTTPS natively. Once you have entered a static IP with a DoH-compatible resolver such as 8.8.8.8 or 1.1.1.1, you can upgrade to encrypted DNS in the same settings area. After saving the IP configuration, find the DNS server assignment row, click Edit, and set the DNS encryption preference to Encrypted only (DNS over HTTPS). This prevents your router, ISP, or any intermediate network from seeing DNS queries in plaintext — increasingly relevant in 2026 as DNS logging at the gateway and carrier level becomes more common in both consumer and enterprise environments.

If your router's WAN IP falls in the 100.64.0.0/10 range, you are behind carrier-grade NAT. A static LAN address works correctly for local networking, but inbound port forwarding from the internet will not function — the router does not hold a true public IP address, so there is no public endpoint for external traffic to reach regardless of how the LAN is configured.