28 Oct

Akamai CDN and DNS resolution analysis

These days Open DNS resolvers are getting quite popular. With Open DNS resolver I mean resolvers including OpenDNS as well as Google Public DNS.

One of major issues these resolvers suffer is failure of integration with CDN providers like Akamai, Limelight etc. In this post I will analyse sample client site of Akamai – Malaysia Airlines website – http://www.malaysiaairlines.com.  


Looking at OpenDNS, Google Public DNS and my ISP (BSNL’s) DNS resolver for its DNS records:


;www.malaysiaairlines.com. IN A

www.malaysiaairlines.com. 12169 IN CNAME www.malaysiaairlines.com.edgesuite.net.
www.malaysiaairlines.com.edgesuite.net. 12169 IN CNAME a1456.b.akamai.net.
a1456.b.akamai.net. 20 IN A
a1456.b.akamai.net. 20 IN A


Google Public DNS

;www.malaysiaairlines.com. IN A

www.malaysiaairlines.com. 12312 IN CNAME www.malaysiaairlines.com.edgesuite.net.
www.malaysiaairlines.com.edgesuite.net. 12318 IN CNAME a1456.b.akamai.net.
a1456.b.akamai.net. 10 IN A
a1456.b.akamai.net. 10 IN A


BSNL’s DNS resolver

;www.malaysiaairlines.com. IN A

www.malaysiaairlines.com. 20410 IN CNAME www.malaysiaairlines.com.edgesuite.net.
www.malaysiaairlines.com.edgesuite.net. 20410 IN CNAME a1456.b.akamai.net.
a1456.b.akamai.net. 20 IN A
a1456.b.akamai.net. 20 IN A


Notice different IP’s coming when asked from different DNS resolvers. 

OpenDNS passes me which is announced by Singtel in Singapore.
Google passes me which is announced by Tmnet in Malaysia.
BSNL’s DNS resolver passes me announced by BSNL-NIB itself is within India (yay!) 🙂

This results in latency of 300ms for www.malaysiaairlines.com when using OpenDNS & Google while 60ms when using ISP’s default resolver


How and why this is happening?

The answer lies on underlying DNS layer which is doing this magic. In all cases www.malaysiaairlines.com. is a cname (alias record) to www.malaysiaairlines.com.edgesuite.net.  Further www.malaysiaairlines.com.edgesuite.net. is a cname to a1456.b.akamai.net. Real magic comes here – “b.akamai.net.” itself is a DNS zone. Let’s look at this zone from all 3 DNS resolvers:


anurag@laptop:/$ dig b.akamai.net. ns +short @

anurag@laptop:/$ dig b.akamai.net. ns +short @

anurag@laptop:/$ dig b.akamai.net. ns +short @


All identical names. Let’s pick one randomly and analyse:



anurag@laptop:/$ dig n0b.akamai.net a @ +short

anurag@laptop:/$ dig n0b.akamai.net a @ +short

anurag@laptop:/$ dig n0b.akamai.net a @ +short


All different IPs!
At this stage everything seems very confusing.


Let’s revise what we have till now

www.malaysiaairlines.com. is CNAME to www.malaysiaairlines.com.edgesuite.net. and www.malaysiaairlines.com.edgesuite.net. is cname to a1456.b.akamai.net. Now a1456.b.akamai.net. is a absolute hostname under DNS zone “b.akamai.net” which is giving different IPs when checked from different DNS resolvers. b.akamai.net DNS zones has several DNS servers and I randomly pick one of them n0b.akamai.net. We see n0b.akamai.net itself gives different A records and thus I am going back to parent zone which is akamai.net to further find how this is happening.


Let’s see DNS servers of akamai.net:

To avoid further confusion due to interesting DNS lookups, let’s use whois record of akamai.net domain to see what authoritative DNS servers it is using rather then a DNS query:

anurag@laptop:~$ whois akamai.net

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

