莱因电博

Li-e.cn

Li Internet Electronic Blog
@rss

Linux 设置网卡速率、全/半双工模式

Linux sets the working mode of the network adapter, such as speed, and full/half duplex mode.

————————————————————

1. 设置网卡的速率

单位:Mb/s

ethtool -s eth0 speed [10|100|1000] 

2. 设置网卡是否自动协商

ethtool -s eth0 autoneg [on|off]

3. 设置网卡的工作模式,可设置为半双工或全双工

ethtool -s eth0 duplex [half|full] 

3. 设置网口速率10/100/1000M、设置网口半/全双工、设置网口是否自协商

ethtool -s eth0 [speed 10|100|1000] [duplex half|full] [autoneg on|off]

例:修改eth0非自动协商,100M,全双工

ethtool -s eth0 autoneg off speed 100 duplex full
(C) 2019 - 2024 Li-e.cn莱因电博(立网电子博客) | Powered by Vercel , based on Hugo with Gists theme.