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 126.96.36.199 and 188.8.131.52. 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 184.108.40.206:
Type escape sequence to abort.
Tracing the route to google-public-dns-a.google.com (220.127.116.11)
1 18.104.22.168 [MPLS: Label 550027 Exp 0] 0 msec
22.214.171.124 [MPLS: Label 550027 Exp 0] 4 msec
126.96.36.199 [MPLS: Label 354133 Exp 0] 0 msec
2 188.8.131.52 0 msec
184.108.40.206 0 msec 0 msec
3 220.127.116.11 44 msec 44 msec 48 msec
4 18.104.22.168 [AS 15169] 52 msec 56 msec 52 msec
5 google-public-dns-a.google.com (22.214.171.124) [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:
- 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 @126.96.36.199 testing-google-dns.anuragbhatia.com. a +short to ask my DNS server for IP and this gave me source IP of Google’s resolver.
- 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 @188.8.131.52 +short
In both cases I saw IP was 184.108.40.206. It belongs to 220.127.116.11/24 announced by Google’s AS15169. As per Google’s FAQ page (which has IPs too!) the prefix 18.104.22.168/24 belongs to Kuala Lumpur, Malaysia. So that’s the actual DNS resolver node which serves users here in India. Machines with IPs 22.214.171.124 and 126.96.36.199 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! 🙂