Share via

Cannot Connect to Internet From WSL2

Anonymous
2021-06-26T06:25:58+00:00

I could not be able to connect to internet from WSL2. WSL2 is freshly installed on a fresh installed copy of Windows 10 Pro (insider).

Pinging to any site shows 100% packet loss. I cannot install nor update anything. Internet is working fine on Windows.

/etc/resove.conf (WSL)

nameserver 172.27.80.1

ipconfig /all (powershell)

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DESKTOP-GHGUSK8

   Primary Dns Suffix  . . . . . . . :

   Node Type . . . . . . . . . . . . : Hybrid

   IP Routing Enabled. . . . . . . . : No

   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Realtek PCIe GbE Family Controller

   Physical Address. . . . . . . . . : 2C-F0-**-55-**-** (##masked)

   DHCP Enabled. . . . . . . . . . . : Yes

   Autoconfiguration Enabled . . . . : Yes

   Link-local IPv6 Address . . . . . : fe80::65e7:5e90:f40c:80f0%8(Preferred)

   IPv4 Address. . . . . . . . . . . : 192.168.0.108(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.255.0

   Lease Obtained. . . . . . . . . . : Saturday, June 26, 2021 11:52:23

   Lease Expires . . . . . . . . . . : Saturday, June 26, 2021 13:52:23

   Default Gateway . . . . . . . . . : 192.168.0.1

   DHCP Server . . . . . . . . . . . : 192.168.0.1

   DHCPv6 IAID . . . . . . . . . . . : 170717277

   DHCPv6 Client DUID. . . . . . . . : 00-01-00-07-28-68-2F-2A-92-3F-B7-29-4A-23

   DNS Servers . . . . . . . . . . . : 8.8.8.8

                                       0.0.0.0

   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (WSL):

   Connection-specific DNS Suffix  . :

   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter

   Physical Address. . . . . . . . . : 00-15-5D-54-46-C0

   DHCP Enabled. . . . . . . . . . . : No

   Autoconfiguration Enabled . . . . : Yes

   Link-local IPv6 Address . . . . . : fe80::25fd:f6de:d5f2:25fa%27(Preferred)

   IPv4 Address. . . . . . . . . . . : 172.27.80.1(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.240.0

   Default Gateway . . . . . . . . . :

   DHCPv6 IAID . . . . . . . . . . . : 452990301

   DHCPv6 Client DUID. . . . . . . . : 00-01-00-07-28-68-2F-2A-92-3F-B7-29-4A-23

   NetBIOS over Tcpip. . . . . . . . : Enabled

I'm using an ethernet connection. Please let me know

Closing it, since I decided to no longer use WSL2. I'll use a regular Linux distro with dual boot.

Windows for home | Windows 10 | Internet and connectivity

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2021-06-26T07:19:09+00:00

Hi Themhbd,

I'm Louie, an Independent Advisor and a fellow Windows 10 user like you. Hope you're doing well and safe there. I'm sorry that you're having trouble with your network connection.

I would suggest first you to run network troubleshooter, use these steps:

Open Settings.

Click on Update & Security.

Click on Troubleshoot.

Under the "Recommended troubleshooting" section, click the Additional troubleshooters option.

Under the "Get up and running" section, select the Internet Connections troubleshooter.

Quick note: On Windows 10 version 1909 and earlier, the option is available within the Troubleshoot page.

Click the Run the troubleshooter button.

Select the Troubleshoot my connection to the Internet option.

Select the Try these repairs as an administrator option (if applicable).

Continue with the on-screen directions (if applicable).

After you complete the steps, the troubleshooter will run and fix any connectivity issues.

In the case that the troubleshooter is unable to resolve the problem, you should try resetting the TCP/IP stack and clearing any DNS information on Windows 10.

To reset the network stack with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to reset the component that handles network requests and press Enter:

netsh winsock reset

  1. Type the following command to reset the internet protocol stack and press Enter:

netsh int ip reset

  1. Type the following command to clear the current networking configuration and press Enter:

ipconfig /release

  1. Type the following command to reconfigure the network settings and press Enter:

ipconfig /renew

  1. Type the following command to clear the DNS information cached and press Enter:

ipconfig /flushdns

  1. Restart your computer.

Once you complete the steps, launch the web browser and confirm the internet is working.

If the steps above still doesn't work, reset all the network adapters, use these steps:

Open Settings.

Click on Network & Internet.

Click on Status.

Under the "Advanced network settings" section, click the Network reset option.

Click the Reset now button.

Click the Yes button.

After you complete the steps, the computer will restart automatically, and on reboot, you should now be able to connect to the internet.

The tool will reset all the network adapters installed on your computer to their factory defaults, which means that you'll need to re-enter the password to connect to a wireless network. Also, you'll need to reconfigure other networking software, such as VPN clients, if applicable.

I also would recommend you to follow the solutions provided on the links below and see if it works:

https://support.microsoft.com/en-ph/help/10741/...

https://www.windowscentral.com/how-regain-inter...

Standard Disclaimer: There are links to non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the sites that may advertise products often classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the sites before you decide to download and install it.

Hope this helps.

Sincerely,

Louie

Was this answer helpful?

6 people found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-06-26T07:33:39+00:00

    Hi Themhbd,

    I'm Louie, an Independent Advisor and a fellow Windows 10 user like you. Hope you're doing well and safe there. I'm sorry that you're having trouble with your network connection.

    I would suggest first you to run network troubleshooter, use these steps:

    Open Settings.
    Click on Update & Security.
    Click on Troubleshoot.
    Under the "Recommended troubleshooting" section, click the Additional troubleshooters option.
    Under the "Get up and running" section, select the Internet Connections troubleshooter.

    Quick note: On Windows 10 version 1909 and earlier, the option is available within the Troubleshoot page.

    Click the Run the troubleshooter button.
    Select the Troubleshoot my connection to the Internet option.
    Select the Try these repairs as an administrator option (if applicable).
    Continue with the on-screen directions (if applicable).

    After you complete the steps, the troubleshooter will run and fix any connectivity issues.

    In the case that the troubleshooter is unable to resolve the problem, you should try resetting the TCP/IP stack and clearing any DNS information on Windows 10.

    To reset the network stack with Command Prompt, use these steps:

    1. Open Start.
    2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
    3. Type the following command to reset the component that handles network requests and press Enter:

    netsh winsock reset

    1. Type the following command to reset the internet protocol stack and press Enter:

    netsh int ip reset

    1. Type the following command to clear the current networking configuration and press Enter:

    ipconfig /release

    1. Type the following command to reconfigure the network settings and press Enter:

    ipconfig /renew

    1. Type the following command to clear the DNS information cached and press Enter:

    ipconfig /flushdns

    1. Restart your computer.
      Once you complete the steps, launch the web browser and confirm the internet is working.

    If the steps above still doesn't work, reset all the network adapters, use these steps:

    Open Settings.
    Click on Network & Internet.
    Click on Status.
    Under the "Advanced network settings" section, click the Network reset option.
    Click the Reset now button.
    Click the Yes button.
    After you complete the steps, the computer will restart automatically, and on reboot, you should now be able to connect to the internet.

    The tool will reset all the network adapters installed on your computer to their factory defaults, which means that you'll need to re-enter the password to connect to a wireless network. Also, you'll need to reconfigure other networking software, such as VPN clients, if applicable.

    I also would recommend you to follow the solutions provided on the links below and see if it works:

    https://support.microsoft.com/en-ph/help/10741/...
    https://www.windowscentral.com/how-regain-inter...

    Standard Disclaimer: There are links to non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the sites that may advertise products often classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the sites before you decide to download and install it.

    Hope this helps.

    Sincerely,
    Louie

    Hi. The tips you provided works for Windows. But I don't have the problem in Windows. WSL2  is a virtual platform for running Linux. My problem is there. I decided to no longer use WSL2. Thank your for your kind reply.

    Was this answer helpful?

    20+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-06-26T07:30:39+00:00

    What is  WSL2?

    Windows Subsystem for Linux version 2.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2021-06-26T06:52:31+00:00

    What is  WSL2?

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments