Building a fast CDN with anycast (OSPFv2/3 based)

A Priori : If you didn’t already read the previous post Building a fast CDN with anycast (BGP) about, I would advice you to read it before starting with this one, which is only technical.

Deploying anycast loopback advertising via OSPF

The goal is to make a server, in our case a DNS server, announcing his own IP address in order to get anycast DNS working over several continents. He has to do the announcement itself otherwise he will not disappear from the routing tables and causing DNS request black holing.

Configure the server router

We have to install Quagga from repositories :

apt-get install quagga
sysctl -w net.ipv6.conf.default.router_solicitations=0
sysctl -w net.ipv6.conf.default.accept_ra=0
sysctl -w net.ipv6.conf.default.forwarding=1
sysctl -w net.ipv4.conf.default.forwarding=1

If you don’t want to use IPv6, you shall better not let it active (but of course we prefer deactivate ipv4):

sysctl -w net.ipv6.conf.all.disable_ipv6=1

Edit the file to define what protocols you want running on your server:

vim /etc/quagga/daemons

For example, our file is looking this like:

zebra=yes
bgpd=no
ospfd=yes
ospf6d=yes
ripd=no
ripngd=no
isisd=no

 Continue reading