[Bind 4.9] domain name and CNAME

Mark_Andrews at isc.org Mark_Andrews at isc.org
Tue Sep 24 22:14:21 UTC 2002


> Hello,
> 
> I have to configure a bind 4.9.7 on Solaris. Don't ask me to upgrade it : I 
> cannot, it is a production server ;)

	Well I hope you have that in writing.
 
> Let's imagine I want to create the domain domaintest.com. Moreover, I want 
> domaintest.com (as an address) to be redirected (by CNAME) to 
> www.website.com.
> 
> I do :
> 
> @               SOA     ns.otherdomain.com postmaster.otherdomain.com (
>                 2002092301      ;serial number
>                 21600           ; refresh       :       6 hours
>                 3600            ; retry :       1 hours
>                 3600000 ; expire :       42 days
>                 21600) ; default ttl : RAF 6 heures
> ;
>                 NS ns.otherdomain.com.
>                 NS ns.provider.com.
> ;
>                 CNAME www.website.com.
> www             CNAME www.website.com.
> 
> But that produces weird behaviour : on the secondary name server (that is 
> obviously allowed to do 'axfr'), when I try to transfer my zone, I get :
> 
> [julien at lysis rpms]$ dig @ns.otherdomain.com domaintest.com axfr
> 
> ; <<>> DiG 9.2.1 <<>> @ns.otherdomain.com domaintest.com axfr
> ;; global options:  printcmd
> domaintest.com. 21600   IN      CNAME   www.website.com.
> ; Transfer failed.  Didn't start with SOA answer.
> 
> I guess that there is a problem having a CNAME on the domain name...
> 
> So, is there a way, on my bind 4.7, to have
>   - domaintest.com to be a independant domain
>   - domaintest.com (as an address) to be a cname 
> 
> Many thanks for your help
> 
> Julien
> 

	What you want to do is illegal.  You can't use a CNAME with
	other data  (NS and SOA in this case).

	Hopefully you will be able to use SRV records in the future
	to support this sort of thing however it depends upon application
	support.

	For the present you will just have to use a A record.

	From RFC 1034:

The domain system provides such a feature using the canonical name
(CNAME) RR.  A CNAME RR identifies its owner name as an alias, and
specifies the corresponding canonical name in the RDATA section of the
RR.  If a CNAME RR is present at a node, no other data should be
present; this ensures that the data for a canonical name and its aliases
cannot be different.  This rule also insures that a cached CNAME can be
used without checking with an authoritative server for other RR types.

	Mark
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at isc.org


More information about the bind-users mailing list