Maintained by: NLnet Labs

[Unbound-users] Does not cache DNAME ?

W.C.A. Wijngaards
Wed Mar 23 17:36:59 CET 2011

Hash: SHA1

Hi Stephane,

RFC1034 3.6, A zero TTL prohibits caching of the data.  The CNAME has a
0 TTL and therefore the message cannot be cached.

The DNAME RR is stored in the cache (since it has a TTL greater than
zero).  However, unbound will not synthesize from the DNAME unless it is
DNSSEC signed, to avoid spoof trouble.

Basically, unbound will trust the DNAME record only within the context
of the query for which the DNAME was asked.  But since the CNAME had TTL
0, this context is not stored.  If the CNAME had TTL equal to the TTL of
the DNAME, say, then unbound would cache, and return a DNAME and CNAME
message as you expect (for that qname).

On 03/23/2011 05:17 PM, Stephane Bortzmeyer wrote:
> When I query repeatedly a name which is covered by a DNAME, the TTL in
> the answer makes me thing Unbound does not cache it:
> % dig -x
> ...
> 86400 IN      DNAME

Note: 0   IN      CNAME

> % dig -x
> ...
> 86400 IN      DNAME


> While BIND has the expected behaviour:
> % dig -x
> ...
> 86180 IN      DNAME
> % dig -x
> ...
> 86168 IN      DNAME
> Unbound 1.4.6

I see ARIN and RIPE offer signed reverse delegations, perhaps a good
reason to sign these zones :-)

Another solution is to deploy an authority server that gives TTL to the
synthesized CNAME equal to the TTL of the DNAME.

Best regards,
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE -