我的route很怪 - Linux

By Jack
at 2007-01-28T17:56
at 2007-01-28T17:56
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
又跑出來了= =,怎麼會這樣,是我哪裡沒有設定好嗎?
真的很困擾....
--
有兩塊網路卡: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
又跑出來了= =,怎麼會這樣,是我哪裡沒有設定好嗎?
真的很困擾....
--
Tags:
Linux
All Comments

By Emma
at 2007-01-29T01:45
at 2007-01-29T01:45

By Doris
at 2007-02-01T10:02
at 2007-02-01T10:02

By Liam
at 2007-02-02T12:24
at 2007-02-02T12:24

By Susan
at 2007-02-04T04:55
at 2007-02-04T04:55

By Xanthe
at 2007-02-04T10:38
at 2007-02-04T10:38

By Freda
at 2007-02-09T03:25
at 2007-02-09T03:25

By Edith
at 2007-02-11T10:47
at 2007-02-11T10:47

By Mia
at 2007-02-16T09:55
at 2007-02-16T09:55

By John
at 2007-02-18T09:09
at 2007-02-18T09:09

By Edith
at 2007-02-18T22:46
at 2007-02-18T22:46
Related Posts
Re: 請問支援Linux的硬碟擴充卡

By Candice
at 2007-01-25T23:32
at 2007-01-25T23:32
可以在CentOS下更改網卡的MAC值嗎?

By Rosalind
at 2007-01-25T22:47
at 2007-01-25T22:47
Re: 請問網卡名稱的問題

By Dorothy
at 2007-01-25T20:20
at 2007-01-25T20:20
ghost手誤..有辦法回復嗎?!

By Anthony
at 2007-01-25T14:52
at 2007-01-25T14:52
Re: 我要請教各位大大

By Bennie
at 2007-01-24T20:55
at 2007-01-24T20:55