[CentOS] Multiple Internet facing Nics - Gateway issue

Fri Jul 3 20:08:26 UTC 2009
Doug Coats <dcoatshca at gmail.com>

So for those of you following this thread.  This is what I ended up with
that seems to be working.

/etc/iproute2/rt_tables


#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
1 Cable
2 T1
/etc/sysconfig/network-scripts/rule-eth2

# Creates Rule Cable
from xx.yy.51.46 table Cable
# Sets up the routing rule
from xx.yy.51.45 to default lookup Cable

/etc/sysconfig/network-scripts/rule-eth3

# Creates Rule T1
from aa.bb.166.2 table T1
# Sets up the routing rule
from aa.bb.166.2 to default lookup T1

/etc/sysconfig/network-scripts/route-eth2

# Sets up routing for Cable
xx.yy.51.44/30 dev eth2 src xx.yy.51.45 table Cable
default via xx.yy.51.45 table Cable
# Sets up main routing table for Cable
xx.yy.51.44/30 dev eth2 src xx.yy.51.45
# Sets up default route
default via xx.yy.51.46
# Sets up route for internal network
192.168.4.0/24 dev eth0 proto kernel scope link src 192.168.4.1 table Cable

/etc/sysconfig/network-scripts/route-eth3

# Sets up routing for T1
aa.bb.166.0/27 dev eth3 src aa.bb.166.2 table T1
default via aa.bb.166.2 table T1
# Sets up main routing table for T1
aa.bb.166.0/27 dev eth3 src aa.bb.166.2
# Sets up routing for internal network
192.168.4.0/24 dev eth0 proto kernel scope link src 192.168.4.1 table T1

Now where would the proper place be to put a route for load balancing like:

ip route add default scope global nexthop via xx.yy.51.46 dev eth2 weight 3
nexthop via aa.bb.166.2 dev eth3 weight 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20090703/0fc44165/attachment-0005.html>