Page MenuHomeVyOS Platform

FRR 9.1.x 10.2.x does not redistribute OSPF kernel table x routes
Open, NormalPublicBUG

Description

There is a bug with FRR 9.1.x.+, 10.2.+ that does not redistribute routes from Table X into OSPF.

Simple diagram

ospf-table.png (234×468 px, 14 KB)

To reproduce, add kernel routes in a table and redistribute this table into OSPF

VyOS left configuration (FRR 7.5.1):

set interfaces ethernet eth0 address '192.0.2.1/30'
set protocols ospf area 0.0.0.0 network '192.0.2.0/30'
set protocols ospf parameters router-id '192.0.2.1'
set protocols ospf redistribute kernel metric-type '2'

sudo ip route add blackhole 100.64.1.0/24 table 10
sudo ip route add blackhole 100.64.2.0/24 table 10
sudo ip route add blackhole 100.64.3.0/24 table 10

VyIS right configuration (FRR 9.1.2):

set interfaces ethernet eth0 address '192.0.2.2/30'
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 kernel metric-type '2'

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

Check the database on the router left expected kernel routes 100.64.x.0/24 in the database

vyos@left:~$ show ip ospf database 

       OSPF Router with ID (192.0.2.1)

                Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
192.0.2.1       192.0.2.1        703 0x80000008 0x75bc 1
192.0.2.2       192.0.2.2        694 0x80000009 0xce68 1

                Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum
192.0.2.1       192.0.2.1        703 0x80000001 0x8ac2

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
100.64.1.0      192.0.2.1        798 0x80000002 0xa7ac E2 100.64.1.0/24 [0x0]
100.64.2.0      192.0.2.1        792 0x80000002 0x9cb6 E2 100.64.2.0/24 [0x0]
100.64.3.0      192.0.2.1        789 0x80000002 0x91c0 E2 100.64.3.0/24 [0x0]

vyos@left:~$

And we see those routes on the router right all works fine:

vyos@right:~$ show ip route ospf | grep 100.64
O>* 100.64.1.0/24 [110/20] via 192.0.2.1, eth0, weight 1, 00:13:14
O>* 100.64.2.0/24 [110/20] via 192.0.2.1, eth0, weight 1, 00:13:14
O>* 100.64.3.0/24 [110/20] via 192.0.2.1, eth0, weight 1, 00:13:14
vyos@right:~$

Check the database on the router right expected kernel routes 10.5.x.0/24 NOT IN THE DATABASE

vyos@right:~$ show ip route table 10
Codes: K - kernel route, C - connected, S - static, R - RIP,

VRF default table 10:
K>* 10.5.1.0/24 [0/0] unreachable (blackhole), 00:06:22
K>* 10.5.2.0/24 [0/0] unreachable (blackhole), 00:06:19
K>* 10.5.3.0/24 [0/0] unreachable (blackhole), 00:06:17
K>* 10.5.4.0/24 [0/0] unreachable (blackhole), 00:17:02
vyos@right:~$ 
vyos@right:~$ 
vyos@right:~$ show ip ospf database 

       OSPF Router with ID (192.0.2.2)

                Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
192.0.2.1      192.0.2.1        951 0x80000008 0x75bc 1
192.0.2.2      192.0.2.2        941 0x80000009 0xce68 1

                Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum
192.0.2.1      192.0.2.1        952 0x80000001 0x8ac2

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
100.64.1.0     192.0.2.1       1046 0x80000002 0xa7ac E2 100.64.1.0/24 [0x0]
100.64.2.0     192.0.2.1       1040 0x80000002 0x9cb6 E2 100.64.2.0/24 [0x0]
100.64.3.0     192.0.2.1       1038 0x80000002 0x91c0 E2 100.64.3.0/24 [0x0]

vyos@right:~$

Of course, we don't see such routes on the router left due to this bug

vyos@left:~$ show ip  route ospf 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,

O   192.0.2.0/30 [110/10] is directly connected, eth0, weight 1, 00:19:17
vyos@left:~$

Opened a bug report for FRR https://github.com/FRRouting/frr/issues/18542

Details

Version
VyOS 2025.03.27-0018-rolling, 1.4.1
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)
Story points
5

Event Timeline

Viacheslav triaged this task as Normal priority.
Viacheslav renamed this task from FRR 9.1.x does not redistribute OSPF kernel table x routes to FRR 9.1.x 10.2.x does not redistribute OSPF kernel table x routes.Sat, Mar 29, 10:21 AM

SUMMARY:
working versions:

7.5.1-20240509-02-gc9dd2977e
8.0.1

Not working:

8.1
8.2.2
8.3-2 
9+
10+