Saturday, January 18, 2014

Faster DNS Resolution

Recently a friend shared a link from TechRepublic that suggested changing your DNS servers in order improve web browsing speeds.

This seemed interesting and I initially changed my home DNS servers to 8.8.8.8 and 8.8.4.4.  Afterward, I started to wonder if my Internet provider might be able to route to one DNS server faster than another.  Additionally, it seemed logical to assume that the actual resolution could potentially be done faster on one DNS server farm than another.

It seemed like it would be neat to validate existing performance vs. the suggested DNS servers listed in the TechRepublic article.  The idea would be to highlight if a DNS server change would be beneficial on your home network.

Here is the type of output I ended up with:

10.10.1.1 is an internal DNS server and should not be modified
10.10.1.2 is an internal DNS server and should not be modified

Resolution times by DNS Servers (best to worst)

Name              Value
208.67.222.222    00:00:00.0728325
75.75.75.75*      00:00:00.0740533
208.67.220.220    00:00:00.0813375
8.8.8.8           00:00:00.0988982
8.8.4.4           00:00:00.1096580                                                                                      
* - denotes your existing DNS server

If you would like to test your current DNS settings, you are welcome to try the following powershell script on your system:

$ErrorActionPreference = "SilentlyContinue"
cls
$DNS = Get-WmiObject Win32_NetworkAdapterConfiguration -computername . | select DNSServerSearchOrder
$names = $dns.DNSServerSearchOrder
$techRepublicSuggested = ("208.67.222.222", "208.67.220.220", "8.8.8.8", "8.8.4.4")
$names = $names + $techRepublicSuggested
Foreach ($name in $names)
    {
    if (($name -like "10.*") -or ($name -like "176.*") -or ($name -like "192.168.*"))
        {
        Write-Host "$name is an internal DNS server and should not be modified"
        $names =  $names -replace $name
        }
    }
Write-Host ""
$names = $names | Where { $_.Trim(" `t")}
$hashlatency = @{}
$hashresolve = @{}
Foreach ($name in $names)
    {
    $resTime = Measure-command {resolve-dnsname systemzengineer.blogspot.com -server $name}
    if ($techRepublicSuggested -notcontains $name)
        {$name = $name + "*"}
    $hashresolve.add($name, $resTime)
    }
Write-Host "Resolution times by DNS Servers (best to worst)"
$hashresolve.GetEnumerator() | Sort-Object Value
Write-Host ""
Write-Host "* - denotes your existing DNS server"

2 comments:

  1. Man, do you have an idea how comodo settings compare http://securedns.dnsbycomodo.com/switch/?

    ReplyDelete
  2. If you are searching for genuine QuickBooks Customer Service dial QuickBooks Support Phone Number + 1855-550-7546 for immediate help .Our Quickbooks Support Phone Number is available 24*7.

    ReplyDelete