1.109 Nslookup

Purpose

Use at the server console to diagnose DNS setup problems or DNS problems in an application. This utility is similar to other Nslookup applications available in Windows and UNIX; however, this utility supports only the interactive mode and the commands and options listed below or in the online help. The interactive mode allows you to query name servers for information about various hosts and domains or to display a list of hosts in a domain.

Using Nslookup

Using this utility requires you to be familiar with how DNS works. For more information about DNS, see the references in Additional Information.

To load Nslookup utility, enter nslookup at the System Console prompt.

For optimum performance, Nslookup uses the sys:\system\etc\resolv.cfg file to obtain the DNS configuration information. If this file is mising or not configured, the Nslookup queries might display information that looks similar to the following:

Figure 1-6 Message Displayed if resolv.cfg Is Missing

To resolve this problem, either configure the resolv.cfg file with the correct DNS configuration information and then exit and reload Nslookup or issue the following server command for Nslookup to use as the DNS server information for future queries:

SERVER IP_ADDRESS

Syntax

After loading Nslookup, use the following commands to make queries about DNS.

command variable|[optional]command[variable]

The following table contains a list of supported commands and a description of what each does.

Command

Description

exit

Exits the utility.

help or ?

Displays help for the utility at the server console. The ? can be used instead of entering HELP.

lserver

Changes the default server to the specified DNS domain. The LSERVER command uses the initial server to look up the information about the specified DNS domain. This is in contrast to the SERVER command, which uses the current default server.

name

Displays information about the host or domain name.

name1 name2

Displays information about the host or domain name1 but performs a lookup using name2 as server.

root

Changes the default server to a server for the root of the DNS domain name space. You can change the name of the root server with the SET ROOT command.

server name

Changes the default server to name using the current server to resolve name

set option

Changes the configuration settings that affect how the lookup functions. For a list of supported options, see the following table.

The following table contains a list of supported NSLOOKUP SET command options and a description of what each does.

Set Option

Description

all

Displays the current values of all the configuration settings and default server.

class=value

Changes the query class.

Supported values:

  • IN specifies the Internet class

  • CS specifies CSNET class (obsolete in RFC 1035)

  • CH specifies the CHAOS class

  • HS specifies the MIT Athena Hesiod class

  • ANY allows a wildcard query that will match any of the supported classes

Default = IN

[no]debug

Turns debugging mode on or off. With debugging on, more information is displayed about the response to each query.

Default = nodebug

[no]defname

Appends the default DNS domain name to any lookup request where the name does not end in a dot (implied name to root).

Default = defname

domain=name

Changes the default DNS domain to the name specified.

The default DNS domain name is appended to a lookup request depending on the state of the defname option.

Default = name in the domain line of the resolv.cfg file (if it is present). If the domain line is not present, no default name is used. Queries will not use a default domain unless the SET DOMAIN=name command is used.

querytype=value or type=value

Changes the type of information queried. More information about types can be found in Request for Comment (RFC) 1035. The SET TYPE command is a synonym for SET QUERYTYPE.

Supported values:

  • A is the computer's IP address

  • ANY is all types of data

  • CNAME is the canonical name for an alias

  • HINFO is the computer's CPU and operating system type used by a host

  • MX identifies a mail exchanger for the domain

  • NS is the authoritative name server for the domain

  • PTR is the computer name if the query is an IP address (otherwise, it is the pointer to other information)

  • SOA is the DNS domain’s start-of-authority record

Default = A

[no]recurse

Tells the DNS name server to query other servers if it does not have the information.

Default = recurse

retry=number

Sets the number of retries. When a reply to a request is not received within a certain amount of time (change with SET TIMEOUT), the request is re-sent before giving up.

Default = 1

root=root_server_name

Changes the name of the root server. This affects the root command.

Default = A.ROOT‑SERVERS.NET

timeout=number

Changes the initial number of seconds to wait for a reply to a request. When a reply to a request is not received within this time period, the request is re-sent the configured number of retries (changed with SET RETRY) before giving up.

Default = 2

Additional Information

Topic

See

Domain Names—Concepts and Facilities

Request for Comment (RFC) 1034

Domain Names—Implementation and Specification

Request for Comment (RFC) 1035

In-depth information about NSLOOKUP

DNS and BIND by Paul Albitz and Cricket Liu, published by O’Reilly and Associates, April 2001