Subject: Re: Can't find a host.
To: Nguyen, Son N. <email@example.com>
From: Jeremy C. Reed <firstname.lastname@example.org>
Date: 09/10/2007 10:38:21
On Mon, 10 Sep 2007, Nguyen, Son N. wrote:
> I have a DSL and a router to connect to internet. I set 192.168.1.16
> for my network card.
> In /etc/rc.conf, I added dhclient=YES and I can browse the web without
> any problem.
> In /etc/hosts file, I add "192.168.1.16 nsl.myhome.net nsl".
> But if I type 'host nsl' it could not find the host:
> "...not found in 3(NXDOMAIN)".
> I don't know why? Any one know? Thanks a lot.
The host tool uses DNS (/etc/resolv.conf) and not /etc/hosts file.
Use ping or pkgsrc/net/gethost. Or setup BIND named on your system to
provide DNS for "nsl.myhome.net".
Jeremy C. Reed
<plug> In a few weeks, the BIND 9 DNS Administration Reference Book will
be available at online book stores with ISBN 978-0-9790342-1-3 </plug>