Page 1 of 3 123 LastLast
Results 1 to 15 of 43
  1. #1
    Lounger
    Join Date
    Dec 2009
    Location
    UK
    Posts
    41
    Thanks
    0
    Thanked 20 Times in 2 Posts

    Thumbs up DNS reliability and performance

    Recently I have been having real issues with DNS lookups - with browsers, Chrome especially, giving DNS lookup errors on a frequent but intermittent basis and web browsing, particularly to new sites, being sloooowwwww.

    My choice of DNS servers was the obvious culprit, so I downloaded the DNS checking tools from GMC and Google and tried those, but if anything it made it worse. The bottom line was DNS lookups (which are based on UDP) were being dropped somewhere (and I suspected my router), and it didn't seem to matter which DNS servers I used. If I tried NSLOOKUP over TCP rather than UDP, it worked reliably and almost instantaneously, but over UDP it was unreliable and slow.

    Rebooting the broadband router helped for a short while, but the problem came back and I couldn't work out whether this was due to general internet traffic, my own other traffic, the router or something else entirely. The bottom line was sometimes it was reliable and sometimes it wasn't.

    In the end, I decided to look at how Windows uses DNS and came up with a solution which not only gives me reliable DNS lookups, but has given me the fastest web browsing I have ever had.

    According to TechNet, Windows first tries your primary DNS on your primary network card, then your next DNS server on all network cards in parallel (but most people only have one card anyway), then the next DNS server on all network cards, then all DNS servers on all network cards. The default is 1 1 2 4 4 0, so it takes 4 seconds to query the first 3 servers, and then a further 8 seconds to timeout completely.

    They key things in my mind were:

    a. I am on broadband, so if packets are not being dropped then I should easily get a response in far less than a second.

    b. If the network is acting reliably, then I should get a DNS response from the first server tried, but if the network is dropping packets for any reason, then I want to send out DNS requests in parallel as quickly as possible to enough DNS servers that one request and response will get through. DNS requests and responses are not large, so the bandwidth required for parallel requests would not be excessive.

    My solution was as follows:

    1. Set DNS Negative Caching TTL to zero - so any negative responses are not cached and Windows will try again (with a different DNS server) next time.

    HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Pa rameters\MaxNegativeCacheTtl = DWORD:0

    2. Set the DNS wait times to 1 1 1 10 10 0:

    HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Pa rameters\DNSQueryTimeouts = MULTI_SZ:1 1 1 10 10 0

    I wanted the total DNS timeout to be 20s-30s, and thought it unlikely that a DNS query would take more than 10s, so allowed a retry in case of a full network glitch and used 1 1 1 10 10 0 rather than 1 1 1 10 0.

    3. Set the list of DNS servers as follows:

    a. My own ISP's DNS servers - closest so should be quickest.
    b. Google's public DNS servers
    c. A few other public DNS servers
    d. My broadband router's DNS proxy.

    Since I did this, my browsing has been rock solid and FAST!!

    Hope this helps anyone else with a similar problem.

    P.S. Obviously the fastest way to resolve a DNS lookup is from the cache, and I want to increase the cache effectiveness. I don't seem to have many entries in the cache (30-40), the reason being that the TTLs are quite short. Some DNS entries have a very short TTL <60s with most <5m and all <30m. If anyone has any ideas on how to improve the time DNS entries spend in the cache, that would be welcome.
    Attached Files Attached Files

  2. The Following 19 Users Say Thank You to Protopia For This Useful Post:

    A1ex (2014-06-05),abaas (2014-06-12),Bob Spafford (2014-06-12),Candide (2014-06-12),dalejanus (2014-06-12),davefrombc (2014-06-12),Dunsojerin (2014-06-12),English Bob (2014-06-12),Frank S (2014-08-16),joro (2014-06-12),jtonti (2014-06-12),KenYoung (2014-06-12),lhse44 (2014-06-12),lien (2014-06-12),Litemotif (2014-06-12),mauricesandler (2014-06-12),mavrik (2014-06-12),sreilly24590 (2014-06-12),thedailycommute (2014-06-12)

  3. #2
    Gold Lounger Roderunner's Avatar
    Join Date
    Dec 2009
    Location
    Scotland.
    Posts
    3,426
    Thanks
    16
    Thanked 212 Times in 180 Posts
    Hi Protopia,
    I use OpenDNS, Primary 208 67 222 222 / Secondary 208 67 220 220 in my router.
    I also set my pc to use the recommended MTU (Maximum Transfer Units) for my ISP (TalkTalk) which is 1432 and have never had any trouble. MTU.pdf
    George's PC Specs. / Laptop. Desktop.

  4. The Following User Says Thank You to Roderunner For This Useful Post:

    lien (2014-06-12)

  5. #3
    Lounger
    Join Date
    Dec 2009
    Location
    UK
    Posts
    41
    Thanks
    0
    Thanked 20 Times in 2 Posts
    Well - we have been with plus.net for several years, and it is only recently that we have started having trouble.

    But since I couldn't find my fix elsewhere, I thought it might be nice to post here in case anyone else finds it useful.

  6. #4
    New Lounger English Bob's Avatar
    Join Date
    Dec 2013
    Location
    Cambridge, UK
    Posts
    13
    Thanks
    5
    Thanked 1 Time in 1 Post
    Thanks for the informative post! Like Roderunner, I use OpenDNS in place of TalkTalk's offering, but now you have me thinking that I don't know as much about DNS as I thought I did (and that wasn't a lot...). I'm going to have a play around tonight and see if I can avoid breaking anything. Our rural broadband is slow and unreliable anyway, at least until Openreach finish installing fibre to the cabinet, so I tend to blame any problems on that.

  7. #5
    Lounger
    Join Date
    Dec 2009
    Location
    warren, ohio
    Posts
    41
    Thanks
    1
    Thanked 2 Times in 2 Posts
    I have intermittent internet failures as well.
    All I have ever done is list two DNS for the lan adaptor card. I never realized I could add more by using the advanced settings. I will try your registry changes and see if that helps.

  8. #6
    New Lounger
    Join Date
    Jun 2013
    Location
    Prescott, AZ
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Danka!

    Great post, great information. Many (!) thanks for the procedure(s).

  9. #7
    New Lounger
    Join Date
    Oct 2011
    Location
    Central Virginia
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Protopia,

    This is an interesting thread and close to home. What I find perplexing is that on my home network I only have issues with my office computer doing this. In my case all but one system is wired Cat5e connected and the office computer connects directly to the modem/router. When I start to have problems I sometimes can't even log into my modem to reboot, which has helped this computer. But if I use the computer next to it, a backup for the observatory and temporary weather server, I can log in and do whatever I want. I checked my registry and didn't find either entry as you have listed on either computer. The symptoms are typical of yours but only on this one computer, out of 6. Rebooting the modem does clear the problem for a day maybe. This is a rural fiber DSL connection with typical speeds of 7-8 MBs and very reliable. The only changes to the modem have been port forwarding for remote access to the observatory and office computers using VNC.

    I've hesitated using any kind of tweaking program as I don't understand what the changes are doing. I've come to the point where I think I need to reload my OS (Win 7 Pro 64 bit) and get a clean install. It's been a few years and there's likely to be a lot of undesirable stuff that should be gotten rid of.

    Thanks for your posting.

  10. #8
    Silver Lounger
    Join Date
    Aug 2012
    Location
    UK
    Posts
    1,825
    Thanks
    30
    Thanked 248 Times in 242 Posts
    Quote Originally Posted by sreilly24590 View Post
    Protopia,

    This is an interesting thread and close to home. What I find perplexing is that on my home network I only have issues with my office computer doing this. In my case all but one system is wired Cat5e connected and the office computer connects directly to the modem/router. When I start to have problems I sometimes can't even log into my modem to reboot, which has helped this computer. But if I use the computer next to it, a backup for the observatory and temporary weather server, I can log in and do whatever I want. I checked my registry and didn't find either entry as you have listed on either computer. The symptoms are typical of yours but only on this one computer, out of 6. Rebooting the modem does clear the problem for a day maybe. This is a rural fiber DSL connection with typical speeds of 7-8 MBs and very reliable. The only changes to the modem have been port forwarding for remote access to the observatory and office computers using VNC.

    I've hesitated using any kind of tweaking program as I don't understand what the changes are doing. I've come to the point where I think I need to reload my OS (Win 7 Pro 64 bit) and get a clean install. It's been a few years and there's likely to be a lot of undesirable stuff that should be gotten rid of.

    Thanks for your posting.
    Try these commands as an administrator from the command prompt pressing Enter after each, then reboot -

    netsh winsock reset catalog
    netsh int ip reset resetlog.txt
    ipconfig /flushdns
    ipconfig /registerdns
    Last edited by Sudo15; 2014-06-12 at 11:14.

  11. The Following User Says Thank You to Sudo15 For This Useful Post:

    sreilly24590 (2014-06-12)

  12. #9
    New Lounger
    Join Date
    Oct 2011
    Location
    Central Virginia
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Thanks Sudo15,

    I have done this and will see where that takes me. Networking isn't one of my strong points and I really should look deeper into it. As per my earlier post, I had changed Cat5E cables with known good ones, added a wireless adapter as well as a PCIe 10/100/1000 network adapter card. None had changed the behavior and I knew it wasn't the modem/router as no other computers were acting this way. It wasn't interference as the data/voice lines had been isolated at the box back soon after the initial install over a year ago when I was having to reboot the modem to get speeds back up every other day or so. None of that since then.

    So I'll keep an eye on this and see what happens. I appreciate the information.

  13. #10
    New Lounger
    Join Date
    Dec 2009
    Location
    Seattle, WA - USA
    Posts
    21
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Thanks

  14. #11
    Silver Lounger
    Join Date
    Aug 2012
    Location
    UK
    Posts
    1,825
    Thanks
    30
    Thanked 248 Times in 242 Posts
    Quote Originally Posted by sreilly24590 View Post
    Thanks Sudo15,

    I have done this and will see where that takes me. Networking isn't one of my strong points and I really should look deeper into it. As per my earlier post, I had changed Cat5E cables with known good ones, added a wireless adapter as well as a PCIe 10/100/1000 network adapter card. None had changed the behavior and I knew it wasn't the modem/router as no other computers were acting this way. It wasn't interference as the data/voice lines had been isolated at the box back soon after the initial install over a year ago when I was having to reboot the modem to get speeds back up every other day or so. None of that since then.

    So I'll keep an eye on this and see what happens. I appreciate the information.
    They are useful commands to make a note of for when you have what seem like anomalous connectivity problems.

  15. #12
    New Lounger
    Join Date
    Dec 2009
    Location
    Glasgow, Scotland
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post

    Mr

    The first place that is checked is not the dns servers its cache / hosts file.
    It may have been corrupted / hacked by a virus leading to some crazy results.

    Always flush the dns cache first when diagnosing dns problems.
    And check the hosts file.
    Its the hosts file that is preloaded into the cache so if its corrupt your cache is corrupt!!

    This is a good article although in depth it gives a wider picture of DNS resolution.

    http://technet.microsoft.com/en-us/l.../cc961411.aspx

    There is an app that checks DNS servers and gives you the correct order to put into you DNS fields.
    Cant remember it offhand but google should elucidate.

  16. The Following User Says Thank You to omendata For This Useful Post:

    sreilly24590 (2014-06-13)

  17. #13
    New Lounger
    Join Date
    Oct 2011
    Location
    Central Virginia
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Well less than 24 hours after flushing the DNS and other commands above I'm back to about where I was yesterday before I ran them. It may actually have been sooner but I was connected remotely last night on and off checking my e-mails. I rebooted the modem again this morning and all was fine so I'm wondering, what affect does rebooting the modem have on this one computer? As I said before the other 5 network computers do just fine and haven't needed this to be done. I usually use the computer sitting right next to my office computer to access the modem as mine is hit and miss on connecting. Again, both are Cat5E connected directly, the modem is in my office. I've switched wires and swapped outlets on the modem and no difference. I'm unclear what rebooting the modem does to my office computer other than reload the IP address? Or is it refreshing the adapters's settings?

  18. #14
    Platinum Lounger
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    3,610
    Thanks
    7
    Thanked 230 Times in 218 Posts
    Rebooting the router empties it's DNS cache, amongst other things. If you have the router as the DHCP server - this is the normal arrangement - the PC will use the router's DNS. Try pointing your PC directly to an external DNS.

    cheers, Paul

  19. The Following User Says Thank You to Paul T For This Useful Post:

    sreilly24590 (2014-06-13)

  20. #15
    New Lounger
    Join Date
    Oct 2011
    Location
    Central Virginia
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Paul T View Post
    Rebooting the router empties it's DNS cache, amongst other things. If you have the router as the DHCP server - this is the normal arrangement - the PC will use the router's DNS. Try pointing your PC directly to an external DNS.

    cheers, Paul
    I'm guessing this is done by setting the DNS Server addresses in the IP4V settings and using manually added DNS server addresses such as 8.8.8.8 and 8.8.4.4? Those belonging to Google Public DNS I believe. I've entered these into both the wireless and on board adapters.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •