今天要用到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.
轉載于:https://blog.51cto.com/jinkaiye/1869984