NSQUERY User's Manual October, 1993 This manual contains information about the use of NSQUERY, a program for testing Internet domain service (RFC 1035) name servers. Revision/Update Information: This is a revised manual. Operating System and Version: VMS V5.0 or later Software Version: NSQUERY V3.0-2 Matthew Madison MadGoat Software ________________________ 11 October 1993 Permission is granted to copy and redistribute this document for no commercial gain. The information in this document is subject to change without notice and should not be construed as a commitment by the author. The author assumes no responsibility for any errors that may appear in this document. DISCLAIMER: The author, the author's employer, and MadGoat Software make no representations or warranties with respect to the contents hereof and specifically disclaim any implied warranties of merchantability or fitness for any particular purpose. The following are trademarks of Digital Equipment Corporation: DEC ULTRIX VAX VAXcluster VMS MultiNet is a registered trademark of TGV, Inc. __________ Copyright ©1993 MadGoat Software. All Rights Reserved. _______________________________________________________ Preface This document is intended for users of the NSQUERY program. The reader is expected to be familiar with, or at least have access to, the information about the Internet Domain Naming Service, such as Internet RFC's 1034 and 1035. __________________________________________________________________ System Requirements NSQUERY requires VMS V5.0 or later and either TGV MultiNet or another TCP/IP package supported by the author's NETLIB package, version V1.2 or later. Refer to the NETLIB release notes for information on supported TCP/IP products. iii _______________________________________________________ 1 Installing NSQUERY NSQUERY comes in both source and object form. You may either recompile the program from sources or simply link the provided object code to create the NSQUERY executable. To just create the executable from the object code provided in the distribution kit, just execute the LINK.COM command procedure provided in the kit. For rebuilding from source code, use the BUILD.COM command procedure provided or the MMS description file also in the kit. You may need to modify these files before using them. __________________________________________________________________ 1.1 Alternate Network Transports NSQUERY is provided with access routines for two network transports: MultiNet (using its $QIO interface) and NETLIB (which interfaces to several different TCP/IP packages). If you have a TCP/IP package that isn't directly supported, or you just don't want to install the NETLIB package to support it, you can write your own network access routines. The files NETWORK_MULTINET.C and NETWORK_NETLIB.C can be used as examples or modified as needed for use with your TCP/IP package's API. 1-1 _______________________________________________________ 2 Using NSQUERY NSQUERY is designed to be invoked as a DCL "foreign command": $ NSQ*UERY :== $disk:[dir]NSQUERY The command description on the following pages describes the qualifiers and parameters available with NSQUERY. 2-1 NSQUERY _______________________________________________________ NSQUERY-Issue a Name Service Query This command issues a query to an Internet domain server and displays the resultant reply. _______________________________________________________ FORMAT NSQUERY query-name [server] _______________________________________________________ Command Qualifiers Defaults /PORT=number /PORT=53 /PROTOCOL=proto /PROTOCOL=UDP /[NO]RECURSIVE /NORECURSIVE /TYPE=qtype /TYPE=ALL /CLASS=qclass /CLASS=INTERNET _______________________________________________________ PARAMETERS query-name Name about which information should be obtained. This should be an internet dotted domain-style name. If query-name is a numeric IP address in dotted decimal form (e.g., 128.113.1.5), NSQUERY will automatically make an inverse query by reversing the address segments and adding ".IN-ADDR.ARPA". server Server to be queried. If omitted, NSQUERY translates the logical name NSQ_SERVER to obtain the server name. If there is no such logical name or it cannot be translated, NSQUERY prompts for the name of the server. If the server's name has multiple addresses, all addresses are obtained and each is tried until a query is successfully sent and reply received. 2-2 NSQUERY _______________________________________________________ DESCRIPTION All resource records defined in RFC 1035 are interpreted by NSQUERY. Refer to that RFC for information about the abbreviations used in the resource record display. All "time-to-live" values are displayed as VMS delta-time strings. Authoritative responses and truncated messages are noted before the resource records are displayed. _______________________________________________________ QUALIFIERS /PORT=port Directs the query to the specified TCP or UDP port. If omitted, port 53 (the port used by most, if not all, domain servers) is used. /PROTOCOL=proto Selects either TCP or UDP protocol. The default is UDP. UDP is generally used for simple domain queries; TCP is generally only used for major domain system events, such as zone transfers. /[NO]RECURSIVE Sets the recursion desired bit in the query. If the server being queried supports recursion and does not have the requested information cached, it will make queries of other servers on your behalf until the query is answered. NSQUERY will notify you if the server does not support recursive queries. /TYPE=qtype Selects the type of resource record to be returned about the name. The default is ALL, which selects all available resource record types. Available types are as follows: 2-3 NSQUERY Table_2-1__Resource_record_types_______________________ Type/QType_____Description_____________________________ A host address NS authoritative name server MD mail destination (obsolete) MF mail forwarder (obsolete) CNAME canonical name for an alias SOA start of zone authority MB mailbox domain name (experimental) MG mail group member (experimental) MR mail rename domain name (experimental) NULL null resource record WKS well-known service description PTR domain name pointer HINFO host information MINFO mailbox or mail list information MX mail exchange TXT text strings AXFR complete zone transfer MAILB all mailbox-related records (MB, MG, MR) MAILA__________all_mail_agent_records_(obsolete)_______ Refer to RFC 1035 for a complete description of resource record types and their uses. Note that not all servers support all record types. You should probably never attempt to use the AXFR query type. /CLASS=qclass Selects the class of resource records to be returned. The default is INTERNET. Available qclass values are: 2-4 NSQUERY Table_2-2__Resource_record_classes_____________________ Class/QClass___Description_____________________________ INTERNET the Internet CSNET the CSNET class (obsolete) CHAOSNET the CHAOS class HESIOD the Hesiod class ALL____________all_classes_____________________________ For more information about resource record class values, see RFC 1035. Note that not all servers support all classes; most servers' authority extends only over Internet-class information. Example 2-1 Sample NSQUERY output _______________________________________________________ $ NSQUERY RPI.EDU NETSERV1.ITS.RPI.EDU %NSQUERY-I-TRYNS, trying address 128.113.1.5... %NSQUERY-I-AUTHRESP, authoritative response %NSQUERY-I-QUERYOK, query operation completed successfully QUERY #1: QName=RPI.EDU., QType=255, QClass=1 ANSWER #1: RPI.EDU., SOA, INTERNET, 0 12:00:00 Primary NS: rpi.edu. Responsible: hostmaster.rpi.edu. Serial=600072, Refresh= 1 06:00:00, Retry= 0 00:20:00 Expire= 41 16:00:00, Minimum= 0 12:00:00 ANSWER #2: RPI.EDU., A, INTERNET, 0 12:00:00, Addr=128.113.1.7 ANSWER #3: RPI.EDU., NS, INTERNET, 0 12:00:00, NS=netserv1.its.rpi.edu. ANSWER #4: RPI.EDU., NS, INTERNET, 0 12:00:00, NS=netserv2.its.rpi.edu. ANSWER #5: RPI.EDU., NS, INTERNET, 0 12:00:00, NS=columbia.edu. ANSWER #6: RPI.EDU., NS, INTERNET, 0 12:00:00, NS=n2ngw.nyser.net. ANSWER #7: RPI.EDU., HINFO, INTERNET, 0 12:00:00, CPU=SUN-3/280, OS=UNIX _______________________________________________________ Example 2-1 Cont'd on next page 2-5 NSQUERY Example 2-1 (Cont.) Sample NSQUERY output _______________________________________________________ ADDTNL #1: netserv1.its.rpi.edu., A, INTERNET, 0 12:00:00, Addr=128.113.1.5 ADDTNL #2: netserv2.its.rpi.edu., A, INTERNET, 1 00:00:00, Addr=128.113.1.3 ADDTNL #3: columbia.edu., A, INTERNET, 0 21:27:26, Addr=128.59.16.1 ADDTNL #4: columbia.edu., A, INTERNET, 0 21:27:26, Addr=128.59.32.1 ADDTNL #5: n2ngw.nyser.net., A, INTERNET, 1 22:57:35, Addr=192.35.82.2 ADDTNL_#6:_n2ngw.nyser.net.,_A,_INTERNET,____0_00:00:56, Addr=128.145.198.2 2-6