由买买提看人间百态

topics

全部话题 - 话题: eth6table
(共0页)
w*r
发帖数: 2421
1
distribution: SLES10 SP3
ip route add 10.30.239.0/24 via 10.30.239.122 dev eth6 table eth6table
ip rule add from 10.30.239.122 table eth6table
如何在启动时自动加载???
放在rc.local似乎太ugly了一点,
我注意到 /etc/sysconfig/network下面有ifroute-ethx的文件,似乎可以放ip route
,但是ip rule放在哪里呢?
还有有没有ifroute-ethx的范例我可以抄抄?
w*r
发帖数: 2421
2
还是自己解决的号,这里靠不住啊,各位玩linux都玩什么方向的???
solution:
1. static router, use the ifroute-ethx file. man route(5), any text after
the 5th parameter will be passed as command text to ip route command
SLES 10 sp3 /etc/sysconfig/network/ifroute-eth6
10.30.239.0/24 0.0.0.0 - eth6 - via 10.30.239.122 table eth6table
2. ip rule, use the ifcfg-ethx file, adding POST_UP_SCRPT/PRE_DOWN_SCRIPT
argument to insert ip rule command.
(共0页)