What is DNS round robin and subnet prioritization?

John Savill

October 24, 2002

2 Min Read
ITPro Today logo in a gray background | ITPro Today

A. The most common type of DNS record is a resource record type A, which is a record that provides the IP address for a specified host name. In certain instances, a host name might resolve to multiple IP addresses, each with its own A record. For example, if three servers host the www.savilltech.com Web site, the DNS server might contain the following three address records:

www.savilltech.com.IN    A200.200.10.1www.savilltech.com.IN    A200.200.11.1www.savilltech.com.IN    A200.200.12.1

When a client queries a DNS server for this host, the server returns all three address records. To avoid sending every client to the first address record (and, hence, the first host) every time, the DNS server uses a round-robin algorithm, which Request For Comments (RFC) 1794 describes. With each request, the algorithm rotates the order in which the DNS server returns the address records to more evenly distribute the load across all hosts. For example, the first time a client queries the DNS server, the server might return

200.200.10.1   200.200.11.1   200.200.12.1

to the client. The second time, the DNS server would return

200.200.11.1   200.200.12.1   200.200.10.1

The third time, the DNS server would return

200.200.12.1   200.200.10.1   200.200.11.1

and so on.

If the client making the request connects directly to a subnet that contains one of the returned host addresses, having the client communicate directly with the host that corresponds to that address would reduce response time and network traffic. Subnet prioritization is a feature that recognizes when a host is on the same subnet as the client and returns the local host's address first. (Microsoft introduced subnet prioritization in Windows NT 4.0 Service Pack 4--SP4--and later.) When a client uses subnet prioritization, the client resolver receives address record results and sorts them according to the order of direct subnet connectivity.

So, for example, if a client has address 200.200.11.5 (which is part of subnet 200.200.11) and the DNS server would typically return address record results of

200.200.10.1   200.200.11.1   200.200.12.1

the local DNS resolver will use subnet prioritization to re-sort the results according to the local subnet priority and return results of

200.200.11.1   200.200.10.1   200.200.12.1

to the client. Consequently, the local DNS resolver's subnet prioritization takes priority over the DNS server round robin when a resolved address is on the local subnet. Although this approach reduces network traffic, it doesn't balance the load across hosts.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like