Dynamic routing (BGP)

OpenBSD bgpd(8) router: peer with neighbouring routers and originate your prefixes. OSPF →

{{#DRIFT_BADGE}}{{#B_UNSAVED}}Unsaved edits{{/B_UNSAVED}}{{#B_DRIFT}}{{B_LABEL}}{{/B_DRIFT}}{{#B_OK}}In sync{{/B_OK}}{{/DRIFT_BADGE}}
{{#ERROR}}
{{ERROR}}
{{/ERROR}} {{#FLASH}}
{{FLASH}}
{{/FLASH}} {{#APPLY_JOB}}
{{APPLY_JOB_TITLE}}
This can take up to a couple of minutes (bgpd -n runs on the router); the page will update when it completes.
{{/APPLY_JOB}} {{#PENDING}}

Confirm BGP change

A live BGP change by {{PENDING_ACTOR}} is awaiting confirmation and reverts automatically in {{PENDING_REMAINING}} seconds unless you keep it. If the change severed your own path to this box, simply do nothing — the previous routing configuration restores itself.

{{#PENDING_REVERT_FAILED}}
Automatic revert failed — the routing configuration may be in an inconsistent state. The change keeps retrying in the background; if it persists, resolve it from the console.
{{/PENDING_REVERT_FAILED}} {{#WRITE}} {{/WRITE}}
{{/PENDING}} {{#PENDING_OTHER}}
A confirm window is open on {{PENDING_OTHER_SVC}} — resolve it on that page before applying routing changes.
{{/PENDING_OTHER}} {{#ADOPTION}}

Existing routing configuration detected

This router has an unmanaged routing configuration. Applying from this page takes ownership of it. Any existing bgpd config is preserved to bgpd.conf.preadopt before the first overwrite, and shown read-only here — it is never imported automatically.

{{#LIVE_PREVIEW_TRUNCATED}}

Preview truncated — the full file is preserved on adoption.

{{/LIVE_PREVIEW_TRUNCATED}}
{{/ADOPTION}}
Configured {{ENABLED_LABEL}} bgpd {{RUNNING_LABEL}} Route policy {{POSTURE_LABEL}}
{{#ENABLED_DRIFT}}

The bgpd service state does not match the configuration — applying re-synchronizes it.

{{/ENABLED_DRIFT}} {{#DRIFT_PENDING_NOTE}}

A confirm window is open — the live /etc/bgpd.conf intentionally differs from the saved configuration until the change is confirmed or reverted.

{{/DRIFT_PENDING_NOTE}} {{#FWD_OFF_WARN}}

⚠ BGP is enabled but IPv4 forwarding is off — this router peers and announces routes but will not forward transit traffic. Enable it under Setup → Network tuning.

{{/FWD_OFF_WARN}}

Route policy

How this router treats routes it learns from peers. The posture is the single most important BGP safety setting.

{{#CAP_BGP_TRANSIT}} {{/CAP_BGP_TRANSIT}} {{#NO_TRANSIT}} {{/NO_TRANSIT}}

Peering is by IP address. Each neighbour shows a 🔒 MD5 or ⚠ no auth chip: assign a TCP-MD5 session key (RFC 2385) in the Neighbours tab to protect a session against on-path injection or reset. Manage keys under Authentication below.

BGP router

Editing a neighbor description reloads bgpd without dropping BGP sessions; adding or removing neighbors, or changing the router ID, AS numbers, MD5 keys, filters, or other options restarts it, briefly resetting sessions.

A private AS (64512–65534, or 32-bit 4200000000–4294967294) is the usual choice unless an upstream assigned you one. Connect-retry (1–3600s, default 120) is how long bgpd waits before retrying a failed outbound connection.

{{BGP_MGMT_ADVISORY}}
{{#ADOPTION}} {{#WRITE}} {{/WRITE}} {{/ADOPTION}} {{#TRANSIT_CONFIRM}} {{/TRANSIT_CONFIRM}} {{#WRITE}} {{/WRITE}} {{#WRITE}} {{/WRITE}}

BGP authentication keys {{BGP_KEY_COUNT}}

TCP-MD5 (RFC 2385) session keys, held in the secret store. Assign a key to a neighbour in the Neighbours tab — the value is write-only and is never displayed here or in the rendered config. Both ends of a session must share the same key. Changing a key's value takes effect only after you re-apply BGP (the session is reset to pick up the new key).

{{BGP_KEY_ROWS}}
{{#SECRET_WRITE}}
 

Stored under a bgp- name. The passphrase may be up to 80 printable characters (no quotes, backslash or spaces); an over-long key is rejected when you apply BGP.

{{/SECRET_WRITE}}
Live peer event log (bgpd)
Open to stream bgpd events.
TimeSourceProgramMessage

Scoped to the bgpd tag in /var/log/daemon. Apply a change above, then watch handshake / notification events here in real time. Requires the log:*:read capability.