14 Apr

EDNS support by Google’s Public DNS

Just was looking around at EDNS support by Google. To find how it supports and how packet looks like I created a test NS records for dnstest.anuragbhatia.com pointing to one of test server ( I wasn’t running any DNS server on the server. Just ran quick tcpdump.


At server end:

sudo tcpdump ‘port 53 and dst’ -nn -vvv -w sample.pcap


Then I forcefully triggered DNS queries via Google’s recursor using:

dig @ dnstest.anuragbhatia.com


At server end dump was captured. In wireshark came across the packet:

Packet dump > DNS Query > Addition records > <Root> Type OPT > Option C Subnet – Client Subnet this shows client subnet of BSNL from which I queried. ūüôā



This is a very important project pushed by Google, OpenDNS etc to help CDNs (which are based on DNS resolution) perform optimally when end users use non-ISP based recursors. You can read more about project here.

16 May

Backend of Google’s Public DNS

And finally academic session over. Done with all vivas and related stuff.

Next will be exams likely in June. Time for me to get ready for travel. ūüôā


Anyways an interesting topic for today’s post – Google Public DNS. Lot of us are familier with popular (and free) DNS resolvers and I have covered reason in previous posts on why it tends to fail with Content Delivery networks like Akamai which rely on anycasting at bottom DNS layer and simple unicasting on application servers. Anycasted DNS nodes point to application servers based on various factors like distance, load, cost etc out of interesting algorithms these CDN networks use for load & cost management.


Anyways today’s post focus is not CDN issues with these resolvers but Google Public DNS itself. Are these servers located in India and everywhere else where Google has PoPs?


Let’s do a simple trace to get forward path from Airtel to Google’s


Type escape sequence to abort.
Tracing the route to google-public-dns-a.google.com (

1 [MPLS: Label 550027 Exp 0] 0 msec [MPLS: Label 550027 Exp 0] 4 msec [MPLS: Label 354133 Exp 0] 0 msec
2 0 msec 0 msec 0 msec
3 44 msec 44 msec 48 msec
4 [AS 15169] 52 msec 56 msec 52 msec
5 google-public-dns-a.google.com ( [AS 15169] 52 msec * 116 msec


50ms latency. Clearly destination is within India and based on my experience with latency values, I strongly guess that’s Chennai.


Location of Google Public DNS servers

Anyways so does that means Google’s DNS server is within India?


A clear answer is no. This is just a DNS caching server and Google does not use it for originating actual queries further to root, TLDs nodes and authoritative DNS servers. This seems like a interesting distributed setup.

As per Google Public DNS FAQ page, there are quite a few locations from where DNS servers originate queries but India is not in the list yet. Google has PoPs in Delhi, Mumbai and Chennai and they peer with pretty much every Indian ISP out from there.


We can actually test which node is serving us here in India.
This can be achieved in multiple ways:

  1. Running a authoritative zone on a server with basic BIND installation. I tried this with my own Linux server by having testing-google-dns.anuragbhatia.com. DNS zone. I delegated NS for this zone on auth. DNS servers for “anuragbhatia.com” zone. Next I sent a DNS query with dig @¬†¬†testing-google-dns.anuragbhatia.com. a +short to ask my DNS server for IP and this gave me source IP of Google’s resolver. 
  2. The other easy way out is to simply use Akamai’s “whoami.akamai.net” service. It is designed in a way to return A record of DNS resolver which queries it. This gives IP of Google’s server which sent the DNS query for resolution.


Anurags-MacBook-Pro:~ anurag$ dig whoami.akamai.net a @ +short
Anurags-MacBook-Pro:~ anurag$



In both cases I saw IP was¬† It belongs to¬† announced by Google’s AS15169. As per Google’s FAQ page (which has IPs too!) the prefix¬† belongs to¬†Kuala Lumpur, Malaysia. So that’s the actual DNS resolver node which serves users here in India. Machines with IPs and are just caching replies and more over taking the IP traffic to Google within India.


Now one can ask why Google is not having DNS resolver within India?




Guess work time!

I don’t know exactly but I can do a strong guess work here. Google is a tier 1 transit free network. It relies on paying on layer 2, building PoPs and connected them together. It does not pays on layer 3 for bandwidth to any ISP. So Google’s routers in India learn traffic from just peering sessions with all major telcos (except BSNL). Google is peering with Tata-VSNL AS4755, Reliance AS18101, Airtel AS9498, MTNL AS17813, Spectranet AS10029 etc. One interesting thing here is that these are all tier 2 networks. Tata Communications is a tier 1 network but their domestic backbone VSNL AS4755 is technically not a tier 1 network and technically it sits in downstream of Tata AS6453 (which is their tier 1 IP backbone). Thus Google does not gets full global table feed from any of these links and possibly nearest PoP of Google which has full table feed from Tier 1 networks is in Malaysia.


What I am not able to answer from my guess work is that when Google is relying on East Asian PoPs for such stuff and mantaining a backbone between East Asia and India directly then why they could not feed Indian routers routing table with routes learnt from outside? ¬†It could be just to ensure direct delivery in India and avoid routing loops. E.g BSNL has IP port from Tata-VSNL AS4755 within India and IPLC port from Tata-AS6453 to outside Indian PoPs. Thus if tables are combined Google might see paths like ¬†AS6453 > AS9829 and AS4755 > AS9829 which seem identical as per AS path but one is direct India to India traffic while other via India > Singapore > India or India > US > India. It’s not just about BSNL but Sify also lately has weird routing loops going from outside India for Indian destinations.


That’s about it. Can’t do any guess work beyond this point unless someone gives me access to a router of AS15169 to see table! ūüôā