在 Linux 中升級埠速度
在 Linux中使用下列資訊來更新埠速度。
下列指令會影響伺服器的連線功能。 一律透過先連接至您未使用的 IP 來管理網路連線。
您可以執行下列指令來檢查現行連線速度:
# ethtool eth# (eth1 for public, eth0 for private)
輸出會顯示該連線的現行配置:
root@noc-training-linux [~]# ethtool eth1
eth1 的設定:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 3
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: yes
root@noc-training-linux [~]#
若要變更速度,請使用您喜愛的文字編輯器來編輯下列檔案:
/etc/sysconfig/network-scripts/ifcfg-eth# (ifcfg-eth1 for public, ifcfg-eth0 for private)
您會看到下列行:
ETHTOOL_OPTS="autoneg off speed 100 duplex full"
此項目容許在開機時強制自動協調、速度及雙工,透過重新啟動保持一致配置。 速度可以修改成符合新的埠速度。 此修改需要在套用新速度之前重新啟動網路。
在 ifcfg-eth# 檔案中,必須已啟用所有強制為 1000 Mbps 之連線的自動協調。