Problem with DHCP, /etc/hosts and GNOME

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Thu Apr 8 16:07:10 UTC 2004


Am Do, den 08.04.2004 schrieb Julien Olivier um 17:43:

> Hi
> 
> I've installed both FC1 and FC2 and, each time, I have noticed a very
> annoying problem.
> 
> I have an ethernet ADSL modem. So, when I configure the network, I use
> DHCP (my modem is also a DHCP server).
> Then, when I try to log in GNOME for the first time, I get an error
> message stating that I should had my hostname to /etc/hosts.
> So, I fire vim and add my hostname (provided by my ADSL modem) to
> /etc/hosts.
> Then, I log in again, and everything works.
> 
> Now, my questions are:
> 
>  - Why does GNOME need my hostname to be in /etc/hosts ?

Because some daemons are running and they need a working name scheme.

>  - Why isn't my hostname automatically added to /etc/hosts after the
> connection is established ? Is there a technical reason to it ? Or is it
> simply a bug that should be filed ?

Your hostname changes when connecting the internet through ADSL? I would
understand that you establish the internet connection through your ADSL
modem which acts as modem and router with DHCPD functionality. So only
the external address of the modem/router should change and the internal
address of the modem/router stays as it is (often 192.168.0.1 or from
10.0.0.0/8 net). You Fedora machine should not always get a new dynamich
DHCP address from the router. Check your settings and define a DHCP
hostname to be used (-> /etc/sysconfig/network-scripts/ifcfg-eth0).

If your situation is different please correct me with better
information.

>  - Or, alternativeley, is there a way to ignore the hostname provided by
> the DHCP connection and just stick to localhost.localdomain ? I found a
> similar option in Anaconda but it doesn't seem to work.

localhost.localdomain or in short localhost is only for loopback
purposes. Having a network connection you alsways have to have a proper
hostname set and a relating entry (in addition to the localhost entry!)
in /etc/hosts file, i.e.

192.168.0.2  fedora.home.lan  fedora

> Thanks !

> Julien Olivier <julo at altern.org>

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 1 (Yarrow) on Athlon CPU kernel 2.4.22-1.2174.nptl
Sirendipity 17:58:16 up 20 days, 1:39, load average: 0.10, 0.20, 0.18 
                   [ Γνωθι σ'αυτον - gnothi seauton ]
             my life is a planetarium - and you are the stars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040408/558707d7/attachment-0001.sig>


More information about the fedora-list mailing list