温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Linux常用命令ethtool怎么用

发布时间:2022-02-16 13:50:52 来源:亿速云 阅读:315 作者:小新 栏目:开发技术

小编给大家分享一下Linux常用命令ethtool怎么用,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

Linux常用命令ethtool命令用于查询ethX网口基本设置、及设置网卡的参数

Linux常用命令ethtool怎么用

语法格式:

ethtool [参数]

常用参数:

-i显示网卡驱动的信息
-E修改网卡只读存储器字节
-K修改网卡 Offload 的状态
ethx查询ethx网口基本设置,其中 x 是对应网卡的编号,如eth0、eth2等
-s修改网卡的部分配置
-t让网卡执行自我检测

实例

例1

 [root@redhat ~]# ethtool eth2         #查询eth2网口基本设置 
 [root@redhat ~]# ethtool -i eth2      #查询eth2网口相关信息 
 [root@redhat ~]# ethtool -S eth2       #查询eth2网口收发包统计 
 [root@redhat ~]# ethtool -s eth2 autoneg off speed 100 duplex full   #设置eth2网口速率

例2

 root@c:~# ethtool -k br-prv  #显示网卡详细信息 Features for br-prv: Cannot get device udp-fragmentation-offload settings: Operation not supported rx-checksumming: off [fixed] tx-checksumming: on  tx-checksum-ipv4: off [fixed]  tx-checksum-ip-generic: on  tx-checksum-ipv6: off [fixed]  tx-checksum-fcoe-crc: off [fixed]  tx-checksum-sctp: off [fixed] scatter-gather: on  tx-scatter-gather: on  tx-scatter-gather-fraglist: on tcp-segmentation-offload: on  tx-tcp-segmentation: on  tx-tcp-ecn-segmentation: on  tx-tcp-mangleid-segmentation: on  tx-tcp6-segmentation: on udp-fragmentation-offload: off generic-segmentation-offload: on generic-receive-offload: on large-receive-offload: off [fixed] rx-vlan-offload: off [fixed] tx-vlan-offload: on ntuple-filters: off [fixed] receive-hashing: off [fixed] highdma: on rx-vlan-filter: off [fixed] vlan-challenged: off [fixed] tx-lockless: on [fixed] netns-local: off [fixed] tx-gso-robust: off [fixed] tx-fcoe-segmentation: off [fixed] tx-gre-segmentation: on tx-gre-csum-segmentation: on tx-ipxip4-segmentation: on tx-ipxip6-segmentation: on tx-udp_tnl-segmentation: on tx-udp_tnl-csum-segmentation: on tx-gso-partial: off [fixed] tx-sctp-segmentation: on tx-esp-segmentation: off [fixed] fcoe-mtu: off [fixed] tx-nocache-copy: off loopback: off [fixed] rx-fcs: off [fixed] rx-all: off [fixed] tx-vlan-stag-hw-insert: on rx-vlan-stag-hw-parse: off [fixed] rx-vlan-stag-filter: off [fixed] l2-fwd-offload: off [fixed] hw-tc-offload: off [fixed] esp-hw-offload: off [fixed] esp-tx-csum-hw-offload: off [fixed] rx-udp_tunnel-port-offload: off [fixed]

看完了这篇文章,相信你对“Linux常用命令ethtool怎么用”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI