You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turn on autogeneration of /etc/resolv.conf by making sure it isn't turned off in /etc/wsl.conf
Make sure the /etc/resolv.conf is auto-generated
root@DaStallion:~# cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.26.112.1
Make sure that the auto-generated IP is indeed the windows host on the WSL subnet PS C:\Users\howar> netsh interface ip show config name="vEthernet (WSL)" Configuration for interface "vEthernet (WSL)" DHCP enabled: No IP Address: 172.26.112.1 Subnet Prefix: 172.26.112.0/20 (mask 255.255.240.0) InterfaceMetric: 5000 Statically Configured DNS Servers: None Register with which suffix: None Statically Configured WINS Servers: None
Ping something in WSL, like cloudflare.com
Expected Behavior
I should be able to ping the cloudflare server.
Actual Behavior
The DNS resolution fails. ping cloudflare.com ping: cloudflare.com: Temporary failure in name resolution
However, it works if:
I used a manually written /etc/resolv.conf.
I pinged from Windows Powershell, which has no manually configured DNS
I pinged an IP address
I ran wireshark to capture the packets, and I can see that WSL did send a query, but got no DNS response.
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.
Version
Microsoft Windows [Version 10.0.22598.1]
WSL Version
Kernel Version
5.10.102.1
Distro Version
Ubuntu 18.04
Other Software
ping, from iputils version s20190709
Repro Steps
PS C:\Users\howar> netsh interface ip show config name="vEthernet (WSL)" Configuration for interface "vEthernet (WSL)" DHCP enabled: No IP Address: 172.26.112.1 Subnet Prefix: 172.26.112.0/20 (mask 255.255.240.0) InterfaceMetric: 5000 Statically Configured DNS Servers: None Register with which suffix: None Statically Configured WINS Servers: None
Expected Behavior
I should be able to ping the cloudflare server.
Actual Behavior
The DNS resolution fails.
ping cloudflare.com ping: cloudflare.com: Temporary failure in name resolution
However, it works if:
I ran wireshark to capture the packets, and I can see that WSL did send a query, but got no DNS response.
Diagnostic Logs
Here's my WSL log:
wsl.etl.zip
Here's my strace log:
trace.txt
The text was updated successfully, but these errors were encountered: