無法透過 ethtool 停用 autoneg

無法透過 ethtool 停用 autoneg

我想禁用auto-negotiation網卡的功能,我運行以下命令

$sudo ethtool -s ens1f0 speed 10000 duplex full autoneg off

然後我透過以下方式檢查它是否生效ethtool ens1f0

Settings for ens1f0:
        Supported ports: [ FIBRE ]
        Supported link modes:   1000baseT/Full
                                10000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

仍然打開autoneg,為什麼不起作用?

更新2020/8/22

我的網路卡是82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb,我發現 10GBASE-T 連結的auto-neg功能在某些情況下可能會關閉。

  1. 奇怪的是,一個網路卡的兩個連接埠有不同的autoneg狀態。我對此真的很困惑。
Settings for ens1f0:
        Supported ports: [ FIBRE ]
        Supported link modes:   1000baseT/Full
                                10000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  1000baseT/Full
                                10000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

Settings for ens1f1:
        Supported ports: [ FIBRE ]
        Supported link modes:   10000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  10000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
Cannot get wake-on-lan settings: Operation not permitted
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
  1. 當連接埠沒有與對端建立連接時,燈autoneg
Settings for ens1f1:
        Supported ports: [ FIBRE ]
        Supported link modes:   10000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  10000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
Cannot get wake-on-lan settings: Operation not permitted
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: no

答案1

無法在 10GBASE-T 鏈路上停用自動協商。 802.3標準表明自動協商是強制性的對於此類連結。部分原因包括:

55.6.1 支援自動協商

所有 10GBASE-T PHY 應提供自動協商支援(第 28 條),並且應能夠作為主設備或從設備運作。所有10GBASE-T PHY 應提供對28.2.3.4.2 中定義的擴展下一頁的支持,並應支持和使用28.2.1.1.1 中定義的優化FLP 突發到FLP 突發時序,以及28.3 中定義的nlp_link_test_min_timer 和link_fail_inhibit_timer。

自動協商作為鏈路初始設定的一部分執行,允許每一端的 PHY 通告其功能(速度、PHY 類型、半雙工或全雙工),並自動選擇鏈路上通訊的操作模式。自動協商訊號用於 10GBASE-T 的以下主要目的:

  • 協商 PHY 是否能夠支援 10GBASE-T 傳輸。
  • 決定鏈路兩端 PHY 之間的主從關係。
  • 決定本地 PHY 是否執行 PMA 訓練模式重設。
  • 確定本地PHY是否支援EEE能力。
  • 確定本地PHY是否支援快速重訓練能力。

相關內容