2010年11月29日星期一

policy routing for multi homed linux box

default gw = 192.168.0.1

eth0

eth1

i want  traffic coming from eth1 leaving from eth1

vi /etc/iproute2/rt_tables
insert
200 number2

/etc/sysconfig/network-scripts/route-eth1
insert
default table number2 via 10.0.0.1(gw ip)

vi /etc/sysconfig/network-scripts/rule-eth1
from 10.0.0.2 table number2

restart it

0 comments:

張貼意見