A problem has surfaced about loadbalance and DNS.
The first Internet interface can be either PPPoE, DHCP, or Static; the rest (2, 3, 4) are Static. DNS servers and GW are assigned for PPPoE or DHCP and you enter it in by hand for a Static line. All is OK (not really) until the first Internet connection goes down. Then you are dead. No DNS except what your browser has learnt or is in the DNS cache of BFW or in the respective host files. What! you don't use BFW DNS cache?? You are really dead.
This effect can be seen in this thread viewtopic.php?f=3&t=63812 where Wilful is trying loadbalance. His system dies after he loses the PPPoE line. The second Internet connection is good but the DNS of the first ISP refuses queries from that network because most ISPs do not service DNS queries unless it comes from their network and there is no guarantee the request will go out on the proper Internet connection.
In practice one of the very first things that would occur after a boot is a DNS request and it should go out on the first Internet connection and you are good but no guarantee. What if a ping goes out first. Line 1. Then a DNS query to line 2, query refused, then next DNS server on line 1 again and you are good again unless you have 3 or more lines. This is untested and is theory only.
Next problem: rc.line_up calls rc.loadbalance each time the line(s) are brought up thus many entries occur for the same rules. This can also be seen in the thread mentioned above.
Next problem: There is no detection for a line going down. PPPoE and DHCP would keep on trying to connect to the ISP by themselves but their gateways would still be on the next hop list and traffic would fail. We just created a script for this within the last week. I called mine loadbalance.check Marcos do Vale called his keepalive.sh
Next problem: There is no way to ensure that the DNS request goes out to the ISP through their line. No automatic way for a script to deduce that from a bootup so a method to do this has to be manual. This is being tried in the thread mentioned above.