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

Bug#247734: /etc/hosts: Two lines with the same IP address?



On Wed, 2004-06-09 at 19:05, Joshua Kwan wrote:
> Where does 127.0.1.1 fit in to the whole "hostname of system must
> resolve into a usable IP" thing?

I am not aware that the hostname of the system must resolve into
something usable.  I am only aware that sudo prints an error 
message (which may be harmless) if the hostname isn't resolvable
at all.


> should we have an alias for the lo
> device that sets up 127.0.1.1?

I am not sure that that is necessary.  It seems that one can connect
to 127.0.1.1 without further ado.  I have dnsmasq running, for example,
and it answers queries made to 127.0.1.1.

$ host www.matrox.com 127.0.1.1
Using domain server:
Name: 127.0.1.1
Address: 127.0.1.1#53
Aliases:

www.matrox.com has address 138.11.241.200

I wouldn't expect this to work given my routing table:

$ sudo route
Kernel IP routing table
Destination  Gateway    Genmask         Flags Metric Ref    Use Iface
192.168.0.0  *          255.255.255.0   U     0      0        0 wlanp_0
default      hubert     0.0.0.0         UG    0      0        0 wlanp_0

But it does.


>  It sounds like a gross hack.
> 
> > If the machine has static IP address 10.1.2.3:
> > 
> >     127.0.0.1	localhost.localdomain	localhost
> >     10.1.2.3    pingo
> > 
> > If the machine has static IP address 10.1.2.3 and domain name
> > 'pingodom':
> > 
> >     127.0.0.1	localhost.localdomain	localhost
> >     10.1.2.3    pingo.pingodom	pingo
> 
> This sounds good. I won't commit anything until we all agree though :)

Yes, better wait until the debian-devel discussion is finished.
--
Thomas




Reply to: