CentOS系統VMware複製後 重新設定成eth0

來源:互聯網
上載者:User

CentOS系統VMware複製後 重新設定成eth0

問題:用VMware複製CentOS6.4後,發現系統內只有eth1,而且/etc/sysconfig/network-scripts/下只有,ifcfg-eth0檔案,雖然可以上網,但無法設定靜態IP。

ifconfig eth0

eth1: error fetching interface information: Device not found

解決:vi /etc/udev/rules.d/70-persistent-net.rules 顯示為:

# PCI device 0x8086:0x100f (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:48:85:9c", ATTR{type}=="1", KERNEL=="eth*",NAME="eth1"

將 NAME="eth1" 改成NAME="eth0"

並將 ATTR{address}=="00:0c:29:48:85:9c",中的網卡地址改到

/etc/sysconfig/network-scripts/ifcfg-eth0 檔案中,HWADDR="00:0C:29:48:85:9C",使他們對應。

然後reboot

ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:0C:29:48:85:9C

inet addr:192.168.74.148 Bcast:192.168.74.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe48:859c/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:5032 errors:0 dropped:0 overruns:0 frame:0

TX packets:3674 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:5762656 (5.4 MiB) TX bytes:209372 (204.4 KiB)


完成。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.