吴伟贤のBlog

Feed Rss

设置rhel 网卡全双工工作模式

10.19.2010, linux, by .

方法1:

用ethtool命令

1):查看当前的工作模式

ethtool eth0

2):设置成百兆全双工,关闭自适应

ethtool -s eth0 speed 100 duplex full autoneg off

方法2:

1). 查看网卡的工作模式,输入命令:

#mii-tool -v

eth0: negotiated 100baseTx-FD,link ok

product info:Vendor 00:05:be,model 8 rev 0

basic status: autonegotiation complete,link ok

basic mode:autonegotiation enabled.

Capabilities: …………..

从以上信息中可以看出,这块网卡工作在100M全双工自适应模式下,“100BaseTx-FD”意为100M Full Duplex。

2). 更改网卡的工作模式,输入命令:

#mii-tool -F media [interface]

media可选的模式有100baseTx-FD、100baseTx-HD、10baseT-FD、10baseT-HD等。 Interface代表所选择的网卡,如eth0、eth1等,默认为eth0。

例如,设置网卡工作在10M半双工模式下,输入命令:

#mii-tool -F 10baseT-HD eth0

3. 恢复网卡的自适应工作模式,输入命令:

#mii-tool -r eth0

更详细的使用方法可以用mii-tool -h来获得。

评论已关闭。