Page MenuHomeVyOS Platform

Add an option to import routes from a non-default table into the system RIB
Closed, ResolvedPublicFEATURE REQUEST

Description

Summary
Add FRR ip import-table x feature to import routes from non-main kernel table

Use case

Import routes to the table main from the kernel table X
For example, if we want to import routes from Table 220 (Added by Strongswan and we cannot use VRF for this)

Example of config:

set protocols ospf area 0.0.0.0 network '192.0.2.0/30'
set protocols ospf parameters router-id '192.0.2.2'
set protocols ospf redistribute table 10

sudo ip route add blackhole 10.5.1.0/24 table 10
sudo ip route add blackhole 10.5.2.0/24 table 10
sudo ip route add blackhole 10.5.3.0/24 table 10

vtysh -c "conf t" -c "ip import-table 10"

check routes:

vyos@right:~$ show ip route 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

T[10]>* 10.5.1.0/24 [15/0] unreachable (blackhole), 00:33:07
T[10]>* 10.5.2.0/24 [15/0] unreachable (blackhole), 00:33:07
T[10]>* 10.5.3.0/24 [15/0] unreachable (blackhole), 00:33:07
O   192.0.2.0/30 [110/1] is directly connected, eth0, weight 1, 00:44:04
C>* 192.0.2.0/30 is directly connected, eth0, 00:44:11
C>* 192.168.122.0/24 is directly connected, eth3, 00:44:09
vyos@right:~$

Expected entries in the OSPF database:

vyos@right:~$ show ip ospf database | grep External -A 5
                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
10.5.1.0       192.0.2.2         70 0x80000001 0x01e8 E2 10.5.1.0/24 [0x0]
10.5.2.0       192.0.2.2         70 0x80000001 0xf5f2 E2 10.5.2.0/24 [0x0]
10.5.3.0       192.0.2.2         70 0x80000001 0xeafc E2 10.5.3.0/24 [0x0]
vyos@right:~$

There also should be other use cases.

Additional information
n/a

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

Viacheslav triaged this task as Normal priority.
a.apostoliuk changed the task status from Open to In progress.May 22 2025, 7:44 AM
a.apostoliuk changed the task status from In progress to Needs testing.Jun 5 2025, 9:15 AM
a.apostoliuk changed the task status from Open to In progress.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.Jul 9 2025, 12:52 PM
dmbaturin renamed this task from Add FRR ip import-table x feature to import routes from non-main kernel table to Add an option to import routes from a non-default table into the system RIB.Jul 17 2025, 10:24 AM