织梦CMS - 轻松建站从此开始!

罗索

LINUX网卡(设置千兆网卡速度及模式)

jackyhwei 发布于 2020-03-24 11:34 点击:次 
Ethtool是用于查询及设置网卡参数的命令。 概要: ethtool ethX //查询ethX网口基本设置 ethtool h //显示ethtool的命令帮助(help) ethtool i ethX //查询ethX网口的相关信息 ethtool d ethX //查询ethX网口注册性信息
TAG: 网卡  千兆网卡  网卡速度  

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

概要:
ethtool ethX //查询ethX网口基本设置
ethtool –h //显示ethtool的命令帮助(help)
ethtool –i ethX //查询ethX网口的相关信息
ethtool –d ethX //查询ethX网口注册性信息
ethtool –r ethX //重置ethX网口到自适应模式
ethtool –S ethX //查询ethX网口收发包统计
ethtool –s ethX [speed 10|100|1000]\ //设置网口速率10/100/1000M
[duplex half|full]\ //设置网口半/全双工
[autoneg on|off]\ //设置网口是否自协商
[port tp|aui|bnc|mii]\ //设置网口类型
[phyad N]\
[xcvr internal|exteral]\
[wol p|u|m|b|a|g|s|d...]\
[sopass xx:yy:zz:aa:bb:cc]\
[msglvl N]

举例:
1)[root@linux /]# ethtool eth1
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: d
Link detected: yes
2)[root@linux /]# ethtool -i eth1
driver: e1000
version: 5.0.43-k1
firmware-version: N/A
bus-info: 06:08.1
3)[root@linux /]# ethtool -S eth1
NIC statistics:
rx_packets: 58068300
tx_packets: 87124083
rx_bytes: 1589713008

(wzyzzu)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/202003/17640.html]
本文出处:CSDN博客 作者:wzyzzu 原文
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容