Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Load Balancing WAN using NFTables

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
blee
Posts: 3
Joined: 2020-03-29 03:40

Load Balancing WAN using NFTables

#1 Post by blee »

I use 2 cellular connections; WWAN0 and WWAN1
Using Debian Buster
NFTables
all latest updates

So far I have route setup for nexthop:

Code: Select all

root@raspberrypi:/home/pi# ip route show
default
        nexthop via 100.195.xx.xx dev wwan0 weight 100
        nexthop via 10.71.yy.yy dev wwan1 weight 100
default via 10.71.yy.yy dev wwan1 proto dhcp src 10.71.yy.yz metric 20
default via 100.195.xx.xx dev wwan0 proto dhcp src 100.195.xx.xz metric 20
10.10.1.0/24 dev eth0 proto kernel scope link src 10.10.1.1
10.71.yy.yy/30 dev wwan1 proto kernel scope link src 10.71.yy.yz
10.71.yy.yy dev wwan1 proto dhcp scope link src 10.71.yy.yz metric 20
100.195.xx.xx/30 dev wwan0 proto kernel scope link src 100.195.xx.xz
100.195.xx.xx dev wwan0 proto dhcp scope link src 100.195.xx.xz metric 20
I am looking to load balance these connections and at the moment it is working. I added them manually using nexthop gateway. when I restart, I will not know the nexthop gateway until i check and manually add again, with this command:

Code: Select all

ip route add default scope global nexthop via xxx.xxx.xxx.xxx dev wwan0 weight 100 nexthop via yyy.yyy.yyy.yyy dev wwan1 weight 100
I am open to other suggestions on how to achieve a decent load balancer. I would like to stay efficient as possible with little processing and memory use.
If anyone is slick with writing scripts and knows of one I can use to call for the next hop gateway to run on startup. I would be humbled if you could share.

Thank you

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Load Balancing WAN using NFTables

#2 Post by Head_on_a_Stick »

deadbang

Post Reply