
我有兩台具有相同主機板的計算機,其中有兩個乙太網路連接埠。
在一台電腦上,它就像一個魅力,沒有任何問題。
在另一台電腦上,不知何故,其中一個連接埠被Linux 停用(我驗證了BIOS,它已在那裡啟用),並且另一個連接埠的速度也被限制為100Mbps,而不是預期的1Gbps,儘管這可能是我的電纜造成的一個問題。
有一個 ifconfig 的範例。在有問題的計算機上,p5p1 遺失。
$ 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:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:1292 (1.2 KB) TX bytes:1292 (1.2 KB)
p4p1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.0.0
inet6 addr: xx::xx:xx:xx:xx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:296 errors:0 dropped:0 overruns:0 frame:0
TX packets:270 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:315437 (315.4 KB) TX bytes:32060 (32.0 KB)
Interrupt:16 Memory:f7200000-f7220000
[following missing on computer with problem]
p5p1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
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:17 Memory:df100000-df120000
所以我檢查了一下lshw
網路資訊並找到p5p1
了,但不知何故它被禁用了。如果我將電纜連接到該端口,該端口會按預期喚醒(即我看到燈亮起),但在 Linux 下它仍然丟失。
$ sudo lshw -c NET
*-network
description: Ethernet interface
product: 82574L Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:03:00.0
logical name: p4p1
version: 00
serial: xx:xx:xx:xx:xx:xx
size: 100Mbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress msix 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 duplex=full firmware=2.1-2 ip=10.0.0.1 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:16 memory:f7200000-f721ffff ioport:d000(size=32) memory:f7220000-f7223fff
*-network DISABLED
description: Ethernet interface
product: 82574L Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:04:00.0
logical name: p5p1
version: 00
serial: xx:xx:xx:xx:xx:xx
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress msix 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=2.1-2 latency=0 link=no multicast=yes port=twisted pair
resources: irq:17 memory:f7100000-f711ffff ioport:c000(size=32) memory:f7120000-f7123fff
知道為什麼 Linux 會在啟動時停用連接埠嗎?
更新:
我發現我可以透過以下方式啟用乙太網路連接埠:
sudo ip link set up p5p1
但這並不能真正解釋為什麼它會下跌。重啟後又回到停用狀態。
按照 Chai T. Rex 的建議,我將長電纜連接到另一台具有 1Gbps 連接的電腦上,效果很好。我看到連線速度為 1Gbps,而不是 100Mbps...