On Fri, 23 Feb 2007, naturalwatt wrote:
> I had a problem on a TS7250, that couldn't even resolve localhost until
> /etc/resolv.conf was altered to set the nameserver line to point to
> something real.
>
> My router is on 192.168.0.1, so the resolv.conf reads
> --
> search ts-local.net
> nameserver 127.0.0.1
> nameserver 192.168.0.1
> --
>
> The intention is that it tries /etc/hosts first, so that localhost can
> always be resolved, then tries the Big Bad World for everything else.
>
> However, it doesn't do what I expect. I have an entry in /etc/hosts,
> which is not picked up. I know that a named is not running, but there
> is no complaint about this. I think the nameserver 127.0.01 line is not
> valid, as there is no nameserver running on my system.
Correct - remove the "nameserver 127.0.0.1" line.
> The man pages for Linux in general talk about a /etc/host.conf file
> which can be set to search /etc/hosts first, then use BIND. There is no
> /etc/host.conf supplied with TS-Linux, and creating one doesn't seem to
> give the results I expect - ie, looking up in /etc/hosts first.
Check out the /etc/nsswitch.conf file
It is used by the resolver functions.
You need....
hosts: files dns
in the file. With appropriate entries in the /etc/hosts file of course.
>
> Although it sort of works, allowing the router to be used as a
> nameserver, I would prefer that the system can still resolve localhost
> even if the router were to fail or be disconnected.
>
> Also, although a resolv.conf containing only nameserver 127.0.0.1 works,
> to my surprise, for resolving names in /etc/hosts, when there are two
> nameserver lines, it does *not* seem to go onto the second one if the
> first one fails.
>
> Any explanation or comments?
>
> I am used to Solaris and HP-UX, which are controlled by nsswitch.conf
> files, which seems to be what host.conf is claiming to do.
>
> Martin
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/4It09A/fOaOAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|