Exporting multipath link routes from Linux kernel

Eugene Crosser crosser at average.org
Mon Jan 21 18:38:21 CET 2019


Hello all,

we do virtual hosting, and we provide routeable /32 addresses to the
guests. Kernel routes on the KVM host are link routes that look like this:

1.0.0.113 dev pub020304050612 proto static

They are picked up by bird and exported to the core router. When we
launch multiple guests with the same address on multiple hosts, this
results in an ECMP route on the core router, providing load balancing.

This all works fine until we launch more than one guest with the same
address on _one_ host. We create kernel multipath route that looks like
this:

1.0.0.115 proto static metric 10
	nexthop dev pub020304050612 weight 1
	nexthop dev pub020304050616 weight 1

Note that there is no "via" address in the hop configulations! This
actually works, i.e. connections originating from the host are balanced
between those guests. But bird refuses to pick up such route because of
the code here:

https://gitlab.labs.nic.cz/labs/bird/blob/master/sysdep/linux/netlink.c#L528

Questions:

1. What was the justification for disallowing gateway-less multipath
routes? Would it make sense to allow them (in the mainstream code)?

2. Would it be sufficient to simply drop the check for the presence of
the gateway address in the message, and return `first` even if gateway
address was not present?

Thank you,

Eugene

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20190121/356a4bb6/attachment.sig>


More information about the Bird-users mailing list