2

I have a small office network with a handful of Windows / Ubuntu machines of varying releases. A few days ago, one Windows machine lost the ability to access any services on the Ubuntu machines by hostname.

I can resolve the Ubuntu hostname using DNS:

C:\>nslookup gruit
Server:  router.asus.com
Address:  192.168.73.1

Name:    gruit
Address:  192.168.73.152

But, I cannot use things like ping, ftp, ssh, etc. by hostname. For example:

C:\>ping gruit
Ping request could not find host gruit. Please check the name and try again.

I can successfully use the IP address with any of those commands:

C:\>ping 192.168.73.152

Pinging 192.168.73.152 with 32 bytes of data:
Reply from 192.168.73.152: bytes=32 time<1ms TTL=64

I can also use the hostname with a . at the end:

C:\>ping gruit.

Pinging gruit [192.168.73.152] with 32 bytes of data:
Reply from 192.168.73.152: bytes=32 time<1ms TTL=64

This smacks of a NetBIOS issue. Indeed, things like NET VIEW fail:

C:\>net view \\gruit
System error 53 has occurred.

The network path was not found.

Interestingly, though, NBT does resolve the hostname properly:

C:\>nbtstat -c

Ethernet0:
Node IpAddress: [192.168.73.104] Scope Id: []

                  NetBIOS Remote Cache Name Table

        Name              Type       Host Address    Life [sec]
    ------------------------------------------------------------
    GRUIT          <20>  UNIQUE          192.168.73.152      592

For practical purposes, I don't care about NetBIOS/Samba/etc. on Ubuntu here; I just want my "normal" TCP/IP stuff to work (namely Postgres). Somehow, though, every client on this Windows 10 machine seems to use NetBIOS. If I clear the cache with nbtstat -R, for example, then use some TCP/IP client (e.g. ssh, psql...), the NBT cache immediately shows the Ubuntu hostname and IP address again.

[EDIT: Some commands do not trigger an entry in the NBT cache. nslookup never does. Neither do usual offenders (e.g. ping) when I end the hostname with a dot.]

The real problem, of course, is that despite successfully resolving via both DNS and NBT, I can't actually use the hostnames with any client apps. I've read many conflicting doc pages, blogs, and forum posts about the name resolution order on Windows - and whether the client has a role in determining the resolution method. I'm not sure what's correct / current.

[nslookup behavior in prior edit suggests that the client does have a role in choosing name resolution method. Not sure if it's explicit or incidental - e.g. which of several API functions they happen to call.]

For context:

  • The problem machine is Windows 10; it has no hosts or lmhosts file
  • The Ubuntu machines are 14.04 and 18.04
  • All other Windows machines (all Windows 7) can access the Ubuntu servers by hostname, including for straight TCP/IP services and Samba-type services
  • I've fixed a ton of other stuff throughout this odyssey (e.g. DHCP/DNS reconfig, OS upgrade, anti-malware/firewall upgrades and uninstalls, samba/systemd-resolved reconfig...); the network is in better shape than its ever been, other than this one remaining issue

Any ideas?

5
  • Here's an interesting article about the trailing "dot", which I think you know, but not everyone will. It's not very helpful sorry, just interesting.
    – Tim
    Oct 29, 2018 at 7:19
  • That is interesting; I didn't know that about the dot. I only learned enough so far to know that it coaxes Windows into using DNS instead of NBT. I kinda backed into it when testing my DHCP server with a domain name, and wanted to avoid a potential conflict with avahi / .local. Somewhere along the way I read that the dot would suffice on its own, and was able to go back to a blank domain. Thanks for the background!
    – manniongeo
    Oct 29, 2018 at 7:39
  • Did you ever resolve this problem? I believe it's the same problem that many windows10 users have experienced periodically: ip adresses work but host names fail on everything except NSLookup. Nobody has resolved it. Rebooting temporarily cures it but none of the other gazillion suggestions help at all. Feb 4, 2020 at 19:57
  • Unfortunately, no; I've been clinging to Windows 7, due to myriad outstanding Windows 10 issues. Now that 7 is officially unsupported, I'm part-way through upgrading my office, and will probably need to turn attention back to this again at some point.
    – manniongeo
    Feb 5, 2020 at 6:36
  • You can disable NetBIOS in the TCP/IP settings on your network adapter if you really don't need it.
    – lordadmira
    Dec 18, 2020 at 4:02

1 Answer 1

0

An error like that happened to me in the past, was a WINS/NBT database corruption error, while the dns resolved correctly.

Restarted the master browser server and it did the trick for me.

A wireshark would probably identify the culprit that reply bad data to the NBT request of your windows 10.

1
  • 1
    Found that router (which is also DHCP & local DNS server) is master browser using nbtstat -a for each machine on network, per this article. Rebooted, to no avail :( I'll look at wireshark. Thanks for the suggestions.
    – manniongeo
    Oct 31, 2018 at 1:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .