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;
You need to click on the name of one of your VMs to enter its details page.
You then need to click on the “Networking” tab.
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.
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
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.
iface eth0:anycast inet static
address [You Anycast IP Address]
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.