语法格式:
ethtool [参数]
常用参数:
-i | 显示网卡驱动的信息 |
---|---|
-E | 修改网卡只读存储器字节 |
-K | 修改网卡 Offload 的状态 |
ethx | 查询ethx网口基本设置,其中 x 是对应网卡的编号,如eth0、eth1等 |
-s | 修改网卡的部分配置 |
-t | 让网卡执行自我检测 |
实例
例1
[root@redhat ~]# ethtool eth1 #查询eth1网口基本设置 [root@redhat ~]# ethtool -i eth1 #查询eth1网口相关信息 [root@redhat ~]# ethtool -S eth1 #查询eth1网口收发包统计 [root@redhat ~]# ethtool -s eth1 autoneg off speed 100 duplex full #设置eth1网口速率
例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命令的使用方法分享结束,大家如果对ethtool命令的使用方法还有问题可以通过评论区将问题提交我们。
以上就是为各位朋友分享的相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多等着你 !