網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 [論壇 - Ubuntu 中文書籍討論區]
正在瀏覽:
1 名遊客
anson
|
網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 |
|
---|---|---|
Anon:anson
|
原先兩張都沒問題,結果在圖型管理介面下去改網路相關設定。改完後
下ifconfig 出現 eth0 ........ eth2 .......... 後來我到/etc/network/interfaces 去看 居然出現 eth0 eth1 eth2 3個設定。 我就用 vi 將/etc/network/interfaces 內 eth2 相關項目刪掉 再/etc/init.d/networking restart 出現下列訊息…… SIOCSIFADDR: No such device eth1: ERROR while getting interface flags: No such device Bind socket to interface: No such device Failed to bring up eth1. 我再用ifconfig 去看 仍是 eth0...... eth2...... 為何我的eth2不能改回eth1 ? 以下是我的/etc/network/interfaces 內容 //////////////////////////////////////////////// auto lo iface lo inet loopback auto eth0 auto eth1 iface eth0 inet static address 210.xxx.xxx.xxx netmask 255.255.255.0 gateway 210.xxx.xxx.xxx iface eth1 inet dhcp //////////////////////////////////////// 有人知道為什麼嗎? 謝謝!!
2009/4/15 1:14
| 75878 66430 9b1e1 2165b
|
|
![]() |
回覆: 網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
版主
![]() ![]() 註冊日期:
2008/7/14 0:03 來自 螢幕的另一端
所屬群組:
網站管理員 已註冊使用者 討論區管理群 等級: 33
HP : 0 / 808
![]() |
首先用 ifocnfig -a 看你的系統內有幾張網卡,記下該網卡的 mac address
編輯以下檔案 vim /etc/udev/rules.d/z25_persistent-net.rules 此檔內你會看見有一堆 SUBSYSTEM =="net",.......NAME="ethX" 此處的 "ethX" 那個 X 數字可能是任意數 找到你實際網卡所對映的 mac address 例如,我的機器上所找到的該網卡,被編到 eth5 去了 SUBSYSTEM =="net",.......NAME="eth5" 將此 eth5 改成 eth0 之後,其它沒用的網卡編號全刪掉或 mark 起來,重開機即ok
2009/4/15 1:27
|
||||||||||
![]() |
anson
|
回覆: 網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 |
|
---|---|---|
Anon:anson
|
我的/etc/udev/rules.d 內的檔案如下,但沒有看到你說的那個z25_persistent-net.rules
謝謝!! 00-init.rules 60-symlinks.rules 85-hwclock.rules 20-names.rules 65-persistent-disk.rules 85-ifupdown.rules 25-iftab.rules 80-programs.rules 85-pcmcia.rules 40-permissions.rules 85-alsa.rules 90-hal.rules 45-libgphoto2.rules 85-hal.rules 90-modprobe.rules 45-libsane.rules 85-hdparm.rules 99-udevmonitor.rules
2009/4/15 15:01
| 75878 66430 9b1e1 2165b
|
|
![]() |
回覆: 網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員三級
![]() ![]() 註冊日期:
2009/3/17 21:45 來自 台北縣永和市
所屬群組:
已註冊使用者 等級: 12
HP : 0 / 283
![]() |
你的 Ubuntu 版本?
在 7.X 以前的版本應該是用 ??-iftab.rules 這個檔案。 所以請看一下這個檔案的內容。 anson 寫到:
2009/4/15 15:59
|
||||||||||
術業有專攻,聞道有先後,你會我不會,就是我老師。
![]() ubuntu 精神:感同身受,同源一體! 愛用自由軟體,支持開放格式,反對軟體剝削,就從你我開始! |
|||||||||||
![]() |
anson
|
回覆: 網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 |
|
---|---|---|
Anon:anson
|
謝謝所有回覆者
我的版本是6.06 DISTRIB_ID=Ubuntu DISTRIB_RELEASE=6.06 DISTRIB_CODENAME=dapper DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS" 而且我整個/rules.d 內的檔案都找過了沒有看到有"ethX"相關的設定。
2009/4/16 1:55
| 75878 66430 9b1e1 2165b
|
|
![]() |
回覆: 網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
版主
![]() ![]() 註冊日期:
2008/7/14 0:03 來自 螢幕的另一端
所屬群組:
網站管理員 已註冊使用者 討論區管理群 等級: 33
HP : 0 / 808
![]() |
你版本真夠舊的了,很多設定的方法都不一樣了
建議你升級到新一點的版本吧 8.04 就夠用了,不用最新
2009/4/16 7:55
|
||||||||||
![]() |
回覆: 網路卡有2張,一張是eth0,另一張是eth1,不知怎麼設定的,eth1變成eth2了。 |
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
會員三級
![]() ![]() 註冊日期:
2009/3/17 21:45 來自 台北縣永和市
所屬群組:
已註冊使用者 等級: 12
HP : 0 / 283
![]() |
anson 寫到: 看一下你的 /etc/ 這個目錄下,是否有 iftab 這個檔案,相關的設定可能在這個檔案內。
2009/4/16 8:28
|
||||||||||
術業有專攻,聞道有先後,你會我不會,就是我老師。
![]() ubuntu 精神:感同身受,同源一體! 愛用自由軟體,支持開放格式,反對軟體剝削,就從你我開始! |
|||||||||||
![]() |
您可以查看帖子.
您不可發帖.
您不可回覆.
您不可編輯自己的帖子.
您不可刪除自己的帖子.
您不可發起投票調查.
您不可在投票調查中投票.
您不可上傳附件.
您不可不經審核直接發帖.