I was struggling with this for a long time. I've few devices on my network and for some reason my windows on my main pc doesnt recognize them
It doesn't make much sense to me - wouldn't WSL Ubuntu derive settings from windows? I've set default dns everywhere on windows.
Do you have any idea what the problem might be?
I've also checked to make sure that network has router IP listed as DNS Settings screenshot - 2
nslookup output on windows
Default Server: UnKnown
Address: 192.168.100.1
resolv.conf on wsl
# 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.31.96.1
What's even weirder about it is the fact that nslookup resolves IP addresses correctly.
>nslookup main
Server: UnKnown
Address: 192.168.100.1
Name: main
Address: 192.168.100.89
EDIT. I've found the answer to this question in other thread: Why is 'ping' unable to resolve a name when 'nslookup' works fine? Thanks @DanielB for pointing me pointing me to the answer with nslookup command.


nslookupon Windows? Does it use the router's DNS server? Does it resolve the name? Also, I'd like to recommend Wireshark once again. You will be able to inspect the actual DNS traffic. – Daniel B Mar 21 '22 at 23:11/etc/resolv.confthat WSL generated. Please add all information to your question, not in comments. In the question, you can use proper formatting. – Daniel B Mar 21 '22 at 23:21mainpcinnslookup. Nothing surprising about the output so far. It’s using your router as the DNS server, as expected. // Your WSL config looks strange. It looks like you’re using the Docker Desktop DNS server? Did you somehow mix the Docker and regular WSL distributions? – Daniel B Mar 22 '22 at 10:42Server: UnKnown Address: 192.168.100.1 Name: main Address: 192.168.100.89– nxyt Mar 22 '22 at 10:48