How to Add an Anycast IP to Your BuyVM Slice

As many people will probably know BuyVM has this awesome feature where if you buy a VPS in all three of their location (Las Vegas, New York and Luxembourg), you are able to assign up to five free anycast IP Addresses. As three VMs from BuyVM can be gotten for only $6/month in total (512MB package) it is probably the cheapest way of getting into the world of anycasted hosting.

Assigning a Anycast IP in the Stallion panel

Before you can add an anycast IP address to your VMs you will need to first assign them in the stallion panel;

A screenshot of the BuyVM panel instructing the user of where to click to access the details page of the VPS.

  1. You need to click on the name of one of your VMs to enter its details page.

  2. You then need to click on the “Networking” tab.

  3. Once in the networking tab, you need to click on the “Assign Anycast IP Address” button and click okay and you will have a new anycast IP address available for your own use.

A screenshot of the assigning screen for anycast ip addresses.

Setting up your news IP in the VM itself

Note: The following steps will have to be completed on all three of your BuyVM VMs.

The anycast IP address can then be added to each of the three VMs by editing your network interfaces config files, to do so;

  • Open your network config file in Nano

nano /etc/network/interfaces

Note: If you see an error like " nano: command not found" it means that nano is not installed on your VM
which can be fixed by issuing the following command (Debian); apt-get install nano
  • Add the following to the bottom of that file, replacing [You Anycast IP Address] with the anycast IP address that was assigned to you in the stallion panel.

auto eth0:anycast

allow-hotplug eth0:anycast

iface eth0:anycast inet static

address [You Anycast IP Address]

netmask 255.255.255.0

Note: A gateway is not necessary for adding IP addresses on BuyVM VMs
and in fact trying to add one will not work.
  • Restart your VM by issuing the “reboot” command and your anycast IP address should be available you for you to use.