<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div></div><div class="gmail_quote">On Thu, Sep 22, 2016 at 3:36 PM, Woodworth, John R <span dir="ltr"><<a href="mailto:John.Woodworth@centurylink.com" target="_blank">John.Woodworth@centurylink.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">We’ve recently noticed multiple $TTL values in transferred zonefiles which do not exist in the original zonefiles.  They appear to be aggregates of TTLs set for individual records and I am definitely a fan of the organized look and feel.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However, I am curious about how they should be interpreted where $ORIGIN is concerned.  I just re-read rfc2308 and it states quite simply:<u></u><u></u></p>
<p class="MsoNormal">“   All resource records appearing after the directive, and which do not<u></u><u></u></p>
<p class="MsoNormal">    explicitly include a TTL value, have their TTL set to the TTL given<u></u><u></u></p>
<p class="MsoNormal">    in the $TTL directive. “<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">My confusion is $ORIGIN basically defines the default origin while reading in the file and creates a mini-universe for interpreting records until redefined.  Would a $TTL after a $ORIGIN be encapsulated by and restricted to records within
 that $ORIGIN block?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">My gut tells me no, and to follow the RFC literally (or loosely stated “from this point down”) but looking at the file it seems as if the $TTL is intended to be for the records within the $ORIGIN only (i.e. it is not reset to global value
 at the end).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I need to investigate this more on my own but I thought it might prove useful to ask the group as part of my research.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks in advance,<u></u><u></u></p>
<p class="MsoNormal">John<u></u><u></u></p>
<p class="MsoNormal"><u></u><br></p></div></div></blockquote><div><br></div><div>This is a common point of confusion.  DNS does not transfer zoneFILES.  Zone files are read and converted into the in-memory tree structure.  Zones are sent in wire format from the in-memory tree.  The receiving end populates its in-memory tree.  It can then convert the information to zone file format, and write it out, but do not expect it to look anything like the original zone file. It has no idea what the original file looked like, or what order the records were in.</div><div><br></div><div>$ORIGIN and $TTL only apply to the zone they are in, so no need to reset them at the end of the file since they cease to exist at that point.  They apply "from this line down until changed" and are merely a convenience to shorten the size of the file.</div><div><br></div><div>-- </div><div>Bob Harold</div><div><br></div></div><br></div></div>