Ping of short hostname doesn't work, ping of hostname. works, host works, nslookup works
Posted on 2006-04-17
Just installed CentOS 4.3 (kernel 2.6.9-34.EL) on a box and the local network name resolution doesn't work properly. It did work fine with CentOS 3.4 (kernel 2.4.21-32.EL).
Pinging a host on the local network doesn't work. Pinging the same host with a trailing dot works. Local name resolution with both host and nslookup work. Pinging a host on the Internet works. Here's the results of a few commands which show the problem:
[root@linux etc]# hostname
[root@linux etc]# ping windows //DOESN'T WORK//
ping: unknown host windows
[root@linux etc]# ping windows. //THIS WORKS--NOTE TRAILING DOT//
PING windows (192.168.0.10) 56(84) bytes of data.
64 bytes from windows (192.168.0.10): icmp_seq=0 ttl=128 time=0.512 ms
[root@linux etc]# host windows //THIS WORKS WITHOUT THE TRAILING DOT//
windows has address 192.168.0.10
[root@linux etc]# nslookup windows //THIS WORKS WITHOUT THE TRAILING DOT//
Contents of some files:
Thanks in advance.