On Mon, Jul 22, 2002 at 10:17:01PM -0700, Horst wrote: > > On Mon, Jul 22, 2002 at 07:24:23PM -0700, Horst wrote: > > 1) How do I get the serial number that an arbitrary NS has cached for a > > specific domainname ? > > > > 2) How is this different if the 'arbitrary' NS is actually the Primary > > for that domain ? (except that 'cached' wouldn't be the right term?) > > On Mon, 22 Jul 2002, Jacob Meuser wrote: > ... snipped > > > > $ dig [ @ns.example.com ] example.com SOA ANY [ +nssearch ] > > > > Thanks Jacob, this got me off the ground (of course, I tried man dig > before posting but that particular man page isn't that helpful); bind > 9.2.1
Yes, it's not very informational on what 'type' is. That's why I also referenced rfc 1035, which explains the query types. > Still, from what I see so far only the NSs with SAO show the details - Yes, '+nssearch' will look for the SOA from authoritative servers. Try: $ dig @ns.example.com example.com SOA | egrep 'SOA[[:space:]]' to get the SOA from the server in question. > see 4 blocks below (the 3rd only shows the complaint about 'SOA') Yeah, you don't need both ANY and SOA, my bad. > - Horst > > """ > [root@ns Work]# dig @ns2.google.com google.com ANY +nssearch > SOA ns1.google.com. dns-admin.google.com. 2002072208 7200 1800 1038800 60 > from server ns3.google.com in 103 ms. > SOA ns1.google.com. dns-admin.google.com. 2002072208 7200 1800 1038800 60 > from server ns4.google.com in 54 ms. > SOA ns1.google.com. dns-admin.google.com. 2002072208 7200 1800 1038800 60 > from server ns1.google.com in 73 ms. > SOA ns1.google.com. dns-admin.google.com. 2002072208 7200 1800 1038800 60 > from server ns2.google.com in 72 ms. > > [root@ns Work]# dig @ns2.google.com efn.org ANY +nssearch > << there was nothing, H. >> > > [root@ns Work]# dig @ns2.google.com efn.org SOA ANY +nssearch > ;; Warning, extra type option > ;; connection timed out; no servers could be reached > [root@ns Work]# ns2.google.com apparently doesn't have a record for efn.org ... it points to the root servers. $ dig @ns2.google.com efn.org ANY ; <<>> DiG 2.2 <<>> @ns2.google.com efn.org ANY ; (1 server found) ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38989 ;; flags: qr rd; Ques: 1, Ans: 0, Auth: 13, Addit: 0 ;; QUESTIONS: ;; efn.org, type = ANY, class = IN ;; AUTHORITY RECORDS: . 3600000 NS A.ROOT-SERVERS.NET. . 3600000 NS B.ROOT-SERVERS.NET. . 3600000 NS C.ROOT-SERVERS.NET. . 3600000 NS D.ROOT-SERVERS.NET. . 3600000 NS E.ROOT-SERVERS.NET. . 3600000 NS F.ROOT-SERVERS.NET. . 3600000 NS G.ROOT-SERVERS.NET. . 3600000 NS H.ROOT-SERVERS.NET. . 3600000 NS I.ROOT-SERVERS.NET. . 3600000 NS J.ROOT-SERVERS.NET. . 3600000 NS K.ROOT-SERVERS.NET. . 3600000 NS L.ROOT-SERVERS.NET. . 3600000 NS M.ROOT-SERVERS.NET. ;; Total query time: 194 msec ;; FROM: funk to SERVER: ns2.google.com 216.239.34.10 ;; WHEN: Mon Jul 22 23:20:01 2002 ;; MSG SIZE sent: 25 rcvd: 236 > [root@ns Work]# dig @ns.efn.org efn.org ANY +nssearch > SOA efn.org. hostmaster.opn.org. 2002071701 10800 3600 604800 600 from > server phloem.uoregon.edu in 390 ms. > SOA efn.org. hostmaster.opn.org. 2002071701 10800 3600 604800 600 from > server ns.efn.org in 390 ms. > SOA efn.org. hostmaster.opn.org. 2002071701 10800 3600 604800 600 from > server ns1.efn.org in 99 ms. > SOA efn.org. hostmaster.opn.org. 2002071701 10800 3600 604800 600 from > server ns2.efn.org in 101 ms. > [root@ns Work]# > > """ -- <[EMAIL PROTECTED]>
