[Unbound-users] doubt for unbound process flow when run command "dig @localhost . ns"
W.C.A. Wijngaards
wouter at nlnetlabs.nl
Thu Mar 20 08:19:12 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Jianjun,
On 03/20/2014 08:26 AM, Jianjun Ning wrote:
> all, when I run command "dig @localhost . ns",I used tcpdump to
> capture the DNS packets,I found that unbound query root DNS server
> twice, why?
The first is the root prime query, the second is the query to fetch
your answer. The reason it does it twice is that the first query is
run while the state machine in unbound does not perform further
recursions, and the second has the state machine set to store the
answer for the user. So, with the first it fetches the addresses of
the root servers and the second asks one of those root servers for the
answer you wanted. Realistically, the answer is stored in cache and
the second query is not necessary, but there is no code there that
checks the cache for contents; the cache-check code is in a different
position in the implementation. I do not think that this query needs
to have special-case code added to avoid the second query.
Best regards,
Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJTKqR6AAoJEJ9vHC1+BF+Nwk8P/27k2YnH/XohNZi2n27sJJNI
dUchOQeve3g809nmIQxp4ErEs609LwtKPmBC/yJL50guOqykWTGJoU0KL3lnzkTF
h9J8fbMxDiPKEaEQm5zIIGijHzSn5pE+sdGVEXqna/uQGJ1HHRiF6LPt1DHCq6Tt
YsjtJ8rNYTvHNwYtVQiS/d0KgR3BnftiIldlF9snjN7zPtOPgL310eRY4v3Wjfz0
y3/vojmTs7Sg4qtI7fKsgWQQfnh+IcWd3baNcXXdl5vPHMMvpkrioLjlpWhCj48S
NWX3iJL6CjxKpnsYpub9qiTvpwJelv0qqVqG3QsNVn6NHR2Qv9+uWxIqbm7lvsvz
6jJPtYboY30TPDIz3MgnTR1ZWEBwBkmFKEqX73JjnCzPU5cQfg78iV9oEIJeIaro
yRfP2yTebwuYUMUznFiXi58UPsEMkmxkZAtryWFppMfgRlo81jna8XdPVRGFuHE8
ylpEe4zo2cldZuRn7w6PS3TmglWkktPyPziN3+bqUSXafgUTTeLY9dLgx6omOI+w
bpJY0luNA0/FJpnRfHesrzI+/CVICrTGKrgScDfsWhp59mxiwfsJnaSNzzKJWtQq
dxSrYcfPfyBUyF32oY3A19XrerXdpNy/9G0PBR4HVOOSOmGwpy4dxZJ9R7cW0IgP
7Ij6k0GsvL6u7jAGZjyV
=31yc
-----END PGP SIGNATURE-----
More information about the Unbound-users
mailing list