ubuntu 网卡突然无法连接

今天要用到VM BT的Namp扫描服务器端口,发现桥接后无法使用。

ifconfig 只看到 lo地址,看不到以太网网卡地址

使用lspci 查看是否安装了以太网网卡驱动

lscpi | grep Ethernet

02:01.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)

看到文章中是克隆或者复制其他虚拟机开机出现此类问题,操作以下步骤就解决了。

sudo rm /etc/udev/rules.d/70-persistent-net.rules 删除相关文件

reboot 重启

问题的原因是MAC地址被缓存出了问题导致的。

但是我的虚拟机开机用了一段时间是可以的,是过了好长时间才出现了这个问题,这究竟是为什么?

我多次添加删除虚拟网卡并执行重启都没有反应。

猜测是不是支持的缓存网卡数量达到了三个,而且目前使用的网卡有没有办法顶上去,没有办法继续缓存导致无法跟新网卡设备。从而导致无法识别网络设备。

After cloning a virtual machine running Ubuntu Server 10.04 found that it didn
’t have any network available.

Restarting networking gave:
sudo /etc/init.d/networking restart * Reconfiguring network interfaces... eth0
: ERROR
while getting interface flags:
No such device SIOCSIFADDR: No such device eth0: ERROR

while getting interface flags:
No such device SIOCSIFNETMASK: No such device SIOCSIFBRDADDR: No such device
eth0: ERROR

while getting interface flags:
No such device eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.

The problem lies in the fact that ethernet MAC addresses are cached. You need to remove a file to clear the cached value: sudo rm /etc/udev/rules.d/70-persistent-net.rules After a restart of your server you should have networking back again.

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...