查看linux系统网卡工作模式、速率等

查看linux系统网卡工作模式、速率等

有时候,我们需要看下linux系统网卡工作模式、速率等,比较常

用到的命令是mii-tool、ethtool,下面简单看下即可。

www.2cto.com

查看下eth0网卡信息

[root@cloud ~]# mii-tool -v eth0

eth0: negotiated 100baseTx-FD flow-control, link ok

product info: vendor 00:00:20, model 32 rev 1

basic mode: autonegotiation enabled

basic status: autonegotiation complete, link ok

capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

从上面可以看出eth0 工作 100M全双工自适应模式下

[root@cloud ~]# ethtool eth0

Settings for eth0:

Supported ports: [ TP MII ]

Supported link modes: 10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Supports auto-negotiation: Yes

Advertised link modes: 10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Advertised pause frame use: Symmetric Receive-only

Advertised auto-negotiation: Yes

Link partner advertised link modes: 10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Link partner advertised pause frame use: Symmetric Receive-only

Link partner advertised auto-negotiation: Yes

Speed: 100Mb/s

Duplex: Full

Port: MII

PHYAD: 0

Transceiver: internal

Auto-negotiation: on

Supports Wake-on: pumbg

Wake-on: g

Current message level: 0x00000033 (51)

Link detected: yes

[root@cloud ~]#

 

  Linux