Problem with local network

Chris Jones linux at stow-jones.co.uk
Fri Jan 20 20:37:50 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim wrote:

> 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 at 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).
>
I am still having the same problem as last weekend. pinging my Fedora
box by IP address works, but pinging by name does not:

[root at bilbo ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0F:EA:8C:2E:52
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:eaff:fe8c:2e52/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:58986 errors:1 dropped:0 overruns:0 frame:1
          TX packets:88116 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29442270 (28.0 MiB)  TX bytes:7303437 (6.9 MiB)
          Interrupt:11

[root at bilbo ~]# ping -c4 192.168.0.3
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
64 bytes from 192.168.0.3: icmp_seq=0 ttl=64 time=0.069 ms
64 bytes from 192.168.0.3: icmp_seq=1 ttl=64 time=0.057 ms
64 bytes from 192.168.0.3: icmp_seq=2 ttl=64 time=0.055 ms
64 bytes from 192.168.0.3: icmp_seq=3 ttl=64 time=0.054 ms

- --- 192.168.0.3 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 0.054/0.058/0.069/0.011 ms, pipe 2
[root at bilbo ~]# ping -c4 bilbo
ping: unknown host bilbo

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

The last three entries are for the PC's on the network.

/etc/resolv.conf shows:
nameserver 192.168.0.1
nameserver 212.23.3.100
nameserver 212.23.6.100
search stow-jones.local
# generated by NetworkManager, do not edit!

The first line refers to my router, the other two nameservers are my
ISP's.

When I check the status of the named service, I get the following:
[root at bilbo ~]# service named status
rndc: couldn't get address for 'localhost': not found
[root at bilbo ~]#

Is there anything else that I can check to get this back up?


- --
mailto:linux at stow-jones.co.uk
Q:    Why don't lawyers go to the beach?
A:    The cats keep trying to bury them.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFD0UoeZJbxzczKArcRAluaAJ9mzUJDBqMhyl9yLGBIksS04f0r9wCdHN1+
kizGtOUu4CI52Axzh7QYRCw=
=Ffbs
-----END PGP SIGNATURE-----




More information about the fedora-list mailing list