ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [Linux] device eth0 does not seem to present

[Linux] device eth0 does not seem to present

原创 Linux操作系统 作者:tolilong 时间:2016-06-17 22:31:11 0 删除 编辑
虚拟机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博客 ” ,链接:https://blog.itpub.net/24237320/viewspace-2120395/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-07-13

  • 博文量
    406
  • 访问量
    1208664