Tuesday, January 27, 2009

Netmask Ordering of Type A Records in DNS Server Responses

When a DNS server finds more than one Host A (address) resource records for a dns query, it must determine a order in which the response records should be sent to the client. Traditionally,the DNS server returns address records in the order based on the following methods.

1. Subnet Address Proximity to the client.

2. Load balancing.

Subnet Address Proximity to the client: An address was said be in the proximity of the client. if it's subnet mask address is same as that of the client. For example, if the client had a Class A IP address, then all the Host type A response records with host addresses having same Class A subnet mask address will be put first in the result list.
This is called “local net prioritization".

The following shows the order of Host A responses to be sent for a dns query to a dns client having a Subnet mask address "S".

Host A Responses with Matching Subnet Mask "S"

Host A response but with different subnet masks




Load balancing: if the DNS server sends Host A records in the same proximity order every time a dns query repeats from a dns client,Then the hosts which are first in order list will receive more load than hosts which are in last position. To alleviate this problem, DNS server sends Host A type records in round robin fashion.



In windows 2003 and windows 2008, load balancing is improved further. The following illustrates the improved behavior.


Suppose, In an orgainisation, or In WAN environment, internet address space can be organized in to Class A, Class B or even in Class C addresses. Using the default behavior of Address Proximity, Class B and Class C Host A records may not in the Proximity Address list even though the Class B and C addresses are physically nearer to the client. To address this issue, All addresses with matching 24 most significant bits will put in "Proximity Address List".


The following load balancing modes are supported in windows 2003 and windows 2008.


Default mode: In this mode, 24 most significant bits used to find proximity list.


Backport mode: In this mode, Address Proximity list is calculated using traditional windows 2000 behavior.


Extended Mode: In this mode, variable no of most significant bits can be used to find proximity address list.


Note: In windows 2000, load balancing using round rabin is applied only to Type "A" dns responses. But In windows 2003 and 2008 round rabbin is applied to all types of dns responses.


Relevant Posts:

set localnetpriority using dnscmd
Local Net Prioriry Registry Key
round-robin vs localnetpriority

0 comments:

Design by infinityskins.blogspot