Scott Forsyth's Blog

Postings on IIS, ASP.NET, SQL Server, Webfarms and general system admin.

Windows Server 2008 R2 DNS Issues

I recently upgraded my home Windows Server 2008 Domain Controller to R2.  The upgrade process itself wasn’t too much work but was a bit more than ‘next, next, finish’ because the AD schema needed to be updated and the installer required that WSUS be uninstalled first.  But, those weren’t a big deal.

However, after the install, I got the strangest behavior.  Visiting some websites like www.microsoft.com, www.bing.com, www.windowsupdate.com and a number of other Microsoft websites didn’t work.  However, other websites worked perfectly.  In fact, www.google.com still worked.  It’s almost as if Microsoft decided they didn’t want to grow their search engine market share anymore and would start blocking their visitors. :)

What made it even more confusing was that if I viewed the errors in my browser, it timed out and gave a DNS error. However, if I pinged the DNS name, it worked. 

(feel free to skip to the bottom for the fix if you don’t want to read the details)

I did some searching and didn’t find an answer (although now that I know what search terms to look for, I see that others have run into this now).  I tried all the basic troubleshooting methods to no avail.

I skimmed some R2 release notes I found and I saw that there were EDns (EDNS0) changes with R2 but it was pretty vague.  EDns is a relatively new DNS protocol extension that is still coming of age.  Later I realized that I was on to something here.

I realized that I would need to fire up Network Monitor to get the story.  After running Network Monitor, an issue was immediately apparent as seen from the following screen shot snippet:

image

First, I wondered why my search for bing.com returned search.ms.com.edgesuite.net.  The answer to that wasn’t hard to find.  Those are the DNS names of the Akamai CDN which Microsoft uses for a lot of their sites.  The real issue there is the “Response – Format error”. 

I looked at the request and the results for a while and it seemed straight forward, so I did a network trace on a working server and found that R2 added some extra information.  Notice the bottom line of the following image with the “AdditionalRecord:  of type OPT on class Unknown DNSClass”.  The network trace on the working server didn’t have that.

image

So, I knew at this point that R2 was adding something that the Akamai DNS servers didn’t like.  I did a search for OPT and discovered that OPT is used in EDns.  I found a registry setting called EnableEDNSProbes which disables EDNS when set to 0.  After setting that and restarting the DNS Server service, everything worked perfectly.  I set it back again and it stopped working, so I knew I had narrowed it down.

While searching for information on EDns, I discovered that some DNS servers will attempt to make a EDNS probe, and if it fails then it will try again with a plain query.  That allows it to always work regardless of the support of the other DNS servers.  However, after testing I found that Microsoft DNS doesn’t do that.  EDNS can either be ‘on’ or ‘off’.  Bummer, I thought that was a good idea.

Testing further I discovered that it’s not enabled by default on Windows Server 2008 RTM.  I tried on another R2 server that wasn’t in production yet and confirmed that the issue appeared there too.  So, the issue wasn’t that something changed with EDns, it’s simply that it was enabled in R2 for the first time.

The reason that it failed in the web browser but worked with a ping is because the browser followed a redirect and failed on the redirected address and not the original address.  The ping didn’t follow the redirect so the failure never occurred.

It appears that the same issue occured when Windows Server 2003 was released: http://support.microsoft.com/kb/832223.  I don't remember that occuring and being a big deal so I suspect that Microsoft must have made changes to the default with later service packs or hot fixes.

Conclusion

It appears that the Internet isn’t fully up to date and ready to use EDns quite yet.  The solution for this is to disable EDns and wait another year or two until Akamai and other DNS servers catch up, or Microsoft releases a hot fix to support the failback option I mentioned above.

Note that this isn’t a problem for most Windows Server 2008 R2 member servers.  It’s only a problem for DNS *servers* that do recursive lookups.  i.e. likely only your domain controller will be affected if that is where your DNS Server role exists.

Fix

To disable EDns, you can do it from the command prompt, or by editing the registry.

From the command prompt, no restart of DNS is required.  If from the registry, make sure to restart the DNS Server service.

Command prompt: 

dnscmd /config /EnableEDNSProbes 0

No restart is needed.  It takes effect immediately.

or Registry: </>

Create a DWORD called EnableEDNSProbes and set to 0 in HKLM\SYSTEM\CurrentControlSet\services\DNS\Parameters

Restart the DNS Server service for it to take effect.

Comments

VNOHosting » Windows Server 2008 R2 DNS Issues - Scott Forsyth's Blog said:

Pingback from  VNOHosting &raquo; Windows Server 2008 R2 DNS Issues - Scott Forsyth&#39;s Blog

# September 17, 2009 5:40 AM

Windows Server 2008 R2 DNS Issues - Scott Forsyth's Blog | Windows (7) Affinity said:

Pingback from  Windows Server 2008 R2 DNS Issues - Scott Forsyth&#39;s Blog | Windows (7) Affinity

# September 17, 2009 8:43 AM

Mike said:

