[CentOS] assigning "best" gateway via DHCP

Joseph L. Casale JCasale at activenetwerx.com
Fri Jun 13 17:13:16 UTC 2008


>This is a good idea, thanks.  So, I'm assuming that you mean something
>like this?
>
>http://tldp.org/HOWTO/IP-Masquerade-HOWTO/

Yeah,
I don't know how "sexy" the solution would be, but you could poll for throughput/availability
with a script, then rewrite the iptables rule for example taking the new, preferred outside route as
your new external IP to masq with. It would be functional, and given the external link your moving
away from is likely down you probably don't have to worry about existing connections, or do you? :)

Once you rewrite the rule and refresh it, current connections getting masq'ed will be killed. If your
in the middle of secure connection to something/someone or a download, it will be terminated.

There is *no* way of maintaining any connection between different paths in this situation unless you
specifically have something setup with your provider that is aggregated across {n} connections, but then
we wouldn't be discussing this:)

jlc



More information about the CentOS mailing list