[FROG] kernel route redistribution via OSPF

HOSTAK Peter Peter.HOSTAK at frequentis.com
Mon Dec 20 17:02:17 UTC 2021


Hi all,

I have a question regarding redistribution of kernel routes with specific metric via OSPF6.
I have a very simple OSPF6 router definition:

interface eth0
ipv6 ospf6 area 0
exit
!
router ospf6
ospf6 router-id 8.8.8.81
redistribute kernel
exit

and I would like to redistribute the following sample kernel (static) routes:
ATN-DC-FRR-01# show ipv6 route kernel
K>* fca0:ffff::2/128 [0/50] via fc00::4, eth0, 3d23h32m
K>* fca0:ffff::3/128 [0/100] via fc00::4, eth0, 00:00:03

The problem is not to redistribute them via OSPF6 to another OSPF6 neighbor but to either redistribute them with the same OSPF metric (e.g. 50 or 100 as in my example above) or somehow set it using route maps (I have finite number of metrics to set).
Q1: Is it expected that the kernel route metric is ignored and default OSPF metric "20" is set instead? (it is a feature or a bug?)

I've also tried to set the metrics using route maps. Yes, it is possible to set it but there is no way to match "original" kernel route metric ("match metric XY" matches everything) and set it as OSPF metric.
Q2: What kind of metric "match metric" matches? In documentation I found only "matches the specified metric". Is it only an "IGP" metric (BGP, OSPF...) and kernel route metric is ignored?  "match metric 100" matches routes with any metric so I guess it is ignored.

In reality I have multiple kernel routes (static routes) which need to be assigned into pre-defined groups (finite number) and this assignment needs to be propagated somehow via OSPF to another OSPF neighbours (cisco boxes). Only usable parameter for such an assignment is a metric since there is no "tag" in "iproute" (I also tried "weight" which is not visible for FRR).

So, the idea is the following:
all the routes with metric e.g. 10 will be part of the group 1 and will get OSPF metric 10 and so on. Since it is group of kernel routes which have nothing in common (apart of group assignment), I can't use e.g. source IP or next-hop IP as matching criterion, but I need something more generic (like a tag) which I can use to label them.

Do you guys have an idea how to achieve it?

Thank you in advance.

Best regards
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/frog/attachments/20211220/b0ff1cdc/attachment.htm>


More information about the frog mailing list