<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>The order of records in the zone is always going to be determined by a lexicographical sort by label, the same sort order as would be used by NSEC records if you were using them.</div><div><br></div><div>The $ORIGIN statements are just somebody's idea of a good time. But again, really inconsequential unless you are actually reading your slave zone files, and why would you need that? (Also applies to dynamic master zone files.)</div><div><br></div><div>You could always just use named-compilezone to convert your zone to a more script-readable format before you actually open it up; that removes all $ORIGIN statements altogether and writes out each domain name in full. Once you're in that habit, you could (as Alan Clegg said) use the raw file format for your zone files, which named-compilezone can read just as easily - just add '-f raw' to the command line.</div><div><br></div><div>Chris Buxton</div><div>BlueCat Networks</div><br><div><div>On Feb 10, 2011, at 10:11 AM, Walter Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit;">Yes!<br><br>So - I want to combine and sort unique $ORIGINs without seeing same $ORIGIN again and again.<br><br>Like in your example, I would prefer to see just _ONE_ time this sorted paragraph:<br><<$ORIGIN <a href="http://admin.cam.ac.uk">admin.cam.ac.uk</a>. >> and not having multiple entries...<br><br><br><br>$ORIGIN <a href="http://cam.ac.uk">cam.ac.uk</a>. <br> admin                   MX      7 mx <br> $ORIGIN <a href="http://admin.cam.ac.uk">admin.cam.ac.uk</a>.    <<<---------------- FIRST OCCURENCE<br> aat                     A       131.111.150.33 <br> alumni                  A       131.111.150.60 <br> blog                    CNAME   webservices <br> $ORIGIN blog.admin.cam.ac.uk.
 <br> preview                 CNAME   cms.admin.cam.ac.uk. <br> $ORIGIN <a href="http://admin.cam.ac.uk">admin.cam.ac.uk</a>.   <<< ---------------- SECOND OCCURENCE<br> bolero                  CNAME   ufsplay <br> bpaservices             A       131.111.150.69 <br> <a target="_blank" rel="nofollow" href="http://www.google.com/url?sa=D&q=www.business">www.business</a>            CNAME   www <br> camino                  A       131.111.150.91 <br><br><br><br>--- On <b>Thu, 2/10/11, Chris Thompson <i><<a href="mailto:cet1@cam.ac.uk">cet1@cam.ac.uk</a>></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Chris Thompson <<a href="mailto:cet1@cam.ac.uk">cet1@cam.ac.uk</a>><br>Subject: Re: syntax/format of zone on slave
 $ORIGIN/paragraph - sorted?<br>To: "Barry Margolin" <<a href="mailto:barmar@alum.mit.edu">barmar@alum.mit.edu</a>><br>Cc: "Bind-Users List" <<a href="mailto:bind-users@isc.org">bind-users@isc.org</a>><br>Date: Thursday, February 10, 2011, 9:48 AM<br><br><div class="plainMail">On Feb 10 2011, Barry Margolin wrote:<br><br>>When writing the zone file on a slave, BIND uses $ORIGIN so that all <br>>records just have a single label.  So instead of writing:<br>><br>>foo.bar IN A 1.2.3.4<br>><br>>it will write:<br>><br>>$ORIGIN bar<br>><br>>foo IN A 1.2.3.4<br>><br>>If you have a zone with lots of levels of subdomain, the file will have <br>>lots of $ORIGIN statements as a result.<br><br>Except that the rules seem to be a bit more complicated than that. (I am<br>using "named-checkzone -D -s relative" but I am pretty sure the same code<br>is involved.) Here's an extract:<br><br>$ORIGIN <a href="http://cam.ac.uk">cam.ac.uk</a>.<br>admin                   MX 
     7 mx<br>$ORIGIN <a href="http://admin.cam.ac.uk">admin.cam.ac.uk</a>.<br>aat                     A       131.111.150.33<br>alumni                  A       131.111.150.60<br>blog                    CNAME   webservices<br>$ORIGIN blog.admin.cam.ac.uk.<br>preview                 CNAME   cms.admin.cam.ac.uk.<br>$ORIGIN <a href="http://admin.cam.ac.uk">admin.cam.ac.uk</a>.<br>bolero                  CNAME   ufsplay<br>bpaservices             A       131.111.150.69<br>www.business            CNAME   www<br>camino               
   A       131.111.150.91<br><br>So why did it dive into a subdomain for preview.blog.admin.cam.ac.uk,<br>but not for <a href="http://www.business.admin.cam.ac.uk">www.business.admin.cam.ac.uk</a>? These lines<br><br>$ORIGIN blog.admin.cam.ac.uk.<br>preview                 CNAME   cms.admin.cam.ac.uk.<br>$ORIGIN <a href="http://admin.cam.ac.uk">admin.cam.ac.uk</a>.<br><br>could have been replaced by<br><br>preview.blog            CNAME   cms<br><br>just as in the latter case.<br><br>-- <br>Chris Thompson<br>Email: <a ymailto="mailto:cet1@cam.ac.uk" href="x-msg://87/mc/compose?to=cet1@cam.ac.uk">cet1@cam.ac.uk</a><br>_______________________________________________<br>bind-users mailing list<br><a ymailto="mailto:bind-users@lists.isc.org" href="x-msg://87/mc/compose?to=bind-users@lists.isc.org">bind-users@lists.isc.org</a><br><a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br></div></blockquote></td></tr></tbody></table><br>







      _______________________________________________<br>bind-users mailing list<br><a href="mailto:bind-users@lists.isc.org">bind-users@lists.isc.org</a><br>https://lists.isc.org/mailman/listinfo/bind-users</blockquote></div><br></body></html>