UniFi - Border Gateway Protocol (BGP)
BGP is a dynamic routing protocol which sets up neighbors with other gateways or Layer 3 switches and distributes routing information within a single AS (internal BGP) or to an external AS (external BGP). Neighbor with the ISP in a multi-homing setup to provide redundancy and load balancing for traffic to and from the internet.
Requirements
- EFG, UDM-Pro-Max, UDM-SE, UDM-Pro, or UDW with firmware version 4.1.5 (Early Access)
- ECS-Aggregation
How can I use BGP?
BGP is an extensive routing protocol that can be used for many different purposes. Examples include:
- Set up neighbors with other gateways or L3 switches in the same AS and exchange routes internally.
- Exchange routes over a VPN and redistribute routes into BGP.
- Neighbor with your ISP in a single-homing setup and exchange routes.
- Neighbor with multiple ISPs in a multi-homing setup, exchange routes and use traffic engineering to influence how inbound and outbound traffic is routed.
BGP Settings
BGP is enabled by uploading a configuration text file in FRR BGP format. The file needs to be created manually and the configuration lines will differ between setups. An example is shown below which configures:
- The AS number used locally (AS 65000).
- The Router ID used locally (198.51.100.1).
- Redistributed connected and static routes into BGP.
- A neighbor connection to 198.51.100.2 (AS 65001) that is authenticated with a password.
- BGP community attributes (send-community).
- Apply updates without needing to reset the BGP session (soft-reconfiguration).
router bgp 65000
bgp router-id 198.51.100.1
redistribute connected
redistribute static
neighbor 198.51.100.2 remote-as 65001
neighbor 198.51.100.2 password securesecret1
address-family ipv4
neighbor 198.51.100.2 activate
neighbor 198.51.100.2 send-community all
neighbor 198.51.100.2 soft-reconfiguration inbound