- 論壇徽章:
- 0
|
用一臺linux pc作路由器,三張網(wǎng)卡,eth0接電信,eth1接內(nèi)網(wǎng),eth2接網(wǎng)通.
eth0:192.168.18.15
eth1:192.168.1.1
eth2:192.168.15.20
我按照IP高級路由上的設(shè)置來設(shè)置回應(yīng)數(shù)據(jù)從來的那塊網(wǎng)卡原路返回策略,
分別在linux下作如下設(shè)置:
ip route add 192.168.18.0 dev eth0 src 192.168.18.15 table cnc
ip route add default via 192.168.18.1 table cnc
ip route add 192.168.15.0 dev eth2 src 192.168.15.20 table ct
ip route add default via 192.168.15.1 table ct
ip route add 192.168.18.0 dev eth0 src 192.168.18.15
ip route add 192.168.15.0 dev eth2 src 192.168.15.15
ip route add default via 192.168.18.1
ip rule add from 192.168.18.15 table cnc
ip rule add from 192168.15.20 table ct
設(shè)置完以后,ping 192.168.15.20就通了,但在linux機器上ping其它15網(wǎng)做的機器又是正常的.
還有,就算這樣作是正常情況下,可以做到這樣做是否可以做 "所有的回應(yīng)數(shù)據(jù)都會從他們來的那塊網(wǎng)卡原路返回"么?
大家遇到這樣的情況一般是怎么做的? |
|