首頁  >  文章  >  運維  >  linux如何查看網路卡訊息

linux如何查看網路卡訊息

尚
原創
2019-12-30 16:47:0528502瀏覽

linux如何查看網路卡訊息

1、使用ifconfig指令查看網卡資訊

ifconfig是linux中用來顯示或設定網路設備(網路介面卡)的指令,英文全名是network interfaces configuring。 ifconfig可設定網路設備的狀態,或顯示目前的設定。

範例:

linux如何查看網路卡訊息

2、使用ethtool檢視網卡

Ethtool是Linux下用於查詢及設定網卡參數的命令。

使用摘要:

ethtool ethx       //查詢ethx網口基本設置,其中x 是對應網路卡的編號,如eth0、eth1等等

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] [duplex half|full]  [autoneg on|off]        //設定網口速率10/100/1000M、設定網口半/全雙工、設定網口是否自協商

#範例:

[root@CentOS76 ~]# ethtool ens192
Settings for ens192:
    Supported ports: [ TP ]
    Supported link modes:   1000baseT/Full 
                            10000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: No
    Supported FEC modes: Not reported
    Advertised link modes:  Not reported
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Advertised FEC modes: Not reported
    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@CentOS76 ~]#

免費影片教學分享:linux影片教學

以上是linux如何查看網路卡訊息的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn