On 20 June 2013 06:33, Ralph Castain <[email protected]> wrote:
> Been trying to decipher this problem, and think maybe I'm beginning to
> understand it. Just to clarify:
>
> * when you execute "hostname", you get the <name>.local response?
Yes:
[rmurri@nh64-2-11 ~]$ hostname
nh64-2-11.local
[rmurri@nh64-2-11 ~]$ uname -n
nh64-2-11.local
[rmurri@nh64-2-11 ~]$ hostname -s
nh64-2-11
[rmurri@nh64-2-11 ~]$ hostname -f
nh64-2-11.local
> * you somewhere have it setup so that 10.x.x.x resolves to <name>, with no
> ".local" extension?
No. Host name resolution is correct, but the hostname resolves to the
127.0.1.1 address:
[rmurri@nh64-2-11 ~]$ getent hosts `hostname`
127.0.1.1 nh64-2-11.local nh64-2-11
Note that `/etc/hosts` also lists a 10.x.x.x address, which is the one
actually assigned to the ethernet interface:
[rmurri@nh64-2-11 ~]$ fgrep `hostname -s` /etc/hosts
127.0.1.1 nh64-2-11.local nh64-2-11
10.1.255.201 nh64-2-11.local nh64-2-11
192.168.255.206 nh64-2-11-myri0
If we remove the `127.0.1.1` line from `/etc/hosts`, then everything
works again. Also, everything works if we use only FQDNs in the
hostfile.
So it seems that the 127.0.1.1 address is treated specially.
Thanks,
Riccardo