-----原始郵件-----
寄件者: etotal.bbs@bbs.ee.nthu.edu.tw
<etotal.bbs@bbs.ee.nthu.edu.tw>
收件者: netmanforever@yahoo.com
<netmanforever@yahoo.com>
日期: 星期五, 21 一月 2000 PM 22:16
主旨: Re: 網路卡問題
>網中人我將設定設好了
>在 ifconfig 中 也有看到 eth1
>可是我在 192.168.1.0 中的電腦都ping不到
>eth1 192.168.1.254 ,我貼上一些檔案設定給你
>參考
>/etc/sysconfig/network
>NETWORKING=yes
>FORWARD_IPV4=yes
>HOSTNAME=ftp.sys.com.tw
>DOMAINNAME=sys.com.tw
>GATEWAY=210.242.15.174
> GATEWAYDEV=eth0
>
>/etc/sysconfig/network-scripts/ifcfg-eth1
>DEVICE=eth1
>#USERCTL=no
>ONBOOT=yes
>BOOTPROTO=none
>BROADCAST=192.168.1.255
>NETWORK=192.168.1.0
>NETMASK=255.255.255.0
>IPADDR=192.168.1.254
>
>/etc/sysconfig/network-scripts/ifcfg-eth0
>DEVICE=eth0
>IPADDR=210.242.15.163
>NETMASK=255.255.255.240
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
請問這對 IP 和 mask 是您自己設的麼﹖好像有點怪哦~~
163 換成二進位是﹕10100011
240 換成二進位是﹕11110000
也就是說﹐您目前使用的 sub-net ID 為 1010。
>NETWORK=210.242.15.0
>BROADCAST=210.242.15.255
如果根據前面的 mask 設計﹐
您的network 應該是﹕210.242.15.160
broadcast 應該為﹕210.242.15.175
如果您堅持 network 是 210.242.15.0 的話
broadcast 就應該是﹕210.242.15.15
如果您要 broadcast 為 210.242.15.255 的話
那麼 network 應該是 210.242.15.240
無論用哪一個﹐您的 210.242.15.163 都不在其中﹗
如果您不知道我為什麼這樣說﹐請參考 http://go.to/study-area
之“網路基礎”有
關“IP基礎”的部份吧。
>ONBOOT=yes
>BOOTPROTO=none
>USERCTL=no
>
>ifconfig
>eth1 Link encap:Ethernet HWaddr
00:80:C8:25:2E:2F
> inet
addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
> UP BROADCAST RUNNING
MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0
dropped:0 overruns:0 frame:0
> TX packets:0
errors:13 dropped:0 overruns:0 carrier:0
> collisions:0
txqueuelen:100
> Interrupt:10 Base
address:0x320
這樣看來 eth1 應該沒問題了。
>
>route
>Kernel IP routing table
>Destination Gateway
Genmask Flags Metric Ref
Use
Iface
>192.168.1.254 *
255.255.255.255 UH 0 0
0
eth1
>210.242.15.160 *
255.255.255.240 U 0 0
0
eth0
>210.242.15.0 210.242.15.174 255.255.255.240 UG
0 0 0
eth0
>210.242.15.0 *
255.255.255.240 U 0 0
0
eth0
>192.168.1.0 *
255.255.255.0 U 0
0 0
eth1
>127.0.0.0 *
255.0.0.0 U 0
0 0 lo
>default 210.242.15.174
0.0.0.0 UG 0
0 0 eth0
看這個 route table ﹐應該沒問題了(看﹕eth0 的 network 不正是 160
麼﹖)不過﹐
您這裡的 進管 default gateway 使用了 210.242.15.174﹐但作為
192.168.1.254 這
個 IP 本身﹐應該不需要另外設定 gateway 給 192.168.1.0
﹐這樣的話﹐您就要看
192.168.1.0
的其它主機設定了﹐另外﹐檢查一下網線是否接撥正確。我感覺上認為是
網線連接問題﹐因為﹐如果大家的機器都設定在同一個 subnet
上面﹐應該不需要另設
gateway 了。這點您可以參考 study-area 之“網路基礎”中關於“ARP協定”的部
份。