I use 1 ubuntu as gateway with 2 gateway internet:
eno3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d4:be:d9:f8:82:7a brd ff:ff:ff:ff:ff:ff
inet 10.11.12.3/24 brd 10.11.12.255 scope global eno3
valid_lft forever preferred_lft forever
inet6 fe80::d6be:d9ff:fef8:827a/64 scope link
valid_lft forever preferred_lft forever
eno4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d4:be:d9:f8:82:7c brd ff:ff:ff:ff:ff:ff
inet 192.168.1.7/24 brd 192.168.1.255 scope global dynamic eno4
valid_lft 45456sec preferred_lft 45456sec
inet6 fe80::d6be:d9ff:fef8:827c/64 scope link
valid_lft forever preferred_lft forever
I use this command to split the packets evenly between 2 gateway internet:
ip route add default
nexthop via 192.168.1.1 dev eno4 weight 1
nexthop via 10.11.12.2 dev eno3 weight 1
here is my hostnamectl command output:
Icon name: computer-server
Chassis: server
Machine ID: 05347957aee242939b05284f3a25313f
Boot ID: 2d1adf269c6d4e9cacffc843ebd386a8
Operating System: Ubuntu 18.04.5 LTS
Kernel: Linux 4.15.0-144-generic
Architecture: x86-64
Everything went perfect. The client can go to the internet under both gateway, download and upload perfect.
What I wonder about here is how it did? I know the above command uses linux routing cache, but starting from linux 3.6 routes are not cached anymore, all caching code was removed for IPv4. So how did it when the client's connection sessions were still preserved and perfect