-
Notifications
You must be signed in to change notification settings - Fork 821
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
sudo ifconfig eth0 up doesn't bring up network #12011
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
This is the log. It only happens when I command sudo ifconfig eth0 down and then sudo ifconfig eth0 up . $ ifconfig lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 $ ping google.com |
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
|
I only updated the title. That's my feedback. |
@gigit0000: This is by design, since WSL's network interfaces are configured by WSL itself (not by dhcp). If you disable an interface , it won't be able to automatically reconfigure itself when you enable it again. |
Windows Version
Microsoft Windows [Version 10.0.19045.4780]
WSL Version
0.0.0.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.10.16.3
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
sudo ifconfig eth0 down
sudo ifconfig eth0 up
ping google.com >> doesn't work > ping: connect: Network is unreachable
ping 8.8.8.8 >> doesn't work > ping: connect: Network is unreachable
ping 127.0.0.1 >> works
Expected Behavior
After sudo ifconfig eth0 down and sudo ifconfig eth0 up, the eth should work.
Actual Behavior
After sudo ifconfig eth0 down and sudo ifconfig eth0 up, the eth doesn't work as shown above.
Diagnostic Logs
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.19.210.220 netmask 255.255.240.0 broadcast 172.19.223.255
inet6 fe80::215:5dff:fe49:338a prefixlen 64 scopeid 0x20
ether 00:15:5d:49:33:80 txqueuelen 1000 (Ethernet)
RX packets 75 bytes 14548 (14.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 2180 (2.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 146 bytes 7640 (7.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 146 bytes 7640 (7.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ ping google.com
ping: connect: Network is unreachable
$ ping 8.8.8.8
ping: connect: Network is unreachable
$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.061 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.034 ms
^C
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1038ms
rtt min/avg/max/mdev = 0.034/0.047/0.061/0.013 ms
No response
The text was updated successfully, but these errors were encountered: