CentOS Computer Name Resolution without Domain Name

Posted on


I have a network of CentOS6 machines. Pretend the names are :


From computer1.someDomain.net, I can run commands like “ssh computer1” or “ping computer2”. This behavior also works on computer2. However, from computer3, “ping computer1” fails with a “ping: unknown host computer1”. I have to run “ping computer1.someDomain.net” to get this to work.

Stranger still — on computer1, “nslookup computer3” returns the appropriate name and IP address. However, on computer3, “nslookup computer3” returns SERVFAIL.

Any help is greatly appreciated. Thanks in advance.


A DNS resolver will usually try to resolve a name to an IP address.

By default, it will not try to add parts to the name. The exception is when you add a line to /etc/resolv.conf containing the search keyword. E.g. add search mydomain.tld.

In that case both the host and the host.mydomain.tld will be attempted.

Leave a Reply

Your email address will not be published. Required fields are marked *