'dig -t any ...' question

Jim Reid jim at rfc1035.com
Thu Jun 10 18:19:14 UTC 2004


>>>>> "Sara" == Sara  <demone33 at yahoo.it> writes:

    Sara> Hi all, please take a look at the below reported commands I
    Sara> issued from DNS (BIND 9.2.1 on Red-Hat 7.3) and the output I
    Sara> got Briefly, I issued:

    Sara> # dig -t any ericsson.com 
    Sara> # dig -t mx ericsson.com 
    Sara> # dig -t any ericsson.com

    Sara> and I got different output for the dig -t any ericsson.com
    Sara> commands.  So, which is the way the 'dig -t any' command
    Sara> works?  Thank you all.

There's nothing strange happening here. All you're seeing is routine
cacheing and resolving behaviour. Your name sever knew nothing about
ericsson.com. So the first lookup terminates when your name server
retrieves the name servers for ericsson.com from the .com name
servers. That info is cached by your server. On your next lookup,
those ericsson.com servers get asked for MX records. These get cached
by your server too and the reponse is relayed back to your lookup with
dig. By the time of your last lookup, your name server has cached a
bunch of stuff for ericsson.com, so your server just returns that.

If you repeated that query a few minutes later, you'd see that the
answers now had lower TTLs than before because they're on a countdown
for expiry from your name server's cache. In fact you can see that in
your posting. The MX related records have a 300 second TTL. But in the
next lookup, the TTL was 298 seconds.


More information about the bind-users mailing list