<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.ledhed.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.ledhed.net/index.php?action=history&amp;feed=atom&amp;title=Windows_DNS_Netmask_Ordering</id>
		<title>Windows DNS Netmask Ordering - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.ledhed.net/index.php?action=history&amp;feed=atom&amp;title=Windows_DNS_Netmask_Ordering"/>
		<link rel="alternate" type="text/html" href="https://wiki.ledhed.net/index.php?title=Windows_DNS_Netmask_Ordering&amp;action=history"/>
		<updated>2026-04-30T15:03:46Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.2</generator>

	<entry>
		<id>//wiki.ledhed.net/index.php?title=Windows_DNS_Netmask_Ordering&amp;diff=3446&amp;oldid=prev</id>
		<title>Ledhed at 01:50, 31 January 2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.ledhed.net/index.php?title=Windows_DNS_Netmask_Ordering&amp;diff=3446&amp;oldid=prev"/>
				<updated>2020-01-31T01:50:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 01:50, 31 January 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; | 128 | 64&amp;#160; |&amp;#160; 32 |&amp;#160; 16 |&amp;#160; 8&amp;#160; |&amp;#160; 4&amp;#160; |&amp;#160; 2&amp;#160; |&amp;#160; 1&amp;#160; |&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; | 128 | 64&amp;#160; |&amp;#160; 32 |&amp;#160; 16 |&amp;#160; 8&amp;#160; |&amp;#160; 4&amp;#160; |&amp;#160; 2&amp;#160; |&amp;#160; 1&amp;#160; |&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; -------------------------------------------------&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; -------------------------------------------------&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; |&amp;#160; 0&amp;#160; | &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &lt;/del&gt;1 |&amp;#160;  1 |&amp;#160;  0 |&amp;#160; 0&amp;#160; |&amp;#160; 0&amp;#160; |&amp;#160; 0&amp;#160; |&amp;#160; 1&amp;#160; |&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; |&amp;#160; 0&amp;#160; | &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;1 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;|&amp;#160;  1 |&amp;#160;  0 |&amp;#160; 0&amp;#160; |&amp;#160; 0&amp;#160; |&amp;#160; 0&amp;#160; |&amp;#160; 1&amp;#160; |&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ledhed</name></author>	</entry>

	<entry>
		<id>//wiki.ledhed.net/index.php?title=Windows_DNS_Netmask_Ordering&amp;diff=3445&amp;oldid=prev</id>
		<title>Ledhed: Created page with &quot;== Overview == DNS Netmask Ordering will cause a DNS server to return an A Record who's IP is within the same network as the client who requested it.   == How it works == Netm...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ledhed.net/index.php?title=Windows_DNS_Netmask_Ordering&amp;diff=3445&amp;oldid=prev"/>
				<updated>2020-01-31T01:48:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Overview == DNS Netmask Ordering will cause a DNS server to return an A Record who&amp;#039;s IP is within the same network as the client who requested it.   == How it works == Netm...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
DNS Netmask Ordering will cause a DNS server to return an A Record who's IP is within the same network as the client who requested it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Netmask ordering is handy if you want to have 3 servers in different geographical areas, but want them to have the same name. Netmask Ordering will cause the client to access the server that is closest to it. Take for example an update server (updates.ledhed.net). You can host that server at 3 different sites (A =10.1.1.1, B=10.1.2.1, C=10.1.3.1), a client at site B with an IP address of 10.1.2.69 who does an NSLookup for updates.ledhed.net would get 10.1.2.1 as the response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MS Catch 22 ==&lt;br /&gt;
In Server 2012 and above, Netmask Ordering and Round Robin are enabled by default. In this case RR takes president and basically nullifies Netmask ordering. MS also set Netmask Ordering to scope to a Class C network which is a rather small subnet. Fortunately you can change this by running:&lt;br /&gt;
 Dnscmd /Config /LocalNetPriorityNetMask &amp;lt;INV_MASK_HEX&amp;gt;&lt;br /&gt;
Where &amp;lt;INV_MASK_HEX&amp;gt; is:&amp;lt;br&amp;gt;&lt;br /&gt;
Class A: 255.0.0.0   (/8) = 0x00ffffff&amp;lt;br&amp;gt;&lt;br /&gt;
Class B: 255.255.0.0 (/16) = 0x0000ffff&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can math it out for other sized subnets. Each 2 zeros after the 0x represent an octet. If you remember your network binary conversion a /24 (or 255.255.255.0) address would be 11111111.11111111.11111111.00000000. MS wants the inverse (00000000.00000000.00000000.11111111) which is 00.00.00.ff in hex.  So the inverse hex netmask for /24 would be 0x000000ff. You can google hex, but it basically goes like this 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f where 0=0 and f=15. 15 in binary = 1111 so ff = 1111 1111 or eight 1's, eight 1's in binary = 255. How does eight 1's equate to 255. Ughh I knew you'd ask.&amp;lt;br&amp;gt;&lt;br /&gt;
Imagine 8 slots: 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 &amp;lt;br&amp;gt;&lt;br /&gt;
1=true, 0=false &amp;lt;br&amp;gt;&lt;br /&gt;
If you put a 1 in each slot and then sum the numbers marked true (1's) then thats 128+64+32+16+8+4+2+1=255. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take another number like 97&amp;lt;br&amp;gt;&lt;br /&gt;
In Binary it looks like this:&amp;lt;br&amp;gt;&lt;br /&gt;
         64  +  32                         +  1  = 97&lt;br /&gt;
 | 128 | 64  |  32 |  16 |  8  |  4  |  2  |  1  |&lt;br /&gt;
 -------------------------------------------------&lt;br /&gt;
 |  0  |   1 |   1 |   0 |  0  |  0  |  0  |  1  |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Hex it looks like this:&lt;br /&gt;
       4 + 2     =6                 1 =1&lt;br /&gt;
 | 8 | 4 | 2 | 1 |    | 8 | 4 | 2 | 1 |&lt;br /&gt;
 -----------------    -----------------&lt;br /&gt;
 | 0 | 1 | 1 | 0 |    | 0 | 0 | 0 | 1 |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
So 97 (Decimal) is 0x61 (Hex) is 01100001 (Binary) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Was that confusing? If so you should probably seek better examples on the internet. ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Umm, that took a bit of a tangent. However the point of this article is that you can disable RR and use Netmask Ordering to access network services that are closest to you, but you may have to alter the default 'LocalNetPriorityNetMask' to suit your network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
https://support.microsoft.com/en-us/help/842197/description-of-the-netmask-ordering-feature-and-the-round-robin-featur&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Ledhed</name></author>	</entry>

	</feed>