10

For a long time (2 years?) I have been running a virtual machine (Ubuntu 12.04 server) with a very basic outbound load balancing capability, sending different outbound connections out different ADSL routers.

Configured simply by using iproute with no NAT masquerade, NAT is managed by the outbound ADSL routers themselves allowing connections to route directly back to sender bypassing the load balancing router VM. There are also no firewall rules (iptables) on the router VM.

echo 1 > /proc/sys/net/ipv4/ip_forward

# flush initially
ip route flush cache

# remove whatever is there for the default to begin with
ip route delete default

# default load balancing rule
ip route add default scope global \
    nexthop via ${ROUTER2} dev ${INTERFACE} weight 6 \
    nexthop via ${ROUTER1} dev ${INTERFACE} weight 4

This has worked well for a long time.

I have recently upgraded (do-release-upgrade -d) the load balancer (Ubuntu 12.04 server virtual machine) to Ubuntu 14.04.

Since the upgrade internet connections using the above "ip route add default" command are causing sporadic connection issues and creating an unusable experience. Almost as if individual packets are being sent across both routers and not full connections.

This has been attempted with a second 14.04 virtual machine with the same effect.

I would love to have the same functionality on Ubuntu 14.04 (current kernel: 3.13.0-24). I don't understand what has changed.

Any suggestions?

4
  • A lot of people are complaining about network issues. Can you upgrade your kernel to 3.14? Here are some installation instructions: linuxg.net/…
    – Sacx
    Apr 29, 2014 at 10:10
  • Upgrading to 3.14 killed the VM. Kernel panic. Maybe I didn't do it right, but I did follow those instructions. Meanwhile, I have downgraded to 12.04 (re-installed VM) to continue to use the old working functionality, support until 2017 is probably OK. Apr 30, 2014 at 11:15
  • So people are aware, I am no longer in need of this solution (changed jobs) so I will not know if I can get this working in 14.04. Sep 22, 2014 at 8:12
  • are both routers in the same L3 network? best to have 1 subnet per NIC/route.
    – user158798
    Feb 28, 2015 at 3:23

1 Answer 1

2

I realize the original poster is no longer in need of a solution, but here's my take on the best solution for this issue. I also realize the poster would prefer to use Ubuntu, but configuring the routing rules manually like that isn't great for transferring ownership to others or even referencing yourself years later.

I personally would suggest a more robust setup using a PFSense VM to load balance the connections. I'd probably also suggest performing NAT on the PFSense box itself rather than on the modems. I have something similar to this configured in a VM and it works well.

For the connections between the modems and the PFSense VM, I use a vlan capable switch to connect 3 separate VLans to the VM, and break those out to 3 separate ports on the switch. This in effect provides a direct (virtual) cable from each modem to the pfsense box and another cable out to the lan. You can then configure the modems for passthrough, which varies from provider to provider.

It's true that this sidesteps the problem rather than addressing it directly, but putting the NAT on the modems themselves seems to me like just asking for trouble. Also, PFSense is specifically designed as a prepackaged router solution, so it supports and will continue to be tested with configurations like this, ensuring better reliability through upgrades.

1
  • this answer may have been better as a comment, but I don't have the reputation for that. Apr 2, 2015 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .