系統管理
1753597 會員
6878 線上
108796 解決方案
發表新文章

how to enable muiti route

 
watermelonyu
教授

how to enable muiti route

我的server 有兩張網卡eth0 ,eth1

ip address設成

10.242.101.3

10.242.101.5

但是route 只有一組

example

/etc/sysconfig/network

NETWORKING=yes

HOSTNAME=joeylinux

GATEWAY=10.242.101.254

當我把eth0 off之後會導致eth1 也連不上

請問怎樣解這個問題(我不要用bind ip)

3則回覆 3
watermelonyu
教授

how to enable muiti route

# netstat -rn



一般default route都在eth0上, 如果eth0 off了, 當然會導致eth1也連不上.



兩組IP對同一個gateway, 你的封包會不知道到底要走哪條路出去.
watermelonyu
教授

how to enable muiti route

route add default gw *.*.*.* dev eth1

那如果我用上述方式手動加入another route

會有影響嗎
watermelonyu
教授

how to enable muiti route

default route只能有一筆.