How to change IP address Windows 11: a step-by-step guide

To change your IP address on Windows 11, open Settings > Network & internet, select your Wi-Fi or Ethernet network, select Edit next to IP assignment, choose Manual, turn on IPv4 and type the new address, subnet mask and gateway.

This guide also covers netsh in Command Prompt, PowerShell, renewing a DHCP address, router reservations, Windows 10, switching back to automatic and fixes when the connection drops.

How to change IP address Windows 11: a step-by-step guide
Under Edit IP settings, choose Manual, turn on IPv4 and fill in the address, subnet mask, gateway and DNS before selecting Save. (Image: Microsoft Q&A)

How to change IP address on Windows 11

These steps set a static (manual) IPv4 address. Have the address, subnet mask, gateway and DNS servers ready before you start.

  1. Select Start > Settings > Network & internet.
  2. For Wi-Fi, select Wi-Fi > Manage known networks and choose your network. For a wired connection, select Ethernet, then select the network you are connected to.
  3. Next to IP assignment, select Edit.
  4. Under Edit IP settings, choose Manual, then turn on IPv4.
  5. Type the new address in IP address, then fill in Subnet mask and Gateway.
  6. Type DNS servers in Preferred DNS and Alternate DNS.
  7. Select Save.

Windows applies the new address straight away. Choose an address in the same range as your router, for example 192.168.1.50 when the gateway is 192.168.1.1, and make sure no other device uses it.

Types of IP address

Type What it is Who sets it
Private (local) IP The address your PC uses on your home or office network, such as 192.168.1.3 Your router, or you in Windows
Public IP The address websites see for your whole network Your internet provider
Dynamic IP An address handed out automatically by DHCP; it can differ each time the device connects The router's DHCP server
Static IP An address typed in manually that stays the same You, in Windows Settings, netsh or PowerShell
Reserved IP A DHCP address the router always gives the same device You, in the router's admin page
IPv4 and IPv6 Two address formats; Windows 11 has separate IPv4 and IPv6 switches under Manual Router or you

Why change your IP address on Windows?

Reason Best approach
A NAS, server or game setup needs a fixed address A static IP in Windows or a reservation on the router
Port forwarding rules point at one address A reserved or static IP so the rule keeps working
The PC picked up a wrong or duplicate address Release and renew the DHCP lease
A static address no longer fits a new network Switch IP assignment back to Automatic (DHCP)
You need a different public IP Contact your internet provider; Windows settings only change the local address

If a static address is for port forwarding, the same setup often fixes a strict console or PC NAT type on Windows.

How to change IP address in Windows 11 using CMD

netsh sets a static address in one line. Run it in Command Prompt opened as administrator.

  1. Select Start, type cmd, right-click Command Prompt and select Run as administrator.
  2. Run netsh interface ipv4 show config and note the adapter name, such as Wi-Fi or Ethernet.
  3. Save the current settings first with ipconfig /all >ipconfig.txt.
  4. Set the address, mask and gateway: netsh interface ipv4 set address name="Wi-Fi" source=static address=192.168.1.50 mask=255.255.255.0 gateway=192.168.1.1.
  5. Set a DNS server: netsh interface ipv4 set dnsservers name="Wi-Fi" source=static address=192.168.1.1.
  6. Run ipconfig /all and check that DHCP Enabled shows No and the new address is listed.

Replace the example values with your own. The set address command removes any previous static addresses and default gateways on that adapter before it adds the new one.

Change IP address in Windows 11 with PowerShell

  1. Select Start, type PowerShell, right-click Windows PowerShell and select Run as administrator.
  2. Run Get-NetIPInterface and note the ifIndex number of your adapter.
  3. Run New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.1.50 -PrefixLength 24 -DefaultGateway 192.168.1.1, using your own index and addresses.
  4. Run Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.168.1.1 to set DNS.
  5. Run Get-NetIPConfiguration to see the new settings.

PrefixLength 24 equals a subnet mask of 255.255.255.0. The default gateway must be in the same subnet as the new address, or the command fails.

Releasing DHCP lease and resetting your dynamic IP

