Unable to lookup host registered in hosts file

Edi CAHYADI edi.cahyadi at st.com
Sun Oct 15 22:42:22 EDT 2006


Hi All,

I have 2 servers:
hostA: Solaris 8
hostB: HP-UX 10.20

>From hostA, I can't lookup hostB even though I put its entry in /etc/hosts
file.

root at hostA:/> host hostB
......
*** <DNSserver> can't find hostB: Non-existent host/domain

Nsswitch.conf is configured to search file first:
root at hostA:/> grep ^hosts /etc/nsswitch.conf
hosts:      files dns

But ping works:
root at hostA:/> ping -s hostB
PING hostB: 56 data bytes
64 bytes from hostB (<hostB's IP>): icmp_seq=0. time=0. ms
64 bytes from hostB (<hostB's IP>): icmp_seq=1. time=0. ms
64 bytes from hostB (<hostB's IP>): icmp_seq=2. time=0. ms
^C
----hostB PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0/0/0

Can anybody tell me why is that so, and how to solve it such that host lookup
can work just like nslookup in HP Unix?

Regards,
Edi



More information about the sunmanagers mailing list