查看网络设备接口,ifconfig命令执行后,结果如下,其中lo是本地环回接口。我们要查的是ens160。 ubuntu@junyan-51:~$ ifconfigens160 Link encap:Ethernet HWaddr 00:50:56:bf:1f:b9 inet addr:192.168.8.51 Bcast:192.168.8.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:febf:1fb9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:39259841 errors:0 dropped:5400 overruns:0 frame:0 TX packets:34924409 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:765113675318 (765.1 GB) TX bytes:443557003596 (443.5 GB)lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:151908495 errors:0 dropped:0 overruns:0 frame:0 TX packets:151908495 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:3676577868252 (3.6 TB) TX bytes:3676577868252 (3.6 TB) 查网卡带宽。sudo ethtool ens160 ubuntu@junyan-51:~$ sudo ethtool ens160Settings for ens160:Supported ports: [ TP ]Supported link modes: 1000baseT/Full 10000baseT/Full Supported pause frame use: NoSupports auto-negotiation: NoAdvertised link modes: Not reportedAdvertised pause frame use: NoAdvertised auto-negotiation: NoSpeed: 10000Mb/sDuplex: FullPort: Twisted PairPHYAD: 0Transceiver: internalAuto-negotiation: offMDI-X: UnknownSupports Wake-on: uagWake-on: dLink detected: yes
结果是10000Mb/s。