I have the following two devices tun-1
and tun-2
. They have the same ip address 21.2.0.3
and the same gateway 21.2.0.1
(each gateway points to a different device/VM, they just happen to have the same IP). I am trying to set up a ECMP(equal cost multipath) so that the forwarded request can be sent out randomly from any of the tun
devices.
The below command works in the kernel 4.4 with ip tool iproute2-ss130716
, but it fails with RTNETLINK answers
error in the kernel 4.19 with ip tool iproute2-ss170501
.
$ip route add default \
nexthop via 21.2.0.1 dev tun-1 weight 1 \
nexthop via 21.2.0.1 dev tun-2 weight 1
RTNETLINK answers: Invalid argument
21.2.0.0/24 dev tun-1 proto kernel scope link src 21.2.0.3
21.2.0.0/24 dev tun-2 proto kernel scope link src 21.2.0.3
I want to use kernel 4.19 so that I can use the L4 hash for the ECMP setup.
I wonder what the problem it is, and how to fix it? Is it just the ip tool version issue or it is kernel issue?