Score:1

Load balancing and failover using nmcli

ru flag

I would like to use nmcli (NetworkManager, on CentOS) to balance the load from the subnet 172.22.0.0/24 across the two gateways (.3 and .1) on the 192.168.1.0/24 subnet. These two gateways are connected to two different ISP commercial fiber-optic routers. The network looks like this:

network diagram

And the three NICs on balancerouter look like this:

===============================================================================
                            Device details (enp2s0)
===============================================================================
IP4.ADDRESS[1]:                         192.168.1.22/24
IP4.GATEWAY:                            192.168.1.3
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.1.3, mt = 101
IP4.ROUTE[2]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 101
IP4.DNS[1]:                             9.9.9.9
---------------------------------------------

===============================================================================
                            Device details (enp1s0)
===============================================================================
IP4.ADDRESS[1]:                         172.22.0.1/24
IP4.GATEWAY:                            --
IP4.ROUTE[1]:                           dst = 172.22.0.0/24, nh = 0.0.0.0, mt = 100
IP4.DNS[1]:                             9.9.9.9
---------------------------------------------

===============================================================================
                            Device details (enp3s0)
===============================================================================
IP4.ADDRESS[1]:                         192.168.1.23/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 102
IP4.ROUTE[2]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 102
IP4.DNS[1]:                             9.9.9.9
---------------------------------------------

At the moment all traffic from 172.22.0.0/24 is routed through 192.168.1.3, because (I believe) the mt (metric) value is lower than that of 192.168.1.1.

Can I use nmcli to 'load balance' traffic from 172.22.0.0/24 between 192.168.1.1 and 192.168.1.3 and to ensure failover if one of the ISP routers stops working?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.