zoukankan      html  css  js  c++  java
  • centos MAC 地址与报错eth0 unknown interface no such device

    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)


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

  • 相关阅读:
    SSH移植
    ARM PPC 交叉编译环境搭建
    CEOI2020 作战记录&题解
    [NOI2019]序列 题解
    Atcoder Dwango Programming Contest 6th 题解
    CF516D Drazil and Morning Exercise 题解
    CF568E Longest Increasing Subsequence 题解
    [IOI2013]robots 题解
    SPOJ22549 DIVFACT4
    CF590E Birthday 题解
  • 原文地址:https://www.cnblogs.com/jamesf/p/4751508.html
Copyright © 2011-2022 走看看