Technical data

Configuring and Managing BIND
5.8 Using NSLOOKUP to Query a Name Server
5.8.5 Query Types
You can change the type of information you receive from a query. The default
query type is A. Table 5–14 lists the different types of query information.
5.8.5.1 A Query Type
This is the default NSLOOKUP query type. It returns the name and IP address
of a host. The following NSLOOKUP session shows a query for the host
apple
.
The query to the server
condor.lgk.dec.com
is successful, and the server returns
the IP address 16.99.208.10.
$ NSLOOKUP
Default Server: condor.lgk.dec.com
Address: 16.99.208.53
> apple
Server: condor.lgk.dec.com
Address: 16.99.208.53
Name: apple.lgk.dec.com
Address: 16.99.208.10
>
If you enter a domain name without a trailing period, NSLOOKUP appends the
default domain to the name. You can change the default domain with the
set
domain
or
set srchlist
commands.
To look up a host not in the current domain, append a period to the name, as
shown in the following example:
$ NSLOOKUP apple.koz.dec.com.
5.8.5.2 PTR Query Type
To obtain the host name for an IP address, change the query type to PTR and
enter the IP address, as shown in the following example:
> set type=ptr
> 16.99.208.189
Server: condor.lgk.dec.com
Address: 16.99.208.53
Name: dove.lgk.dec.com
Address: 16.99.208.189
You can also use the PTR query type to obtain more information about a domain,
as as shown in the following example:
> lgk.dec.com
Server: condor.lgk.dec.com
Address: 16.99.208.53
lgk.dec.com
origin = condor.lgk.dec.com
mail addr = postmaster.lgk.dec.com
serial = 1998101948
refresh = 3600 (1H)
retry = 300 (5M)
expire = 604800 (1W)
minimum ttl = 43200 (12H)
>
Configuring and Managing BIND 5–43