Once upon a time, Chris Adams <[EMAIL PROTECTED]> said:
> Linux can do routing based on source addresses with "ip rule" and the
> routing policy database.  I haven't done this myself (and don't have a
> test bed I could try it on at the moment), but based on looking at the
> list archives though, I would suggest something like:
> 
> ip route add default table 10 via 120.207.10.1 dev eth0
> ip route add default table 20 via 120.207.17.1 dev eth2
> ip rule add from 120.207.7.245/32 table 10
> ip rule add from 120.207.17.22/32 table 20
> ip route flush cache
> 
> See "man ip" for more information.

Also, this can be added via the RH interface scripts by setting files
like:

/etc/sysconfig/network-scripts/route-eth0:
default table 10 via 120.207.10.1 dev eth0

/etc/sysconfig/network-scripts/route-eth2:
default table 10 via 120.207.17.1 dev eth2

/etc/sysconfig/network-scripts/rule-eth0:
from 120.207.7.245/32 table 10

/etc/sysconfig/network-scripts/rule-eth2:
from 120.207.17.22/32 table 20

Then the standard ifup/ifdown scripts should initialize the policy
routing.
-- 
Chris Adams <[EMAIL PROTECTED]>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

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

Reply via email to