Skip to content

Commit ccf6650

Browse files
dcearaputnopvut
authored andcommitted
docs: Add dynamic routing (BGP) configuration guide.
Add a configuration and usage guide for OVN's dynamic routing feature covering IP route exchange with external routing daemons. The guide is incomplete on purpose, all of these configuration options are already described in the main ovn-nb man page and in the architecture document. The added value is some more details and a few examples. The guide includes: - Two examples: gateway router with BGP and distributed router with gateway ports. - Verification commands and best practices. Also update the architecture document with information that was missing: - Add hub-spoke to the redistribution options list. - Fix VRF table ID description to list the exact excluded values (0, 252, 253, 254, 255, 4294967295). - Add Routing Protocol Redirect section. - Add Port-to-Interface Mapping section. - Improve connected-as-host + local-only grouping. Also expand the dynamic-routing-v4-prefix-nexthop description in ovn-nb.xml to explain the RFC 5549 use case. Reported-at: https://redhat.atlassian.net/browse/FDP-3119 Assisted-by: Claude Opus 4.6, Claude Code Acked-by: Martin Kalcok <martin.kalcok@gmail.com> Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Mark Michelson <mmichels@redhat.com>
1 parent 8d5aa2c commit ccf6650

5 files changed

Lines changed: 441 additions & 8 deletions

File tree

Documentation/automake.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ DOC_SOURCE = \
2626
Documentation/topics/test-development.rst \
2727
Documentation/topics/high-availability.rst \
2828
Documentation/topics/dynamic-routing/architecture.rst \
29+
Documentation/topics/dynamic-routing/configuration-examples.rst \
2930
Documentation/topics/dynamic-routing/index.rst \
3031
Documentation/topics/incremental-processing/datapath-sync-graph.png \
3132
Documentation/topics/incremental-processing/evpn-arp-graph.png \

Documentation/topics/dynamic-routing/architecture.rst

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ accepts a comma-separated list of the following values:
288288
- ``lb`` --- The VIP address of each load balancer associated with this
289289
router and neighboring routers.
290290

291+
- ``hub-spoke`` --- Routes learned through OVN Interconnection (OVN-IC)
292+
from other routers, enabling hub-and-spoke propagation.
293+
291294
These options can also be set per logical router port, overriding the
292295
router-level setting for routes associated with that specific port.
293296

@@ -322,15 +325,18 @@ When the ``tracked_port`` field is set on an ``Advertised_Route`` record,
322325
``ovn-controller`` adjusts the route metric based on whether the tracked
323326
port is locally bound on this chassis. Routes for locally bound ports
324327
receive a higher priority (lower metric value), which causes the routing
325-
daemon to prefer the chassis that actually hosts the workload. This
326-
mechanism is particularly useful for host routes generated by the
327-
``connected-as-host`` redistribution mode.
328+
daemon to prefer the chassis that actually hosts the workload.
328329

329330
The ``dynamic-routing-redistribute-local-only`` option further refines
330331
this behavior: when set to ``true``, ``ovn-controller`` only installs
331332
routes on the chassis where the ``tracked_port`` is locally bound,
332333
preventing other chassis from advertising the route at all.
333334

335+
This is particularly useful with ``connected-as-host`` redistribution
336+
to ensure host routes are only announced from the chassis that owns the
337+
workload, providing optimal traffic forwarding and avoiding unnecessary
338+
traffic tromboning.
339+
334340
IP Route Learning
335341
-----------------
336342

@@ -391,8 +397,9 @@ The VRF routing table ID is determined by one of the following, in order
391397
of precedence:
392398

393399
1. The ``dynamic-routing-vrf-id`` option on the logical router, if set to
394-
a valid integer (1-4294967295, excluding reserved table IDs such as
395-
``RT_TABLE_MAIN`` and ``RT_TABLE_LOCAL``).
400+
a valid integer in the range (1-4294967294), excluding the reserved
401+
table IDs 252 (``RT_TABLE_COMPAT``), 253 (``RT_TABLE_DEFAULT``),
402+
254 (``RT_TABLE_MAIN``), and 255 (``RT_TABLE_LOCAL``).
396403

397404
2. The tunnel key of the logical router datapath, used as a fallback
398405
when ``dynamic-routing-vrf-id`` is not configured.
@@ -423,6 +430,57 @@ If ``dynamic-routing-maintain-vrf`` is ``false`` (the default), the VRF
423430
is expected to already exist on the chassis, managed by external tooling
424431
or configuration management.
425432

433+
Routing Protocol Redirect
434+
-------------------------
435+
436+
OVN can optionally redirect routing protocol control plane traffic from
437+
a logical router port to a logical switch port where an external routing
438+
daemon is listening. This allows the routing daemon to peer using the
439+
router port's IP addresses through an OVN-managed logical switch port.
440+
441+
Routing protocol redirect is entirely optional. The routing daemon can
442+
establish its BGP or BFD sessions completely outside of OVN --- for
443+
example, on a separate physical interface, a loopback, or any other
444+
interface that is not managed by OVN. Use this feature only when you
445+
want the routing daemon to peer using the logical router port's IP
446+
addresses through an OVN-managed logical switch port.
447+
448+
The ``routing-protocols`` option on a ``Logical_Router_Port`` specifies
449+
which control plane protocols to redirect:
450+
451+
- ``BGP`` --- Redirects TCP port 179 (BGP session establishment and
452+
keepalives).
453+
454+
- ``BFD`` --- Redirects UDP port 3784 (Bidirectional Forwarding
455+
Detection).
456+
457+
The ``routing-protocol-redirect`` option on the same port identifies the
458+
logical switch port where the routing daemon is bound. OVN installs
459+
logical flows to forward matching control plane traffic between the
460+
router port and the specified switch port.
461+
462+
For BGP unnumbered deployments, periodic IPv6 Router Advertisements can be
463+
enabled on the logical router port via the ``ipv6_ra_configs`` column.
464+
This provides automatic link-local address discovery, which is required
465+
for establishing BGP sessions over IPv6-only peering links that carry
466+
both IPv4 and IPv6 routes. In order for this to function, automatic address
467+
discovery needs to also be supported and configured on remote BGP peer.
468+
469+
Port-to-Interface Mapping
470+
-------------------------
471+
472+
When a chassis has multiple links toward the fabric, each running BGP
473+
independently, the ``dynamic-routing-port-name`` option on a logical
474+
router port restricts route learning to a specific Linux interface.
475+
``ovn-controller`` resolves the port name to a Linux interface. If the
476+
referenced port is bound locally, the interface name is discovered
477+
automatically.
478+
479+
When automatic discovery is not available (for example, the port is not
480+
bound locally), the ``dynamic-routing-port-mapping`` option on the
481+
``Open_vSwitch`` table provides an explicit mapping from logical port
482+
names to Linux interface names.
483+
426484
EVPN (Ethernet VPN) Integration
427485
-------------------------------
428486

0 commit comments

Comments
 (0)