linux 下mii-tool ethtool 命令簡單的使用

來源:互聯網
上載者:User

標籤:linux下mii-tool ethtool 命令簡單的使用

################################################################

通過命令查看linux網卡的物理資訊,狀態:

[[email protected] ~]# mii-tool  eth0

eth0: negotiated 100baseTx-FD, link ok   

 

-V 顯示版本資訊; -v 顯示網路介面的資訊;

 -R 重設MII到開啟狀態; -r 重啟自動協商模式;

 -w 查看網路介面串連的狀態變化; -l 寫入事件到系統日誌;

 -A 指令特定的網路介面; -F 更改網路介面協商方式;


如果我們想把網路介面eth0改為1000Mb/s全雙工系統的模式應該怎麼辦呢? 

[[email protected] ~]# mii-tool -F 100baseTx-FD

#################################################################

通過mii-tool命令查看的資訊實在是太少了,還可用下面的命令查看更多的網卡資訊。


通過ethtool eth0來查看更多的底層資訊:

[[email protected] ~]# ethtool eth0

Settings for eth0:

        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: 0

        Transceiver: internal

        Auto-negotiation: on

        MDI-X: Unknown

        Supports Wake-on: d

        Wake-on: d

        Current message level: 0x00000007 (7)

                               drv probe link

        Link detected: yes


通過ethtool -i eth0 可以來查看網卡的驅動資訊:

[[email protected] ~]# ethtool -i eth0                //網卡的驅動版本

driver: e1000

version: 7.3.21-k8-NAPI

firmware-version: 

bus-info: 0000:02:01.0

supports-statistics: yes

supports-test: yes

supports-eeprom-access: yes

supports-register-dump: yes

supports-priv-flags: no


可以通過ethtool -S eth0來查看網卡的工作狀態:

如:可以查看網卡的輸入資料流量,輸出資料流量,輸入包,輸出包,輸入的廣播,輸出的廣播,輸入的網路錯包,輸出的網路錯包等。。。


linux 下mii-tool ethtool 命令簡單的使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.