Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why can't the rest of my network see my Linux box's hostname?

3 views
Skip to first unread message

mac...@gmail.com

unread,
Mar 26, 2005, 3:55:53 PM3/26/05
to
Hi all,

Apologies in advance if this is a FAQ - I couldn't find an FAQ list. I
would appreciate some help/advice about getting my network right.

I have a small business network with Macs (running Mac OS X) and a
variety of Windows PCs. This network is connected to a Netgear DG834
ADSL router and thence to my ISP. I have added a new Linux box to this
network today, running Fedora Core 2. When I look at the list of
attached devices in the Netgear console it sees the Linux box as
hostname marple and ip address 192.168.0.6. The hostname setting on the
box is marple. However when I try to ping the Linux box from any of the
other machines on the network it doesn't work by hostname, only by ip
address.

Do I need to set hostnames/ip addresses explicitly in the /etc/hosts
file under Linux? Or is there something else I need to do to get my box
recognised by hostname on the network?

Any help much appreciated.


macfizz.
--

Sandgroper

unread,
Mar 26, 2005, 8:47:31 PM3/26/05
to

<mac...@gmail.com> wrote in message
news:1111870553....@f14g2000cwb.googlegroups.com...
> Hi all,

>
> Do I need to set hostnames/ip addresses explicitly in the /etc/hosts
> file under Linux? Or is there something else I need to do to get my box
> recognised by hostname on the network?
>

Your /etc/hosts file should contain

The 127.0.0.1 loopback entry.

IP address localhost.localdomain Alias

The entries you have are for your host machine as well as the all the
machines in the workgroup and on the network that has been granted access to
your host machine.


Generally for a small network you set it up using

127.0.0.1 localhost.localdomain lo
IP address <workgroupName>.<hostName> Alias


--
Sandgroper
----------------------------------
Remove KNICKERS to Email
stev...@KNICKERSiinet.net.au


--
Sandgroper
----------------------------------
Remove KNICKERS to Email
stev...@KNICKERSiinet.net.au


Tim

unread,
Mar 27, 2005, 4:19:10 AM3/27/05
to
On 26 Mar 2005 12:55:53 -0800,
mac...@gmail.com posted:

> I have a small business network with Macs (running Mac OS X) and a
> variety of Windows PCs. This network is connected to a Netgear DG834
> ADSL router and thence to my ISP. I have added a new Linux box to this
> network today, running Fedora Core 2. When I look at the list of
> attached devices in the Netgear console it sees the Linux box as
> hostname marple and ip address 192.168.0.6. The hostname setting on the
> box is marple. However when I try to ping the Linux box from any of the
> other machines on the network it doesn't work by hostname, only by ip
> address.
>
> Do I need to set hostnames/ip addresses explicitly in the /etc/hosts
> file under Linux? Or is there something else I need to do to get my box
> recognised by hostname on the network?

The hosts file is for the machine that it's on (so it can resolve some
addresses without using the DNS). Other machines will either need their
own hosts file edited to include another machine's details on it, or you
can use a local DNS server to manage it all for you.

I'd imagine that your router might have some of this functionality. Have a
look at it, and see if you can configure it's hosts file or DNS server, if
it has one.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.

mac...@gmail.com

unread,
Mar 27, 2005, 5:24:06 AM3/27/05
to
Thanks for the quick responses folks. I had thought that my ADSL router
was effectively acting as a local DNS, since it has a table of
hostnames and ip addresses, but clearly it wasn't. I didn't want to
resort to host file entries as I am using DHCP. However I have edited
the hosts files on the various machines and lookups are now working as
expected. I just have to hope that renewing the DHCP leases doesn't
cause the ip addresses to change anywhere. Under Mac OS X one of the
networking options is "Using DHCP with manual address" which I suppose
means that a box reserves an ip address beyond lease renewal. Can I do
that on my Linux box?


macfizz
--

Tim

unread,
Mar 27, 2005, 8:04:59 AM3/27/05
to
mac...@gmail.com posted:

By default, devices will ask for the same lease that they had last time,
and provided that you have more than enough to spare you should be fine.
They can specifically request a certain address, rather than just the same
as last time, so you could configure what you want either in the
requesting device, or for the DHCP server to assign the same address to
the same hardware. You can also configure the lease times, both in what's
offered, and what's asked for.

"Using DHCP with manual address" *might* mean to get other parameters via
DHCP requests (DNS server addresses, etc.), but use a fixed address for
this device.

0 new messages