linux以太网(二).之ethtool命令

linux以太网(二).之ethtool命令ethtool 是一个用于查看和配置网络接口控制器参数的工具

大家好,欢迎来到IT知识分享网。

一、命令描述:

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

ethtool eth0 //查询eth网口基本设置 ethtool –h //显示ethtool的命令帮助(help) ethtool –i eth0 //查询eth0网口的相关信息  ethtool –d eth0 //查询eth0网口注册性信息 ethtool –r eth0 //重置eth0网口到自适应模式 ethtool –S eth0 //查询eth0网口收发包统计 ethtool –s eth0 [speed 10|100|1000] [duplex half|full] [autoneg on|off] //设置网口速率10/100/1000M、网口半/全双工、网口是否自协商 ethtool -E eth0 magic 0x offset 0x10 value 0x1A //修改网卡EEPROM内容(0x1079 网卡device id , 0x8086网卡verdor id ) ethtool -e eth0 //dump网卡EEPROM内容 

二、使用举例:
1) ethtool ens33
在这里插入图片描述
在这里插入图片描述
2) ethtool -i ens33
在这里插入图片描述
3) ethtool -S ens33
在这里插入图片描述






[root]# ethtool -t ens33 The test result is PASS The test extra info: Register test (offline) 0 Eeprom test (offline) 0 Interrupt test (offline) 0 Loopback test (offline) 0 Link test (on/offline) 0 
ethtool -h ethtool version 5.4 Usage: ethtool DEVNAME Display standard information about device ethtool -s|--change DEVNAME Change generic options [ speed %d ] [ duplex half|full ] [ port tp|aui|bnc|mii|fibre ] [ mdix auto|on|off ] [ autoneg on|off ] [ advertise %x ] [ phyad %d ] [ xcvr internal|external ] [ wol p|u|m|b|a|g|s|f|d... ] [ sopass %x:%x:%x:%x:%x:%x ] [ msglvl %d | msglvl type on|off ... ] ethtool -a|--show-pause DEVNAME Show pause options ethtool -A|--pause DEVNAME Set pause options [ autoneg on|off ] [ rx on|off ] [ tx on|off ] ethtool -c|--show-coalesce DEVNAME Show coalesce options ethtool -C|--coalesce DEVNAME Set coalesce options [adaptive-rx on|off] [adaptive-tx on|off] [rx-usecs N] [rx-frames N] [rx-usecs-irq N] [rx-frames-irq N] [tx-usecs N] [tx-frames N] [tx-usecs-irq N] [tx-frames-irq N] [stats-block-usecs N] [pkt-rate-low N] [rx-usecs-low N] [rx-frames-low N] [tx-usecs-low N] [tx-frames-low N] [pkt-rate-high N] [rx-usecs-high N] [rx-frames-high N] [tx-usecs-high N] [tx-frames-high N] [sample-interval N] ethtool -g|--show-ring DEVNAME Query RX/TX ring parameters ethtool -G|--set-ring DEVNAME Set RX/TX ring parameters [ rx N ] [ rx-mini N ] [ rx-jumbo N ] [ tx N ] ethtool -k|--show-features|--show-offload DEVNAME Get state of protocol offload and other features ethtool -K|--features|--offload DEVNAME Set protocol offload and other features FEATURE on|off ... ethtool -i|--driver DEVNAME Show driver information ethtool -d|--register-dump DEVNAME Do a register dump [ raw on|off ] [ file FILENAME ] ethtool -e|--eeprom-dump DEVNAME Do a EEPROM dump [ raw on|off ] [ offset N ] [ length N ] ethtool -E|--change-eeprom DEVNAME Change bytes in device EEPROM [ magic N ] [ offset N ] [ length N ] [ value N ] 

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/114933.html

(0)
上一篇 2025-12-06 07:00
下一篇 2025-12-06 07:15

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信