LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   nameserver resolves unqualified hostname in nslookup, ping (at CLI) doesn't-- why? (http://www.linuxquestions.org/questions/linux-networking-3/nameserver-resolves-unqualified-hostname-in-nslookup-ping-at-cli-doesnt-why-624759/)

lumix 02-29-2008 10:22 AM

nameserver resolves unqualified hostname in nslookup, ping (at CLI) doesn't-- why?
 
I open nslookup and merely type "computer1" and it replies with the correct ip address. I then exit and go to the command line, and type "ping computer1" and it's completely baffled. Yet /etc/resolv.conf contains the very same server as nslookup chooses.

Why is this?

{BBI}Nexus{BBI} 02-29-2008 07:23 PM

Hostnames go into your /etc/hosts file: <ip_address> <hostname>. Now if you ping with the hostname is should work. The name in your resolv.conf file is what resolvconf has picked up as your nameserver.


All times are GMT -5. The time now is 08:54 PM.