Domain Name: AKAMAI.NET
Registrar: TUCOWS.COM CO.
Whois Server: whois.tucows.com
Referral URL: http://domainhelp.opensrs.net
Name Server: NS2-193.AKAMAITECH.NET
Name Server: NS3-193.AKAMAITECH.NET
Name Server: NS4-193.AKAMAITECH.NET
Name Server: NS5-193.AKAMAITECH.NET
Name Server: NS6-193.AKAMAITECH.NET
Name Server: NS7-193.AKAMAITECH.NET
Status: clientTransferProhibited
Status: clientUpdateProhibited
Updated Date: 18-jun-2012
Creation Date: 03-mar-1999
Expiration Date: 03-mar-2022

>>> Last update of whois database: Sun, 28 Oct 2012 16:56:03 UTC <<<


Now again let’s pick one randomly – NS1-1.AKAMAITECH.NET and see what it tells us for hostname “n0b.akamai.net” 


anurag@laptop:~$ dig @NS1-1.AKAMAITECH.NET n0b.akamai.net +short



Wow! Akamai’s DNS setup can make a boring Sunday evening very interesting. 😉


Now since NS1-1.AKAMAITECH.NET. itself is on a different domain name (and so different DNS zone), let’s do bit more effort to get to the core of it. NS1-1.AKAMAITECH.NET. is simply an A record on DNS servers of AKAMAITECH.NET. zone.


Let’s look at that zone now:

anurag@laptop:/$ dig AKAMAITECH.NET ns +short


Again, let’s pick – zh.AKAMAITECH.NET. and query for NS1-1.AKAMAITECH.NET.

anurag@laptop:/$ dig NS1-1.AKAMAITECH.NET. @zh.AKAMAITECH.NET.  +short

Finally some consistent result (YAY!). So is server with IP playing game? Remember in 2nd last step this server was giving different IPs for hostname NS1-1.AKAMAITECH.NET. I SMELL ANYCASTING! 🙂

Let’s do a traceroute to from my location (BSNL Haryana), Airtel Delhi node & my Europe server (where this blog is hosted!):



