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.

