Mastering Network Routing: Explore Netmask Ordering & Round Robin in Windows Server

Table of Contents

Mastering Network Routing

Summary

This article delves into the intricacies of netmask ordering and round robin features within Windows Server domain name system (DNS). Understanding these features is crucial for optimizing network performance and resource accessibility. Furthermore, this article elucidates how these two functionalities can be effectively combined to enhance DNS server response management, particularly in scenarios requiring both proximity awareness and load distribution. By leveraging these techniques, administrators can fine-tune their DNS infrastructure to better serve client requests and improve overall network efficiency.

More Information

Netmask Ordering Feature

The netmask ordering feature in Windows Server DNS is a mechanism designed to prioritize responses to type A DNS queries based on the client’s perceived network locality. Essentially, it aims to direct clients to resources that are geographically or topologically closer within the network infrastructure. This prioritization is achieved by analyzing the client’s IP address and comparing it against the IP addresses associated with the requested DNS name. For instance, consider a scenario where a DNS name has multiple associated IP addresses, each representing a different server hosting the same service.

If you have configured eight distinct type A records for a single DNS name, each pointing to a unique server, the netmask ordering feature comes into play. When a client queries this DNS name, the DNS server will attempt to order the responses, placing the IP addresses that are deemed “closer” to the client at the top of the response list. This “proximity” in network terms implies reduced latency and potentially faster data transfer rates for the client.

In the initial release of Microsoft Windows 2000 Server, the determination of network proximity was primarily based on the native IP address class assigned to the client. For example, if a client held a Class A IP address, the DNS server would prioritize responses that matched the Class A network membership of the client. This same principle extended to clients with native Class B and Class C addresses, ensuring that proximity calculations aligned with the traditional IP addressing scheme.

Round Robin Feature

The round robin feature in DNS serves a different but equally important purpose: basic load balancing. It operates by randomizing the order in which DNS records of the same type are returned in response to queries. Imagine again the scenario with eight type A records for a single DNS name, each pointing to a different server. With round robin enabled, each time a client queries this name, the DNS server will return the list of IP addresses in a different order.

This randomization ensures that no single server is consistently overloaded with requests, as clients are distributed across the available servers in a rotating fashion. By prioritizing a different IP address at the top of the response list with each query, round robin effectively prevents clients from being repeatedly directed to the same server, thereby distributing the load and improving responsiveness across the server pool. This is particularly useful for services that experience high traffic and require distribution across multiple servers for optimal performance.

Combined Use in Windows Server 2003

A significant limitation in the initial release of Windows 2000 Server was the inability to natively utilize both netmask ordering and round robin features concurrently. When netmask ordering was activated, the DNS server would consistently provide answers to clients in the same predetermined order, effectively negating the randomization benefit of round robin. This behavior was redesigned in Windows Server 2003 to enable the simultaneous operation of both subnet-based netmask ordering and round robin.

This enhancement in Windows Server 2003 allowed administrators to achieve both proximity awareness and load balancing simultaneously. By combining these features, DNS servers could prioritize local resources for clients while still distributing client requests across multiple servers for load management. This combination offered a more sophisticated and efficient approach to DNS response management, catering to both performance and availability needs.

Class C Based Proximity in Windows Server 2003

Modern network environments often deviate from traditional IP address class structures, making native class-based netmask ordering less reliable. Subnet masks are frequently used that do not align with the inherent class of the IP address, rendering the initial proximity calculation method less effective in predicting actual network locality. Consequently, relying solely on native class-based ordering might not accurately identify resources that are truly “local” to the client in contemporary network setups.

Windows Server 2003 addressed this issue by shifting the proximity calculation basis to Class C, regardless of the native address class of the client or the network. This change ensured a more consistent and predictable determination of network locality in environments with non-native subnetting.

