Linux/Unixmii-toolcommand-成都快上网建站

Linux/Unixmii-toolcommand

mii-tool:linux下专门设置网卡工作模式的命令
mii-tool --help
usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...]
       -V, --version               display version information       显示版本信息
       -v, --verbose               more verbose output               显示网络接口的信息;
       -R, --reset                 reset MII to poweron state        重设MII到开启状态;
       -r, --restart               restart autonegotiation           重启自动协商模式;
       -w, --watch                 monitor for link status changes   查看网络接口连接的状态变化;
       -l, --log                   with -w, write events to syslog   写入事件到系统日志;
       -A, --advertise=media,...   advertise only specified media    指令特定的网络接口;
       -F, --force=media           force specified media technology  更改网络接口协商方式;   
      
media: 1000baseTx-HD, 1000baseTx-FD,
       100baseT4, 100baseTx-FD, 100baseTx-HD,
       10baseT-FD, 10baseT-HD,
       (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT
更改网卡的工作模式,输入命令:
[root@10.10.90.97 ~]# mii-tool -f media [interface]
media:     1000baseTx-HD, 1000baseTx-FD,100baseT4, 100baseTx-FD, 100baseTx-HD,10baseT-FD, 10baseT-HD
interface: 代表所选的网卡,例如eth0,eth2,默认为eth2
实例1:查看网卡的工作模式
[root@10.10.90.97 ~]# mii-tool -v eth0
eth0: negotiated 1000baseT-FD flow-control, link ok
  product info: vendor 00:50:ef, model 60 rev 8
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
以上显示这块网卡工作在1000m全双工自适应模式下,“1000basetx-fd”意为1000m full duplex
实例2:设置网卡工作在100M半双工模式下
[root@10.10.90.97 ~]# mii-tool -f 100baset-hd eth0
实例3:恢复网卡的自适应工作模式
[root@10.10.90.97 ~]# mii-tool -r eth0


当前标题:Linux/Unixmii-toolcommand
当前路径:http://kswjz.com/article/gchhee.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流