When the PC gets its address automatically, releasing and renewing the lease asks the router for a fresh one. The router may hand back the same address.

  1. Open Command Prompt as administrator.
  2. Run ipconfig /release to drop the current DHCP address on every adapter.
  3. Run ipconfig /renew to request a new address.
  4. To renew one adapter only, add its name, for example ipconfig /renew Wi-Fi.
  5. Run ipconfig and read the new IPv4 Address.

/renew only works on adapters set to get an address automatically. The other ipconfig release and renew switches target IPv6 or a single adapter.

Configuring your network router DHCP settings

An address reservation makes the router give the same IP to your PC every time, while Windows stays on automatic. This suits laptops that also join other networks. The steps below are for NETGEAR routers; other brands use similar LAN or DHCP pages.

  1. Open a web browser on a device connected to the router and go to http://www.routerlogin.net.
  2. Sign in with the router user name and password.
  3. Select ADVANCED > Setup > LAN Setup (some models show Settings > Setup > LAN Setup).
  4. In the Address Reservation section, select Add.
  5. Type the IP address to assign, chosen from the router's LAN subnet, such as 192.168.1.x.
  6. Find the PC's MAC address and type it in, or copy it from the router's Attached Devices page.
  7. Select Apply, then restart the PC or release and renew its DHCP lease.

The reserved address only takes effect the next time the PC contacts the router's DHCP server.

Reserve an IP address on a NETGEAR router in LAN Setup Address Reservation
On the LAN Setup page, select Add under Address Reservation, enter the IP address and MAC address, then select Apply. (Image: kb.netgear.com)

Setting a static IP address on Windows 10

  1. Select Start > Settings > Network & Internet.
  2. For Wi-Fi, select Wi-Fi > Manage known networks and choose the network. For Ethernet, select Ethernet and then your network.
  3. Under IP assignment, select Edit.
  4. Choose Manual and turn on IPv4.
  5. Enter the IP address, Subnet mask, Gateway, Preferred DNS and Alternate DNS.
  6. Select Save.

The DNS over HTTPS options shown in Windows 11 are not available in Windows 10. The netsh and PowerShell commands above work the same on Windows 10.

Change IP address back to automatic (DHCP) in Windows 11

  1. Open Settings > Network & internet and select your Wi-Fi or Ethernet network.
  2. Next to IP assignment, select Edit.
  3. Choose Automatic (DHCP) and select Save.
  4. Or in an admin Command Prompt, run netsh interface ipv4 set address name="Wi-Fi" source=dhcp.
  5. Set DNS back to automatic with netsh interface ipv4 set dnsservers name="Wi-Fi" source=dhcp.

With Automatic (DHCP), the router sets the IP address and DNS servers, so the PC works when you move it to another network.

How to find your IP address?

  1. Open Settings > Network & internet.
  2. Select Wi-Fi and then the network you are connected to, or select Ethernet.
  3. Read the address next to IPv4 address.
  4. Or open Command Prompt and run ipconfig; the IPv4 Address line shows the current address.
  5. Ping the router's gateway address to confirm the new address can reach the network.

Run ipconfig /all for the full picture: DHCP status, gateway and DNS servers. The public address websites see is different, and you can find your IP address on Windows for both kinds.

Tips for changing IP address on Windows 11

Tip Why it matters
Record the old settings first ipconfig /all >ipconfig.txt saves them to a text file you can copy back
Stay in the router's subnet An address outside the LAN range cannot reach the gateway
Avoid addresses the router hands out A static IP inside the DHCP pool can clash with another device
Always fill in DNS in Manual mode Without DNS servers, websites will not load even though the network connects
Prefer a router reservation on laptops The PC keeps DHCP, so it still works on other networks
Use DNS over HTTPS only with a supporting server Windows 11 can encrypt DNS queries to servers you specify
Change IP address Windows 11 DNS settings with DNS over HTTPS turned on
Only pick a DNS over HTTPS option when the DNS server you typed supports encrypted queries; otherwise leave it Off. (Image: Microsoft Q&A)

Windows 11 static IP address not working

No internet after setting a static IP

