centos8平台使用ethtool配置网卡
一,ethtool命令所属的包
[root@centos8 liuhongdi]# whereis ethtool
ethtool: /usr/sbin/ethtool /usr/share/man/man8/ethtool.8.gz [root@centos8 liuhongdi]# rpm -qf /usr/sbin/ethtool
ethtool-5.0-2.el8.x86_64
默认情况下centos已自带了ethtool,
如果找不到此命令,可以用yum安装
[root@centos8 liuhongdi]# yum install ethtool
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
说明:作者:刘宏缔 邮箱: 371125307@qq.com
二,查看ethtool的版本和帮助:
1,查看版本
[root@centos8 liuhongdi]# ethtool --version
ethtool version 5.0
2,查看帮助
[root@centos8 liuhongdi]# ethtool --help
三,查看网卡的信息:
1,命令:
[root@centos8 liuhongdi]# ethtool ens33
Settings for ens33:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
2,输出字段的说明:
Supported ports: #网卡接口支持的类型,
FIBRE是光纤
TP 是双绞线,就是普通的RJ45网口 100Base-TX
AUI是粗缆接口 10Base-5
BNC是细缆接口 10Base-2
Supported link modes: #支持的模式有哪些
Supports auto-negotiation: #是否支持自动协商
Speed: #当前速度
Advertised link modes: #通告模式
Advertised auto-negotiation: #通告是否使用自动协商
Duplex: #工作模式,Full为全双工
Port: #接口类型,Twisted Pair是双绞线,FIBRE是光纤
Auto-negotiation: #自动协商是否打开,on是打开状态
Link detected: #是否连接到网络,yes是激活状态
Supports Wake-on: d #是否支持Wake On LAN,d:不支持,g:支持
Wake-on: #Wake On LAN是否启用,d:禁用,g:启用
Advertised link modes: #Advertise是给自动协商(用来配置速度和模式)的通告
PHYAD:#网卡的物理标识,如果两个device的PHYAD相同,表示在一块物理网卡上
四,查看网卡的驱动信息:
1,用-i参数查看驱动信息
[root@centos8 liuhongdi]# ethtool -i ens33
driver: e1000
version: 7.3.21-k8-NAPI
firmware-version:
expansion-rom-version:
bus-info: 0000:02:01.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
说明:
driver: #驱动
version: 版本
firmware-version: 固件版本
五,统计网卡收发包的数据
1,用 -S统计收发包的数据
[root@centos8 liuhongdi]# ethtool -S ens33
六,如果机器上安装了两块网卡,那么eth0对应着哪块网卡呢?
用 -p参数使网卡的led灯闪烁
操作完毕后,看哪块网卡的led灯在闪,eth0就对应着哪块网卡
[root@centos8 liuhongdi]# ethtool -p ens33 10
-p: 检测ens33这个device对应的物理接口,
10: 10秒时间后停止闪烁
参数的说明:
-p --identify
Initiates adapter-specific action intended to enable an operator to easily identify the adapter by sight. Typically this involves blinking
one or more LEDs on the specific network port. [ N] Length of time to perform phys-id, in seconds.
七,查看收发队列:
1,用 -g参数查看网卡收发队列的大小
[root@centos8 liuhongdi]# ethtool -g ens33
Ring parameters for ens33:
Pre-set maximums:
RX: 4096 #预设最大接收队列大小
RX Mini: 0
RX Jumbo: 0
TX: 4096 #预设最大发送队列大小
Current hardware settings:
RX: 256 #当前接收队列大小
RX Mini: 0
RX Jumbo: 0
TX: 256 #当前发送队列大小
八,相关的说明:
1,自动协商:Auto-Negotiation
它是主动的协商方式,具有这种功能的设备会主动与对方协商,并且等待对端返回协商结果,
它能够协商两端的工作速度是10M,还是100M还是1000M,
还可以协商两端工作的双工方式是半双工还是全双工.
2,Wake On LAN:
用来实现远程开机
九,本地centos的版本
[root@centos8 conf]# cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)
centos8平台使用ethtool配置网卡的更多相关文章
- centos8平台nginx服务配置打开文件限制max open files limits
一,nginx启动时提示打开文件数,ulimit的配置不起作用: 1, 2020/04/26 14:27:46 [notice] 1553#1553: getrlimit(RLIMIT_NOFILE) ...
- centos8平台给sudo配置日志
一,sudo日志的用途: 我们可以记录下来用户账号在哪个时间进行过sudo 这样不需要再从secure日志中查找用户的sudo记录 说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://w ...
- linux配置网卡IP地址命令详细介绍及一些常用网络配置命令
linux配置网卡IP地址命令详细介绍及一些常用网络配置命令2010-- 个评论 收藏 我要投稿 Linux命令行下配置IP地址不像图形界面下那么方 便,完全需要我们手动配置,下面就给大家介绍几种配置 ...
- RedHat5配置网卡
RedHat5配置网卡过程: 1.vi /etc/sysconfig/network-scripts/ifcfg-eth0 2.将hdcp修改成static 3.最后添加 IPADDR=192.168 ...
- linux系统下,安装centos7.0系统,配置网卡出现的问题(与centos5.x、centos6.x版本,有差异)
1.新建虚拟机时,自己下载的是centos64系统,选择系统时,默认选择centos,而未选择centos64位,导致犯了一个低级错误,导致后面网卡安装一直有问题 2.查看ip命令与centos5.x ...
- Disconf 分布式配置管理平台(安装配置)
Disconf 分布式配置管理平台(安装配置) 依赖环境 Nginx:处理静态资源请求.动态请求转发到Tomcat Tomcat:处理Nginx的请求 Redis:用户session管理 MySQL: ...
- 新建虚拟机并与XShell连接(配置网卡)
新建虚拟机并与XShell连接 一.新建虚拟机 下一步 下一步 选择CentOS版本,我的CentOS镜像是6.5版本64位,所以我选择CentOS 6 64. 然后点击下一步 可以自行更改位置,然后 ...
- Linux 创建虚拟机,配置网卡,桥接,连接XShell
一.新建虚拟机 1.“root” 输入密码: 2.看虚拟机的IP地址 “ifconfig” 二.配置网卡 1.更改设置(打开vim编辑) “vim /etc/sysconfig/network- ...
- Debian-Linux配置网卡网络方法
Debian不同于centos系统,网卡配置不是在/etc/sysconfig/network-scrip里面,而是在/etc/network/interfaces里面 1.Debian网络配置 配置 ...
随机推荐
- 吴恩达《深度学习》-第一门课 (Neural Networks and Deep Learning)-第四周:深层神经网络(Deep Neural Networks)-课程笔记
第四周:深层神经网络(Deep Neural Networks) 4.1 深层神经网络(Deep L-layer neural network) 有一些函数,只有非常深的神经网络能学会,而更浅的模型则 ...
- 小白的springboot之路(十八)、i18n多语言支持(后端篇)
0-前言 在有些系统中,比如网站,往往需要支持多国语言,英文版中文版什么的,这个其实也不难: 今天我们就来介绍spring boot中用i18n在后端支持多语言: 当然,也可以直接在前端用i18n直接 ...
- Mac部署spark2.4.4
环境信息 操作系统:macOS Mojave 10.14.6 JDK:1.8.0_211 (安装位置:/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jd ...
- 10.扩展:Zero Copy
- jdk在linux下安装、配置环境变量
1.jdk下载: 下载地址:https://www.oracle.com/java/technologies/javase-downloads.html 2. 3. 4.解压jdk到/usr/loca ...
- org.springframework.dao.InvalidDataAccessApiUsageException: The given id must not be null!; nested exception is java.lang.IllegalArgumentException: The given id must not be null
通过这个简单的案例,手把手教给你分析异常信息(适合初学者看) org.springframework.dao.InvalidDataAccessApiUsageException: The given ...
- 与Bat脚本的故事
因为工作时需要将定时处理的业务抽出来,废弃通过监听定时调用的这种方法,改为通过第三方软件定时执行bat脚本来实现,所以学习了一下bat脚本,整理出一些学习中的基础点和重点. 基础点: (1)bat脚本 ...
- 061 01 Android 零基础入门 01 Java基础语法 06 Java一维数组 08 一维数组总结
061 01 Android 零基础入门 01 Java基础语法 06 Java一维数组 08 一维数组总结 本文知识点:一维数组总结 总结 注意点
- c++中 预编译头文件PCH
转载:https://blog.csdn.net/lovemysea/article/details/74858430 一.预编译头文件使用经验: 如果预编译头文件被正确使用时,它确实大大提高我们编程 ...
- Java 实现截屏
操作系统:Windows 10 x64 参考:https://blog.csdn.net/weixin_40657079/article/details/83961708 1 import java. ...