
我們有兩台連接到第三方平台的伺服器。一台伺服器經常出現通訊問題,而另一台則沒有。
我使用“route”命令驗證了兩台伺服器都使用“eth0”
當我在沒有連接問題的伺服器上執行“ethtool eth0”時,我得到以下資訊:
Settings for eth0:
Supported ports: [ Backplane ]
Supported link modes: 100000baseKR4/Full
100000baseSR4/Full
100000baseCR4/Full
100000baseLR4_ER4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100000baseKR4/Full
100000baseSR4/Full
100000baseCR4/Full
100000baseLR4_ER4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 100000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Current message level: 0x000000f7 (247)
drv probe link ifdown ifup rx_err tx_err
Link detected: yes
當我檢查存在 BAD 連接問題的伺服器時,我發現有很多不同之處:
Settings for eth0:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 50000Mb/s
Duplex: Unknown! (255)
Auto-negotiation: off
Port: None
PHYAD: 0
Transceiver: internal
Current message level: 0x000000f7 (247)
drv probe link ifdown ifup rx_err tx_err
Link detected: yes
這些伺服器都是託管在 Azure 上的 Ubuntu 22.04 伺服器
這個配置從哪裡來?我怎麼能改變一個像另一個一樣?
答案1
嘗試跑步
ip -s link show eth0
lsmod
這可能是由於缺少一些驅動程序,因此請嘗試比較兩台伺服器上的輸出。