ethtool命令

Linux 下ethtool命令用来获取以太网卡的配置信息,或者修改这些配置。

640?wx_fmt=png

640?wx_fmt=png

640?wx_fmt=png

640?wx_fmt=png


选项:

-a 查看网卡中 接收模块RX、发送模块TX和Autonegotiate模块的状态:启动on 或 停用off。 


-A 修改网卡中 接收模块RX、发送模块TX和Autonegotiate模块的状态:启动on 或 停用off。

 

-c display the Coalesce information of the specified ethernet card。 


-C Change the Coalesce setting of the specified ethernet card。 


-g Display the rx/tx ring parameter information of the specified ethernet card。 


-G change the rx/tx ring setting of the specified ethernet card。


-i 显示网卡驱动的信息,如驱动的名称、版本等。


-d 显示register dump信息, 部分网卡驱动不支持该选项。


-e 显示EEPROM dump信息,部分网卡驱动不支持该选项。 </span>


-E 修改网卡EEPROM byte。 


-k 显示网卡Offload参数的状态:on 或 off,包括rx-checksumming、tx-checksumming等。


-K 修改网卡Offload参数的状态。


-p 用于区别不同ethX对应网卡的物理位置,常用的方法是使网卡port上的led不断的闪;N指示了网卡闪的持续时间,以秒为单位。


-r 如果auto-negotiation模块的状态为on,则restarts auto-negotiation。


-S 显示NIC- and driver-specific 的统计参数,如网卡接收/发送的字节数、接收/发送的广播包个数等。


-t 让网卡执行自我检测,有两种模式:offline or online。


-s 修改网卡的部分配置,包括网卡速度、单工/全双工模式、mac地址等。


实例:


查看机器上网卡的速度:百兆还是千兆

ethtool eth0


停止网卡的发送模块TX

ethtool -A tx off eth0


查看tx模块是否被停止

ethtool -a eth0


查看网卡eth0采用何种驱动

ethtool -i eth0


关闭网卡对收到的数据包的校验功能

ethtool -K eth0 rx off


查看校验功能是否停止

ethtool -k eth0


将千兆网卡的速度降为百兆

ethtool -s eth0 speed 100

640?wx_fmt=jpeg



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值