[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cannot resolve self



Matt P. wrote:
> * /etc/hosts is slightly modified:
> ----------------------------------
> 127.0.0.1 localhost
> 999.999.999.999 myname.mydomain.myext

> ===> Symptom:
> On machine myname, I type
> $> host myhost
> myhost.mydomain.myext does not exist (authoritative answer)
>
> If I strace this last command, it doesn't show any sign of opening
> /etc/host.conf (and /etc/hosts for that matter), but rather runs to
> the dns which doesn't contain a reference to myhost.mydomain.myext
>
> How can I force the resolver to peek into /etc/hosts ?

myname and myhost are two different machines.  But more importantly, any DNS
client is always going to look at DNS.  /etc/host.conf is used by the TCP/IP
stack, though, so pinging myname.mydomain.myext should work (if it wasn't an
invalid IP address).

Try putting 127.0.0.2 hello in /etc/hosts, then ping hello.

A




Reply to: