![Ubuntu 14.04 LTS 中未检测到以太网电缆](https://linux22.com/image/877739/Ubuntu%2014.04%20LTS%20%E4%B8%AD%E6%9C%AA%E6%A3%80%E6%B5%8B%E5%88%B0%E4%BB%A5%E5%A4%AA%E7%BD%91%E7%94%B5%E7%BC%86.png)
Ubuntu 14.04 检测不到以太网 LAN 电缆。Windows 检测到相同的以太网 LAN 电缆。尽管 ubuntu 检测到路由器包装盒中附带的 LAN 电缆。请帮忙
以下是 ethtool eth0 的输出:
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: no
sudo lshw -C 网络:
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0.1
bus info: pci@0000:05:00.1
logical name: eth0
version: 14
serial: 08:9e:01:e1:0a:57
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8411-2_0.0.1 07/08/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:62 ioport:3000(size=256) memory:b0404000-b0404fff memory:b0400000-b0403fff
如果配置 -a:
eth0 Link encap:Ethernet HWaddr 08:9e:01:e1:0a:57
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
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:65536 Metric:1
RX packets:626 errors:0 dropped:0 overruns:0 frame:0
TX packets:626 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:61833 (61.8 KB) TX bytes:61833 (61.8 KB)
wlan0 Link encap:Ethernet HWaddr 48:d2:24:a1:1b:4f
inet addr:192.168.159.8 Bcast:192.168.159.255 Mask:255.255.252.0
inet6 addr: fe80::4ad2:24ff:fea1:1b4f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63929 errors:0 dropped:719 overruns:0 frame:0
TX packets:7323 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11495871 (11.4 MB) TX bytes:1100882 (1.1 MB)
答案1
我以前遇到过类似的问题,该问题与 Realtek 以太网卡有关。
以下是我解决问题的方法:
运行这个命令来启用我的互联网访问:
sudo ethtool -s eth0 speed 100 duplex full
不确定它是否会对您有帮助,但值得一试。
答案2
经过几个小时的反复尝试,我终于成功让以太网连接正常工作。步骤如下:
编辑
/etc/network/interfaces
(sudo nano /etc/network/interfaces
),添加以下两行:allow-hotplug eth0 iface eth0 inet dhcp
安装 Avahi 库:
sudo apt-get update sudo apt-get install libavahi-compat-libdnssd-dev
编辑
/etc/rc.local
(gksudo gedit /etc/rc.local
),添加以下行:avahi-autoipd --daemonize --syslog eth0
上面一行
exit 0
重启
重启后,使用以下命令检查网络接口:
ifconfig -a
eth0
、lo
和wlan0
应该会列出。
如果eth0:avahi
也列出(通常带有inet addr:169.254.5.215
),那么基本上就可以开始了。
如果eth0:avahi
没有列出,则输入命令:sudo avahi-autoipd --daemonize --syslog eth0
片刻之后,运行
eth0:avahi
时会出现ifconfig -a
,您就可以开始了。将以太网电缆连接到您的计算机上,然后您可以尝试 ping 网络上的某个 IP 地址。