[Linux] device eth0 does not seem to present

tolilong發表於2016-06-17
虛擬機器service network restart提示
device eth0 does not seem to present

需要如下動作:
[root@iphone ~]# more /etc/udev/rules.d/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 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:9c:52:5a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth6"

記錄下其中mac address
[root@iphone ~]#
[root@iphone ~]# cd /etc/sysconfig/network-scripts/
[root@iphone network-scripts]# mv ifcfg-eth0 ifcfg-eth6
[root@iphone network-scripts]# more ifcfg-eth6           #將device 和 hwaddr 修改為上述內容
DEVICE=eth6
HWADDR=00:50:56:9c:52:5a
TYPE=Ethernet
UUID=7a969bdb-527f-4dc0-980e-e3cc4a6fe8a3
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
DNS1=192.168.169.254
IPV6INIT=no
USERCTL=no
IPADDR=172.16.99.19
NETMASK=255.255.255.0
GATEWAY=172.16.99.1
[root@iphone network-scripts]# service network restart        #之後ok

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-2120395/,如需轉載,請註明出處,否則將追究法律責任。

相關文章