zoukankan      html  css  js  c++  java
  • 使用ethtool工具来查看网卡是否工作

    描述:
    Ethtool是用于查询及设置网卡参数的命令。
    概要:
    ethtool ethX      //查询ethX网口基本设置
    ethtool –h        //显示ethtool的命令帮助(help)
    ethtool –i ethX    //查询ethX网口的相关信息 
    ethtool –d ethX    //查询ethX网口注册性信息
    ethtool –r ethX    //重置ethX网口到自适应模式
    ethtool –S ethX    //查询ethX网口收发包统计
    ethtool –s ethX [speed 10|100|1000]         //设置网口速率10/100/1000M
    [duplex half|full]           //设置网口半/全双工
    [autoneg on|off]            //设置网口是否自协商
    [port tp|aui|bnc|mii]         //设置网口类型
    [phyad N]                 
    [xcvr internal|exteral]
    [wol p|u|m|b|a|g|s|d...]
    [sopass xx:yy:zz:aa:bb:cc]
    [msglvl N]   

    举例:

    [root@dg1 ~]# ethtool eth0
    Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   1000baseT/Full 
                                10000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: No
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 10000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        MDI-X: Unknown
        Supports Wake-on: uag
        Wake-on: d
        Link detected: yes
    [root@dg1 ~]# ethtool eth1
    Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:   1000baseT/Full 
                                10000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: No
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        MDI-X: Unknown
        Supports Wake-on: uag
        Wake-on: d
        Link detected: no
  • 相关阅读:
    SRM 551 div2
    HDU_4390 Number Sequence (容斥原理)
    HDU 多校联合第五场
    HDU 多校联合第六场
    POJ 2057 The Lost House (经典树形dp)
    Lucas定理
    HDU 4385 Moving Bricks (状态dp+贪心)
    HDU 多校联合第三场
    当最短路变成二维 _!
    POJ 1848 (一道不错的树形dp)
  • 原文地址:https://www.cnblogs.com/wqswjx/p/5541102.html
Copyright © 2011-2022 走看看