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    # 也可以同时写在一起

          

  • 相关阅读:
    html笔记
    Git入门学习总结
    使用OpenSSH远程管理Linux服务器
    Linux 网卡驱动的安装
    vi的使用
    Linux下常用的数据恢复工具
    网络文件系统(NFS)的使用
    文件系统管理
    磁盘存储管理
    用户权限管理
  • 原文地址:https://www.cnblogs.com/pzk7788/p/10372863.html
Copyright © 2011-2022 走看看