Babak Farrokhi

A Tale of Using Public DNS Servers in Iran — Part 1

Babak Farrokhi

4 min read

0 You have liked this article 0 times.

While most Internet users are not aware of the importance of DNS resolution in their overall web browsing experience, they often complain about shortage of bandwidth when experiencing sluggish Internet connectivity. It is no surprise that most of the service providers also ignore this fact by redirecting their customer DNS traffic to public DNS servers.


I’ve seen this mostly happening to Google’s Public DNS servers. Doing a quick test, it turned out that choosing DNS Public DNS Servers is not a wise choice:

      # ./ server-list.txt 10   average 163   min 139   max   230 ms   10 responses   average 673   min 174   max  5140 ms   10 responses   average 149   min 133   max   168 ms   10 responses   average 135   min 132   max   140 ms   10 responses   average 150   min 133   max   278 ms   10 responses   average 133   min 131   max   136 ms   10 responses   average 134   min 132   max   138 ms   10 responses   average 134   min 128   max   139 ms   10 responses

Two addresses ( and belong to Google and are widely in use by end users, while the rest of the addresses (4.2.2.x) belong to Level3 Communications. They are obviously using BGP Anycast to distribute their DNS resolvers around the world. Most DNS servers respond to a specifically crafted query to reveal their physical location:

      # dig +short id.server TXT chaos @

Any experienced network engineer could guess that this host should be located in Frankfurt, Germany, and a traceroute reveals a shorter path with lower latency to this host.

However, Google Public DNS servers respond with an empty reply to ‘id.server’ requests, so it is not easy to say where the host is located:

      # dig +short id.server TXT chaos @

Running a traceroute from my network, it seems like this host is also located somewhere in Europe (given the latency), but it is 40ms farther from Level3 DNS servers.

At the end, I turned to the RIPE Atlas service to measure the quality of access to public DNS servers from various networks in Iran. I chose to measure DNS connectivity from 50 different nodes in Iran (at various locations) toward and, querying A records for the domain

The output of these measurements can be found here:

You can see the detailed information on RIPE Atlas reports, but I put together a quick python script to calculate the average success rate and response time for both datasets.

Following is the result for Google Public DNS:

      ./ RIPE-Atlas-measurement-3458036.json
      Average Response Time: 177.360 ms
      Success Rate = 94%

And for Level3:

      % ./ RIPE-Atlas-measurement-3458037.json
Average Response Time: 182.329 ms Success Rate = 94%


While the reachability of public DNS servers from both Google and Level3 are the same, I observed more variable response time from Google DNS servers compared to Level3. But in average they both performed similarly when it comes to reachability and response time.

In the second part of this report, I will dig into reachability and performance of other public DNS servers, such as Verisign and OpenDNS and will also measure the performance of TIC public DNS resolvers which are widely used by local operators.

 Please also see Part 2 of this story.

Note: This was originally published on Babak Farrokhi's blog .

0 You have liked this article 0 times.

You may also like

View more

About the author

Babak Farrokhi is a Computer Scientist and Researcher with over 20 years of experience in UNIX Systems and Networking. His expertise includes IP Networking, BGP, DNS, Internet Performance, System Scalability and Network Security. He provides consulting services and develops products and services related to his expertise.

Comments 3