The most effective way to use a multihomed router is to use BGP. To do this you'd need several things: an ASN, PI or PA address space of a /24 for IPv4 or a /48 for IPv6 and upstream ISP's who will do connect to you over BGP.

Assuming you're dealing with a more consumer/residential type scenario there are a number of appliances that will do this. Assuming you're using NAT with two different public addresses you'll have to maintain existing connections across the same link otherwise if you change IP addresses in the middle of an established connection the other side will drop/kill the unexpected new IP address' packets. I am not sure if Fatpipe is still around but they've had appliances that will handle this. There are others too. 

If you want to go homegrown then you'll have to start digging into iptables and get very familiar with the snat commands and write some wrapper scripts around iptables to make changes on the fly. There may be some applications out there that do this already I don't know, have not looked. I know pf on BSD systems can do this pretty well but that is not Ubuntu obviously. 






<div>-------- Original message --------</div><div>From: gregrwm <tclug1 at whitleymott.net> </div><div>Date:10/31/2014  12:56 PM  (GMT-06:00) </div><div>To: tclug-list at mn-linux.org </div><div>Subject: [tclug-list] two gateways </div><div>
</div>when two gateways are available, i want to monitor response times and use whichever is responding	better.  this raises several questions.  this is presumably the sort of thing heavyweight routers do all the time?  but my peon ubuntu probably needs either special software or clever configuration?  an established connection is confined to its established route, or not necessarily?  for worthwhile pointers i would be very grateful, tia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20141101/93c7aeb1/attachment.html>