<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 6, 2013 at 6:12 PM, Matus UHLAR - fantomas <span dir="ltr"><<a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On 06.12.13 15:52, sumsum 2000 wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I am having only a forward only option in bind configuration.<br>
When i dig on some host which has CNAME, the cache contains a longer TTL<br>
for the CNAME than the TTL for the final resolution of the IP.<br>
</blockquote>
<br></div>
Yes, every record has its own TTL, including every record in CNAME chain.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
However, in the example below, the CNAME is queried again when the TTL<br>
for <a href="http://a336.g.akamai.net" target="_blank">a336.g.akamai.net</a>. is up.<br>
</blockquote>
<br></div>
Pardon?<div class="im"><br></div></blockquote><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I was expecting that the TTL for CNAME will be used from the cache and the<br>
lookup will not happen again until the TTL has not expired.<br>
</blockquote>
<br></div>
When a name is queried, query is processed always the same way - every name<br>
of a chain is validated again and missing/expired names are resolved again.<br>
<br>
Note that records can removed from memory even without expiring, e.g. when<br>
memory is full.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Is there a way to avoid additional lookups when the value is already<br>
present in the cache for CNAME entries.<br>
</blockquote>
<br></div>
not without violating DNS standard.<div class=""><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
;; ANSWER SECTION:<br>
<a href="http://emp.bbci.co.uk" target="_blank">emp.bbci.co.uk</a>. 436 IN CNAME <a href="http://emp-live.bbc.net.uk" target="_blank">emp-live.bbc.net.uk</a>.<br>
<a href="http://emp-live.bbc.net.uk" target="_blank">emp-live.bbc.net.uk</a>. 253 IN CNAME <a href="http://emp.bbci.co.uk.edgesuite.net" target="_blank">emp.bbci.co.uk.edgesuite.net</a>.<br>
<a href="http://emp.bbci.co.uk.edgesuite.net" target="_blank">emp.bbci.co.uk.edgesuite.net</a>. 3368 IN CNAME <a href="http://a336.g.akamai.net" target="_blank">a336.g.akamai.net</a>.<br>
<a href="http://a336.g.akamai.net" target="_blank">a336.g.akamai.net</a>. 6 IN A 58.27.124.225<br>
<a href="http://a336.g.akamai.net" target="_blank">a336.g.akamai.net</a>. 6 IN A 58.27.124.200<br>
</blockquote></div></div></blockquote><div>What i meant was that, <br> when a DNS query is made to <a href="http://emp.bbci.co.uk">emp.bbci.co.uk</a>, the record for it is present in the cache with TTL of 436. and since it is present, there should not be any query to the DNS
server,the same goes for <a href="http://emp-live.bbc.net.uk">emp-live.bbc.net.uk</a> and
<a href="http://emp.bbci.co.uk.edgesuite.net">emp.bbci.co.uk.edgesuite.net</a><br><br><a href="http://emp.bbci.co.uk" target="_blank">emp.bbci.co.uk</a>. 436 IN CNAME <a href="http://emp-live.bbc.net.uk" target="_blank">emp-live.bbc.net.uk</a>.<br>
<a href="http://emp-live.bbc.net.uk" target="_blank">emp-live.bbc.net.uk</a>. 253 IN CNAME <a href="http://emp.bbci.co.uk.edgesuite.net" target="_blank">emp.bbci.co.uk.edgesuite.net</a>.<br>
<a href="http://emp.bbci.co.uk.edgesuite.net" target="_blank">emp.bbci.co.uk.edgesuite.net</a>. 3368 IN CNAME <a href="http://a336.g.akamai.net" target="_blank">a336.g.akamai.net</a>.<br><br> For all these three CNAME, there should not be any lookup that needs to be sent to the DNS server, as they are present in the cache and their TTL entries have not expired and are present in the cache. Only when it comes to the last chain <a href="http://a336.g.akamai.net">a336.g.akamai.net</a>, which expires after TTL of 6 and when is not present in the cache, the DNS query for this should be sent for lookup.<br>
<br></div><div>But I see that though the entries for CNAME's are present in the cache, the look up happens again for the CNAME,<br><br>Does it take the minimum TTL for getting the answer for the original entry <a href="http://emp.bbci.co.uk">emp.bbci.co.uk</a>, and ignores the CNAME TTL in the cache. <br>
<br></div><div>Is this the correct behavior<br> <br></div><div><br></div><div> <br></div></div><br></div></div>