我的内部网络(工作站、服务器、交换机)中一直都有千兆以太网,但今天我在 OpenSuSE Leap 15.5 工作站的系统日志中偶然发现了这样的警告消息:
[ 145.886888] r8169 0000:07:00.0 eth0: Link is Down
[ 149.670266] r8169 0000:07:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 171.555271] r8169 0000:07:00.0 eth0: Link is Down
[ 185.386620] Generic FE-GE Realtek PHY r8169-0-700:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 185.386635] r8169 0000:07:00.0 eth0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx
这是网络调试工具告诉我的:
╭─jacek@epica ~
╰─➤ uname -a
Linux epica 5.14.21-150500.55.36-default #1 SMP PREEMPT_DYNAMIC Tue Oct 31 08:37:43 UTC 2023 (e7a2e23) x86_64 x86_64 x86_64 GNU/Linux
╭─jacek@epica ~
╰─➤ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b4:2e:99:c6:e9:9f brd ff:ff:ff:ff:ff:ff
altname enp7s0
╭─jacek@epica ~
╰─➤ sudo ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: slave
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: pumbg
Wake-on: d
Link detected: yes
YaST 的硬件信息部分对网络设备的说明如下:
Device: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
继Linux Mint 论坛中的建议,我尝试重新加载有问题的驱动程序:
╭─jacek@epica ~
╰─➤ sudo modprobe -r r8169 && sudo modprobe r8169
但是:没用!网络接口确实以 1 Gbps 的速度开始,但随后降至 100 Mbps:
[ 6470.039948] r8169 0000:07:00.0 eth0: Link is Down
[ 6470.341900] libphy: r8169: probed
[ 6470.342189] r8169 0000:07:00.0 eth0: RTL8168g/8111g, b4:2e:99:c6:e9:9f, XID 4c0, IRQ 81
[ 6470.342196] r8169 0000:07:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[ 6470.402643] Generic FE-GE Realtek PHY r8169-0-700:00: attached PHY driver (mii_bus:phy_addr=r8169-0-700:00, irq=MAC)
[ 6470.603188] r8169 0000:07:00.0 eth0: Link is Down
[ 6477.014457] r8169 0000:07:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 6478.210793] r8169 0000:07:00.0 eth0: Link is Down
[ 6481.311902] r8169 0000:07:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 6482.077305] r8169 0000:07:00.0 eth0: Link is Down
[ 6496.122480] Generic FE-GE Realtek PHY r8169-0-700:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[ 6496.122492] r8169 0000:07:00.0 eth0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx
我使用的电缆、插座和接线板都是 Cat 5E,接线板也是现成的。我使用的硬件已经运行了好几年,没有出现任何问题,所以我真的不知道为什么我的网络突然变慢了。
这里突然出现什么问题了?这个缺陷是否与我几个月前从 Leap 15.4 升级到 15.5 的系统升级有关?或者我应该尝试另一根电缆?
答案1
我将工作站的跳线插入另一个 RJ45 插座,一切运行正常,全速运行。
罪魁祸首可能是插座、墙上电缆、配线架或交换机(可能是因为我的设备太旧了)。