* Unable to lookup host registered in hosts file
@ 2006-10-02 5:35 Edi CAHYADI
2006-10-02 8:36 ` Adam T. Bowen
0 siblings, 1 reply; 2+ messages in thread
From: Edi CAHYADI @ 2006-10-02 5:35 UTC (permalink / raw)
To: linux-admin
Hi All,
I have 2 servers:
hostA: RedHat Linux 2.4.21-40.EL
hostB: HP-UX 10.20
From hostA, I can't lookup hostB even though I put its entry in /etc/hosts file.
root@hostA:/> host hostB
Host hostB not found: 3(NXDOMAIN)
Nsswitch.conf is configured to search file first:
root@hostA:/> grep ^hosts /etc/nsswitch.conf
hosts: files dns
But ping works:
root@hostA:/> ping hostB
PING hostB.domain (<hostB's IP>) 56(84) bytes of data.
64 bytes from hostB.domain (<hostB's IP>): icmp_seq=0 ttl=254 time=0.208 ms
64 bytes from hostB.domain (<hostB's IP>): icmp_seq=1 ttl=254 time=0.231 ms
--- hostB.domain ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1011ms
rtt min/avg/max/mdev = 0.208/0.219/0.231/0.018 ms, pipe 2
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Unable to lookup host registered in hosts file
2006-10-02 5:35 Unable to lookup host registered in hosts file Edi CAHYADI
@ 2006-10-02 8:36 ` Adam T. Bowen
0 siblings, 0 replies; 2+ messages in thread
From: Adam T. Bowen @ 2006-10-02 8:36 UTC (permalink / raw)
To: Edi CAHYADI; +Cc: linux-admin
Hi,
Edi CAHYADI wrote:
> Hi All,
>
> I have 2 servers:
> hostA: RedHat Linux 2.4.21-40.EL
> hostB: HP-UX 10.20
>
>>From hostA, I can't lookup hostB even though I put its entry in /etc/hosts file.
Commands like host, dig and nslookup are DNS lookup utilities and so
don't use the configuration defined in /etc/nsswitch.conf. The switch
file is used to define different ways to find host names (amongst other
things) of which DNS is just one.
Cheers
Adam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-02 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-02 5:35 Unable to lookup host registered in hosts file Edi CAHYADI
2006-10-02 8:36 ` Adam T. Bowen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).