newbie question: can canonical name be the same as db name?

Kevin Darcy kcd at daimlerchrysler.com
Fri Feb 7 17:29:31 UTC 2003


azu wrote:

>Hello,
>
>I would to know if it's possible to have a canonical name the same as
>a declared zone. Here's what I mean.
>
>someserver           IN A 1.2.3.4.
>research.someserver  IN CNAME someserver
>
>
>In /etc/named
>
>zone "research.someserver" IN {
>        type master;
>        file "db.research.someserver";
>};
>
>and in /var/named i have a db.research.someserver
>
I think you're a little confused. If you put an owner name of 
"someserver" into the "research.someserver" zone file, then in the 
absence of any $ORIGIN directives, it'll be interpreted as the name 
"someserver.research.someserver.". Similarly, an owner name of 
"research.someserver" in that zone file will be interpreted as the name 
"research.someserver.research.someserver.". As long as 
"research.someserver.research.someserver." appears nowhere else in your 
namespace, it is perfectly legal for the second name to be an alias of 
the first, but it's probably not what you want.

If you were to dot-terminate those names (or, in a more roundabout way, 
set the $ORIGIN to "."), then suddenly "someserver." no longer belongs 
in the zonefile, because the name "someserver." is not in the 
"research.someserver." zone (it would belong in the "someserver." or 
root zone). Also, the name "research.someserver." under those conditions 
could not own a CNAME record, because a name that owns a CNAME record 
cannot own any other records, and presumably you have an SOA record and 
NS records in that zone, all with the name "research.someserver.".

                                                                        
                                                - Kevin







More information about the bind-users mailing list