欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > linux >内容正文

linux

linux查询网卡是百兆还是千兆,查看网卡是百兆还是千兆

发布时间:2023/12/20 linux 34 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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]\ //设置网口类型

如想了解更多,请关注电鱼电子(http://www.dianyu.net)

总结

以上是生活随笔为你收集整理的linux查询网卡是百兆还是千兆,查看网卡是百兆还是千兆的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。