Reset the Windows network stack with netsh

The nuclear option for broken connectivity: rebuild Winsock and the TCP/IP stack to defaults when adapters show 'no internet' despite everything else working.

WindowsnetworksystemDiagnosticsMedium risk
Run `netsh winsock reset && netsh int ip reset` in an elevated prompt, then restart — this clears Winsock catalog corruption and reinitializes TCP/IP.

01Command

Command
$ netsh winsock reset && netsh int ip reset

02What it does

The first command rewrites the Winsock catalog, which third-party software (VPNs, antivirus, proxies) often corrupts with layered service providers; the second resets TCP/IP registry keys under HKLM\SYSTEM\CurrentControlSet\Services\Tcpip. A restart is mandatory — the reset only takes effect on reboot. This wipes static IP and DNS settings back to DHCP, so note them first with `netsh int ip show config`, and it also removes any `netsh interface portproxy` rules you may have set. Before escalating to a reset, try gentler fixes: `ipconfig /flushdns`, `ipconfig /release` + `/renew`, and disabling/re-enabling the adapter.

03Risk

RiskMedium risk
RequirementsRun as administrator; a restart is required afterwards, and static IP/DNS settings and port-proxy entries are wiped.
!Warning: This wipes static IP configurations, DNS settings and port forwarding rules — remote machines managed over a static IP can drop off the network after the reboot.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Netsh contexts and commands | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents the netsh winsock and netsh interface contexts, including reset commands that restore their default configurations.
  • Netsh - Network Shell - Windows CMD
    SS64 · technical · 2026-09-17
    Evidence: SS64 lists netsh commands including 'netsh winsock reset' and 'netsh interface ip reset' for restoring TCP/IP and Winsock defaults.

Last verified: 2026-09-17 · Category: Network

06Related solutions