I l@ve RuBoard |
3.19 Determining the Order in Which a Name Server Returns Answers3.19.1 ProblemYou want a name server to return certain answers in a particular order. 3.19.2 SolutionUse the rrset-order options substatement in BIND 8 or BIND 9.3.0 and later. In BIND 8, rrset-order lets you choose to give out answers that include multiple resource records in one of three orders:
rrset-order also lets you select the particular answers an order applies to using three qualifiers:
The default behavior, then, is equivalent to: options rrset-order { name "*" class IN type ANY order cyclic; }; }; So, to return the A records of your web server in a fixed order, you might use: options { rrset-order { name "www.foo.example" type A order fixed; }; }; You'd want to make sure that www.foo.example's A records appeared in the correct order in the foo.example zone data file, of course. Versions of BIND from 9.3.0 on support just the cyclic and random orders. 3.19.3 DiscussionBIND 9 doesn't support true round robin, in which the name server tracks the order in which it gives out the records in an answer. Instead, it randomly chooses a starting point in the list of records and then places the remaining records into the response as though the first record had rotated to the beginning. For example, say www.foo.example had the following three A records: www.foo.example. IN A 10.0.0.1 IN A 10.0.0.2 IN A 10.0.0.3 A BIND 9 name server might choose the third A record as the starting point, and then would insert the next two A records (10.0.0.3 and 10.0.0.1) to produce a response in the following order: www.foo.example. IN A 10.0.0.3 IN A 10.0.0.1 IN A 10.0.0.2 If what you want to do is sort addresses on certain networks to the front of responses, you need to configure the sortlist. See Recipe 3.28. 3.19.4 See AlsoSection 2.8 for setting up round robin and "The rrset-order Substatement" in Chapter 10 of DNS and BIND for more information on rrset-order. |
I l@ve RuBoard |