• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System BSD

Configuring BGP on Vultr With OpenBSD

How VPS by How VPS
September 1, 2019
in BSD
0
0
SHARES
73
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Getting started
  2. BGP Setup
    1. Instance A
    2. Instance B
  3. Want to contribute?


Vultr’s BGP feature allows you to bring your own IP space and use it across any of our locations, with an OpenBSD instance no additional software is needed!

Getting started

In order to use BGP, you would need your own IP space (either v4 or v6). If you have your own ASN, you can use that or we can assign a private one.

Open a ticket with the following information:

  • Your IP ranges
  • Your ASN (if you have one)
  • A 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.

Our examples are going to use the following:

  • ASN: 64512
  • Instance’s IPv4 address: 203.0.113.123
  • Instance’s IPv6 address: 2001:DB8:1000::1/64
  • IPv4 Block: 198.51.100.0/24
  • IPv6 Block: 2001:0db8::/32
  • BGP Password: hunter2

BGP Setup

OpenBSD ships with bgpd(8) already installed and only requires a few configuration file changes to start.

Edit rc.conf.local(8) to add the following line to allow the bgpd(8) daemon to start via rc.d(8)

bgpd_flags=

A complete example of bgpd.conf(8) can be found at /etc/examples/bgpd.conf and contains lots of extra configuration options you may need.

Adjust the example configuration below as required and write to /etc/bgpd.conf (ensure that the permissions for this file are 600)

   AS 64512
    router-id 203.0.113.123

    listen on 127.0.0.1
    listen on ::1
    log updates
    network 198.51.100.0/24
    network 2001:0db8::/32

    neighbor 169.254.169.254 {
            remote-as               64515
            descr                   "Vultr IPv4"
            announce IPv4           unicast
            announce IPv6           none
            tcp md5sig password     hunter2
            multihop                2
            local-address           203.0.113.123
    }
    neighbor 2001:19f0:ffff::1 {
            remote-as               64515
            descr                   "Vultr IPv6"
            announce IPv4           none
            announce IPv6           unicast
            tcp md5sig password     hunter2
            multihop                2
            local-address           2001:DB8:1000::1
    }

To make sure everything is in order, you can issue the command bgpd -f /etc/bgpd.conf -n. If bgpd(ok) is returned, you can start the daemon.

# rcctl enable bgpd
# rcctl start bgpd
bgpd(ok)

To check the status of your BGP sessions, you will need to use bgpctl(8). For example, to see a basic overview you can use bgpctl show summary

# bgpctl show summary
Neighbor                   AS    MsgRcvd    MsgSent  OutQ Up/Down  State/PrfRcvd
Vultr IPv6              64515        230        207     0 01:41:40      0
Vultr IPv4              64515        244        220     0 01:48:09      0

To see detailed information about a BPG neighbor use bgpctl show neighbor

BGP neighbor is 2001:19f0:ffff::1, remote AS 64515, Multihop (2)
 Description: Vultr IPv6
  BGP version 4, remote router-id 45.63.102.186, using md5sig
  BGP state = Established, up for 01:46:45
  Last read 00:00:08, holdtime 90s, keepalive interval 30s
  Neighbor capabilities:
    Multiprotocol extensions: IPv6 unicast
    Route Refresh
    Graceful Restart: Timeout: 120, IPv6 unicast
    4-byte AS numbers

  Message statistics:
          Sent       Received  
  Opens                    1          1
  Notifications            0          0
  Updates                  2          1
  Keepalives             214        240
  Route Refresh            0          0
  Total                  217        242

  Update statistics:
          Sent       Received  
  Updates                  4          0
  Withdraws                0          0
  End-of-Rib               1          1

  Local host:  2001:DB8:1000::1, Local port:  38298
  Remote host:    2001:19f0:ffff::1, Remote port:   179

BGP neighbor is 169.254.169.254, remote AS 64515, Multihop (2)
 Description: Vultr IPv4
  BGP version 4, remote router-id 45.63.102.186, using md5sig
  BGP state = Established, up for 01:53:14
  Last read 00:00:14, holdtime 90s, keepalive interval 30s
  Neighbor capabilities:
    Multiprotocol extensions: IPv4 unicast
    Route Refresh
    Graceful Restart: Timeout: 120, IPv4 unicast
    4-byte AS numbers

  Message statistics:
          Sent       Received  
  Opens                    1          1
  Notifications            0          0
  Updates                  2          1
  Keepalives             227        253
  Route Refresh            0          0
  Total                  230        255

  Update statistics:
          Sent       Received  
  Updates                  4          0
  Withdraws                0          0
  End-of-Rib               1          1

  Local host:         203.0.113.123, Local port:  19824
  Remote host:      169.254.169.254, Remote port:   179

At this point we can start assigning our IP addresses to interfaces (e.g. by configuring /etc/hostname.lo1 ) so applications can be configured to listen on these IPs.

If you intend to use your IP addresses on multiple instances you will need to adjust the network statements on each instance to announce a more specific route for those IPs.

Instance A

   AS 64512
    router-id 203.0.113.123

    listen on 127.0.0.1
    listen on ::1
    log updates
    network 198.51.100.0/24
    network 198.51.100.1/32
    network 2001:0db8::/32
    network 2001:0db8::/64

    neighbor 169.254.169.254 {
            remote-as               64515
            descr                   "Vultr IPv4"
            announce IPv4           unicast
            announce IPv6           none
            tcp md5sig password     hunter2
            multihop                2
            local-address           203.0.113.123
    }
    neighbor 2001:19f0:ffff::1 {
            remote-as               64515
            descr                   "Vultr IPv6"
            announce IPv4           none
            announce IPv6           unicast
            tcp md5sig password     hunter2
            multihop                2
            local-address           2001:DB8:1000::1
    }

Instance B

   AS 64512
    router-id 203.0.113.124

    listen on 127.0.0.1
    listen on ::1
    log updates
    network 198.51.100.0/24
    network 198.51.100.2/32
    network 2001:0db8::/32
    network 2001:0db8:0001::/64

    neighbor 169.254.169.254 {
            remote-as               64515
            descr                   "Vultr IPv4"
            announce IPv4           unicast
            announce IPv6           none
            tcp md5sig password     hunter2
            multihop                2
            local-address           203.0.113.124
    }
    neighbor 2001:19f0:ffff::1 {
            remote-as               64515
            descr                   "Vultr IPv6"
            announce IPv4           none
            announce IPv6           unicast
            tcp md5sig password     hunter2
            multihop                2
            local-address           2001:DB8:1000::2
    }

Note: Do not forget to use a different password from what is referenced in this article.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install MODX Revolution on a FreeBSD 11 FAMP VPS

Next Post

How to Install October 1.0 CMS on a FreeBSD 11 FAMP VPS

Next Post

How to Install October 1.0 CMS on a FreeBSD 11 FAMP VPS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet