NU021172@VM1.NoDak.EDU (Marty Hoag) (12/17/89)
Archive-name: qns/announce Original-posting-by: NU021172@NDSUVM1.BITNET (Marty Hoag) Original-subject: QNS - Query NameServer EXEC Archive-site: vm1.nodak.edu [134.129.111.1] Archive-directory: LOCSOFT Archive-files: QNS.* Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti) Some of you who know me will attest that my physique does look a little like Santa, and others figure North Dakota is pretty close to the North Pole, so I thought given the season I should share a tool I have found very useful in the role of e-mail postmaster... This is in appreciation to all you who have helped me over the past year! QNS is a simple REXX EXEC which calls the VM TCP/IP CMSRESOL module and formats the results. Others (Cornell I think?) have already provided an "NSLOOKUP" for CMS. QNS is meant to be a "command line" tool similar to DIG (domain information groper by Steve Hotz for UNIX (tm) systems). However, I started QNS before I had even used NSLOOKUP or DIG so the syntax may be rather strange. The output is formatted in a fairly standard representation of the various dns records so you will need to at least know what you are looking for to interpret the results. QNS lets you query name servers - either locally or remotely. You can even query ALL the nameservers for a specified subdomain if you like (I find that very useful for finding out of sync servers). You can query for more than one type at a time (the default is to look for both MX and A records for a host). UDP queries are the default (unless we get a truncation error - then QNS repeats the query via TCP) but you can specify the method and timeout value. The output can be displayed on your console as it is produced, saved in a file, and/or reviewed via XEDIT (handy for long outputs). Because I hate to type, I have tried to make QNS useful with a minimum of input... You can also set up your own default options in a file. QNS is contained in one EXEC right now. You enter QNS ? for the help information. Installation tips are included as comments. QNS was written on our VM SP 4 HPO 4.2 system with IBM's TCP/IP for VM (5798-FAL) at the 1.2.1 level plus further fixes and enhancements (but other than fixing bugs I don't think there is any dependence on those...). You will probably want to tailor the EXEC for your site as noted in the comments. You may obtain QNS from our LISTSERV (LISTSERV@NDSUVM1.BITNET) or via anonymous FTP. To receive the exec on LISTSERV send LISTSERV@NDSUVM1 the command GET QNS PACKAGE . You may also want to "AFD" or "FUI" to the QNS PACKAGE so you receive future updates. You may use anonymous FTP to VM1.NoDak.EDU (134.129.111.1) by using the userid ANONYMOUS and any password. After you are on enter CD LOCSOFT then DIR QNS.* to see the files and GET QNS EXEC to get the file. I am offering this in the spirit of the season. I cannot promise to maintain the EXEC in the future nor offer any warranty for its use, but I would like to hear your complaints, bug reports, and comments. I would also appreciate it if the exec is NOT resold or used for commercial gain! I do want to retain the rights for any future use of it. Some Santa, eh? ;-). Anyway, I hope some of you might find this useful. I will include a few short examples of its use below. Seasons Greatings To All! May all your caches be full! ----------- Marty Hoag ND Higher Education Computer Network US Mail: NDSU Computer Center Phone: (701)-237-8639 Fax: (701)-237-8541 PO Box 5164 / UCCS Bitnet: NU021172@NDSUVM1 (NOTE 0 = ZERO) Fargo, ND 58105 Internet: NU021172@VM1.NoDak.EDU UUCP: ...!uunet!ndsuvax!vm1.nodak.edu!NU021172 Some QNS Examples (The command is shown followed by console output) Look Up MX and A Records for a Host on the Local Server qns vm1.nodak.edu === QNS vm1.nodak.edu === 15 Dec 1989 14:40:34 === --- Query Name: VM1.NODAK.EDU Qtype: A --- Server 1/1: Local Server 14.0.0.0 Question: 1 VM1.NODAK.EDU A IN Answer(s): (ie. Primary Results of the Query) 1 VM1.NODAK.EDU A IN 86400 134.129.111.1 Elapsed time 3.43 sec. --- Query Name: VM1.NODAK.EDU Qtype: MX --- Server 1/1: Local Server 14.0.0.0 Question: 1 VM1.NODAK.EDU MX IN Elapsed time 1.34 sec. End of queries. 1.0 of 1 successful (100%) R; T=0.10/0.17 14:40:39 Look Up the Name of a Numeric Address qns 134.129.111.64 === QNS 134.129.111.64 === 15 Dec 1989 14:42:32 === --- Query Name: 64.111.129.134.IN-ADDR.ARPA Qtype: PTR --- Server 1/1: Local Server 14.0.0.0 Question: 1 64.111.129.134.IN-ADDR.ARPA PTR IN Answer(s): (ie. Primary Results of the Query) 1 64.111.129.134.IN-ADDR.ARPA PTR IN 86400 plains.NoDak.edu Elapsed time 2.14 sec. R; T=0.07/0.10 14:42:34 Look up the Address Records for a Host on ALL Its Secondary DNS Servers qns next210.nodak.edu a . Warning: 5 servers to query. === QNS next210.nodak.edu a . === 15 Dec 1989 14:41:38 === --- Query Name: NEXT210.NODAK.EDU Qtype: A --- Server 1/5: plains.NoDak.edu 134.129.111.64 Question: 1 NEXT210.NODAK.EDU A IN Answer(s): (ie. Primary Results of the Query) 1 NEXT210.NODAK.EDU A IN 86400 134.129.95.2 Elapsed time 0.75 sec. --- Query Name: NEXT210.NODAK.EDU Qtype: A --- Server 2/5: uunet.uu.net 192.48.96.2 Question: 1 NEXT210.NODAK.EDU A IN Answer(s): (ie. Primary Results of the Query) 1 NEXT210.NODAK.EDU A IN 86400 134.129.95.2 Elapsed time 1.50 sec. --- Query Name: NEXT210.NODAK.EDU Qtype: A --- Server 3/5: uunet.uu.net 137.39.1.2 Error in Communications with Name Servers. RC=21 Elapsed time 20.87 sec. --- Query Name: NEXT210.NODAK.EDU Qtype: A --- Server 4/5: nsgeng.nwnet.net 130.42.101.98 Question: 1 NEXT210.NODAK.EDU A IN Answer(s): (ie. Primary Results of the Query) 1 NEXT210.NODAK.EDU A IN 77547 134.129.95.2 Elapsed time 2.52 sec. --- Query Name: NEXT210.NODAK.EDU Qtype: A --- Server 5/5: akbar.cac.washington.edu 128.95.112.1 Question: 1 NEXT210.NODAK.EDU A IN Answer(s): (ie. Primary Results of the Query) 1 NEXT210.NODAK.EDU A IN 84759 134.129.95.2 Elapsed time 2.04 sec. End of queries. 4.0 of 5 successful ( 80%) R(00021); T=0.22/0.39 14:42:10 Query ALL Root Servers of the "EDU" Domain for Their Status (Shortened) qns edu soa .edu (verbose Be patient... trying to find server(s) .EDU Retry one more time with TCP connection. <NOTE: QNS will retry via TCP if the results don't fit in a UDP packet> Use Server 1 NIC.DDN.MIL 26.0.0.73 Use Server 2 NIC.DDN.MIL 10.0.0.51 Use Server 3 A.ISI.EDU 128.9.0.107 Use Server 4 A.ISI.EDU 26.3.0.103 Use Server 5 C.NYSER.NET 192.33.4.12 Use Server 6 C.NYSER.NET 128.213.5.17 Use Server 7 TERP.UMD.EDU 128.8.10.90 Use Server 8 TERP.UMD.EDU 10.1.0.17 Use Server 9 GUNTER-ADAM.AF.MIL 26.1.0.13 Use Server 10 NS.NASA.GOV 128.102.16.10 Use Server 11 AOS.BRL.MIL 128.20.1.2 Use Server 12 AOS.BRL.MIL 192.5.25.82 Use Server 13 AOS.BRL.MIL 132.20.1.2 === QNS edu soa .edu === 15 Dec 1989 14:42:50 === --- Query Name: EDU Qtype: SOA Server 1/13: NIC.DDN.MIL 26.0.0.73 --- Error in Communications with Name Servers. RC=21 Elapsed time 20.63 sec. ... etc... --- Query Name: EDU Qtype: SOA Server 7/13: TERP.UMD.EDU 128.8.10.90 --- Question: 1 EDU SOA IN Answer(s): (ie. Primary Results of the Query) 1 EDU SOA IN 86400 NIC.DDN.MIL HOSTMASTER.NIC.DDN.MIL 891204 1800 300 604800 8 6400 Elapsed time 1.79 sec. ... etc... --- Query Name: EDU Qtype: SOA --- Server 9/13: GUNTER-ADAM.AF.MIL 26.1.0.13 Question: 1 EDU SOA IN Answer(s): (ie. Primary Results of the Query) 1 EDU SOA IN 86400 NIC.DDN.MIL HOSTMASTER.NIC.DDN.MIL 891207 1800 300 604800 8 6400 Elapsed time 3.49 sec. --- Query Name: EDU Qtype: SOA Server 10/13: NS.NASA.GOV 128.102.16.10 --- Question: 1 EDU SOA IN Answer(s): (ie. Primary Results of the Query) 1 EDU SOA IN 86400 NIC.DDN.MIL HOSTMASTER.NIC.DDN.MIL 891211 1800 300 604800 8 6400 Elapsed time 1.33 sec. ... etc... --- Query Name: EDU Qtype: SOA Server 13/13: AOS.BRL.MIL 132.20.1.2 --- Error in Communications with Name Servers. RC=21 Elapsed time 20.74 sec. End of queries. 8.0 of 13 successful ( 62%) qname=EDU qtype=SOA qclass=IN (via datagram for 10 sec.) R(00021); T=0.50/0.92 14:45:00