linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edi CAHYADI <edi.cahyadi@st.com>
To: linux-admin@vger.kernel.org
Subject: Unable to lookup host registered in hosts file
Date: Mon, 2 Oct 2006 13:35:21 +0800	[thread overview]
Message-ID: <002501c6e5e4$8d4d5ec0$3dfbc68a@amk.st.com> (raw)

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


             reply	other threads:[~2006-10-02  5:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-02  5:35 Edi CAHYADI [this message]
2006-10-02  8:36 ` Unable to lookup host registered in hosts file Adam T. Bowen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002501c6e5e4$8d4d5ec0$3dfbc68a@amk.st.com' \
    --to=edi.cahyadi@st.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).