21.4 How to Use nslookupIf your site is connected to the Internet, you can use the nslookup (1) program to interactively find MX and other records. To run nslookup , just type its name:
% Note that you may have to give the full pathname. Under SunOS, nslookup lives in the /usr/etc directory; under Ultrix, in /usr/ucb ; and under HP-UX, in /usr/bin .
Once
nslookup
is running, it prints the name of your default name server
and the IP address for that machine, then a
Server: Your.Main.Server Address: 123.45.67.8 > To tell nslookup to look up only MX records, [14] use the set command:
> Now look up some real hosts and domains. First look up the domain sendmail.org by entering its name at the prompt:
> Note the trailing dot that tells nslookup (1) that the local, default domain should not be appended prior to the lookup. The output produced by the above lookup looks like this:
>
The first two lines again show the name and IP address of the
local DNS server. The next three lines show that
the domain
Now look up a real UUCP host, lady . Enter its name as if it were a part of the icsi.berkeley.edu domain:
> The output produced shows that lady has an MX record:
lady.icsi.berkeley.edu preference = 5, mail exchanger = icsib.ICSI.Berkeley.EDU icsib.ICSI.Berkeley.EDU inet address = 128.32.201.15 >
Mail sent to Machines that have MX records do not necessarily have A records. The host lady is such a machine. You tell nslookup (1) to look up an A record with the set command:
>
The
nslookup
(1) program is a useful tool for performing
all the same lookups that are done by
sendmail
. Each type of lookup
corresponds to a
To exit
nslookup
(1), just type |
|