Verified June 2026 · tested on Windows 11 24H2, Windows 10 22H2 & Server 2022/2025
Quick Reference: Essential Commands
Open an elevated Command Prompt or PowerShell (right-click → Run as administrator) and run these in order. The whole sequence rebuilds the network stack from scratch:
# 1. Reset the Winsock catalog (LSPs, proxy hooks)
netsh winsock reset
# 2. Reset the TCP/IP stack to defaults
netsh int ip reset
# 3. Flush the DNS resolver cache
ipconfig /flushdns
# --- REBOOT NOW (steps 1 & 2 require a restart) ---
# 4. Drop the current DHCP lease, then request a new one
ipconfig /release
ipconfig /renew
Which reset do you need?
- Wrong IP, "limited connectivity", VPN/proxy left junk behind →
netsh winsock reset - TCP/IP stack corrupted, bad routes or stack settings →
netsh int ip reset - Site resolves to the wrong server, DNS record changed →
ipconfig /flushdns - Stuck DHCP lease / no IP address →
ipconfig /releaseand/renew - Only IPv4 or only IPv6 is broken →
netsh interface ipv4/ipv6 reset
Jump to the section you need below. If you only have one problem, prefer the targeted command — you rarely need the whole sequence.
netsh winsock reset: Rebuild the Winsock Catalog
netsh winsock reset returns the Winsock catalog to its default state. Winsock is the Windows Sockets API layer that every network app uses; third-party software (VPN clients, antivirus, proxies) inserts Layered Service Providers (LSPs) into this catalog, and a botched uninstall can leave broken hooks that break all connectivity. This command strips them out.
Windows 10Windows 11Server 2016+Built in — no module⚠ Requires reboot
netsh winsock Switch Reference
| Command | Description |
|---|---|
netsh winsock reset | Reset the entire Winsock catalog to defaults |
netsh winsock reset catalog | Older alias for the same reset (still accepted) |
netsh winsock show catalog | List the current Winsock providers / installed LSPs |
netsh winsock audit trail | Show the history of installed and removed LSPs |
netsh winsock Usage Examples
# Standard reset — the one you almost always want
netsh winsock reset
# Inspect the catalog before resetting (find rogue LSPs)
netsh winsock show catalog
# Review which LSPs were added/removed over time
netsh winsock audit
Warning:
netsh winsock resetremoves all third-party LSPs from the catalog. Software that depends on them — some VPNs, parental-control filters, or legacy security products — may stop working until reinstalled. After running it you must reboot before the change is fully applied. Windows prints "You must restart the computer in order to complete the reset."
netsh int ip reset: Reset the TCP/IP Stack
netsh int ip reset (long form netsh interface ip reset) rewrites the TCP/IP configuration registry keys back to their clean installation defaults. This is the command-line equivalent of removing and reinstalling the TCP/IP protocol: it clears corrupted stack parameters, stale static routes, and bad IP settings that survive a normal reboot.
Windows 10Windows 11Server 2016+Built in — no module⚠ Requires reboot
netsh int ip Switch Reference
| Command | Description |
|---|---|
netsh int ip reset | Reset both IPv4 and IPv6 TCP/IP stacks to defaults |
netsh int ip reset C:\resetlog.txt | Reset and write a log of every key changed |
netsh interface ipv4 reset | Reset only the IPv4 stack |
netsh interface ipv6 reset | Reset only the IPv6 stack |
netsh int ip Usage Examples
# Reset the full TCP/IP stack (IPv4 + IPv6)
netsh int ip reset
# Reset and capture exactly what changed to a log file
netsh int ip reset C:\resetlog.txt
# Long form — identical behaviour
netsh interface ip reset
Warning: This command erases custom IP, DNS, gateway, and routing configuration and reverts the stack to defaults. Record any static IP addresses, DNS servers, or persistent routes beforehand — you will need to re-enter them. A reboot is required to complete the reset.
Note: On Windows 10/11 you may see
Access is deniedprinted for one or two registry keys (such asReset Tcpip\Parameters). This is expected on modern builds and does not mean the reset failed — the rest of the stack is still reset successfully.
ipconfig /flushdns: Clear the DNS Cache
ipconfig /flushdns empties the local DNS resolver cache. Windows caches every name it looks up; when a DNS record changes (or malware/an old cache entry points a hostname at the wrong IP), the stale entry can stick around until it expires. Flushing forces the next lookup to query your DNS server fresh.
Windows 10Windows 11Server 2016+Built in — no moduleNo reboot needed
ipconfig DNS Switch Reference
| Command | Description |
|---|---|
ipconfig /flushdns | Purge the resolver cache |
ipconfig /displaydns | Show the current contents of the resolver cache |
ipconfig /registerdns | Refresh DHCP leases and re-register DNS names |
Clear-DnsClientCache | PowerShell equivalent of /flushdns |
ipconfig DNS Usage Examples
# Flush the DNS resolver cache (Command Prompt or PowerShell)
ipconfig /flushdns
# See what is currently cached before flushing
ipconfig /displaydns
# Re-register this computer's DNS records and renew leases
ipconfig /registerdns
# PowerShell-native equivalent of /flushdns
Clear-DnsClientCache
# Inspect the cache the PowerShell way
Get-DnsClientCache
Tip: Flushing DNS is non-destructive and needs no reboot — it is the safest first thing to try when a single site or service resolves incorrectly.
Clear-DnsClientCacheandipconfig /flushdnsdo exactly the same thing; use whichever shell you already have open.
ipconfig /release & /renew: Get a Fresh DHCP Lease
These two commands cycle your DHCP lease. ipconfig /release tells the DHCP server to reclaim the address currently assigned to the adapter, leaving it with no IP. ipconfig /renew then requests a brand-new lease. Run them as a pair to recover from a bad address, an APIPA 169.254.x.x self-assignment, or a DHCP server that handed out the wrong scope.
Windows 10Windows 11Server 2016+Built in — no moduleDHCP adapters only
ipconfig DHCP Switch Reference
| Command | Description |
|---|---|
ipconfig /release | Release the IPv4 DHCP lease on all adapters |
ipconfig /renew | Request a new IPv4 DHCP lease |
ipconfig /release6 | Release the IPv6 DHCP lease |
ipconfig /renew6 | Request a new IPv6 DHCP lease |
ipconfig /release "Wi-Fi" | Release the lease on one named adapter only |
ipconfig /all | Show full per-adapter config (lease, DNS, MAC) |
ipconfig DHCP Usage Examples
# Drop and re-request the IPv4 lease on every adapter
ipconfig /release
ipconfig /renew
# Target a single adapter by name (use the name from ipconfig /all)
ipconfig /release "Ethernet"
ipconfig /renew "Ethernet"
# Cycle the IPv6 lease as well
ipconfig /release6
ipconfig /renew6
# Confirm the new lease, gateway, and DNS servers
ipconfig /all
Warning:
ipconfig /releasedrops your IP address and will break any active connection — including the remote session you are using. Never run it on a remote/RDP machine unless you have out-of-band access, because the box may not come back on the same address.
netsh interface ipv4 / ipv6 reset: Per-Protocol Reset
When only one IP version is broken — a stuck IPv6 link-local address, or an IPv4 stack that picked up bad parameters — you can reset a single protocol instead of the whole stack. netsh int ip reset does both at once; these target one each.
Windows 10Windows 11Server 2016+Built in — no module⚠ Requires reboot
Per-Protocol Switch Reference
| Command | Description |
|---|---|
netsh interface ipv4 reset | Reset the IPv4 stack to defaults |
netsh interface ipv6 reset | Reset the IPv6 stack to defaults |
netsh interface ipv4 show config | Show current IPv4 config before resetting |
netsh interface ipv6 show interfaces | List IPv6 interfaces and their state |
Per-Protocol Usage Examples
# Reset only IPv6 (e.g. stuck link-local / no IPv6 connectivity)
netsh interface ipv6 reset
# Reset only IPv4, leaving IPv6 untouched
netsh interface ipv4 reset
# Review IPv4 config before you wipe it
netsh interface ipv4 show config
Warning: Like the combined reset, each per-protocol reset reverts that stack to defaults and requires a reboot. Save any static addresses or DNS entries for that protocol first.
Troubleshooting: Common Network Reset Errors
Each row is deep-linkable — share a specific error with …#net-access-denied, and the row highlights on arrival.
| Error / Symptom | Meaning | Fix |
|---|---|---|
Access is denied during netsh int ip reset | A couple of TCP/IP registry keys are protected on Win10/11 | Expected behaviour — the reset still completes. Reboot and re-test |
You must restart the computer… | Winsock/IP reset is staged but not yet applied | Finish all resets, then reboot once at the end |
The requested operation requires elevation | Prompt is not running as Administrator | Re-open Command Prompt/PowerShell with Run as administrator |
Address shows 169.254.x.x | APIPA — DHCP failed to hand out a lease | ipconfig /release then /renew; check the DHCP server/cabling |
unable to contact your DHCP server on /renew | No reachable DHCP server (link down, VLAN, or server offline) | Verify physical link and the DHCP scope; reset the stack if the adapter is stuck |
| "No internet" persists after reset + reboot | Problem is upstream (router, ISP, driver) not the stack | Update the NIC driver, power-cycle the router, test another device |
An app stops working after winsock reset | Its LSP was removed from the catalog | Reinstall the affected VPN/security/proxy software |
Full Reset vs. Targeted Fix: When to Use Each
A full Winsock + TCP/IP reset is powerful but broad — it reverts custom configuration and forces a reboot. Work from the least disruptive fix upward:
- Name resolution is wrong (a site loads the old server) →
ipconfig /flushdnsonly. No reboot. - Bad / missing IP address (
169.254.x.x, wrong subnet) →ipconfig /releasethen/renew. No reboot. - One protocol misbehaving (IPv6 stuck, IPv4 fine) →
netsh interface ipv6 reset(oripv4). Reboot. - Persistent "limited connectivity", LSP/proxy corruption, leftover VPN hooks → full sequence:
netsh winsock reset+netsh int ip reset+ipconfig /flushdns, then reboot, thenrelease/renew.
If connectivity is still broken after the full reset and a reboot, the fault is almost always outside the stack — a NIC driver, the router, or the ISP. Resetting again will not help; update the driver and test a second device on the same network.
Version-Specific & Compatibility Notes
- Windows 11 / 10:
netsh,ipconfig, andClear-DnsClientCacheare identical across modern builds. TheAccess is deniedmessage on a couple of registry keys duringnetsh int ip resetis normal on both and does not indicate failure. - Windows Server 2016–2025: Same commands. On a server with multiple NICs, prefer the per-adapter forms (
ipconfig /release "Ethernet") so you do not drop management interfaces by accident. - Settings app "Network reset": Settings → Network & internet → Advanced → Network reset runs the equivalent of these commands plus removes and reinstalls every adapter and forgets saved Wi-Fi/VPN profiles. Use it only when the targeted commands fail.
- PowerShell vs. Command Prompt: Every command here runs in both.
ipconfig /flushdns⇄Clear-DnsClientCacheandipconfig /displaydns⇄Get-DnsClientCacheare interchangeable. - Always reboot once: After
winsock reset,int ip reset, or a per-protocol reset, the change is staged in the registry and only applied on restart. Batch your resets and reboot a single time at the end.






