Vultr's BGP feature allows you to bring your own IP space and use it across any of our locations
Requirements
In order to use BGP, you would need your own IP space (either ipv4 or ipv6). If you have your own ASN, you can use that or we can assign a private one.
Please complete the bgp setup form to begin. Ensure you verify ownership of your ASN and subnet(s) to prevent delays.
The form with the following information:
- Your IP ranges ( Require)
- Your ASN (if you have one)
- An LOA for your IP ranges (only if you don't have your own ASN)
Once BGP has been configured on your account, you can proceed with configuring BGP.
BGP Setup
Note: If you're going to be configuring an instance that was deployed before BGP was setup on your account, you will need to reboot it via the control panel. BGP will not work on any existing instances until they've been rebooted (rebooting via SSH is not sufficient).
Our examples are going to assume the following
- ASN: 64512
- Instance's IPv4 address: 203.0.113.123
- Instance's IPv6 address: 2001:DB8:1000::1/64
- Instance's interface : ens3
- IPv6 Block: 2001:0db8::/32
- BGP Password: hunter2
We recommend using BIRD as your BGP daemon (but, you can use any BGP daemon you want). Most operating systems have a package available for this.
Install BIRD as BGP daemon
On Ubuntu. Bird package is bird-bgp
sudo apt update && apt install bird-bgp -y
config files will locate in /etc/bird with /etc/bird/bird6.conf for ipv6 and /etc/bird/bird.conf for ipv4
In this example, I will configure with ipv6 block. Adjust the example configuration below as required and write to /etc/bird/bird6.conf
router id 203.0.113.123;
filter out_filter {
if net = 2001:0db8::/32 then accept;
else reject;
}
protocol bgp vultr
{
local as 64654;
source address 2001:DB8:1000::1/64;
import all;
export filter out_filter;
graceful restart on;
multihop 2;
neighbor 2001:19f0:ffff::1 as 64515;
password "hunter2";
}
protocol static
{
route 2001:0db8::/32 via 2001:DB8:1000::1/64;
}
protocol device
{
scan time 5;
}
Tip: You can gen this config by going to "Server Details". In tab BGP. You will see config sample for real infomation
Restart bird daemon
sudo systemctl restart bird6
Verify BGP Session
sudo birdc6 show proto all vultr
BIRD 1.6.3 ready.
name proto table state since info
vultr BGP master up 2020-01-31 Established
Preference: 100
Input filter: ACCEPT
Output filter: out_filter
Routes: 0 imported, 1 exported, 0 preferred
Route change stats: received rejected filtered ignored accepted
Import updates: 0 0 0 0 0
Import withdraws: 0 0 --- 0 0
Export updates: 1 0 0 --- 1
Export withdraws: 0 --- --- --- 0
BGP state: Established
Neighbor address: 2001:19f0:ffff::1
Neighbor AS: 64515
Neighbor ID: 108.61.113.30
Neighbor caps: refresh restart-aware AS4 add-path-rx
Session: external multihop AS4
Source address: 2001:DB8:1000::1/64
Hold timer: 168/180
Keepalive timer: 23/60
A BGP state of 'Established' means that everything is working properly
Note: You will also need to open TCP/179 port on your firewall
Configuring IPs
Now you can add any of your ipv6
sudo /sbin/ifconfig ens3 inet6 add 2001:db8:b9af:a224:d0f3:31c:7a57:7c15/64
Notes: You can subdivide the subnet into multiple instances and repeat the above steps for each of your instances. Note replace the new ipv6 block