syntax/format of zone on slave $ORIGIN/paragraph - sorted?

Chris Thompson cet1 at cam.ac.uk
Thu Feb 10 17:48:11 UTC 2011


On Feb 10 2011, Barry Margolin wrote:

>When writing the zone file on a slave, BIND uses $ORIGIN so that all 
>records just have a single label.  So instead of writing:
>
>foo.bar IN A 1.2.3.4
>
>it will write:
>
>$ORIGIN bar
>
>foo IN A 1.2.3.4
>
>If you have a zone with lots of levels of subdomain, the file will have 
>lots of $ORIGIN statements as a result.

Except that the rules seem to be a bit more complicated than that. (I am
using "named-checkzone -D -s relative" but I am pretty sure the same code
is involved.) Here's an extract:

$ORIGIN cam.ac.uk.
admin                   MX      7 mx
$ORIGIN admin.cam.ac.uk.
aat                     A       131.111.150.33
alumni                  A       131.111.150.60
blog                    CNAME   webservices
$ORIGIN blog.admin.cam.ac.uk.
preview                 CNAME   cms.admin.cam.ac.uk.
$ORIGIN admin.cam.ac.uk.
bolero                  CNAME   ufsplay
bpaservices             A       131.111.150.69
www.business            CNAME   www
camino                  A       131.111.150.91

So why did it dive into a subdomain for preview.blog.admin.cam.ac.uk,
but not for www.business.admin.cam.ac.uk? These lines

$ORIGIN blog.admin.cam.ac.uk.
preview                 CNAME   cms.admin.cam.ac.uk.
$ORIGIN admin.cam.ac.uk.

could have been replaced by

preview.blog            CNAME   cms

just as in the latter case.

-- 
Chris Thompson
Email: cet1 at cam.ac.uk



More information about the bind-users mailing list