How to make BIRD use the kernel routing metric?
Lukas Liebig
lukas.liebig91 at gmail.com
Wed Nov 14 16:22:59 CET 2018
Thank you for your answers! My problem is solved.
filter ospfExport
{
if defined( krt_metric ) && krt_metric > 0 && krt_metric < 16777216
then {
ospf_metric1 = krt_metric;
accept "accepted";
} else {
reject "rejected";
}
}
Am Mi., 14. Nov. 2018 um 14:43 Uhr schrieb Ondrej Zajicek <
santiago at crfreenet.org>:
> 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 at 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."
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20181114/e35300db/attachment.html>
More information about the Bird-users
mailing list