CNAME question

Kevin Darcy kcd at daimlerchrysler.com
Fri Jul 27 01:17:59 UTC 2001


viet anh wrote:

> I have some question about CNAME record in DNS system,
> and want to have your explaination of it.
> Image that, I have a domain vietanh.com and I build a
> name server (dns.domain.com) to administrate this
> domain, so I have to declare in named.conf file new
> zone "vietanh.com", and creat file name
> vietanh.com.dns that contain:
> vietanh.com IN SOA dns.domain.com mail.dns.domain.com
> (
>                       20010725;
>                       86400;
>                       86400;
>                       3600;
>                       3600000;)
> vietanh.com    IN NS dns.domain.com.
> ...
> My question here is that: is there any problem if I
> add only CNAME record after NS record.
> File vietanh.com.dns will like that:
> vietanh.com IN SOA dns.domain.com mail.dns.domain.com
> (
>                       20010725;
>                       86400;
>                       86400;
>                       3600;
>                       3600000;)
> vietanh.com    IN NS dns.domain.com.
> vietanh.com    IN  CNAME www.isp.com.
>
> Because as my knowlege, the CNAME record can't exist
> with any record.

The above is illegal. If a name owns a CNAME, it can't own any other
records. To state it another way, if a name owns records other than
CNAME, then it can't own a CNAME record. The name "vietanh.com" owns an
SOA and an NS record. Therefore it cannot own a CNAME.

> My second question:
> one computer will have only IP address and one name.
> if I want this copumter have another name I have to
> declare CNAME record in DNS that point to the first
> name of this computer. But I have a problem with mail
> exchanger ( my domain have CNAME and MX record). I
> want to replace CNAME record by A record, so one ip
> address will have two A record, for example:
>  mail.vietanh.com IN A 10.0.0.1
>  mail.isp.com     IN A 10.0.0.1
>  I wonder if my dns system work
> correctly.
> As DNS administrator, if I declare like that, what
> problem I have to take care?
> ( at this time, declare like that, it will work fine)
> I am looking forward to have your answer.

There's nothing wrong with what you are proposing. The only slight
inconvenience is that you would need to decide where the reverse record
for 10.0.0.1 will point (if you use reverse DNS at all), since there's
no use in having a name own multiple PTR records.


-Kevin




More information about the bind-users mailing list