On Fri, 2008-07-25 at 08:17 -0600, Ed Brown wrote:
> Brian Long wrote:
> > I believe what the OP is saying is that he would like two default
> > routes.  If traffic comes into eth0 from a non-local subnet, he'd like
> > the replies to go out eth0.  If traffic comes into eth2 from a non-local
> > subnet, he'd like the replies to go out eth2.
> > 
> > If his network contains hundreds of subnets and he's situated this host
> > somewhere in the middle, setting hundreds of static routes for eth0 and
> > hundreds for eth2 is not a manageable solution.
> 
> By definition, a 'default route' is where to send traffic that has no 
> other known routing.  There can't be two 'default routes'.  I think 
> static routes are the only way to accomplish this.

Well, actually, there can be.  Certainly, the most common method of
determining a "default" route is to have a single default route that is
used for any destination network that is not specifically known in the
routing table, however, by using policy based routing, you can add
significantly more complex logic to this decision.

Some of the simplest options are simply to have two "default routes"
based on the source IP address.  That way, a service on bound to one
address would use one "default route" and a service bount to another IP
address would use a different "default route".

By combining policy routing with IP tables, using IP tables to mark
packets for specific routes, you can gain even more control.  You can do
things like send all web traffic via one default route, and all email
traffic via the other.  The ability to use criteria other than the
destination IP address for determining a default route has been part of
most routers, and Linux, for a very long time.

Some links:

http://www.linuxjournal.com/article/7134
http://www.linuxjournal.com/article/7291
http://www.policyrouting.org/PolicyRoutingBook/ONLINE/TOC.html

Later,
Tom




_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to