A BGP session#
You will end up with BGP running with one neighbour, announcing your own network and learning the neighbour's routes. FRR does the routing; the BGP / OSPF page writes its configuration, so the session is a set of pending changes you review and apply, and a commit you can roll back.
Before you start#
- The operator role and a licence.
- Your AS number and the neighbour's, agreed with whoever is on the other end, and the password if the session has one.
- The neighbour's address, reachable on a connected network or through a static route.
- A router ID: an IPv4 address that names this router. Conventionally one on a dummy interface (Adding an interface), which never goes down.
Step 1 — Set BGP up#
Network → BGP / OSPF, the BGP tab, Set up BGP: your AS number, 65001, and
the Router ID, 192.0.2.1. Set up BGP.
Step 2 — Add the neighbour#
Add neighbour:
- Address:
192.0.2.2. - Remote AS: AS number,
65002— or Same as this router for a neighbour in your own AS, or Any other AS to accept whichever external AS it announces. - Description:
Transit. - Password: the agreed password. It is never shown again, anywhere; the form says only that one is set.
- IPv4 unicast, and IPv6 unicast if the session carries both. A neighbour with no address family exchanges no routes.
- Next hop self is for a neighbour in your own AS, which needs this router as the next hop for the routes it passes on. Leave it off for an external neighbour.
Add neighbour.
Step 3 — Announce your network#
Advertised routes → Edit, and add your own block under IPv4 networks:
198.51.100.0/24. Save changes.
Step 4 — Let the session through the firewall#
BGP is TCP port 179 to the router itself. Allow it from the neighbour's address in the input rules on Firewall, and nothing else on that port.
Step 5 — Apply#
The Commit Bar lists what will be applied, in sentences: Set the BGP AS number to 65001, Add BGP neighbour 192.0.2.2 — Remote AS 65002, description “Transit”, password set, IPv4 unicast, Advertise 198.51.100.0/24 over BGP. Apply changes.
Check it worked#
On the BGP tab, the neighbour's Session reads Established, and Routes received counts what it has sent. Until then it shows where the session has got to: Connect or Active when the neighbour does not answer — the address, the firewall or the other end — and Idle (Admin) when it is shut down.
On Static routes, the learned routes are in the forwarding table with source BGP. A route BGP learned that is not installed lost to a better route to the same destination.
Undoing it#
Open the neighbour and Delete neighbour, or Remove BGP for all of it; each asks once more.