Fix: Can't change static IP address & DNS server in Windows 10

Learn what to do when you get the Local Network an unexpected condition occurred error

Reading time icon 6 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • If you can't change your static IP address and DNS servers on Windows 10 & 11, you seem to be stuck with the ones provided by your ISP.
  • Using dynamic IP addresses and private DNS servers are great ways to increase privacy on your machine.
  • There are many ways to force-change these settings and we have the right solutions for that.
How to change static IP address & DNS server

Your IP address represents your ID when you go online. It’s assigned by your ISP and can be used to trace your approximate location.

Meanwhile, your DNS servers are responsible for translating the domains you search online into IP addresses so that machines can understand where you want to go. They are also assigned by your ISP.

However, many privacy-concerned users understand why it’s critical to change their IP address and DNS servers on Windows 10 and 11and other operating systems. It’s problematic when that’s not possible.

Many of our readers reported that they can’t change the IP address and the Internet Protocol v4 properties are greyed out.

In other cases, the following error message pops up from Local Network: An unexpected condition occurred. Not all of your requested changes in settings could be made.

Windows 10 says that Windows 10 an unexpected condition occurred

However, you can fix the unexpected condition error on Ethernet or Wi-Fi so that you can change your static IP address and DNS servers.

How can I change static IP address & DNS in Windows 10?

1. Set a static IP address using PowerShell

  1. Press the Windows 10 Start button and type powershell, then click on Run as administrator from the results.
  2. Copy and paste the following command, but don’t hit Enter until setting your actual IP address and other properties:
New-NetIPAddress
   [-IPAddress] <String>
   [-DefaultGateway <String>]
   [-AddressFamily <AddressFamily>]
   [-Type <Type>]
   [-PrefixLength <Byte>]
   [-ValidLifetime <TimeSpan>]
   [-PreferredLifetime <TimeSpan>]
   [-SkipAsSource <Boolean>]
   [-PolicyStore <String>]
   -InterfaceIndex <UInt32>
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

You can use the New-NetIPAddress cmdlet to set up a new IP address and customize settings.

We suggest reading Microsoft’s complete documentation on New-NetIPAddress to understand the role of each parameter.

2. Reset your IP address using Command Prompt

  1. Press Win + R, type cmd and press Enter.
  2. Type this command and press Enter to release your current IP. The Ethernet adapter section will now be void of numerical values: ipconfig/release
  3. Enter this command and press Enter to reset your IP: ipconfig/renew

You can use the first command to release the current IP address of your computer. Keep in mind that you will have no Internet access at this point.

However, you’ll get back online in no time after using the second command. Your computer will request a new IP address from a DHCP server, such as your router.

3. Change your DNS server using Windows PowerShell

  1. Click the Start button, type powershell, and select Run as administrator from the results.
  2. Copy and paste the following command, but don’t hit Enter until specifying the server address of your DNS client and other properties:
Set-DnsClientServerAddress
   [-InterfaceAlias] <String[]>
   [-ServerAddresses <String[]>]
   [-Validate]
   [-ResetServerAddresses]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

You can use the Set-DnsClientServerAddress command to specify at least one IP address for the DNS servers associated with your network adapter.

It statically adds the DNS server addresses, which will override any DHCP configuration for that network adapter.

Find out the goal of each property involved in Microsoft’s full specifications about Set-DnsClientServerAddress.

4. Flush your DNS and reset Winsock

  1. Select the Start button, type cmd and select Run as administrator to start Command Prompt with administrative privileges.
  2. Copy and paste the following commands one by one and press Enter between each line:
ipconfig /flushdns
ipconfig /registerdns
NETSH winsock reset catalog
NETSH int ipv4 reset reset.log
NETSH int ipv6 reset reset.log
exit

Reboot your computer to finalize changes and see if the problem has been fixed on your PC.

If you can’t change your static IP address and DNS server on Windows 10, use the commands above to flush your DNS servers and reset Winsock, which is responsible for your TCP/IP configuration.

5. Set DHCP IP assignment

  1. Press the Win key, then select Settings.
  2. Click Network & Internet.
    • If you’re using Wi-Fi, select Wi-Fi > Manage known networks. Then, pick your network and select Properties
    • For Ethernet, select Ethernet and then your network
  3. At IP settings, click Edit.
  4. Select Automatic (DHCP) and click Save.

If you use automatic DHCP settings, it will be easier to configure TCP/IP settings on your Windows 10 PC.

6. Use a VPN service

If you wish to regularly change your IP address and protect your DNS queries, we suggest opting for a premium VPN service.

You just have to connect to a VPN IP address. It will not only hide your true IP and location but also encrypt all data traffic to secure your network from hackers.

We think that Private Internet Access is the best VPN for the job. It’s incredibly intuitive, supports more than 3,300 VPN servers across 48 countries, and can be used to access blocked content, including Netflix US from anywhere.

PIA supports static and dynamic IP addresses, native port forwarding, and exclusive DNS servers. It also comes with a kill switch and a malware blocker for browsers.

More about PIA:

  • WireGuard and OpenVPN with up to 256-bit military-grade encryption
  • No IP, DNS or WebRTC leaks
  • 24/7 live chat support
  • 30-day money-back guarantee (no free trial)

โ‡’ Get Private Internet Access

How do I change the IP address and DNS in Windows 11?

The new OS is not that much different from Windows 10, especially when it comes to the networking settings.

Therefore, apart from some design differences, all the solutions we outlined for the older OS will work perfectly on Windows 11.

However, there are a few differences in the menus. For instance, to access the network adapters in Windows 11, you need to click on the Advanced network settings from the Network & internet section from Settings.

To summarize, if you can’t change your static IP address and DNS server on Windows, you can try resetting them from the PowerShell or Command Prompt.

It’s also a good idea to refresh network settings by flushing DNS and resetting Winsock. Plus, you can specify automatic DHCP IP assignments.

We hope that you managed to modify your IP address and DNS servers using our solutions.

You can also get around this problem by using one of the best VPN software for Windows to use an external server and IP.

What other fixes worked for your computer? Let us know in the comments section below.

More about the topics: DNS, IP address, windows 10, Windows 11