How to Use BGP: A Practical Introduction
BGP (Border Gateway Protocol) is how networks on the internet tell each other which IP addresses they can reach. If your business has its own IP space and more than one internet provider, BGP is what lets traffic fail over between them without anyone noticing.
When you need it
- You have two or more upstream ISPs and want automatic failover for inbound traffic.
- You own (or lease) a public IP block, typically a /24 or larger for IPv4.
- You have, or can get, an Autonomous System Number (ASN) from your regional registry, such as ARIN in North America.
If you only have one provider, a static default route is simpler and does the same job.
A minimal configuration
Here is the shape of a basic setup in FRRouting, announcing one prefix to one upstream:
router bgp 64512
bgp router-id 192.0.2.1
neighbor 198.51.100.1 remote-as 64500
!
address-family ipv4 unicast
network 203.0.113.0/24
neighbor 198.51.100.1 prefix-list OUT out
exit-address-family
!
ip prefix-list OUT seq 10 permit 203.0.113.0/24
Things to get right
- Filter what you announce. An outbound prefix list stops you from accidentally leaking routes you learned from one provider to another.
- Publish RPKI ROAs for your prefixes so other networks can verify you're allowed to announce them.
- Keep your IRR records current, since many providers build their filters from them.