cname in zone files problem (???)

Dixon, Justin Justin.Dixon at BBandT.com
Fri Jul 7 16:05:49 UTC 2006


Your zone file is configured incorrectly:

>stage-access.co.uk.     IN      CNAME           stageaccess.com.

The above states that the root of the zone, stage-access.co.uk., is an alias
of stageaccess.com., which will invalidate all other RRs in the
stage-access.co.uk zone.

No other records in the stage-access.co.uk zone will be processed because of
this setup. 

Remove the CNAME listed above or change it to an A record and the rest of
the RRs in the zone should work properly then.

If this is a website, setup your webserver to respond to both hostnames on
the same IP and use A records instead of CNAMES if you need both hostnames
to resolve to the same site.

Justin Dixon
justin.dixon at bbandt.com
 
-----Original Message-----
From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org] On Behalf
Of didds
Sent: Thursday, July 06, 2006 13:15
To: comp-protocols-dns-bind at isc.org
Subject: cname in zone files problem (???)

bind 9.2.4
Red Hat Enterprise Linux ES release 3 (Taroon Update 7)


Hi - I have a zone file - "stage-access.co.uk" -  as such:

$TTL 2h
;
; Origin added to names not ending
; in a dot: stage-access.co.uk
;
@               IN      SOA     dns0.skyrock.co.uk.
hostmaster.skyrock.co.uk. (
                        2006070603 ; serial
                        2h ; refresh
                        1h ; retry
                        1w ; expire
                        1h) ; default_ttl

;
; Name & Mail servers (The name '@' is implied)
;
                        IN      NS              dns0.skyrock.co.uk.
                        IN      NS              dns1.skyrock.co.uk.
                        IN      MX      10      mail.stageaccess.com.

;Alias
stage-access.co.uk.     IN      CNAME           stageaccess.com.
mail                    IN      CNAME           mail.stageaccess.com.
www                     IN      CNAME           www.stageaccess.com.


when named is restarted the following is seen in /var/log/messages

Jul  6 17:17:17 0181-0256-wb01 named[29441]: dns_master_load:
stage-access.co.uk:21: stage-access.co.uk: CNAME and other data
Jul  6 17:17:17 0181-0256-wb01 named[29441]: zone
stage-access.co.uk/IN: loading master file stage-access.co.uk: CNAME
and other data



However....  trying to use this configuration...

$ nslookup
> server localhost
Default server: localhost
Address: 127.0.0.1#53
> www.stageaccess.com
Server:         localhost
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   www.stageaccess.com
Address: 213.219.58.12
> www.stage-access.co.uk
Server:         localhost
Address:        127.0.0.1#53

** server can't find www.stage-access.co.uk: SERVFAIL
> exit

so the CNAME of www.stageaccess.com can be resolved - but not
www.stage-access.co.uk

I'm still pretty green at all this, so apologies if I have made some
galring error...  but what am I doing wrong?  (Well, I have actually
inherited the above but don;t have the knwledge to sort it out!)

cheers

ian





More information about the bind-users mailing list