The gateway or DNS servers are wrong, or the address is outside the router's subnet.

  1. Open Settings > Network & internet, select the network and select Edit next to IP assignment.
  2. Check that the Gateway is the router address and the IP address is in the same range.
  3. Add DNS servers in Preferred DNS, then select Save.
  4. If it still fails, choose Automatic (DHCP) to get back online.

Default gateway is blank or the address starts with 169.254

Old static settings left behind after a network driver reinstall stop the new values from saving. Microsoft documents this for Windows 7 SP1 and Server 2008 R2 SP1.

  1. Set the adapter to obtain an address automatically and save.
  2. Enter the static address, mask and gateway again and save.
  3. Repeat both steps once more, or run the same netsh interface ipv4 set address command twice; the first run may return "Object already exists".

Why is my IP address changing?

The PC uses DHCP, and the router may hand out a different address each time the device connects.

  1. Reserve an address for the PC on the router.
  2. Or set a static IP in Settings > Network & internet > IP assignment > Edit > Manual.

ipconfig /renew does nothing

Renew only works on adapters set to get an IP address automatically.

  1. Switch IP assignment to Automatic (DHCP) first.
  2. Run ipconfig /release, then ipconfig /renew again.

PowerShell returns an error about the default gateway

New-NetIPAddress needs the gateway in the same subnet as the new IPv4 address.

  1. Check the PrefixLength matches your subnet mask, such as 24 for 255.255.255.0.
  2. Use a gateway address inside that subnet and run the command again.
Windows 11 static IP address not working: Can't save IP settings error
Here the Gateway and Preferred DNS boxes are empty; enter the router address as the gateway and add DNS servers. (Image: Microsoft Q&A)

Change IP address Windows 11 FAQ

How do I change my IP address on Windows 11 with CMD?

Open Command Prompt as administrator and run netsh interface ipv4 set address name="Wi-Fi" source=static address=192.168.1.50 mask=255.255.255.0 gateway=192.168.1.1, using your adapter name and addresses. Then set DNS with netsh interface ipv4 set dnsservers.

How do I change the IP address on Windows 10?

Open Settings > Network & Internet, choose Wi-Fi > Manage known networks or Ethernet, select your network, select Edit under IP assignment and pick Manual. Turn on IPv4, enter the address, subnet mask, gateway and DNS, then select Save.

How do I change the IP address on Windows 7?

Windows 7 uses the Internet Protocol Version 4 (TCP/IPv4) Properties dialog for the adapter. Select Use the following IP address, type the address, subnet mask and default gateway, add DNS servers and select OK. The netsh command also works on Windows 7.

How do I change the IP address on Windows Server?

Use PowerShell: run Get-NetIPInterface to find the interface index, then New-NetIPAddress with the address, prefix length and default gateway. Set DNS with Set-DnsClientServerAddress. On Server Core, netsh interface ipv4 set address works too.

Why change IP address?

Common reasons are giving a NAS, server or printer a fixed address, keeping port forwarding rules working, fixing an address conflict, or moving a PC from a static address back to DHCP. A different public IP needs your internet provider, not Windows.

Does my computer IP address change?

Yes, if it uses DHCP. The router hands out addresses automatically, and a device may not get the same one each time it connects. A static IP in Windows or a reservation on the router keeps it fixed.

What does changing my IP address do?

Changing the local IP gives your PC a new address on your home or office network. Other devices and port forwarding rules must use the new address. It does not change the public IP that websites see for your connection.

Can I revert to my original IP address?

Yes. Set IP assignment back to Automatic (DHCP) to let the router assign an address again, or type the old values back in. Saving ipconfig /all output to a text file before you change anything makes this easy.

Is changing my IP address legal?

Yes. Setting the local IP address of your own PC is a normal network setting that Windows provides in Settings. On a work or school network, ask the administrator first, because a manual address can clash with their DHCP plan.

Step-by-step summary

Open Settings > Network & internet, select your network, select Edit next to IP assignment, choose Manual, turn on IPv4, enter the IP address, subnet mask, gateway and DNS, then select Save. The Settings route covers most home PCs. Use netsh or PowerShell for scripts and servers, a router reservation for laptops, and Automatic (DHCP) to undo the change.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

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