码迷,mamicode.com
首页 > 其他好文 > 详细

查看网卡是百兆还是千兆

时间:2019-11-02 15:39:20      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:告诉   inux   pause   网卡   text   iat   ext   网卡参数   linux   

 查看网卡是百兆还是千兆

      网卡对于我们来说相当于家常便饭,自己买的还好,人家会告诉你是什么型号,工作环境调动,又没有人告诉你网卡信息这就需要自己辨识了,究竟怎样查看网卡是百兆还是千兆呢?通过以下几步就可以啦

使用ethtool命令

ethtool是Linux下用于查询及设置网卡参数的命令

输入指令如下所示:

root@imx6qdlsolo:~# ethtool eth0

Settings for eth0:

        Supported ports: [ TP MII ]

        Supported link modes:   10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Supported pause frame use: Symmetric

        Supports auto-negotiation: Yes

        Advertised link modes:  10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Advertised pause frame use: Symmetric

        Advertised auto-negotiation: Yes

        Link partner advertised link modes:  10baseT/Half 10baseT/Full

                                             100baseT/Half 100baseT/Full

                                             1000baseT/Full

        Link partner advertised pause frame use: Symmetric

        Link partner advertised auto-negotiation: Yes

        Speed: 1000Mb/s

        Duplex: Full

        Port: MII

        PHYAD: 1

        Transceiver: external

        Auto-negotiation: on

        Supports Wake-on: g

        Wake-on: d

        Link detected: yes

root@imx6qdlsolo:~#

 

详细参数参考:(//后面是注释,是原文的译文)

ethtool ethX /

ethtool –h //显示ethtool的命令帮助(help)

ethtool –i ethX //查询ethX网口的相关信息

ethtool –d ethX //查询ethX网口注册性信息

ethtool –r ethX //重置ethX网口到自适应模式

ethtool –S ethX //查询ethX网口收发包统计

ethtool –s ethX [speed 10|100|1000]\ //设置网口速率10/100/1000M

[duplex half|full]\ //设置网口半/全双工

[autoneg on|off]\ //设置网口是否自协商

[port tp|aui|bnc|mii]\ //设置网口类型

如果对你有帮助的话,就推一下博主吧!

查看网卡是百兆还是千兆

标签:告诉   inux   pause   网卡   text   iat   ext   网卡参数   linux   

原文地址:https://www.cnblogs.com/dianyu/p/11782371.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!