通过ifconfig查看网络信息,包括网卡名字和网络IP地址
[root@test01 ~]# ifconfig
eth1: Link encap:Ethernet HWaddr 5C:B9:11:9A:83:5C
inet 10.12.40.11 netmask 255.255.254.0 broadcast 10.12.41.255
inet6 fe80::6a91:d0ff:fe61:e582 prefixlen 64 scopeid 0x20
ether 68:91:d0:61:e5:82 txqueuelen 1000 (Ethernet)
RX packets 9636141204 bytes 29168848204723 (26.5 TiB)
RX errors 0 dropped 6065396 overruns 0 frame 0
TX packets 8620546768 bytes 3931743317602 (3.5 TiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth2: Link encap:Local Loopback
ether d0:94:66:64:fe:43 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 18
通过ethtool工具查看该网卡网络的带宽,是千兆还是万兆(该网络带宽为服务器连接交换机的带宽,如果使用远程电脑连接该服务器,连接的带宽不是该命令查询的结果)
[root@test01 ~]# ethtool eth1
Settings for eth1:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes: 10000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s ## -- 10000Mb/s 为万兆网络
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: external Auto-negotiation: off
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)