Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network not working in WSL2 and network config seems does not exist #6068

Closed
Somiona opened this issue Oct 10, 2020 · 2 comments
Closed

Network not working in WSL2 and network config seems does not exist #6068

Somiona opened this issue Oct 10, 2020 · 2 comments
Labels

Comments

@Somiona
Copy link

Somiona commented Oct 10, 2020

Environment

Windows build number: 10.0.19042.0
Your Distribution version: 20.04
Whether the issue is on WSL 2 and/or WSL 1: WSL 2

Steps to reproduce

My WSL installation:

C:\Users\54357>wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Stopped         2
  docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2

As you can see, ifconfig and ip route shown nothing and ping 127.0.0.1 does not work either. I have tried some solution posted in other issue reports, none of those that I've tried works.

somion@Somion-Laptop:~$ ifconfig
somion@Somion-Laptop:~$ ip addr
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:12:cb:bd:5b:5d brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 1a:d3:02:0c:0d:7e brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:15:5d:85:6c:01 brd ff:ff:ff:ff:ff:ff
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
somion@Somion-Laptop:~$ ip route
somion@Somion-Laptop:~$ ping 127.0.0.1
ping: connect: Network is unreachable

My host system do have working network, and here's what ipconfig reported under win10:

C:\Users\54357>ipconfig

Windows IP Configuration


Ethernet adapter Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter WLAN:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 240e:333:1042:8d20:c49f:4c2a:ca8c:6
   IPv6 Address. . . . . . . . . . . : 240e:333:1042:8d20:f810:80a4:fb2d:e3ba
   Temporary IPv6 Address. . . . . . : 240e:333:1042:8d20:1842:9ed0:9d1f:7ac5
   Link-local IPv6 Address . . . . . : fe80::f810:80a4:fb2d:e3ba%3
   IPv4 Address. . . . . . . . . . . : 192.168.3.53
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : fe80::1%3
                                       192.168.3.1

Ethernet adapter Bluetooth Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter vEthernet (WSL):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::1875:5eb2:e38c:2463%45
   IPv4 Address. . . . . . . . . . . : 172.22.16.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 

Expected behavior

There should be something shown after executed ifconfig, and network should works

Actual behavior

No network in Ubuntu WSL, as well as my docker installation.

@onomatopellan
Copy link

Since there is no IP in eth0 you could be hitting this bug #5437.

@Somiona
Copy link
Author

Somiona commented Oct 15, 2020

Since there is no IP in eth0 you could be hitting this bug #5437.

Great! Thankyou, It's working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants