我新买了一台戴尔笔记本电脑,上面安装了 RTL8101/2/6E PCI E 以太网卡。在互联网上搜索后,我找不到任何解决方案让它在插入时检测 cat5 电缆。我已经在其他设备上验证了路由器和电缆,但不知道如何验证 NIC 本身。
以下是我所知道的有关该卡的所有信息:
almostid@almostid:~$ uname -a
Linux almostid 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
almostid@almostid:~$ sudo ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/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: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: no
almostid@almostid:~$ sudo mii-tool
[sudo] password for almostid:
eth0: autonegotiation restarted, no link
almostid@almostid:~$ sudo lshw -C network
*-network
description: Wireless interface
product: BCM43142 802.11b/g/n
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:06:00.0
logical name: wlan0
version: 01
serial: 18:4f:32:ff:27:9b
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=wl0 driverversion=6.30.223.248 (r487574) ip=192.168.0.102 latency=0 multicast=yes wireless=IEEE 802.11abg
resources: irq:18 memory:f7900000-f7907fff
*-network
description: Ethernet interface
product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:07:00.0
logical name: eth0
version: 07
serial: 20:47:47:4c:9d:19
size: 10Mbit/s
capacity: 100Mbit/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 autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:41 ioport:e000(size=256) memory:f7800000-f7800fff memory:f2100000-f2103fff
almostid@almostid:~$ lspci -nnk | grep -iA3 net
06:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)
Subsystem: Dell Wireless 1704 802.11n + BT 4.0 [1028:0016]
Kernel driver in use: wl
Kernel modules: bcma, wl
07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 07)
Subsystem: Dell RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [1028:0652]
Kernel driver in use: r8169
Kernel modules: r8169
almostid@almostid:~$ lsusb
Bus 001 Device 006: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0
Bus 001 Device 004: ID 0c45:670b Microdia
Bus 001 Device 003: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
almostid@almostid:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 20:47:47:4c:9d:19
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)
almostid@almostid:~$ rfkill list all
0: dell-rbtn: Wireless LAN
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: brcmwl-0: Wireless LAN
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
almostid@almostid:~$ networkctl list
WARNING: systemd-networkd is not running, output will be incomplete.
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback n/a unmanaged
2 eth0 ether n/a unmanaged
3 wlan0 wlan n/a unmanaged
3 links listed.
almostid@almostid:~$ service network-manager status
NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2016-12-16 14:32:51 EET; 43min ago
Main PID: 1260 (NetworkManager)
CGroup: /system.slice/NetworkManager.service
├─1260 /usr/sbin/NetworkManager --no-daemon
├─1883 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkM
└─4145 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-wlan0.pid -lf /var/lib
Dec 16 15:09:39 almostid NetworkManager[1260]: <info> [1481893779.9984] device (wlan0): state change: ip-check -> secondaries
Dec 16 15:09:39 almostid NetworkManager[1260]: <info> [1481893779.9988] device (wlan0): state change: secondaries -> activate
Dec 16 15:09:39 almostid NetworkManager[1260]: <info> [1481893779.9989] manager: NetworkManager state is now CONNECTED_LOCAL
Dec 16 15:09:40 almostid dhclient[4145]: bound to 192.168.0.102 -- renewal in 3519 seconds.
Dec 16 15:09:40 almostid NetworkManager[1260]: <info> [1481893780.1108] manager: NetworkManager state is now CONNECTED_GLOBAL
Dec 16 15:09:40 almostid NetworkManager[1260]: <info> [1481893780.1110] policy: set 'Supertatik' (wlan0) as default for IPv4
Dec 16 15:09:40 almostid NetworkManager[1260]: <info> [1481893780.1112] dns-mgr: Writing DNS information to /sbin/resolvconf
Dec 16 15:09:40 almostid dnsmasq[1883]: setting upstream servers from DBus
Dec 16 15:09:40 almostid dnsmasq[1883]: using nameserver 192.168.0.1#53
Dec 16 15:09:40 almostid NetworkManager[1260]: <info> [1481893780.1187] device (wlan0): Activation: successful, device activa
almostid@almostid:~$ iwlist eth0 channel
eth0 no frequency information.
almostid@almostid:~$ iwlist eth0 scan
eth0 Interface doesn't support scanning.
如何正确确定 NIC 是否能够检测链接或是否物理损坏?
编辑:包含ethtool eth0
权限sudo
而不是不包含权限。 dmesg
没有匹配的条目dmesg | grep -i 'eth'
。
编辑:来自 dmesg 的新信息。
almostid@almostid:~$ dmesg | grep -i 'eth'
[ 1.191104] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 1.191530] r8169 0000:07:00.0 eth0: RTL8106e at 0xffffc9000001e000, 20:47:47:4c:9d:19, XID 04900000 IRQ 41
[ 1.280878] ACPI Error: Method parse/execution failed [\_SB.PCI0.RP05.PEGP.DD02._BCL] (Node ffff88012b0f15f0), AE_NOT_FOUND (20150930/psparse-542)
[ 28.139570] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 34.101488] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 34.361253] r8169 0000:07:00.0 eth0: link down
[ 34.361297] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
almostid@almostid:/sys/class/net$ grep -Hs . eth0/*
eth0/addr_assign_type:0
eth0/address:20:47:47:4c:9d:19
eth0/addr_len:6
eth0/broadcast:ff:ff:ff:ff:ff:ff
eth0/carrier:0
eth0/carrier_changes:1
eth0/dev_id:0x0
eth0/dev_port:0
eth0/dormant:0
eth0/duplex:half
eth0/flags:0x1003
eth0/gro_flush_timeout:0
eth0/ifindex:2
eth0/iflink:2
eth0/link_mode:0
eth0/mtu:1500
eth0/netdev_group:0
eth0/operstate:down
eth0/proto_down:0
eth0/speed:10
eth0/tx_queue_len:1000
eth0/type:1
eth0/uevent:INTERFACE=eth0
eth0/uevent:IFINDEX=2
答案1
跑去watch -n 1 ethtool eth0
观察Link detected: yes
。
我有同样的硬件。这对我来说很管用。
答案2
如果它有 LED,这两个 LED(链接和活动)由 NIC 硬件控制。因此,当电缆插入时:
Link=off, ACT=off
:这是物理问题,未检测到连接。(通常是插座/插头连接或电缆)Link=blink, ACT=off
:大多数 NIC 意味着可以检测到连接错误,这是一个物理问题。(例如:仅连接了一对线)Link=on, ACT=*
:物理连接正常。请检查软件级别(驱动程序)。
使用自制RJ45 以太网环回插头e1000e
此机器上已加载和未加载驱动程序(来自英特尔):
sudo dmidecode
BIOS Information
Vendor: Dell Inc.
Version: A16
Release Date: 12/05/2013
System Information
Manufacturer: Dell Inc.
Product Name: Latitude E6410
Version: 0001
sudo lshw -c network
*-network
description: Ethernet interface
product: 82577LM Gigabit Network Connection
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: eno1
version: 05
serial: 5c:26:0a:52:2b:16
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.12-1 latency=0 link=no multicast=yes port=twisted pair
resources: irq:25 memory:e9600000-e961ffff memory:e9680000-e9680fff ioport:8040(size=32)
如果您的情况没有 LED:
检查电缆另一端设备的 LED(交换机、路由器、另一台笔记本电脑、同一台 PC 上的附加 USB 以太网适配器......)。如果是另一台笔记本电脑或同一台 PC 上的 USB 以太网适配器,则可以使用相同的命令行工具)
如果
Link=on
在其他设备上您的物理连接正常,请检查驱动程序。