网络层面基础命令
1.查看网卡速率
可以通过如下三个命令进行查看
1.ethtool命令
[root@confluence ~]# 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
2.lspci
#万兆网卡显示为10-Gigabit,千兆网卡显示Gigabit,但是不方便看网卡名称。
[root@confluence ~]# lspci |grep Ethernet 02:00.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
3.dmesg
看到 Up 1000Mps full duplex 就知道是千兆网卡了。
[root@confluence ~]# dmesg |grep eth0 e1000 0000:02:00.0: eth0: (PCI:66MHz:32-bit) 00:0c:29:41:d0:db e1000 0000:02:00.0: eth0: Intel(R) PRO/1000 Network Connection e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None eth0: no IPv6 routers present