BGP / OSPF#
Network → BGP / OSPF, at /routing, with a tab for each protocol. The routing daemon
is FRR, from VyOS; this page writes its configuration and shows what it reports. Every
form adds its changes to the pending changes, applied from the Commit Bar.
BGP#
Setting it up#
On a router without BGP the tab says BGP is not set up and offers Set up BGP:
| Field | What it takes |
|---|---|
| AS number | this router's AS, 1 to 4294967294. Required |
| Router ID | an IPv4 address that names this router to its neighbours. When left empty the router chooses one from its addresses |
The same form, Edit settings, changes either later.
Neighbours#
The Neighbours table lists each neighbour with its description, its remote AS, its address families, and its session as FRR reports it: Established, or FRR's word for where it has got to — Connect, Active, OpenSent, Idle (Admin) for one that is shut down. Routes received counts what an established session has learned.
Add neighbour, or a row, opens the neighbour's form:
| Field | What it takes |
|---|---|
| Address | the neighbour's IPv4 or IPv6 address. Fixed once the neighbour exists |
| Remote AS | AS number and the number; Same as this router for an internal (iBGP) neighbour; Any other AS to accept whichever external AS it announces |
| Description | anything, up to 255 characters |
| Password | the TCP MD5 password both ends agree on, without spaces |
| IPv4 unicast, IPv6 unicast | the address families the session exchanges; at least one |
| Next hop self for IPv4, for IPv6 | advertise this router as the next hop for the routes it passes on — what an iBGP neighbour usually needs |
| Shut down | close the session and keep it down, keeping its configuration |
The password is never shown. When one is set the form says A password is set and the field is empty: typing a new one replaces it, Remove the password removes it, and leaving both alone changes nothing. No page, pending change or API answer carries the value, whoever is signed in.
A neighbour in a peer group shows the group and takes its AS from it. Delete neighbour, pressed twice, removes the neighbour.
Advertised routes#
Advertised routes → Edit sets what BGP announces, for each family:
- Networks — prefixes announced as they are, such as your own address block. Each must be a network address.
- Redistribute connected networks, static routes, and for IPv4 OSPF routes.
Removing BGP#
Remove BGP, pressed twice, removes BGP and every neighbour in it.
OSPF#
Setting it up#
On a router without OSPF the tab offers Add an interface to OSPF: choose the interface and its area (0, the backbone, in a single-area network). That is a working OSPF configuration; the router ID is chosen by the router until one is set.
Settings#
Edit settings:
| Field | What it takes |
|---|---|
| Router ID | an IPv4 address that names this router to its neighbours |
| Redistribute connected networks, static routes, BGP routes | announce those routes into OSPF |
| Default route | Not advertised; Advertised when this router has one; Always advertised |
| Passive by default | OSPF advertises every interface's network but forms adjacencies only on the interfaces made active |
Interfaces#
The Interfaces table lists each interface OSPF runs on, with its area, whether it is Passive or Active, and its cost. Add interface, or a row, opens its form:
| Field | What it takes |
|---|---|
| Interface | any interface, VLANs included |
| Area | a number such as 0, or dotted such as 0.0.0.1 |
| Passive | advertise the interface's network without forming an adjacency on it — for a LAN with no other router |
| Cost | 1 to 65535; lower is preferred. Worked out from the interface's speed when empty |
Remove from OSPF, pressed twice, takes the interface out.
Areas#
The Areas table lists every area, including one only an interface names. Add area, or a row, sets its Type — Normal, Stub or NSSA; the backbone, area 0, can only be normal — and, where OSPF is told where to run by network, its Networks.
OSPF is told where to run one of two ways, never both, and the router refuses a mix: an area named on each interface, or networks listed under an area. Once interfaces carry their areas, an area's form has no networks field; once areas list networks, an interface's form has no area field.
Neighbours#
The Neighbours table lists each adjacency FRR has: the neighbour's router ID, its address, the interface, and its state — Full/DR, Full/Backup and the like for a formed adjacency, 2-Way or Init for one that has not.
Removing OSPF#
Remove OSPF, pressed twice, removes OSPF, its areas and its interfaces.
Before a session can form#
BGP is TCP port 179, and OSPF is IP protocol 89, both addressed to the router itself. A firewall that drops what is not allowed must allow them from the neighbours, on the Firewall page's input rules. On a segment with devices you do not control, OSPF interfaces there should be passive.
When a read fails#
A protocol whose configuration could not be read says Could not read the BGP configuration (or OSPF) with the router's reason, and offers nothing to set up or change: a protocol that could not be read is not one that is not configured. A session table that could not be read says so; the configuration still shows.
Advanced mode#
With Advanced mode on (Account → Preferences), the header shows the configuration path
and a CLI tab shows the protocols configuration as the router's own commands.
What this page does not do#
Route maps, prefix lists, communities, peer groups (shown, not edited), BGP timers, multihop and update source, BFD, OSPF authentication and OSPFv3 are not edited here. A neighbour or interface configured with any of them keeps them when it is edited on this page.
See also#
- A BGP session and An OSPF area — step by step.
- Static routes — the forwarding table the learned routes arrive in.
- VRF — separate routing tables.
- Uplinks (multi-WAN) — the default route.