traceroute to (, 30 hops max, 60 byte packets
1 ( [AS1] 0.644 ms 1.022 ms 1.150 ms
2 ( [AS9829] 19.467 ms 20.335 ms 21.824 ms
3 ( [AS9829] 27.180 ms 29.092 ms 30.510 ms
4 ( [AS18101] 61.354 ms 63.244 ms 64.209 ms
5 ( [AS18101] 68.160 ms 68.907 ms 69.847 ms
6 ( [AS18101] 72.336 ms 54.497 ms 54.633 ms
7 ( [AS9498/AS7617] 80.766 ms 82.390 ms 83.732 ms
8 AES-Static- ( [AS24560/AS9498] 87.199 ms 88.580 ms 90.314 ms
9 * * *
10 * * *


Europe server

traceroute to (, 30 hops max, 60 byte packets
1 gw.giga-dns.com ( [AS51167] 0.639 ms 0.637 ms 0.623 ms
2 host-93-104-204-33.customer.m-online.net ( [AS8767] 0.600 ms 0.592 ms 0.585 ms
3 xe-1-1-0.rt-decix-2.m-online.net ( [AS8767] 7.784 ms 7.740 ms 7.727 ms
4 xe-1-1-0.rt-decix-2.m-online.net ( [AS8767] 7.464 ms 7.461 ms 7.452 ms
5 decix-fra6.netarch.akamai.com ( [AS6695] 8.434 ms 8.916 ms 8.407 ms
6 * * *
7 * * *
8 * * *


Here we go! Surely anycasting. is coming from prefix announced by Akamai AS21342 announced at different locations.



Let’s go in forward mode now:

Akamai CDN provider has a interesting DNS setup with mix of anycasting DNS servers where “edge servers” carry different A record for a given hostname. E.g at core Akamai has set of anycasted DNS servers like zh.AKAMAITECH.NET which hold A record for another set of DNS servers like NS1-1.AKAMAITECH.NET. which act as DNS server for akamai.net domain name. Next, these DNS servers hold different values for another set of DNS servers like n0b.akamai.net which are hold the delegation for a subzone like b.akamai.net which holds the hostname like a1456.b.akamai.net to which hostnames like www.malaysiaairlines.com.edgesuite.net. point to! 🙂 


Why Akamai is having such complex setup?

My strong guess here is that multiple zones and cross dependency here is simply to spread load and avoid single point failure. The important thing here is that at core of DNS Akamai uses anycasting but for serving content from these web servers there’s no anycasting. E.g I am getting IP for Akamai’s client site why is a unicated IP from BSNL prefix announcement. Akamai is NOT using anycasting on edge distribution and my strong guess for that is that it’s way too easy for Akamai to manage things in current rather then putting caching servers on anycasting IPs. E.g if in current situation Akamai node on BSNL is choked up, they can simply distribute traffic by modifying DNS server to pass A record to BSNL 1 out of 4 times and rest of time pass the IP of caching node on Airtel. In case of anycasting that is not possible. It will simply follow short AS/hop path and distribution of load partially is not possible. Again that’s my guess. 🙂

Time for me to change DNS resolver in my router now! 

11 Oct

i root server Mumbai node offline

Super dull time here. No classes going on due to “TCS Placement session” at college and this makes me to sit in my room most of time of my day. 

Yesterday I tested connectivity to all 13 Global Root DNS Servers and found i root was giving issue.

Here’s a my yesterday’s traceroute to i root: 

traceroute to i.root-servers.net. (, 30 hops max, 60 byte packets
1 router.local ( 1.470 ms 1.965 ms 2.452 ms
2 ( 26.030 ms 28.857 ms 31.243 ms
3 ( 34.673 ms 37.091 ms 41.025 ms
4 ( 72.853 ms 75.272 ms 77.959 ms
5 * * *
6 * * *


Since i root is another root server hosted within India by NIXI, I was quite sure this was issue again due to NIXI’s regional route enforcement policy along with missing transit link on i root. You can see my last blog post about same issue with F root here.

What was happening here was that Swedish provider Netnod had a anycasting node of i root server at NIXI Mumbai. Netnod uses IP from subnet announced by their AS 29216. In current setup Netnod router was connected to NIXI’s Mumbai subnet and was announcing that prefix. Thus all providers including BSNL were getting prefix in their routing table and hence there was a forward path from BSNL to Netnod Mumbai router.
But since ISPs like BSNL are forced to announce regional routes only, BSNL was NOT announcing their prefixes uses in Haryana at Mumbai (they do it at nearest regional exchange which is NIXI Noida) and thus Netnod router was not having any return path. This is true for many other big Indian providers who participate at more then one NIXI.


I informed Netnod Network Operation Center about the issue and they acted promptly by taking Mumbai anycasting instance down. As per their last email to me, they are keeping root server instance down unless they figure out what can be done to prevent this problem.

It is important to note here that if a node is taken down in anycasting that is fine since traffic is routed to other nearest node but keeping a faulty node damages.


Here’s my updated traceroute:

traceroute to (, 30 hops max, 60 byte packets
1 router.local ( 1.486 ms 1.965 ms 2.472 ms
2 ( 26.766 ms 30.029 ms 32.558 ms
3 ( 83.640 ms 83.920 ms 84.336 ms
4 ( 92.011 ms 92.447 ms 92.964 ms
5 ix-0-100.tcore2.MLV-Mumbai.as6453.net ( 85.625 ms 88.078 ms 90.528 ms
6 ( 227.061 ms 236.796 ms 237.210 ms
7 ( 238.669 ms 196.731 ms 197.479 ms
8 ( 205.832 ms 207.994 ms 210.133 ms
9 ( 204.067 ms 206.465 ms 208.859 ms
10 ( 211.274 ms 213.719 ms 216.668 ms
11 ( 223.069 ms 224.352 ms 225.494 ms
12 i.root-servers.net ( 227.769 ms 229.160 ms 231.765 ms


With this, India has lost I root server along with F root for time being unless Netnod is able to workout with NIXI on this. Good luck to last one i.e K root in Delhi to handle the load! 🙂