This is NOT possible, given only the configuration you've described. Link aggregation (or "bonding", as it's sometimes called) cannot provide load balancing or failover between multiple upstream providers. Your current configuration does not appear to serve any useful purpose, unless you are leaving out some important routing and/or IP configuration details.
Link aggregation is strictly a layer 2 (Ethernet) protocol. It can provide load balancing and/or failover when you have multiple physical Ethernet links to a single upstream switch or host. But two different DSL uplinks (even if they link to the same provider) are two different devices. Bonding multiple DSL lines is possible, and so is bonding multiple T1 lines, if the router/bridge devices that terminate the telco loops (i.e., the DSL box you plug into your phone line) support the same protocol-specific (e.g., T1, DSL, etc.) bonding technique.
Your FreeBSD host cannot bond multiple DSL links unless you install DSL cards in it that offer that feature. And even then, your ISP would have to support bonding at their DSLAM (the equipment at the other end of your DSL lines, in the phone company CO).
Load balancing and/or failover of IP traffic, using multiple upstream links, MUST be handled with routing techniques (Layer 3, IP).
To be fair, I may have assumed too much about the details you left out. Could you update your question with some more information about your configuration?
- What IP addresses are bound to re0, re1, and/or lagg0?
- Have you configured a single upstream gateway route, or are you using a more complex routing setup (dynamic routing daemons, IP forwarding/header rewriting, source IP-based routing rules, etc.)?
- If you're using a complex routing setup, could you describe it in detail?
- Do your two DSL phone lines terminate in a single device (AKA modem, router, bridge, etc.), or does each DSL line have its own box? If the two lines share one box, do you have both re0 and re1 plugged directly into that box?
- Do your DSL lines come from the same ISP? If so, does your ISP support DSL bonding? If so, is your current service plan set up for bonding? (i.e., did you order bonded DSL lines, and have they set you up for bonding?)
What I ended up doing was this:
Created a new Address Object under the Network > Address Objects menu. Click Add under "Address Objects", Put the name of the object, such as "Datacenter".
Zone assignment: WAN
Type: Network
Network: xx.xx.xxx.xxx
Netmask: 255.255.255.248
Click Add.
Next, Under Network > Routing
Click Add.
For Source, put in the LAN interface subnet, in my case I put in X0
For Destination, Select the Object we just created, "Datacenter"
Service, Any (you can do FTP, HTTP, Etc only, if you want)
Gateway: Default Gateway
Interface: X1 (WAN Interface you wish the traffic to pass through)
Comment: Datacenter over PRI
Click "Disable Route when the interface is disconnected" to allow for the WAN failover to still function, and traffic to reach the host if the interface is down.
Click Ok, and you're done!
Best Answer
Yes by using static routes. If you're beginner, this is easily done through the web interface by logging on to
https://your.router.ip/
Using web interface go to Router > Static > Static Route > Create new.
Put destination in Destination IP/Mask field and select Device wan2, in Gateway field you're supposed to put IP address of the next hop router, which would probably be your ISP router (this is if you have static ip on your wan2 interface, if it's some DSL line with dynamic ip you can leave the zeros)
This makes all traffic that goes to the network you put in Destionation IP/Mask field go through wan2 interface