ethtool命令用于查询和控制网络设备驱动程序和硬件设置,尤其是有线以太网设备,devname网卡的名称。网卡就像是交换机的一个端口,正常使用我们只是配置网卡IP地址等信息,网卡的速率、双工模式等我们并不关心。通过ethtool命令我们可以像配置交换机网卡一样配置这些参数,这就是这个命令的魅力所在。
The ethtool command is used to query and control network device drivers and hardware settings, especially cable-to-team devices, the name of the devname web card. The net card is like an interface port where we normally use information such as the IP address of the net card, which we don't care about. Through the ethtool command, we can configure these parameters like the switchnet card, which is the charm of the command.
[root@s211 ~]# ethtool -h
[root@s211 ~]# ethtool --version
ethtool version 5.8
[root@s211 ~]# yum install -y ethtool
显示yes表示端口为up状态,使用命令ethtool devicename查看。
Displays yes for port status, using the command ethtool devicename.
【文章福利】小编推荐自己的Linux内核技术交流群:【749907784】整理了一些个人觉得比较好的学习书籍、视频资料共享在群文件里面,有需要的可以自行添加哦!!!(含视频教程、电子书、实战项目及代码)?
远程修改网关速率、双工和协商模式要小心,如果与交换机不一致或者协商失败可能导致网卡断开,远程中断。
Remote modification of gateway rates, double-working and consultation patterns should be careful, and if inconsistent with the switchboard or failure of the consultation could lead to a break in the netcard and a break in the remote.
网卡唤醒启动操作系统功能还需要bios参数配置协同才可以支持。
The webcard awakens the functionality of the operating system and also requires a co-ordinated configuration of the bios parameters to support it.
实际测试下来没有啥效果,可以看到支持的port类型包括tp,mii,但是设置为tp的时候无报错,查询结果还是mii。
The actual tests did not have much effect, and the supporting port types included tp, mii, but were set to tp without error, and the search results were still mii.
用法:ethtool [参数] [参数值] 网卡名称
Usage: ethtool [parameter] [parameter value] netcard name
ethtool的参数有很多,下面只列举主要和常用的进行介绍,更多的详细说明可以通过–help帮助获取。另外虽然ethtool命令支持的功能很多,有些参数命令是需要网卡支持的。
There are a number of parameters for ethtool, and only the main and commonly used presentations are listed below, and more details can be obtained through the help of –help. And although the ethtool command supports a lot of functions, some of the parameter commands need to be supported by a webcard.
原文作者:人人极客社区
Original author: Everyone's Expedition Community
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论