问题描述:

最近学习 hadoop,环境准备搭建在虚拟机之上,装好一台虚拟机克隆完成后,网卡无法启动。

多年前,初学 Linux 的时候,就遇到过这个问题,记录的笔记找不到了,简单记录一下。

shell > /etc/init.d/network restart

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.

解决方法:

shell > rm -rf /etc/udev/rules.d/70-persistent-net.rules

shell > reboot

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

SUBSYSTEM=="net", ACTION=="add", DBIVERS=="?*", ATTR{address}=="00:0c:29:5b:13:08", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# 把最后的 eth1 改为 eth0,然后将 mac 地址:00:0c:29:5b:13:08 写入 ifcfg-eth0 中

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

HWADDR=00:0c:29:5b:13:08

shell > reboot

# 再次重启后,就可以看到 eth0 网卡已经启动,也通过 DHCP 获取了 IP 地址。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2021-08-28
  • 2021-10-28
  • 2021-12-13
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2021-11-05
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案