Forget everything you've read about Windows hostname resolution, because it's wrong when it comes to LAN (unqualified) hostnames. No matter what I try, Windows will not contact the configured DNS server to resolve these. I've examined it in Wireshark, and Windows will use NetBIOS (UDP), mDNS, LLMNR, etc. but never, ever plain old port 53 DNS.
I've tried all the tricks: Disabling NetBIOS over TCP (irrelevant since it uses UDP by default anyway), telling my router's dnsmasq to advertise disabling of NetBIOS, appending .
suffix to unqualified name resolution list, registry hacks to disable multicast name resolution, etc. All these accomplish is disabling one or more of NetBIOS, mDNS, LLMNR, etc. resolution for LAN hosts without enabling DNS.
The only thing that seems to work is manually appending a .
to a hostname when entering it.
I get that this is probably some kind of security thing, but surely in 2021 most home routers now provide their own DNS service advertised via DHCP.
Am I missing something?
Edit: As a workaround, I've enabled Samba on my router, with DNS proxying and WINS enabled. This seems to create a bridge between DNS and NetBIOS.
Edit 2: After extensive research with Wireshark, Avahi, wsdd2, Samba, etc., I have determined that in addition to Windows 10 simply refusing to use regular DNS for unqualified hostnames, it will also wait for its LLMNR query to time out before completing unqualified hostname resolution - even if it has received both NetBIOS and mDNS responses. If it gets an LLMNR response (e.g. when pinging another Windows 10 machine, or a Linux machine running wsdd2 with LLMNR enabled), resolution completes instantly.
Edit 3: Confirmed - I followed instructions for disabling "multicast name resolution" in Windows 10, which actually disables mDNS and LLMNR while leaving NetBIOS enabled. Windows 10 now immediately accepts NetBIOS answers from my router's Samba server as authoritative. https://www.blackhillsinfosec.com/how-to-disable-llmnr-why-you-want-to/