Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

named(1M)

resolver(4)




nslookup(1) nslookup(1)
NAME nslookup - interactively queries name servers SYNOPSIS nslookup nslookup -server nslookup host-to-find [server] ARGUMENTS -server Specifies interactive mode. Replace server with the host name of a name server. host-to-find Specifies the name of the host to be queried. server Specifies either the host name or the address for a name server. DESCRIPTION nslookup is a program which queries DARPA Internet domain name servers. The nslookup program has two modes: interactive and non- interactive. Interactive mode allows the user to query the name server for information about various hosts and domains or print a list of hosts in the domain. Non-interactive mode is used to print just the name and Internet address of a host or domain. Interactive mode is entered in the following cases: a) when no arguments are given (the default name server will be used), and b) when the first argument is a hyphen (-) and the second argument is the host name of a name server. Non-interactive mode is used when the name of the host to be looked up is given as the first argument. The optional second argument specifies a server. Interactive commands Commands may be interrupted at any time by typing a CONTROL-C. To exit, enter the end-of-file signal, CONTROL- D. The command line length must be less than 80 characters. Note: an unrecognized command will be interpreted as a host name. January 1992 1



nslookup(1) nslookup(1)
host [server] Looks up information for host using the current default server, or using server if it is specified. server domain lserver domain Changes the default server to domain. lserver uses the initial server to look up information about domain while server uses the current default server. If an authoritative answer can't be found, the names of servers that might have the answer are returned. root Changes the default server to the server for the root of the domain name space. Currently, the host sri-nic.arpa is used. (This command is a synonym for the lserversri-nic.arpa.) The name of the root server can be changed with the set root command. finger [name] [>filename] finger [name] [>>filename] Connects with the finger server on the current host. The current host is defined when a previous look-up for a host was successful and returned address information (see the set querytype=A command). name is optional. > and >> can be used to redirect output in the usual manner. ls domain [>filename] ls domain [>>filename] ls -a domain [>filename] ls -a domain [>>filename] ls -h domain [>filename] ls -h domain [>>filename] Lists the information available for domain. The default output contains host names and their Internet addresses. The -a option lists aliases of hosts in the domain. The -h option lists CPU and operating system information for the domain. When output is directed to a file, hash marks are printed for every 50 records received from the server. view filename Sorts and lists the output of the ls command with more(1). help ? Prints a brief summary of commands. set keyword[=value] Changes state information that affects the look-ups. Valid keywords are: 2 January 1992



nslookup(1) nslookup(1)
all Prints the current values of the various options to set. Information about the current default server and host is also printed. [no]debug Turns debugging mode on. A lot more information is printed about the packet sent to the server and the resulting answer. (Default = nodebug, abbreviation = [no]deb) [no]defname Appends the default domain name to every look-up. (Default = nodefname, abbreviation = [no]def) domain=name Changes the default domain name to name. The default domain name is appended to all look- up requests if the defname option has been set. (Default = value in /etc/resolv.conf, abbreviation = do) querytype=value Changes the type of information returned from a query to one of: A Specifies the host's Internet address (the default). CNAME Specifies the canonical name for an alias. HINFO Specifies the host CPU and operating system type. MD Specifies the mail destination. MX Specifies the mail exchanger. MG Specifies the mail group member. MINFO Specifies the mailbox or mail list information. MR Specifies the mail rename domain name. January 1992 3



nslookup(1) nslookup(1)
Other types specified in the RFC883 document are valid but aren't very useful. (Abbreviation = q) [no]recurse Tells the name server to query other servers if it does not have the information. (Default = recurse, abbreviation = [no]rec) retry=number Sets the number of retries to number. When a reply to a request is not received within a certain amount of time (changed with set timeout), the request is resent. The retry value controls how many times a request is resent before giving up. (Default = 2, abbreviation = ret) root=host Changes the name of the root server to host. This affects the root command. (Default = sri-nic.arpa, abbreviation = ro) timeout=number Changes the time-out interval for waiting for a reply to number seconds. (Default = 10 seconds, abbreviation = t) [no]vc Always uses a virtual circuit when sending requests to the server. (Default = novc,abbreviation= [no]v) Tutorial The domain name space is tree-structured and currently has five top-level domains: com for commercial establishments edu for educational institutions gov for government agencies org for not for profit organizations mil for MILNET hosts If you are looking for a specific host, you need to know something about the host's organization in order to determine the top-level domain it belongs to. For instance, if you want to find the Internet address of a machine at UCLA, do the following: 4 January 1992



nslookup(1) nslookup(1)
a) Connect with the root server using the root command. The root server of the name space has knowledge of the top- level domains. b) Because UCLA is a university, its domain name is ucla.edu. Connect with a server for the ucla.edu domain with the command server ucla.edu. The response will print the names of hosts that act as servers for the domain ucla.edu. Note that the root server does not have information about ucla.edu but knows the names and addresses of hosts that do. All future queries will be sent to the UCLA name server. c) To request information about a particular host in the domain, type the host name. To request a listing of hosts in the UCLA domain, use the ls command. The ls command requires a domain name (in this case, ucla.edu) as an argument. Note that if you are connected with a name server that handles more than one domain, all look-ups for host name must be fully specified with its domain. For instance, the domain harvard.edu is served by seismo.css.gov, which also services the css.gov and cornell.edu domains. A look-up request for the host aiken in the harvard.edu domain must be specified as aiken.harvard.edu. However, the set domain=name and set defname commands can be used to automatically append a domain name to each request. After a successful look-up of a host, use the finger command to see who is on the system or to finger a specific person. To get other information about the host, use the set querytype=value command to change the type of information desired and request another look-up. (The finger requires value to be A.) STATUS MESSAGES AND VALUES If the look-up request was not successful, an error message is printed. Possible errors are: Time-out The server did not respond to a request after a certain amount of time (changed with set timeout=value ) and a certain number of retries (changed with set retry=value). No information Depending on the query type set with the set querytype command, no information about the host was available, though the host name is valid. Non-existent domain January 1992 5



nslookup(1) nslookup(1)
The host or domain name does not exist. Connection refused Network is unreachable The connection to the name or finger server could not be made at the current time. This error commonly occurs with finger requests. Server failure The name server found an internal inconsistency in its database and could not return a valid answer. Refused The name server refused to service the request. Format error The name server found that the request packet was not in the proper format. This error should not occur. It would indicate a bug in the program. FILES /etc/bind/tools/nslookup Executable file /etc/resolv.conf File containing initial domain name and name server addresses SEE ALSO named(1M) in A/UX System Administrator's Reference resolver(4) in A/UX Programmer's Reference RFC-882, RFC-883 (DNN Network Information Center, SRI International) 6 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026