Skip to content

How-ToOS

How to Set a Static IP Address in Windows 11

How to set a static IP address in Windows 11 for Ethernet or Wi-Fi using Settings or PowerShell's New-NetIPAddress, what to plan first so you don't clash with other devices, and why a router DHCP reservation can be simpler.

By , Systems & Technical Editor

3 min read

How to Set a Static IP Address in Windows 11

Most home PCs get their IP address automatically from the router using DHCP, and Microsoft recommends sticking with DHCP for most people. A fixed (static) IP address is still useful in some situations: when you share files or a printer from your PC, run a game or media server, host a local AI server for other devices, forward a port on your router or use Wake-on-LAN. This guide follows Microsoft's official instructions for Windows 11. Router menus vary by manufacturer.

Before you start: plan your address

A static IP only works well if it doesn't clash with another device. Before changing anything, note your current settings:

  1. Open Settings > Network & internet, then select Ethernet or Wi-Fi and your connection.

  2. Note the IP address, DNS servers and other details Windows shows for that connection.

You'll need four things for a manual setup: an IP address, a subnet mask (or prefix length), a gateway (usually your router's address) and at least one DNS server. Pick an address on the same network as your router that no other device is using. Many routers let you see which addresses they hand out through DHCP; check your router's manual and choose an address outside that range, or use your router's address reservation feature instead (see below).

Method 1: Windows 11 Settings

Microsoft's steps are the same for Wi-Fi and Ethernet, apart from where you find the connection:

  1. Go to Settings > Network & internet.

  2. For Wi-Fi, select Wi-Fi > Manage known networks and choose the network. For Ethernet, select Ethernet, then the network you're connected to.

  3. Next to IP assignment, select Edit.

  4. Under Edit IP settings, choose Manual, then turn on IPv4.

  5. Enter the IP address, Subnet mask and Gateway.

  6. Enter a Preferred DNS and, optionally, an Alternate DNS server.

  7. Optionally choose a DNS over HTTPS setting for each DNS server. Microsoft notes this option isn't available in Windows 10.

  8. Select Save.

To go back to automatic settings, return to the same page and choose Automatic (DHCP). Microsoft says the IP address and DNS server settings will then be set automatically by your router or access point.

For Wi-Fi, Microsoft's steps set this for the saved network you choose under Manage known networks. If you want to change only your DNS server, our guide to changing DNS in Windows 11 covers that separately.

Method 2: PowerShell

Microsoft's New-NetIPAddress cmdlet creates and configures an IP address from PowerShell. Microsoft's example adds an IPv4 address to the network adapter at interface index 12:

New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.0.1 -PrefixLength 24 -DefaultGateway 192.168.0.5

Replace the interface index, IP address and gateway with your own values. Microsoft explains that a prefix length of 24 is the same as a subnet mask of 255.255.255.0, and that the default gateway must be in the same subnet as the IPv4 address. It also notes that if you add an IP address to an interface where DHCP is enabled, DHCP is automatically turned off. You'll typically need an administrator PowerShell window, and to remove the address again, Microsoft's example uses Remove-NetIPAddress.

Alternative: reserve an address on your router

Many routers offer DHCP reservation, which tells the router to always give the same address to your PC. Your PC stays on automatic settings, which can avoid manual address changes on the PC. The option's name and location depend on your router, so check its manual.

What to do next

With a fixed address, it's easier to map a network drive, set up Wake-on-LAN, or share Ollama on your local network. If games lag when others are streaming, see setting up QoS on your router.

Our verdict

For most people, DHCP is the right default. If you need a PC to stay at the same address, set it under Settings > Network & internet > IP assignment > Edit > Manual, or use New-NetIPAddress in PowerShell, and pick an address that won't clash with other devices. A DHCP reservation on your router is often the tidier option.

The bottom line

For most people, DHCP is the right default. If you need a PC to stay at the same address, set it under Settings > Network & internet > IP assignment > Edit > Manual, or use `New-NetIPAddress` in PowerShell, and pick an address that won't clash with other devices. A DHCP reservation on your router is often the tidier option.

Sources

  1. 01Microsoft Support: Essential network settings and tasks in Windows
  2. 02Microsoft Learn: New-NetIPAddress

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Initialise and Format a New SSD in Windows 11

How-To

How to Initialise and Format a New SSD in Windows 11

How to initialise and format a new SSD in Windows 11 with Disk Management: open it as an administrator, initialise the disk as GPT, create a New Simple Volume, assign a drive letter and format it as NTFS, plus what to check if it doesn't appear.

Marcus Thorne3 min

How to Remove an Image Background in Windows 11 with Paint

How-To

How to Remove an Image Background in Windows 11 with Paint

How to remove an image background in Windows 11 with Paint's AI-powered Background Removal tool: remove it from a whole image in one click or from a rectangle selection, which Paint version you need, and tips for cleaner cut-outs.

Marcus Thorne3 min

How to Enable Hyper-V in Windows 11 (Pro and Enterprise)

How-To

How to Enable Hyper-V in Windows 11 (Pro and Enterprise)

How to enable Hyper-V in Windows 11 Pro or Enterprise using Windows Features, PowerShell or DISM, with Microsoft's requirements (SLAT, 4GB RAM, no Home edition) and its warning about VirtualBox and VMware Workstation.

Marcus Thorne3 min