所以我买了一台相当新的笔记本电脑,并在上面安装了linux,但有线以太网永远无法工作。它会加载一段时间,尝试连接,但最终放弃。 Wifi 会工作一段时间,然后有时会断开连接,然后有时会再次工作。我知道它应该可以工作,因为 Windows 10 工作得很好。
我真的很想了解导致问题的原因。您能解释一下以太网卡、驱动程序和操作系统之间的基本交互吗?如果您可以解释基本的网络调试技术(运行哪些命令、隔离问题等),那就太好了!
提前谢谢!
这是 ifconfig -a 的输出
enp2s0 Link encap:Ethernet HWaddr 70:4d:7b:be:95:d2
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)
Interrupt:126 Base address:0x5000
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:1757 errors:0 dropped:0 overruns:0 frame:0
TX packets:1757 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:182772 (182.7 KB) TX bytes:182772 (182.7 KB)
wlp3s0 Link encap:Ethernet HWaddr f0:03:8c:07:a3:b7
inet addr:10.142.1.11 Bcast:10.142.3.255 Mask:255.255.252.0
inet6 addr: fe80::8d43:8f27:cebd:bb98/64 Scope:Link
inet6 addr: 2607:f140:400:a000:228c:f06a:9c42:ad60/64 Scope:Global
inet6 addr: 2607:f140:400:a000:682d:a784:54f3:f1be/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7026 errors:0 dropped:0 overruns:0 frame:0
TX packets:5138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5916838 (5.9 MB) TX bytes:1272641 (1.2 MB)
这是 ethtool eth0
~ $ ethtool eth0
Settings for eth0:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available
And here is sudo lshw -c network -sanitize
~ $ sudo lshw -c network -sanitize
[sudo] password for ***:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: enp2s0
version: 10
serial: [REMOVED]
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.043.02-NAPI duplex=half latency=0 link=no multicast=yes port=twisted pair speed=10Mbit/s
resources: irq:126 ioport:e000(size=256) memory:ef204000-ef204fff memory:ef200000-ef203fff
*-network
description: Wireless interface
product: Qualcomm Atheros
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlp3s0
version: 31
serial: [REMOVED]
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath10k_pci driverversion=4.9.0-040900-generic firmware=WLAN.TF.1.0-00267-1 ip=[REMOVED] latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:130 memory:ef000000-ef1fffff