eth0 unknown interface no such device

出现这个原因是由于虚拟机直接COPY过来,MAC地址发生了变化,但eth0 里仍然记录着旧的MAC地址。

解决方法:

vim  /etc/udev/rules.d/70-persistent-net.rules 

# PCI device 0x8086:0x100e (e1000) (custom name provided by external tool)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:25:d3:1c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100e (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:37:20:1e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

eth1记录着新MAC地址,eth0是旧的地址。

操作步骤:

1.

将eth0的ATTR{address}==eht1的MAC地址

2.

删除eth1 的配置,也就以下内容删除:

# PCI device 0x8086:0x100e (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:37:20:1e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

3. 

vim /etc/sysconfig/network-scripts/ifcfg-eth0

将MAC地址改为:

HWADDR=08:00:27:25:d3:1c  #必须对应etho是的MAC地址(/etc/udev/rules.d/70-persistent-net.rules)

版权声明:本文为博主原创文章,未经博主允许不得转载。

centos MAC 地址与报错eth0 unknown interface no such device的更多相关文章

  1. 执行ifconfig eth2 up命令报错eth2: unknown interface: No such device的解决思路

    排查问题思路 一般出现这种状况都是网卡mac地址错误引起的!要么网卡配置文件中的mac地址不对,要么/etc/udev/rules.d/70-persistent-net.rules文件中的mac地址 ...

  2. VM克隆之后启动eth0找不到eth0:unknown interface:no such device

    问题出现:VMware 克隆之后,ifconfig命令执行找不到eth0,报错 eth0:unknown interface:no such device 是因为/etc/sysconf/networ ...

  3. CentOS Linux解决网卡报错Bringing up interface eth0.....

    问题描述:在VMware里克隆出来的CentOS Linux,开机执行命令:ifconfig...没有看到eth0网卡.然后重启网卡又报以下错误:Bringing up interface eth0: ...

  4. Appium-desktop安装启用Inspector一直报错An unknown server-side error occurred...

    遇到的问题是: 启用Appium-desktop的Inspector一直报错:An unknown server-side error occurred while processing the co ...

  5. centos在yum install报错:Another app is currently holding the yum lock解决方法

    centos在yum install报错:Another app is currently holding the yum lock,这个问题可能是很多的新手经常遇到问题,之前也有人问我,包括本人在刚 ...

  6. mysqlbinlog查看 binlog日志报错mysqlbinlog: unknown variable 'default-character-set=utf8mb4'

    今天,查看mysql slave节点 binlog日志信息时,执行mysqlbinlog命令报错mysqlbinlog: unknown variable 'default-character-set ...

  7. 解决python-memcache报错:“Unknown flags on get: 20”

    [本文出自天外归云的博客园] 在使用python的pytho-memcache库时出现了一个问题,在调用get方法获取键值的时候报错:Unknown flags on get: 20 在网上查了,发现 ...

  8. springMVC 报错:Unknown return value type: java.lang.Integer

    controller层返回值类型为Integer,运行报错: Unknown return value type: java.lang.Integer 解决办法:在此方法上写上注解 @Response ...

  9. Mac Angular打包报错xcode-select: error: tool 'xcodebuild' requires Xcode

    Mac Angular打包报错: Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer ...

随机推荐

  1. 【LeetCode】【动态规划】Generate Parentheses(括号匹配问题)

    描述 Given n pairs of parentheses, write a function to generate all combinations of well-formed parent ...

  2. P3506 [POI2010]MOT-Monotonicity 2

    题目 P3506 [POI2010]MOT-Monotonicity 2 第一次切掉没题解的题\(qwq\) 做法 首先确定\(a_i\)的位置后显然就能确定\(a_{i+1}\)的位置,建一棵权值线 ...

  3. table-cell笔记

    display:table-cell可将元素设为类似于table的td一样的布局,在垂直居中.两行自适应布局.等高布局下有很高的利用价值 详见: http://www.zhangxinxu.com/w ...

  4. bzoj 1008: [HNOI2008]越狱 数学

    1008: [HNOI2008]越狱 Time Limit: 1 Sec  Memory Limit: 162 MB[Submit][Status][Discuss] Description 监狱有连 ...

  5. 使用button的:after伪类选择器内容的跳动

    按钮的css样式,想要作个美观一点的按钮,使用:after伪类选择器在按钮后跟随"!!"的符号,但点击按钮时按钮的值内容动,但跟随的"!!"符合不动,这样看起来 ...

  6. Oracle的权限管理

    --授予系统权限语法 grant system_privilege | all privileges --可以设置select any dictionary权限之外的索引系统权限 to {user i ...

  7. java:maven中webapp下的jsp不能访问web-inf下面的bean

    java:maven中webapp下的jsp不能访问web-inf下面的bean 当然 WEB-INF下面的文件是不能访问的,只能吧jsp文件放入到WEB-INF下面,然后通过配置WEB-INF下we ...

  8. adb命令(二)

    1.获取手机型号指令 adb shell cat /system/build.prop | findstr "ro.product.model" 2.获取手机处理器信息 adb s ...

  9. jmeter--简单使用

    1.启动jmeter 2.创建线程组 2.点击线程组,选择添加,选择sampler(采样器),选择http请求 3.在添加的请求页面中,填写服务器名称或IP,端口,路径,请求的方法 4.添加请求的参数 ...

  10. Java微信开发_00_资源汇总贴

    1.微信公众平台技术文档(https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1445241432) 2.微信企业号开发接口文档(ht ...