[systemd-devel] systemd-networkd: multipath routes to LAN?
Matthew Berry
matthew.william.berry at gmail.com
Sun Mar 14 23:44:27 UTC 2021
Hello,
I'd like to create the following routes via systemd-networkd. I've
read through the systemd.network manpage and located the
MultiPathRoute= directive however the syntax in the manpage and also
in the function config_parse_multipath_route strongly suggest it requires
a gateway address. Although the default route has a gateway, the
multipath route to 10.0.0.0/16 does not because it's a directly
attached network. Is this functionality yet to be added to systemd or
is this a silly thing that I should not be doing in the first place?
$ ip route add 10.0.0.0/16 scope link \
nexthop dev lag0 \
nexthop dev lag1
$ ip route add default \
nexthop via 10.0.0.1 dev lag0 \
nexthop via 10.0.0.1 dev lag1
$ ip route
default
nexthop via 10.0.0.1 dev lag0 weight 1
nexthop via 10.0.0.1 dev lag1 weight 1
10.0.0.0/16 scope link
nexthop dev lag0 weight 1
nexthop dev lag1 weight 1
10.0.0.8/29 dev lag0 proto kernel scope link src 10.0.0.9
10.0.0.16/29 dev lag1 proto kernel scope link src 10.0.0.17
For context, lag0 and lag1 are each two-link LAGs to redundant
switches on the 10.0.0.0/16 LAN. The desire to have routes to each /29
subnet is to avoid consuming inter-switch bandwidth needlessly. Either
switch is a valid path to the larger 10.0.0.0/16 network.
-Matt
More information about the systemd-devel
mailing list