Linux解決Device eth0 does not seem to be present

來源:互聯網
上載者:User

標籤:

複製的系統,重啟網卡時,報錯!

複製的系統,首先它的物理地址是一樣的,所以要先產生一個物理地址。第一步刪除/etc/udev/rules.d/70-persistent-net.rules檔案#rm -rf /etc/udev/rules.d/70-persistent-net.rules第二步:重啟系統 #reboot產生物理地址儲存在哪裡呢?
在這裡:[[email protected] ~]# cat /etc/udev/rules.d/70-persistent-net.rules這個時候還不行,需要修改網路IP設定檔中IP地址及MAC地址和70-persistent-net.rulesMAC一致,修改裝置名稱,也要一致:


[[email protected] rules.d]# cat 70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3d:bd:b4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
[[email protected] rules.d]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

 

第三步:編輯MAC地址

[[email protected]linux ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth1"
BOOTPROTO="static"
HWADDR="00:0c:29:3d:bd:b4"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="c3eedb2c-5894-4a7e-8f3e-8575667d44b3"
IPADDR=192.168.10.32
PREFIX=24
GATEWAY=192.168.10.2
DNS1=8.8.8.8

 

 

 

 

 

 

 

 

 

 第四步:重啟網卡

#service network restart

 

Linux解決Device eth0 does not seem to be present

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.