Why cannot I ping computer name without dot?

1

1

In my home network I have a dhcp server and a dns server running on a router. Dhcp and internet access are working fine.

I have for each device on my home network a dns record that associate some name to the device ip address.

For example mycomputer resolves to 192.168.0.111.

However when I issue at command line in Windows 10:

ping mycomputer

I'm getting

Ping request could not find host mycomputer. Please check the name and try again.

I think this is a windows problem, not a router or configuration problem. This is because:

  • ping mycomputer works perfectly from ubuntu
  • if I create a dns record like mycomputer.local or even mycomputer.bla and assign this to the same ip address I can ping mycomputre.local or ping mycomputre.bla from Windows 10 without an issue.
  • Finally, ping mycomputer. (note the dot at the end) also works in Windows 10.
  • If I look at the traffic in Wireshark, I can see that ping mycomputer.local results in a DNS request while ping mycomputer does not.

It appears that if the target computer name is not multi-part, windows will not resolve it unless I add the dot at the end. This effect does not happen for multi-part names.

I would like to understand: Why is this the case?

Andrew Savinykh

Posted 2016-05-19T00:27:14.343

Reputation: 1 521

This looks relevant – Andrew Savinykh – 2016-05-19T00:34:54.173

Probably a mismatch between the dns suffix on your network vs the dns suffix on the router (ie the router doesn't have one). If your home network dns suffix is .local, make the router suffix the same. – Paul – 2016-05-19T00:39:12.317

@Paul there is no home network suffix as far as I can see. I edited the question to clarify that it's not 'local' what makes it work it's any suffix. – Andrew Savinykh – 2016-05-19T00:41:17.250

You have a Windows machine without a DNS suffix? Can you post ipconfig /all? – Paul – 2016-05-19T01:04:48.163

@Paul it's similar to this There are also other adapters, including virtual, but they are irrelevant. Please let me know if there is something in particular that you wanted to see that is missing.

– Andrew Savinykh – 2016-05-19T01:09:57.077

@Paul, and as far as I understand no non-domain-joined windows boxes would have a suffix by default unless you specifically and manually configure it. Is this understanding incorrect? – Andrew Savinykh – 2016-05-19T01:13:35.437

1Turn off (uncheck) your ip6 on your network device. – GeekyDaddy – 2016-05-19T02:16:38.413

@GeekyDaddy, it is not possible to turn it off because it is already off. – Andrew Savinykh – 2016-05-19T03:47:43.003

Can you perform an "ipconfig /all"? Are your machines part of a domain like active directory? – GeekyDaddy – 2016-05-19T15:06:26.233

When you perform an "nslookup mycomputer" which dns server is it perform the lookup from? Are you getting 127.0.0.1? Also try "nslookup mycomputer <router ip>" do you get something different? – GeekyDaddy – 2016-05-19T15:10:34.093

@GeekyDaddy nslookups works fine and lookups the correct ip. There is no domain on my home network. nslookup uses my router by default for dns lookup (and not 127.0.0.1), which hosts the dns server. In both cases nslookup returns the correct ip. – Andrew Savinykh – 2016-05-19T19:54:26.737

If you don't want to add the dot, then please see my answer to a similar question.

– Frederik Aalund – 2017-10-09T11:56:53.813

Answers

0

You probably do not have a WINS server on the network. Windows first tries WINS server for single part names, because it assumes that these are NetBIOS names and when it fails it does not try DNS.

According to Resolving names article, WINS is the first thing to check, however a subsequent step are supposed to make a DNS query. It's possible that since this particular article does not go into a lot of details, there are some conditions that are being met, that aborts the resolution process before it reaches the DNS step.

This is a longer article on the subject.

Andrew Savinykh

Posted 2016-05-19T00:27:14.343

Reputation: 1 521

Note that WINS is only required for NetBIOS operations across subnets, and that article is only pertinent to the 2003 and prior lines of windows (xp, server 2k3, etc). NBT (NetBIOS over TCP) will largely replace the need for WINS. – Frank Thomas – 2016-05-19T02:18:10.960

@FrankThomas, are you saying that Windows 10 is not try using WINS at all by default? If that's the case it's a useful piece of information. – Andrew Savinykh – 2016-05-19T02:30:25.927

@zespri Does this answer mean you have solved it? It doesn't appear to be an answer to your question, rather it looks more like information that should be added to the question. – Paul – 2016-05-19T02:49:28.190

1Windows will only use WINS for lookup if a WINS server IP address is entered in the Network Adapter settings -> IPv4 -> Advanced -> WINS. NetBIOS is a modern version of the NetBEUI protocol, which could not be carrier across a router, because of the way it used broadcasts for browser role elections and browse list access. These mechanisms are still in play, even today, but with a new fancy TCP wrapper, so you don't need WINS to enable traffic across IP routers. – Frank Thomas – 2016-05-19T02:53:34.533

@FrankThomas, thank you for sharing this. Would it be fair to assume that in my case Windows attempts NetBIOS resolution and when this does not work it bails instead of trying DNS? – Andrew Savinykh – 2016-05-19T03:32:32.597

@Paul, when I wrote it I felt that this is an answer that addresses the question. Now in the light of what Frank is saying, it might be inaccurate. I will try and improve it if/when I can. If you disagree, feel free to mark it for moderator attention with the "flag" link at the bottom of the answer, and thank you for taking interest in my question. – Andrew Savinykh – 2016-05-19T03:35:09.300

@zespri But surely if it worked, you would know? Can you ping now? Your answer says it doesn't check DNS after netbios, and then cite an article that says the opposite. So does your answer answer your question? – Paul – 2016-05-19T09:39:44.353

@Paul, the question was not how to ping - I explained in the question that I know how to do that. The question was about differences in processing multi-part names versus single-part. I wanted to know why. An answer to that is because windows interprets single-part names as NetBIOS names and does different type of resolution on them than DNS. Now I agree that the answer can be improved and I'm intending to address that. – Andrew Savinykh – 2016-05-19T09:43:43.427