Injecting OSPF learned routes (only)

Nico Schottelius nico.schottelius at ungleich.ch
Tue Feb 27 04:30:28 CET 2024


Good morning bird users,

I am a bit puzzled about properly adding OSPF learned routes into the
kernel and let me show you why:

If I use a filter such as:

filter static_and_bgp_and_ospf {
  if(source = RTS_STATIC || source = RTS_BGP || source = RTS_OSPF) then accept;
  reject;
}

And configure the kernel to use it like this:

protocol kernel kernel_v4 {
        ipv4 { export filter static_and_bgp_and_ospf; };
}

protocol kernel kernel_v6 {
        ipv6 { export filter static_and_bgp_and_ospf; };
}


Then I get route duplications in the kernel:

[04:29] server123.place10:~# ip r | grep 147.78.195.224/27
147.78.195.224/27 dev eth1 proto kernel scope link src 147.78.195.254
147.78.195.224/27 dev eth1 proto bird scope link metric 32

The reason for that semes:

- server123 has the route because of an interface address
- other hosts in the network also have an interface in that network

While this is not necessarily a big problem, it seems wrong to inject
the route, because we learned it from OSPF, even though we already had
it in the first place.

How do you usually handle inserting OSPF learned routes? Do you just
have them duplicate or do you have some logic that resembles..

     "If I already have that route and I receive it again from outside
      (such as OSPF), do not inject it again"

?

Looking forward to read how you handle this logic!

Best regards from Seoul,

Nico

--
Sustainable and modern Infrastructures by ungleich.ch


More information about the Bird-users mailing list