[rhn-users] sysconfig files for alternate ip route tables and ip rules

J.T. Moore jtmoore at international-auto.com
Tue Jul 26 04:30:35 UTC 2005


Can anyone tell me the best file to place ip route and ip rule configurations in?

We are running two multi-homed RHEL servers acting as routers running zebra and bgpd. The ISPs filter traffic from each other's ip addresses, so I need to be sure traffic with the source ip address of the internet interface (which is an ip address from the ISP its connected to) is only sent to the connected ISP even if the bgp routes indicate the best route is through the other router and other ISP.

Currently, I  am doing this with the following in /etc/rc.d/rc.local (Note: actual ip addresses replaced with xxx.xxx.xxx.xxx and cidr masks replaced with nm):

ip route add xxx.xxx.xxx.xxx/nm dev eth1 table 1
ip route add xxx.xxx.xxx.xxx/nm dev eth2 table 1
ip route add xxx.xxx.xxx.xxx/nm via xxx.xxx.xxx.xxx dev eth1 table 1
ip route add default via `/sbin/ifconfig w1g1ppp | grep 'inet addr' | awk '{print $3}' | sed -e 's/P-t-P://'` dev w1g1ppp table 1
ip rule add from `/sbin/ifconfig w1g1ppp | grep 'inet addr' | awk '{print $2}' | sed -e 's/addr://'`/32 table 1 priority 1000
ip route flush cache

My guess is Redhat has designated a file somewhere /etc/sysconfig for these rules. If so, I would rather use it to make it easier on future admins.

Thanks in advance,

J.T. Moore
International Auto Parts




More information about the rhn-users mailing list