Re: Problem with local network



On Fri, 2006-01-13 at 18:50 +0000, Chris Jones wrote:

> My hosts file is:
>
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1 bilbo.stow-jones.local localhost.localdomain localhost
> 192.168.0.3 bilbo.stow-jones.local bilbo
> 192.168.0.2 gandalf.stow-jones.local gandalf
> 192.168.0.4 frodo.stow-jones.local frodo

That "following line" should have been:
127.0.0.1 localhost.localdomain localhost
Not as you had it (with the bilbo.stow-jones.local).

*And*, you're setting yourself up for problems trying to give the name
bilbo.stow-jones.local address to both 127.0.0.1 and 192.168.0.3.

If you have LAN interfaces, which you appear to do, then there's no
reason try and apply a local machine address to the loopback. Only do
that if you have no interfaces and want your machine to know itself as
something other than localhost.localdomain.

Although that's a different problem to what you've brought up, it might
be a cause of other problems that bite you, particularly if you've done
the same trick on each PC.

> When I ping to any of the PC's I get the following:-
> [root@bilbo ~]# ping -c4 frodo
> ping: unknown host frodo

You mentioned that you've checked your /etc/resolv.conf file, but you
haven't told us what's in there. Perhaps you expect something different
than what's needed. I'd expect it to have one or the other of the
following lines in it:

search stow-jones.local
domain stow-jones.local

Your /etc/nsswitch.conf looks like it's set up to query your hosts file
before anything else, so it *should* be checking it.

Trying to use dig to test things will only help you if you have your
local DNS server configured with your machine addresses (and
your /etc/resolv.conf file starts off with your local DNS server
addresses instead of remote ISP ones), it won't pay any attention to the
hosts file (neither do some other things, which is just one reason I
stopped playing with my hosts file and did things properly with a DNS
server).

--
Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: W2K doesnt do lookup in hosts
    ... i can call ping without supplying an ip address. ... 'ping 192.168.0.10' and it works, but with 'ping server', it only ... There are two copies of the HOSTS file and I can never remember which one it the actual one being used. ... I've used that trick to resolve names on routed private networks where the local DNS server doesn't have records for hosts on the other. ...
    (microsoft.public.win2000.networking)
  • Re: How big can HOSTS be?
    ... How 'bout when you do this: ... "The Hosts file essentially asks like a local DNS server for web sites ...
    (microsoft.public.windowsxp.general)
  • Re: How big can HOSTS be?
    ... How 'bout when you do this: ... "The Hosts file essentially asks like a local DNS server for web sites ...
    (microsoft.public.windowsxp.general)
  • Re: X-No-Archive, here we go again ;-)
    ... I don't block using a hosts file. ... including most of Google's English sites with my local DNS server ... You can easily add the list to bind. ...
    (news.software.readers)
  • Re: How big can HOSTS be?
    ... How 'bout when you do this: ... "The Hosts file essentially asks like a local DNS server for web sites ...
    (microsoft.public.windowsxp.general)