Windows & BSOD · medium

How to fixWSL2-NETWORK-BROKEN

WSL2 network not working after sleep/wake

What this error means

WSL2 network not working after sleep/wake (WSL2-NETWORK-BROKEN) is a medium-severity fault affecting the Windows operating system. After the PC wakes from sleep, WSL2 has no internet connectivity. DNS fails and ping fails inside the subsystem. See the troubleshooting steps below for the fix.

Before you begin

Save open work and back up important files. Note any recent driver or hardware changes. If Windows cannot start, use the startup guide first.

Work through these checks

0 of 3 complete
01Restart WSL: wsl --shutdown followed by wsl

Restart WSL: wsl --shutdown followed by wsl.

Use the instructions for your exact device and operating system. Check the manufacturer’s documentation before changing firmware, hardware, or system settings.

I need help
02Run inside WSL: echo 'nameserver 8.8.8.8' > /etc/resolv.conf

Run inside WSL: echo 'nameserver 8.8.8.8' > /etc/resolv.conf.

Use the instructions for your exact device and operating system. Check the manufacturer’s documentation before changing firmware, hardware, or system settings.

I need help
03Check Windows Firewall for 'vEthernet (WSL)' adapter rules

Check Windows Firewall for 'vEthernet (WSL)' adapter rules.

Use the instructions for your exact device and operating system. Check the manufacturer’s documentation before changing firmware, hardware, or system settings.

I need help

Possible causes

  • Hyper-V virtual switch does not properly recover after sleep
  • WSL2 DNS server address gets stale
  • Windows Firewall rule blocks WSL2 adapter