example.gov.
Here, a +short argument limits output to just brief answers, the cost and hostnames
found as MX records. The sort(1) uses -n to sort numerically, lowest through highest
costs.
* Some versions of dig(1) use a PTR lookup for -x, whereas other use an ANY lookup.
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
9.5 Pitfalls | 343
This example reveals a handy property of MX records. When multiple hosts share the
same cost, the rule is to select randomly from among them. That is, in this example,
all three of the cost 5 hosts are tried first before any of the cost 100 hosts, but the
order in which the cost 5 hosts are tried is random.
Note that we discuss MX records, generally, in ?§9.3 on page 332, covering their management
and associated pitfalls. Here, we have limited our discussion to using dig(1)
to look up MX records.
9.4.4 Use a Different Name Server with dig(1)
Normally, dig(1) talks to the name server that is defined in your /etc/resolv.conf file.
There will be times, however, when you will need to use a different name server. To
illustrate, consider the need to move from one ISP to another. Let??™s say your MX
records are correct on the old ISP name servers, and you wish to make sure that they
are correct on the new name servers before switching over to them.
Pages:
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623