Linux

linux上網速度慢

  • February 11, 2020

我的新網際網路連接出現問題。這是一個對稱的 500Mbs 連接,但我的 linux 電腦中只有 50M。在 Windows 中,我與其他電腦一起上下移動 500Mb。我知道問題出在我在 linux 中的乙太網連接上,因為我在乙太網卡中的速度是 100Mb。我不知道為什麼。

這是乙太網卡的值(它支持 1Gb)

   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: No
   Advertised FEC modes: Not reported
   Speed: 100Mb/s
   Duplex: Half
   Port: MII
   PHYAD: 0
   Transceiver: internal
   Auto-negotiation: off
   Supports Wake-on: pumbg
   Wake-on: d
   Current message level: 0x00000033 (51)
                          drv probe ifdown ifup
   Link detected: yes

我嘗試使用 ethtool 但是當我嘗試更改為 1000Mb/s 時

$ sudo ethtool -s enp3s0 speed 1000 duplex full

Settings for enp3s0:
       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:  1000baseT/Full 
       Advertised pause frame use: Symmetric Receive-only
       Advertised auto-negotiation: No
       Advertised FEC modes: Not reported
       Speed: 1000Mb/s
       Duplex: Full
       Port: MII
       PHYAD: 0
       Transceiver: internal
       Auto-negotiation: off
       Supports Wake-on: pumbg
       Wake-on: d
       Current message level: 0x00000033 (51)
                              drv probe ifdown ifup
       Link detected: no

但我沒有連結連接

如果我嘗試提高 enp3s0 1000Mb 的速度消失,我又得到 100M

$ sudo ifup enp3s0 

$ 
Settings for enp3s0:
       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:  1000baseT/Full 
       Advertised pause frame use: Symmetric Receive-only
       Advertised auto-negotiation: No
       Advertised FEC modes: Not reported
       Speed: 100Mb/s
       Duplex: Half
       Port: MII
       PHYAD: 0
       Transceiver: internal
       Auto-negotiation: off
       Supports Wake-on: pumbg
       Wake-on: d
       Current message level: 0x00000033 (51)
                              drv probe ifdown ifup
       Link detected: yes
enp3s0: 100 Mbit, half duplex, link ok
$ 

我不知道還能嘗試什麼。

謝謝

解決了

$ sudo ethtool -s enp3s0 autoneg on

引用自:https://serverfault.com/questions/1002672