linuxネットワークカードの速度とモード調整の表示

1497 ワード

[root@c02b03 ~]#  ethtool eth0
Settings for eth0:
        Supported ports: [ FIBRE ]
        Supported link modes:   1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  1000baseT/Full 
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000003 (3)
        Link detected: no
[root@c02b03 ~]#  ethtool eth1
Settings for eth1:
        Supported ports: [ FIBRE ]
        Supported link modes:   1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  1000baseT/Full 
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000003 (3)
        Link detected: yes

または古いmii-toolコマンド(ただし、このコマンドは100 M以下のNICしか認識できないようです)でも構いません.
このうちDuplex:Fullはフルデュプレクス(FD)、halfはセミデュプレクス(HD)、Auto-negotiationは自動ネゴシエーションの有無を示す
/etc/sysconfig/network-scripts/ifcfg-eth 0ファイルの
ETHTOOL_OPTS="speed 100 duplex full autoneg off"

パラメータを設定し、ifupとifdownを使用してテストします.