Thanks for this.  This has been driving me crazy with my 2008 R2 testing.  It's ironic that microsoft.com can't handle EDns.

# September 18, 2009 1:06 PM

Mike T. said:

Thank you for this, I had just started to go into the troubleshooting process in test my when I stumbled upon your blog. You probably saved me at least an hour of irritation.

# September 23, 2009 10:44 PM

Kenny Palmer said:

Thanks for this, i was pulling my hair out with this issue. good old MS. Very nice work getting to the bottom of this. My compliments.

# September 24, 2009 3:10 PM

AlbertF said:

I have been looking for this resolution for some time now. Odd how Windows have not yet found a way to easily fix this. Thanks for this! <a href="http://www.mooladays.com">Make Money Online</a>

# September 25, 2009 1:09 AM

James said:

Thanks for this! It has been driving me crazy for 2 weeks! R2 unable to hit Microsoft sites. how funny

# September 29, 2009 6:13 PM

Windows 2008 R2 DNS issues | HIT Systems - Healthcare IT said:

Pingback from  Windows 2008 R2 DNS issues | HIT Systems - Healthcare IT

# September 29, 2009 6:46 PM

Randy Baker said:

Thanks for this information...just got r2 up and running as a domain controller and dns server and this was driving me nuts.  You saved me a lot of time and headaches.  Thanx

# September 30, 2009 1:37 PM

Jeff said:

Wow thanks a lot. I have been going crazy with my testing at home. I upgraded, well rebuilt my entire home network from scratch and was having DNS issue like mad. I thought maybe it had something to do with Hyper V as I was running the AD controller virtualized. Finally in a bid to just get the thing to work. I installed AD, DNS, and DHCP on the host machine and left Hyper V uninstalled. Still didnt work so I put in a forwarder to 4.2.2.2 and that fixed the issue. Not what I wanted to do as I prefer root hints.

Ill try this out tonight and hope it fixes the issue. I also found it weird microsofts sites werent coming up. I figured something under the hood was changed in R2. Glad to find your site!!!!!

# October 5, 2009 2:21 PM

John said:

For the record it is Akamai that is non-compliant with EDNS, not W2K8 R2 DNS.

# October 8, 2009 3:32 PM

OWScott said:

Thanks John.  You're right, that's my intent.  Thanks for clarifying.

# October 8, 2009 4:24 PM

Steve said:

In the RFC:

www.faqs.org/.../rfc2671.html

Section 5.3 of the spec says:

"""

Responders who do not understand these protocol extensions are expected to send a response with RCODE NOTIMPL, FORMERR, or SERVFAIL.  

"""

That's what the Akamai server seems to have done.

"""

Therefore use of extensions should be "probed" such that a responder who isn't known to support them be allowed a retry with no extensions if it responds with such an RCODE.  

"""

That is not what W2K8 R2 DNS did.

So who is not compliant with what?

# October 12, 2009 9:09 PM

OWScott said:

Steve, good call.  You've pointed out the official specs for the fallback option.  It sounds like it's not just a 'nice have' to fall back, but it's a 'supposed to have'.  

So Akamai DNS needs to update to the latest, but Microsoft DNS Server needs to play nice with properly functioning old protocols.

# October 13, 2009 9:30 AM

Brian said:

Thanks for the info.  I've spent half a day trying to get DNS to work before I found your article!!!

# October 16, 2009 6:00 AM

micke said:

.. thanks

# October 16, 2009 9:06 AM

AJ said:

I was just beating my head against the desktop. Until I saw this applied it and it WORKS!!! Why in the name of all thats holy was this not set to 0 as default.

# October 28, 2009 3:26 PM

Todd said:

Another area to check:  Cisco firewalls may have a feature called DNS Guard implemented.  Out of the box, it has a DNS message ceiling of 512 bytes.  So your firewall can also be trying to protect you, but blocking the ability to communicate through eDNS methods.  We were getting time outs with DNS Guard and eDNS implemented concurrently.

# October 30, 2009 11:36 AM

OWScott said:

Hi Todd, thanks for mentioning.  I considered that.  I have 2 enviornments that I tested in, one with Cisco equipment and one with home linksys equipment.  In both enviornments, the Akamai queries failed while other queries worked, so, based on your comments, it sounds like Cisco is something to watch for and may have come into play with some requests (I didn't test enough to see when), but the eDNS is the most significient player in my situation.

# November 1, 2009 6:19 PM

Juan Sebastián Rodríguez Isáziga said:

Thanks bro!!! you save my ass!!!!!, I have been dealing with this issue for a long time, now I can keep my job and my luxurous life.... lol :)

THANKS

# November 5, 2009 5:10 PM

Patrick Stalteri said:

Thank you so much. This was absolutely driving me crazy. everything was working fine I finish upgrading and no internet although the server said it had internet connection. I put name forwarders in and got it up and running. now I can finish the project for the client.

Thanks again

# November 17, 2009 3:55 PM

Reuven said:

Thanks you save me time, i think after restart i need to run the command in order to disable EDNSP

# November 29, 2009 10:35 PM