Implement Anycast Services with BGP

In this lab exercise, you’ll build a DNS server farm with multiple servers connected to the same layer-3 access switch1.

Lab topology

Enterprise architects would recommend using a load balancer in a typical scale-out architecture. As DNS is connectionless2 and has no concept of sessions, we don’t need a load balancer; equal-cost multipathing on the access switch will do the job just fine.

Regardless of the underlying load balancing mechanism, the solution must track individual servers’ health and availability. In our design3, we’ll use BGP to track server availability. All servers will advertise the same IP address4 to the access switch and offer DNS services on that IP address5.


This lab is still under development. Follow or Ivan Pepelnjak on LinkedIn to find out when it will be ready.

  1. A device formerly known as router 

  2. We’re assuming UDP-based DNS. Implementing TCP-based services with anycast is more complex but doable; many large-scale web properties use anycast web servers. 

  3. This design is used in many large-scale DNS implementations. 

  4. Technically, a /32 IPv4 or a /128 IPv6 prefix 

  5. We won’t go as far as configuring the DNS servers. We’ll declare mission accomplished as soon as we ping the anycast IP address.