这是输出lspic -nn
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
**00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)**
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)
虽然上面的输出显然检测到了我的以太网。但它不在ifconfig
列表中。以下是输出ifconfig
:
ubuntu@ubuntu-VirtualBox:~$ ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:70 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6939 (6.9 KB) TX bytes:6939 (6.9 KB)
即使我尝试ifconfig eth0 up
,我也收到错误:
eth0:获取接口标志时出错:没有这样的设备
答案1
好的,经过谷歌搜索后,我发现这是 Ubuntu 12.0.4 中的一个错误(错误:#145382 损坏 70-persistent-net.rules)
解决方法是:
- 查看你的设置,你的网卡 MAC 地址是什么,并记住它 > $MAC
nano /etc/udev/rules.d/70-persistent-net.rules
- 查找:
子系统=="网络", 驱动程序=="?*", ATTRS{地址}=="$MAC", NAME="eth5"
- 将其重命名为
NAME='eth0'
- 确保你的
/etc/network/interfaces
正确 - 重启