3

I would like to let dig always forget a DNS record. I mean if I do dig yahoo.com then I have a record back in with ttl for 1790 seconds. Even if I have no cache service installed, next time i do the same command, the ttl have lowered. Some how, dig do remember the answer. Is it possible to clear that, so I always get a fresh answer back?

8

dig doesn’t remember queries. But it makes use of name servers listed in /etc/resolv.conf, unless the server to be queried is specified explicitly. Such servers normally accept recursive queries and have caches for their results. So dig can receive records cached by (intermediate) servers.

Use
   dig +trace
to override this behaviour, forcing it to query an authoritative server. See dig(1) for more information.

6

If you don't want a cached answer, ask directly the authoritative DNS serveur with @.

Example: dig yahoo.com @ns1.yahoo.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.