Merging multiple routes into a single multipath route

Alexander Zubkov green at qrator.net
Wed May 4 00:16:45 CEST 2022


If you able to set different metrics than probably you can set
different tables on that dhcp routes? In that case it will be
different kernel protocols in bird. You can also try to set different
"tos" to your dhcp routes, Linux kernel treats different tos as
different routes so dhcp clients would not conflict. Also ensure that
when dhcp client deletes route, it deletes only its own route, i.e.
additional attributes like metric/table/tos should be added to the
delete statement too.
On Tue, May 3, 2022 at 10:11 PM Johannes Erwerle <jo+bird at swagspace.org> wrote:
>
> Well, some observations:
>
> You need to make sure that the dhcp client assigns the default routes
> with different metrics so they appear in the kernel routing table in the
> first place.
>
> Also it appears like bird imports only the first default route:
>
>
>
> # bird.conf
> filter test {
>         print net, " interface: ", ifname;
>         accept;
> }
>
> protocol kernel {
>         ipv4 {
>               import filter test;
>               export none;
>         };
>         learn;
> }
>
> root at host-1:/etc/bird# ip r
> default via 172.21.0.1 dev bond0.300
> default via 172.21.101.1 dev eno1 metric 200
> <... snip ...>
>
> root at host-1:/etc/bird# birdc show route all
> BIRD 2.0.7 ready.
> Table master4:
> 0.0.0.0/0            unicast [kernel1 21:54:15.332] (10)
>         via 172.21.0.1 on bond0.300
>         Type: inherit univ
>         Kernel.source: 3
>         Kernel.metric: 0
>
>
> I assume this is an intended behavior, because a second route with a
> higher metric would usually not be used?
>
> Greetings
> Jo


More information about the Bird-users mailing list