Hi Johannes, On Tue, May 03, 2022 at 04:07:08PM +0200, Johannes Erwerle wrote:
I would like to use both uplinks via the linux multipath routing and I am searching for a way to "merge" both default routes that I get into one route with multiple next hops.
Is there a way to accomplish that with bird? (or any other tool?)
Instead of letting the dhcp client install the routes and then trying to massage them into shape you could do this directly by configuring the dhcp client appropriately. The isc-dhcp client actually and very good support for scripting in dhclient-*-hooks.d that lets you override what the dhclient-script (which handles the OS specific stuff) does by default. I have been working on a dhcp script myself to allow for VRRP redundancy on a DHCP managed interface. You should be able to use the neutralize_ip_change hack I use to override iproute2 commands called by dhclient-script for your purposes too: neutralize_ip_change () { ip () neutered_ip "$@" } neutered_ip () { : do stuff and call real "ip" command; } This works because dhclient-script (a bash script) sources the hooks so we can mess with the shell environment to override the "ip" command with a shell function that matches on the args and does whatever we want. Script attached since I haven't published it anywhere yet. Note this is only lightly tested so far but I'd be happy to help you make this work for your use-case. --Daniel