CentOS Linux解决Device eth0 does not seem to be present

CentOS Linux解决Device eth0 does not seem to be present

今天早上打开xshell链接虚拟机,突然链接不上。然后进入虚拟机执行 ifconfig 或者 ip addr list 命令发现eth0 不见。然后执行重启网卡命令发现 CentOS Linux解决Device eth0 does not seem to be present

解决办法:   首先,打开/etc/udev/rules.d/70-persistent-net.rules内容如下面例子所示:

  # vi /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 0x1022:0x2000 (pcnet32)
  SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:8f:89:9
  7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
  # PCI device 0x1022:0x2000 (pcnet32)
  SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:bd:1
  7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

  记录下,eth1网卡的mac地址00:0c:29:50:bd:17   接下来,打开/etc/sysconfig/network-scripts/ifcfg-eth0   

    # vi /etc/sysconfig/network-scripts/ifcfg-eth0
  将 DEVICE="eth0" 改成 DEVICE="eth1" ,
  将 HWADDR="00:0c:29:8f:89:97" 改成上面的mac地址 HWADDR="00:0c:29:50:bd:17"
  最后,重启网络
  # service network restart
  或者
  # /etc/init.d/network restart

 然后瞬间就满血复活,xshell链接也正常了。

CentOS Linux解决Device eth0 does not seem to be present CentOS Linux解决Device eth0 does not seem to be present

原创文章,作者:fighter,如若转载,请注明出处:http://www.178linux.com/26962

(0)
fighterfighter
上一篇 2016-08-02 10:51
下一篇 2016-08-02 10:51

相关推荐

  • N21 第二周练习

    ####1、Linux上的文件管理类命令都有哪些,其常用的使用方法及其相关示例演示。复制:cp   移动:mv    删除:rm   cp:copy,复制文件或目录</br>  cp [OPTION]… SOURCE… DIRECTORY…

    Linux干货 2016-07-22
  • 软件包管理器之一——RPM介绍及应用

    一、前言:     在没有软件包管理器前,用户都是通过源代码的方式来安装软件。但是我们很容易发现,在每次安装软件时都必须对操作系统的境、编译的参数进行对应的编译,并且操作过程很是复杂,这对于不熟悉操作系统的朋友来说真心困难,那么有没有一款软件能让用户能很简单的安装所需的软件呢?    &n…

    Linux干货 2015-07-20
  • linux系统上命令使用格式及常见命令

    [root@localhost ~]# date -d ‘2017-07-06 00:00:00 ‘  用上面这条指令讲解命令使用格式 date command  -d 是参数,参数有可选参数,必选参数,在参数前必选加上- ,还是以这条指令为列,-d可以写成–date,如果写成date,date前面必选…

    Linux干货 2017-08-19
  • week5:grep命令和find命令的应用

    1.显示当前系统上root、fedora或user1用户的默认shell;     ~]# grep -E "^(root|fedora|user1):" /etc/passwd|cut -d/ -f4 2.找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hel…

    Linux干货 2016-11-28
  • N25 _WSH 第二周

    2、bash 命令执行的状态结果:        * bash通过状态返回值来输出此结果:            * 成功:0            失败:1-255     &n…

    系统运维 2016-12-12