我的route很怪 - Linux

Table of Contents

我使用RedHat9的系統
有兩塊網路卡:eth0和eth1,但是eth1並沒有啟動它,所以真正在工作的只有eth0
,並且我在eth0上面綁了兩個IP

底下是檔案的內容:
/etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.1.11.1
NETWORK=10.1.11.0
NETMASK=255.255.255.0
BROADCAST=10.1.11.255
#GATEWAY=10.1.11.1

/etc/sysconfig/network-scripts/ifcfg-eth0:0
BOOTPROTO=static
ONBOOT=no
IPADDR=10.1.12.1
NETWORK=10.1.12.0
NETMASK=255.255.255.0
BROADCAST=10.1.12.255
#GATEWAY=10.1.11.1
==============================================================================
在文字模式下使用route指令時卻多跑出一個BClass的網域

#route

Destination Gateway Genmask Flages Metric Ref Use Iface
59-117-12-254 * 255.255.255.255 UH 0 0 0 ppp0
10.1.12.0 * 255.255.255.0 U 0 0 0 eth0
10.1.11.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 59-117-112-254 0.0.0.0 UG 0 0 0 ppp0

============================================================================
#route del -net 169.254.0.0 netmask 255.255.0.0 dev eth0

Destination Gateway Genmask Flages Metric Ref Use Iface
59-117-12-254 * 255.255.255.255 UH 0 0 0 ppp0
10.1.12.0 * 255.255.255.0 U 0 0 0 eth0
10.1.11.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 59-117-112-254 0.0.0.0 UG 0 0 0 ppp0


這應該正常,因為已經刪除該route
但是/etc/rc.d/init.d/network restart之後
==============================================================================

Destination Gateway Genmask Flages Metric Ref Use Iface
59-117-12-254 * 255.255.255.255 UH 0 0 0 ppp0
10.1.12.0 * 255.255.255.0 U 0 0 0 eth0
10.1.11.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 59-117-112-254 0.0.0.0 UG 0 0 0 ppp0

又跑出來了= =,怎麼會這樣,是我哪裡沒有設定好嗎?
真的很困擾....

--

All Comments

Emma avatarEmma2007-01-29
APIPA (自動取得虛擬 IP)
Doris avatarDoris2007-02-01
Liam avatarLiam2007-02-02
在 /etc/sysconfig/network 加入NOZEROCONF=yes 載restart.
Susan avatarSusan2007-02-04
我測試一下。
Xanthe avatarXanthe2007-02-04
可以了耶,謝!可以跟我說為什麼嗎?我想知道~
Freda avatarFreda2007-02-09
http://0rz.tw/a42mk <= 我知道 因為我也用RH9也遇過 XD
Edith avatarEdith2007-02-11
那如果加入這段網域的話網路速度是不是會比較快呢?
Mia avatarMia2007-02-16
因為如果用ping 169.254.0.0/16這網域的話速度也比較快
John avatarJohn2007-02-18
線是同一條.. 應該沒差吧?
Edith avatarEdith2007-02-18
推一下 asimon大大的文章 XD