If your site is connected to the Internet, you can use the
(1) program to interactively find MX and other records.
, just type its name:
Note that you may have to give the full pathname.
lives in the
; and under HP-UX,
is running, it prints the name of your default name server
and the IP address for that machine, then a
character as a prompt and awaits input:
to look up only MX records,
Now look up some real hosts and domains. First look
up the domain
by entering its name at the prompt:
Note the trailing dot that tells
(1) that the local,
default domain should not be appended prior to the lookup.
The output produced by the above lookup looks like this:
sendmail.org preference = 20, mail exchanger = mail1.reference.com
sendmail.org preference = 30, mail exchanger = mail2.reference.com
sendmail.org preference = 10, mail exchanger = knecht.oxford.reference.com
mail1.reference.com inet address = 184.108.40.206
mail2.reference.com inet address = 220.127.116.11
knecht.oxford.reference.com inet address = 18.104.22.168
The first two lines again show the name and IP address of the
local DNS server. The next three lines show that
has three MX
records. Mail addressed to that domain is sent
to the machine with the lowest preference (cost), which happens to
If that machine is down (or not accepting mail), the message
is sent to the machine with the next higher cost,
. The last three lines show
the IP addresses (A records) for those machines.
Now look up a real UUCP host,
. Enter its
name as if it were a part of the
The output produced shows that
has an MX record:
lady.icsi.berkeley.edu preference = 5, mail exchanger = icsib.ICSI.Berkeley.EDU
icsib.ICSI.Berkeley.EDU inet address = 22.214.171.124
Mail sent to
is instead delivered to the
, which in turn forwards
that mail over a dial-up line to the UUCP host
Machines that have MX records do not necessarily have A records.
is such a machine.
(1) to look up an A record with the
*** No address information available for lady.berkeley.edu.
(1) program is a useful tool for performing
all the same lookups that are done by
. Each type of lookup
corresponds to a
. The list of some available
(1) types is shown in
Table 21.1: Some nslookup Types
Canonical name for an alias
Host CPU and operating system type
Mail exchanger records
Name server record
Union of all records
(1), just type
(or Control-D if that fails).