Author: Bob Bonomo
URL: http://www.brazilfw.com.br/downloads/addons/bfw2.x/others/loadbalance.check/loadbalance.check.tgz
Add-on State: Untested in the real world
Add-on Version: 2008/03/26
System Version Required: 2.30+
Other Packages Required: None
Other Packages Conflict: None
Description:
The script checks the status of all Internet lines and keeps their states. If the current state is not the same as the previous then routing table 222 is flushed and recreated to reflect the status of the lines. Error status and new states are logged. Routing table 222 does the actual balancing.
Installation Instructions:
Standard Installation
Utilization Instructions:
You need to schedule the script loadbalance.check using Scheduled Tasks of the Webadmin menu. Suggested 15-20 minutes.
History:
2008/03/26 - Package released
2008/11/18 - New version released - Made some variables user configurable. See threads below
Original thread: http://www.brazilfw.com.br/forum/viewtopic.php?f=3&t=63584
Disclaimer:
It was discovered during testing that if there is residue in the fields for second, third, or fourth Internet link then the load balancing will not get configured properly. The main field is the IP address. If someone leaves that filled and blanks out any of the other 4 fields then the logic for loadbalancing will execute with NULL variables and the routing table will not be set. This is tested.
This problem exists for this script also so I say that if your external WANs are properly configured then this script will work.
TO DO:
Discover the new gateway if the device has changed MAC address.