Setting ONLINK flag for arbitrary routes
Hi Is it possible to set the ONLINK flag for arbitrary routes? The use case is a common setup in mesh networks: All devices have a /32 assigned to the interface and advertise this as the nexthop for v4 routes. The routing protocol then installs all kernel routes as onlink, allowing routes to be installed even though the nexthop is not in the same subnet as the local link address. Is this possible to configure in Bird currently? -Toke
On Sun, Apr 29, 2018 at 10:54:06PM +0200, Toke Høiland-Jørgensen wrote:
Hi
Is it possible to set the ONLINK flag for arbitrary routes?
The use case is a common setup in mesh networks: All devices have a /32 assigned to the interface and advertise this as the nexthop for v4 routes. The routing protocol then installs all kernel routes as onlink, allowing routes to be installed even though the nexthop is not in the same subnet as the local link address.
Is this possible to configure in Bird currently?
Hi Onlink flag cannot be set in filters, it can be set by protocol code (currently done by Static and Kernel). Generally protocols are expected to validate next hop address by neigh_find2() before a route is propagated to nest. Babel does not do that, probably because of its beginning as IPv6-only implementation (which uses link-local addresses). It cannot be done currently, but it could be done by a simple patch, as most of infrastructure is here. See proto/static/static.c file for onlink handling. -- 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."
On 30 April 2018 00:27:43 CEST, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Sun, Apr 29, 2018 at 10:54:06PM +0200, Toke Høiland-Jørgensen wrote:
Hi
Is it possible to set the ONLINK flag for arbitrary routes?
The use case is a common setup in mesh networks: All devices have a /32 assigned to the interface and advertise this as the nexthop for v4 routes. The routing protocol then installs all kernel routes as onlink, allowing routes to be installed even though the nexthop is not in the same subnet as the local link address.
Is this possible to configure in Bird currently?
Hi
Onlink flag cannot be set in filters, it can be set by protocol code (currently done by Static and Kernel). Generally protocols are expected to validate next hop address by neigh_find2() before a route is propagated to nest. Babel does not do that, probably because of its beginning as IPv6-only implementation (which uses link-local addresses).
It cannot be done currently, but it could be done by a simple patch, as most of infrastructure is here. See proto/static/static.c file for onlink handling.
Ah, right, doing it in the protocol code would be easier. Will look into that and send a patch, thanks! -Toke
participants (2)
-
Ondrej Zajicek -
Toke Høiland-Jørgensen