歡迎您光臨本站 註冊首頁

Ubuntu下更改eth0網卡名稱為eth1

←手機掃碼閱讀     火星人 @ 2014-03-12 , reply:0
  

這個方法用於解決Ubuntu下更換網卡后,新網卡變更為eth1,並且源網卡的名稱eth0,無法給新網卡用的情況。也可以用於為網卡更名。

網卡MAC地址改變之後,在Linux中找到網卡,新的網卡會被識別為eth1或者更為靠後的網卡寫入到/etc/udev/rules.d/70-persistent-net.rules這個文件中,修改/etc/udev/rules.d/70-persistent-net.rules這個文件,將eth0的MAC地址修改為改變后的地址就可以。


編輯
/etc/udev/rules.d/70-persistent-net.rules

root@shangyuan-laptop:/etc/udev/rules.d# more 70-persistent-net.rules
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x14e4:0x1713 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:ec:0f:79:f
6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:3c:48:70:b
1", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"


將其中的eth0,改為eth1,保存后重啟系統即可。


為了高效的解決在應用此方案時遇到的問題,歡迎大家使用eden附帶的文章評論功能提出使用問題或更好的解決方案。您的問題將得到及時的答覆,謝謝。


更改 網卡 名稱


[火星人 ] Ubuntu下更改eth0網卡名稱為eth1已經有3359次圍觀

http://coctec.com/docs/linux/show-post-68873.html