Anycast with BGPI have been playing with docker image from GNS3 and I wanted to test it.
I choose this great lab from Vincent Bernat based on a great article from Paul Vixie explaining why DNS servers use anycast.
The Vicent's lab uses UML linux as he explains in http://vincent.bernat.im/en/blog/2011-uml-network-lab.html and the lab uses IPv6 addresses. I have migrated it to GNS3 and IPv4. I pushed the GNS3 project directory to my github repository for share.
The lab has 16 IOL Routers, 3 Quagga Servers acting as DNS and 5 PC Clients and it uses over 2 G of RAM.
- They acquire IP by DHCP with network 192.168.X.0/24 where X is the PC number.
- The PC network is announced by BGP so we can have global reachability.
- They have a loopback address 188.8.131.52/24.
- They announce 184.108.40.206/24 prefix, simulating google DNS.
- The eth0 interface is 10.0.0.2 and peers with Router with iBGP.
qemu-system-i386 -drive file=linux-core-4.7.7-openvswitch-1.11.0_guagga-0.99.22.4.img # Login with tc user tce-ab # Search dnsmasq and install it #
I can't export the configuration but it's the same for the 3 routers, you only need to copy&paste changing the AS number
inter lo ip address 220.127.116.11/24 inter eth0 ip address 10.0.0.2/24 inter eth1 shutdown router bgp 64612 network 18.104.22.168 mask 255.255.255.0 neighbor 10.0.0.1 remote-as 64612
- ID = 2 last digits of ASN ID=646XX.
- Loopback0 = 1.1.1.XX.
- Inter-routing addresses 10.ID1.ID2.0/24 with ID1 < ID2.
- If AS is ID1 the use .1 as last digit and ID2 use .2.
- AS64600 uses custom networks.
If you trace from the PCs you can show the different routes: