今天要用到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.