Networking – How does Google bypass IP routing

dnsipnetworkingrouting

At the Google Public DNS Performance Benefits page, they claim

In Google Public DNS, we have implemented several approaches to speeding up DNS lookup times. Some of these approaches are fairly standard; others are experimental:

  • Providing global coverage for proximity to all users.

But if we geo-locate their IP addresses 8.8.8.8 and 8.8.4.4 we see that they are served from Mountain View.

Measuring their latency from Brazil I found out that

  • My ISP's DNS answers in 13 ms
  • Google's DNS answers in 20 ms
  • OpenDNS in San Francisco answers in 130 ms in average

How is that possible? How can they answer from servers in Brazil if the IP routing scheme leads to California?

Best Answer

The addresses are just owned by a company (Google Inc.) located in Mountain View, according to WHOIS information from ARIN. But they are served from whichever location Google decides to announce a route to that range from.

For their DNS servers, Google is using anycast, and the same addresses can in fact be routed to several different locations:

On the Internet, anycast is usually implemented by using BGP to simultaneously announce the same destination IP address range from many different places on the Internet

This is the BGP entry for that route:

BGP routing table entry for 8.8.8.0/24, version 50533132
Paths: (18 available, best #12, table Default-IP-Routing-Table)
  Not advertised to any peer
  7018 15169, (received & used)
    12.123.137.124 from 12.123.137.124 (12.123.137.124)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:37232
  7018 15169, (received & used)
    12.123.139.124 from 12.123.139.124 (12.123.139.124)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:34011
  7018 15169, (received & used)
    12.123.145.124 from 12.123.145.124 (12.123.145.124)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:33051
  7018 15169, (received & used)
    12.123.21.243 from 12.123.21.243 (12.123.21.243)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:39343
  7018 15169, (received & used)
    12.123.13.241 from 12.123.13.241 (12.123.13.241)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:32112
  7018 15169, (received & used)
    12.123.9.241 from 12.123.9.241 (12.123.9.241)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:38001
  7018 15169, (received & used)
    12.123.133.124 from 12.123.133.124 (12.123.133.124)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:36244
  7018 15169, (received & used)
    12.123.5.240 from 12.123.5.240 (12.123.5.240)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:34011
  7018 15169, (received & used)
    12.123.134.124 from 12.123.134.124 (12.123.134.124)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:36244
  7018 15169, (received & used)
    12.123.142.124 from 12.123.142.124 (12.123.142.124)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:33051
  7018 15169, (received & used)
    12.123.17.244 from 12.123.17.244 (12.123.17.244)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:36244
  7018 15169, (received & used)
    12.123.1.236 from 12.123.1.236 (12.123.1.236)
      Origin IGP, localpref 100, valid, external, best
      Community: 7018:2500 7018:37232
  7018 15169, (received & used)
    12.123.37.250 from 12.123.37.250 (12.123.37.250)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:36244
  7018 15169, (received & used)
    12.123.45.252 from 12.123.45.252 (12.123.45.252)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:32112
  7018 15169, (received & used)
    12.123.33.249 from 12.123.33.249 (12.123.33.249)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:39220
  7018 15169, (received & used)
    12.123.25.245 from 12.123.25.245 (12.123.25.245)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:34011
  7018 15169, (received & used)
    12.123.41.250 from 12.123.41.250 (12.123.41.250)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:37232
  7018 15169, (received & used)
    12.123.29.249 from 12.123.29.249 (12.123.29.249)
      Origin IGP, localpref 100, valid, external
      Community: 7018:2500 7018:33051
Related Question