ethtool 是用于查询及设置网卡参数的命令,常见用法如下:

注意:该命令只是临时设置,如果网卡重启就失效了,如果想要永久保存应该配置 /etc/sysconfig/network-scripts/ifcfg-eth0 文件

 查看指定网卡的基本设置,内容包括网卡速率、网卡的工作模式等

ethtool eth0

[root@mysql ~]# ethtool eth0
Settings for eth0:
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:
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 ()
drv probe link
Link detected: yes
查看指定网卡的驱动信息,内容包括驱动的型号、驱动的版本等
ethtool -i eth0
[root@mysql ~]# ethtool -i eth0
driver: e1000
version: 7.3.-k8-NAPI
firmware-version:
expansion-rom-version:
bus-info: ::01.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

[root@mysql ~]# ethtool -s eth0 speed [||]    # 设置网卡的速率,单位是:Mb/s
[root@mysql ~]# ethtool -s eth0 duplex [half|full] # 设置网卡的工作模式,可设置为半双工或全双工
[root@mysql ~]# ethtool -s eth0 autoneg [on|off] # 设置网卡是否自动协商,自动协商的内容主要包括工作模式、网卡速率以及流控等参数
[root@mysql ~]# ethtool -s eth0 autoneg off speed duplex full # 也可以同时写在一起

 

Linux ethtool 命令的更多相关文章

  1. Linux ethtool命令

    一.简介 ethtool 是用于查询及设置网卡参数的命令. 二.常用选项 ethtool ethx //查询ethx网口基本设置,其中 x 是对应网卡的编号,如eth0.eth1等等 ethtool ...

  2. 用ethtool 命令解决Linux 网卡丢包【转】

    转自:https://blog.csdn.net/chengxuyuanyonghu/article/details/73739516 生产中有一台Linux设备并发比较大,droped包比较多,尤其 ...

  3. linux top命令中各cpu占用率含义

    linux top命令中各cpu占用率含义 [尊重原创文章摘自:http://www.iteye.com/topic/1137848]0.3% us 用户空间占用CPU百分比 1.0% sy 内核空间 ...

  4. linux 常用命令大全

    linux 常用命令大全 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统 ...

  5. linux 常用命令及技巧

    linux 常用命令及技巧 linux 常用命令及技巧:linux 常用命令总结: 一. 通用命令: 1. date :print or set the system date and time 2. ...

  6. ethtool命令

    用途 显示或修改以太网卡的配置信息. 语法 ethtool [ -a | -c | -g | -i | -d | -k | -r | -S |] ethX ethtool [-A] ethX [aut ...

  7. 一个linux常见命令的列表

    这是一个linux常见命令的列表. 那些有• 标记的条目,你可以直接拷贝到终端上而不需要任何修改,因此你最好开一个终端边读边剪切&拷贝. 所有的命令已在Fedora和Ubuntu下做了测试 命 ...

  8. Linux常用命令大全(非常全!!!)

    Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制,当然,这也是很多人喜欢linux的原因,比较短 ...

  9. 【转载】Linux常用命令

    Linux常用命令大全(非常全!!!) 转载出处:https://www.cnblogs.com/yjd_hycf_space/p/7730690.html 系统信息 arch 显示机器的处理器架构( ...

随机推荐

  1. (原创)Python文件与文件系统系列(1)—— file 对象

    本系列将从四个部分简单介绍Python对文件系统的操作与支持: 1. Python内置的 file 对象 2. Python的os模块对文件.文件系统操作的支持 3. Python的os.path模块 ...

  2. mysql delete两种关联删除方式

    基本格式:  DELETE t1 FROM t1,t2 WHERE t1.id=t2.id 或 DELETE FROM t1 USING t1,t2 WHERE t1.id=t2.id  示例应用: ...

  3. svn eclipse链接

    先下载site-1.8.22.zip 安装包 然后 在D:\software\eclipse\dropins 目录下新建 svn文件夹 把下载的文件解压到该文件夹下 ,*.xml 删除 不需要 只要 ...

  4. 【python】用python生成pdf文件

    转自:https://www.davidfischer.name/2015/08/generating-pdfs-with-and-without-python/ from reportlab.pla ...

  5. MVC和普通三层架构的区别

    MVC和普通三层架构的区别 其中这里的模型(Model)和视图(View )是完全区别于三层架构中的模型(Model)和视图(View)的. MVC 1)MVC中的模型(Model)指的是数据模型,用 ...

  6. Gym 101149L Right Build

    L. Right Build time limit per test 2.0 s memory limit per test 256 MB input standard input output st ...

  7. iOS - 标准时间与时间戳相互转换

    做倒计时后台传的不是时间戳,是时间然后需要与系统时间对比得出时间戳进行倒计时显示 #pragma mark -- 倒计时 // 倒计时时间 NSString* timeStr = task.recei ...

  8. 还有看不懂的java语句?

    Person stuProxy= (Person) Proxy.newProxyInstance(Person.class.getClassLoader(), new Class<?>[] ...

  9. 7.13python多进程

    所以引入了     多进程*(异步) 处理效率高 #!/usr/bin/env python #!--*--coding:utf-8 --*-- #!@Time :2018/7/13 19:26 #! ...

  10. 配置数据源的三种方式和sql心跳的配置

    三种方式配置数据源连接池: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=" ...