Linux中mii-tool命令怎么用(linux,mii-tool,开发技术)

时间:2024-05-09 21:01:49 作者 : 石家庄SEO 分类 : 开发技术
  • TAG :

Linux常用命令mii-tool命令 是用于查看、管理介质的网络接口的状态,有时网卡需要配置协商方式,比如10/100/1000M的网卡半双工、全双工、自动协商的配置。

Linux中mii-tool命令怎么用

mii-tool

配置网络设备协商方式的工具

补充说明

大多数的网络设备是不用我们来修改协商,因为大多数网络设置接入的时候,都采用自动协商来解决相互通信的问题。不过自动协商也不是万能的,有时也会出现错误,比如丢包率比较高,这时就要我们来指定网卡的协商方式。mii-tool就是能指定网卡的协商方式。下面我们说一说mii-tool的用法。

语法

usage:mii-tool[-VvRrwl][-Amedia,...|-Fmedia][interface...]

选项

-V显示版本信息;-v显示网络接口的信息;-R重设MII到开启状态;-r重启自动协商模式;-w查看网络接口连接的状态变化;-l写入事件到系统日志;-A指令特定的网络接口;-F更改网络接口协商方式;media:100baseT4,100baseTx-FD,100baseTx-HD,10baseT-FD,10baseT-HD,(toadvertisebothHDandFD)100baseTx,10baseT

实例

查看网络接口的协商状态:

[root@localhost~]#mii-tool-veth0eth0:negotiated100baseTx-FD,linkokproductinfo:vendor00:50:ef,model60rev8basicmode:autonegotiationenabledbasicstatus:autonegotiationcomplete,linkokcapabilities:100baseTx-FD100baseTx-HD10baseT-FD10baseT-HDadvertising:100baseTx-FD100baseTx-HD10baseT-FD10baseT-HDflow-controllinkpartner:100baseTx-FD100baseTx-HD10baseT-FD10baseT-HD

注:上面的例子,我们可以看得到是自动协商,注意红字的部份。

更改网络接口协商方式:

更改网络接口的协商方式,我们要用到-F选项,后面可以接100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD等参数;

如果我们想把网络接口eth0改为1000Mb/s全双工的模式应该怎么办呢?

[root@localhost~]#mii-tool-F100baseTx-FD[root@localhost~]#mii-tool-veth0eth0:100Mbit,fullduplex,linkokproductinfo:vendor00:00:00,model0rev0basicmode:100Mbit,fullduplexbasicstatus:linkokcapabilities:100baseTx-FD100baseTx-HD10baseT-FD10baseT-HDadvertising:100baseTx-FD100baseTx-HD10baseT-FD10baseT-HD

注:是不是已经改过来了?当然,我们也一样用ethtool工具来更改,比如执行下面的命令:

[root@localhost~]#ethtool-seth0speed100duplexfull
 </div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
本文:Linux中mii-tool命令怎么用的详细内容,希望对您有所帮助,信息来源于网络。
上一篇:Linux中mkinitrd命令怎么用下一篇:

5 人围观 / 0 条评论 ↓快速评论↓

(必须)

(必须,保密)

阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18