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. CentOS服务器ntpdate同步

    如有多台CentOS服务器运行相同的服务,且对时间准确性要求较高,那必须保证多台服务器时间统一. 最简单的就是每台服务器都用ntpdate同步同一台网络时间服务器的时间. 1.输入ntpdate ti ...

  2. centos7目录统计之du命令

    CentOS下du查看计算目录大小的命令 用法实例: [root@localhost local]# du -hs smgpdfd 3.3G    smgpdfd [root@localhost lo ...

  3. 使用UIScrollView 结合 UIImageView 实现图片循环滚动

    场景: 在开发工作中,有时我们需要实现一组图片循环滚动的情况.当我们使用 UIScrollView 结合 UIImageView 来实现时,一般 UIImageView 会尽量考虑重用,下面例子是以( ...

  4. [IR] Open Source Search Engines

    From:http://blog.csdn.net/xum2008/article/details/8740063 本文档是对现有的开源的搜索引擎的一个简单介绍 1.    Lucene Lucene ...

  5. iOS shell脚本打包

    原文链接:http://www.jianshu.com/p/5abbe0d61cef 参考链接:http://blog.csdn.net/potato512/article/details/52176 ...

  6. ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory

    在开发一个python项目是,需要用到mysql,但是, 安装完mysql-python后import加载模块提示以下错误: ImportError: libmysqlclient_r.so.16: ...

  7. centos7.0 yum 安装php服务器

    https://blog.csdn.net/jiaoshenmo/article/details/50923900 首先收一下:centos7.0用yum直接安装apache.php他们的默认版本是a ...

  8. RabbitMQ随笔

    不管是官方还是能搜到的文章,使用MQ的基本思路都是这样: static void Main(string[] args) { //通过工厂建立连接 using (IConnection connect ...

  9. AWS EC2 使用root账户密码登陆

    创建亚马逊的云主机EC2会提示下载一个pem的文件,需要使用puttygen转换成ppk私钥,转换过程如下图: 然后在使用putty登录,用户名是ec2-user.下面将修改使用root账户登录: 1 ...

  10. win10屏幕变灰怎么解决?

    朋友们在使用电脑过程中最高频使用的快捷键可能就是ctrl+c, ctrl+v了,但是殊不知,有时候按的太快产生误触,触发了ctrl+win+c,是屏幕变成了灰色,只需要再次同时按下这三个键就可以恢复彩 ...