红联Linux门户
Linux帮助

mii-tool(这是linux下专门设置网卡工作模式的命令)

发布时间:2008-06-14 01:17:53来源:红联作者:Segim
1. 查看网卡的工作模式,输入命令:

#mii-tool -v
eth0: negotiated 100basetx-fd, link ok
product info: vendor 00:aa:00, model 56 rev 0
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100basetx-fd 100basetx-hd 10baset-fd 10baset-hd
advertising: 100basetx-fd 100basetx-hd 10baset-fd 10baset-hd flow-control
link partner: 100basetx-fd 100basetx-hd 10baset-fd 10baset-hd

从以上信息中可以看出,这块网卡工作在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来获得。
文章评论

共有 0 条评论