dnsquery for Solaris

Alan Clegg aclegg at isc.org
Tue Mar 9 23:58:27 UTC 2010


ic.nssip wrote:
> What I'm trying to do is to find a way to get the TTL left for a cached
> record.
> I usually use dnsquery like this (12m23s and 9m53s is what interest me):
> 
> # dnsquery -n 8.8.8.8 -t a ftp.funet.fi
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47912
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
> ;;      ftp.funet.fi, type = A, class = IN
> ftp.funet.fi.           12m23s IN A     193.166.3.2
> #
> #
> # dnsquery -n 8.8.8.8 -t a ftp.funet.fi
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29770
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
> ;;      ftp.funet.fi, type = A, class = IN
> ftp.funet.fi.           9m53s IN A      193.166.3.2

aclegg at Yellow:~$ dig +noquestion +nocomments +nostats @8.8.8.8 ftp.funet.fi

; <<>> DiG 9.7.0 <<>> +noquestion +nocomments +nostats @8.8.8.8 ftp.funet.fi
; (1 server found)
;; global options: +cmd
ftp.funet.fi.		900	IN	A	193.166.3.2


See the 900?  There's your TTL.  Use dig.

AlanC

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20100309/8e7d921f/attachment.bin>


More information about the bind-users mailing list