Consider a company assigned a 126.45.x.x subnet. It’s highly improbable that they would utilize an 8-bit subnet mask, which corresponds to a Class A network, for their internal network segmentation. Furthermore, even though the company owns a portion of a Class A subnet, it is likely subdivided into smaller networks, potentially Class B or even smaller. In such scenarios, netmask ordering based on the native Class A address would likely fail to return results that accurately reflect network proximity to the client within their internal network.

Because Windows Server 2003 bases proximity on Class C subnet boundaries by default, resources that are truly closer to the client, in terms of network topology, are more readily discoverable. This adjustment significantly improved the accuracy and effectiveness of netmask ordering in modern, subnetted network environments, making it a more practical and reliable feature for resource prioritization.

Configuring LocalNetPriorityNetMask

While Windows Server 2003 defaults to Class C based proximity for netmask ordering, this setting is configurable, allowing administrators to tailor the behavior to their specific network environments. The Dnscmd /Config /LocalNetPriorityNetMask 0x000000FF Dnscmd.exe command can be used to revert Windows Server 2003 settings back to their default Class C behavior if needed. This command explicitly sets the LocalNetPriorityNetMask value to 0x000000FF, which corresponds to a Class C subnet mask (255.255.255.0).

Administrators have the flexibility to define which portion of the subnet mask is considered relevant for netmask ordering based on their network’s architecture and requirements. By utilizing the /LocalNetPriorityNetMask switch with the Dnscmd command, you can specify the number of bits that should be significant in the netmask ordering calculation. For example, to configure the DNS server to use Class B (or 16-bit) for netmask ordering, you would use the command Dnscmd /Config /LocalNetPriorityNetMask 0x0000FFFF. This command sets the LocalNetPriorityNetMask value to 0x0000FFFF, representing a Class B subnet mask (255.255.0.0).

Netmask Ordering Settings Table

The following table summarizes various netmask ordering settings and their corresponding hexadecimal values for the LocalPriorityNet parameter:

Netmask LocalPriorityNet
255.255.255.0 0x000000ff
255.255.0.0 0x0000ffff
255.0.0.0 0x00ffffff

This table provides a quick reference for configuring netmask ordering based on different subnet mask requirements. Selecting the appropriate LocalPriorityNet value depends on the desired granularity of network proximity and the subnetting scheme employed within the network infrastructure.

Subnetted Class C Address Configuration

In scenarios where subnets are further divided within a Class C network, such as when only 6 bits are used for host addressing, the subnet mask becomes 255.255.255.192. In CIDR (Classless Inter-Domain Routing) notation, this is represented as a /26 mask. To configure Windows Server 2003 for such a subnetted Class C address in netmask ordering, you can use the command Dnscmd /Config /LocalNetPriorityNetMask 0x0000003F Dnscmd.exe.

The significant bits specified in the LocalNetPriorityNetMask value determine which portion of the IP address is interpreted as the host space. Because the binary equivalent of 0x3F is 0011 1111, this setting effectively designates 6 bits as part of the host address. This configuration aligns with a /26 subnet mask, where 6 bits are available for host addresses within the subnet.

If a 7-bit host address space is required (resulting in a subnet mask of 255.255.255.128 or /25), the corresponding LocalNetPriorityNetMask value would be 0x0000007F. This is because the binary equivalent of 0x7F is 0111 1111, indicating 7 significant bits for the host portion. Similarly, if only 5 bits are allocated for host addresses (subnet mask 255.255.255.224 or /27), the value would be 0x0000001F, as the binary equivalent of 0x1F is 0001 1111, representing 5 significant host bits.

These examples illustrate how to precisely configure the LocalNetPriorityNetMask setting to match various subnetting schemes and host address space requirements within a network environment, ensuring accurate and effective netmask ordering.


Understanding and properly configuring netmask ordering and round robin features are essential for optimizing DNS performance and resource availability in Windows Server environments. By leveraging these features individually or in combination, administrators can create a more responsive, efficient, and robust DNS infrastructure.

Feel free to share your experiences or questions regarding netmask ordering and round robin in the comments below!

Post a Comment