dots in cnames

Kevin Darcy kcd at daimlerchrysler.com
Wed Sep 6 20:52:39 UTC 2000


Assuming it doesn't already have the answer cached, the resolver just shoots
off a query for the entire name "www.hostname.sub.dom.ain" and, if it doesn't
get the answer immediately, it then follows the referrals it receives all the
way down until it gets an answer. These referrals are for *zones*, not
necessarily *domains*, _per_se_. Zone cuts -- separations between
"parent" zones and their "child" zones -- always occur at domain boundaries,
but not necessarily at *every* domain boundary; it's possible to "skip" domain
levels within a zone. In the first scenario you described, for instance, the
"hostname.sub.dom.ain" subdomain -- which includes
"www.hostname.sub.dom.ain" -- is contained completely in the
"sub.dom.ain" zone. Since this subdomain is not a zone, it has no NS or
SOA records which might interfere with a CNAME.

To illustrate further, in our internal root namespace here, I delegate
"in-addr.arpa" directly from the root zone, skipping the "arpa" level. There's
nothing else of interest in the "arpa" domain, and it would be hosted on the
same nameserver anyway, so why bother making it a separate zone? It's a matter
of personal taste and/or manageability whether you decide to cut a given domain
level into a separate zone or not. On the Internet, the rules are a little
different: you *have* to delegate subdomains of "com", for instance, since
no-one is going to want to allow direct maintenance of your company's
A records, CNAMEs, MX'es etc. in the "com" master file. But theoretically that
could be done. And, of course, once your domain is delegated to you as a zone,
then you have the freedom to make zone cuts anywhere you want underneath, or
not at all.

For more complete explanations, see the _DNS_and_BIND_ O'Reilly book, or
consult any of the various on-line sources of DNS information.


- Kevin
beetle bailey wrote:

> I'm glad this works, but I'm still a little confused.  Why would a resolver
> not look for information on the domain 'hostname.sub.dom.ain' if given an
> address www.hostname.sub.dom.ain?  I thought dots had a special function,
> kind of like a field separator, that would separate the different
> hierarchical levels in a name thereby making them bad choices for use in a
> hostname.
>
> >From: Kevin Darcy <kcd at daimlerchrysler.com>
> >To: bind-users at isc.org
> >Subject: Re: dots in cnames
> >Date: Tue, 05 Sep 2000 21:00:31 -0400
> >
> >
> >beetle bailey wrote:
> >
> > > Say we have a server: hostname.sub.dom.ain and someone wanted to use
> > > www.hostname.sub.dom.ain (someone created a presentation making use of
> >that
> > > address).  Is there any reason I shouldn't create a CNAME for
> >www.hostname
> > > in the zone file for sub.dom.ain pointing to hostname?  It seems like
> >that
> > > should be a very bad thing to do, but I tried it and it works.
> >
> >Having a CNAME of www.hostname.sub.dom.ain pointing to hostname.sub.dom.ain
> >doesn't violate the "CNAME and other data" rule, as long as no other
> >records
> >exist for www.hostname.sub.dom.ain.
> >
> > > Then again
> > > delegating a new subdomain for hostname.sub.dom.ain and adding an entry
> >for
> > > www sounds like trouble as there's already a A record in sub.dom.ain for
> > > hostname.sub.dom.ain.  Could I get some input on this?  Thanks.
> >
> >If you delegated hostname.sub.dom.ain and wanted to keep an A record for
> >that
> >name, then you'd have to add the hostname.sub.dom.ain A record to the new
> >zone
> >file. Once that was done, there'd be no problem creating a "www" CNAME in
> >the
> >zone pointing to that A record, just as you might, e.g. create a
> >www.example.com CNAME pointing to the example.com A record. You'd only run
> >into
> >problems going the other way, i.e. creating a www.hostname.sub.dom.ain A
> >record
> >and then trying to point a hostname.sub.dom.ain CNAME to it -- in that
> >case,
> >the CNAME would conflict with the SOA and NS records for the zone.
> >
> >
> >- Kevin
> >
> >
> >
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.






More information about the bind-users mailing list