On Wed, Nov 14, 2018 at 08:21:12AM +0100, Lukas Liebig wrote:
Hello,
I use BIRD 2.0.2 and want the OSPF daemon to announce the Linux kernel routing metric. For instance, if I run "ip route add table 44 to 10.2.3.0/24 metric 1234 dev eth0", I want this route to propagate into BIRD. Therefore I use the kernel protocol configured like this:
protocol kernel { ipv4 { export all; import all; }; learn; kernel table 44; scan time 10; }
My OSPF instance reads data from table master4. "show ospf state" displays my kernel route as "external", but with "metric2 10000". According to the documentation https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.6 I tried to use metric 0; but without any effect. Do I overlook something essential?
Hi Kernel metric is stored in attribute krt_metric, OSPF metric is set by attribute ospf_metric1 or ospf_metric2. Therefore the required behavior could be achieved by: ospf_metric2 = krt_metric; in either kernel import filter or OSPF export filter. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."