Welcome to the world of advanced networking with HYEHOST! In this guide, we will walk you through the process of setting up Border Gateway Protocol (BGP) on your Virtual Private Server (VPS) using the Pathvector platform. BGP is a powerful protocol that enables dynamic routing and enhances network performance. By implementing BGP, you can achieve load balancing, failover, and optimal traffic routing for your applications.
Before You Begin:
- Ensure you have a VPS (In this guide, we will specifically use our Kansas location).
- Have an ASN and Prefix.
- This guide uses Debian/APT, if you are using another OS please adjust as needed.
Step 1:
Log into your VPS (this guide assumes root, if not using root remember to use sudo)
Step 2:
Install the correct packages
apt -y update && apt -y upgrade && apt -y install bird2 bgpq4 curl wget nano && systemctl enable --now bird
Install Pathvector https://pathvector.io/docs/installation
curl https://repo.pathvector.io/pgp.asc > /usr/share/keyrings/pathvector.ascecho "deb [signed-by=/usr/share/keyrings/pathvector.asc] https://repo.pathvector.io/apt/ stable main" > /etc/apt/sources.list.d/pathvector.listapt update && apt install -y pathvector
Step 3:
Create the Pathvector config
nano /etc/pathvector.yml
Due to the size of a config, here are some Pastebin example configs:
Amsterdam - https://pastebin.com/vvTqKG42Â (Password: HYEHOST)
London - https://pastebin.com/LLgqNg9z (Password: HYEHOST)
Frankfurt - https://pastebin.com/Nxjs87sJ (Password: HYEHOST)
Kansas - https://pastebin.com/hm3wHUgN (Password: HYEHOST)
Toronto - https://pastebin.com/FtG9Fp2a (Password: HYEHOST)
Fremont - https://pastebin.com/ak1tzLt2 (Password: HYEHOST)
Here is an index for what should be changed:
- YOUR_ASN - Change all these to your ASN number excluding AS for example 47272
- YOUR_VPS_V4 - An IPv4 address assigned to your server
- YOUR_VPS_V6 - An IPv6 address assigned to your server (Normally ends in ::a)
- YOUR_PREFIX/48 - Add once or multiple of your v6 prefixes with netmask example 2001:47:27:2::/48
- YOUR_PREFIX/24 - Add once or multiple of your v4 prefixes with netmask example 47.27.2.0/24
This example config follows the example Pathvector config along with the addition of static routes to ensure your BGP session works as intended with us, it also adds in templates to be used for peers: and will tag communities so under "peers:" you will see in the example there is "Kansas_Hyehost" that uses the template called "upstream", all imported routes from the peer using the template upstream will be tagged YOUR_ASN:0:12 and so on.
Once you have saved this file ctrl+x you will want to run pathvector generate (You can shorten generate to just g pathvector g) you will need to run this anytime after you have modified your pathvector config
Step 4:
Check your bgp session is up using the command birdc s p or if you want more details you can use birdc s p a and if you want to see a specific session only you can take the name shown from the birdc s p command and use this command birdc s p a KANSAS_HYEHOST__AS47272_v6
As always, if you get stuck you can always open a ticket on our billing panel or via discord.
NOTE: while this guide shows specific for Kansas this is only a guide, please use the gateway IPs for other locations or you can open a ticket and ask for them.