Centos 6.5でethoolでNIC速度を制限

1957 ワード

操作環境:
Centos 6.5 x86_64
ethtool
 
操作手順:
この時点でのネットワークポートem 1デバイス情報の表示
[root@ceph-osd-2 ~]# ethtool em1
Settings for em1:
        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
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d
        Link detected: yes

ethoolを使用してem 1ポートレートを表示し、設定できないことを示す
[root@ceph-osd-2 ~]# ethtool -s em1 speed 100
Cannot advertise speed 100

 
後で資料を探して、正しく設定する方法は以下の通りです.
#ethtool -s em1 speed 100 duplex full autoneg off

この時点のem 1ポート情報を表示
[root@ceph-osd-2 ~]# ethtool em1
Settings for em1:
        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
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: off
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d
        Link detected: yes

構成に成功しました