zoukankan      html  css  js  c++  java
  • Linux ethtool 命令

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

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

    [root@localhost ~]$ ethtool eth1                           # 查看指定网卡的基本设置,内容包括网卡速率、网卡的工作模式等
    [root@localhost ~]$ ethtool -i eth1                        # 查看指定网卡的驱动信息,内容包括驱动的型号、驱动的版本等
    [root@localhost ~]$ ethtool -s eth1 speed [10|100|1000]    # 设置网卡的速率,单位是:Mb/s
    [root@localhost ~]$ ethtool -s eth1 duplex [half|full]     # 设置网卡的工作模式,可设置为半双工或全双工
    [root@localhost ~]$ ethtool -s eth1 autoneg [on|off]       # 设置网卡是否自动协商,自动协商的内容主要包括工作模式、网卡速率以及流控等参数
    [root@localhost ~]$ ethtool -s eth1 autoneg off speed 100 duplex full    # 也可以同时写在一起

          

  • 相关阅读:
    冲刺4
    冲刺3
    冲刺2
    冲刺一
    构建之法阅读笔记04
    数组02开发日志
    进度条第七周
    《构建之法》阅读问题
    软件工程概论第一节
    《大道至简》弟七八章读后感
  • 原文地址:https://www.cnblogs.com/pzk7788/p/10372863.html
Copyright © 2011-2022 走看看