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

Re: where is /etc/hosts supposed to come from?



On 2009-12-31 12:37:25 -0800, Russ Allbery wrote:
> Vincent Lefevre <vincent@vinc17.org> writes:
> > On 2009-12-30 11:54:57 -0800, Russ Allbery wrote:
> >> Vincent Lefevre <vincent@vinc17.org> writes:
> 
> >>> "stanford.edu" is definitely wrong. First it's just a domain name, not a
> >>> FQDN (as required by the mailname(5) man page).
> 
> >> stanford.edu is an RFC 1035 FQDN.
> 
> > RFC 1035 (from /usr/share/doc/RFC/links/rfc1035.txt.gz) doesn't define
> > what a FQDN is. It doesn't contain "FQDN", and the only occurrence of
> > "fully" and "qualified" is in "Gateways will also have host level
> > pointers at their fully qualified addresses.
> 
> However, the other standards that do talk about FQDNs refer to RFC 1035
> for the definition.  See, for instance, RFC 5322.

RFC 5322 doesn't mention "FQDN", "fully" or "qualified" either!
Perhaps you meant RFC 5321, which uses "FQDN" with a different
meaning, and uses "primary host name" for what is a FQDN here.
RFC 5321 also says "In the EHLO command, the host sending the
command identifies itself", implying that what you give after EHLO
must be unique (otherwise that's no longer an identification).

> > FYI, here's what Wikipedia[*] (though not authoritative and sometimes
> > containing errors) says:
> 
> >   For example, given a device with a local hostname myhost and a
> >   parent domain name example.com, the fully qualified domain name is
> >   written as myhost.example.com. This fully qualified domain name
> >   therefore uniquely identifies the host — while there may be many
> >   resources in the world called myhost, there is only one
> >   myhost.example.com.
> 
> You're right, that's not authoritative and, in this case, is misleading.
> Nothing about an FDQN implies uniqueness.  Wikipedia is trying to get at
> the distinction between an unqualified name, which could duplicate many
> other unqualified names in other domains, and a fully-qualified name which
> has a single location in the DNS hierarchy.  However, an FQDN, despite
> living in one place in the DNS hierarchy, may refer to multiple separate
> systems (as it does for stanford.edu, time.stanford.edu, etc., all of
> which are FQDNs).

No, they are not FQDNs of the corresponding hosts. For instance,
time.stanford.edu resolves to 3 IP addresses (3 hosts, I suppose):

time.stanford.edu has address 171.64.7.105
time.stanford.edu has address 171.64.7.67
time.stanford.edu has address 204.63.224.70

xvii% host 171.64.7.105
105.7.64.171.in-addr.arpa domain name pointer time-a.Stanford.EDU.
xvii% host 171.64.7.67
67.7.64.171.in-addr.arpa domain name pointer time-b.Stanford.EDU.
xvii% host 204.63.224.70
70.224.63.204.in-addr.arpa domain name pointer time-c.Stanford.EDU.

The respective FQDN's of these hosts seem to be time-a.Stanford.EDU,
time-b.Stanford.EDU and time-c.Stanford.EDU, and they are unique:
they all resolve to a *single* IP address.

xvii% host time-a.Stanford.EDU
time-a.Stanford.EDU has address 171.64.7.105
xvii% host time-b.Stanford.EDU
time-b.Stanford.EDU has address 171.64.7.67
xvii% host time-c.Stanford.EDU
time-c.Stanford.EDU has address 204.63.224.70

Note: this is a heuristic only; the only way to be sure that they
are the FQDN's of the host (as returned by "hostname -f") is to
test on the machines themselves.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


Reply to: