查看当前网卡数量和状态
查看数量命令
nmcli conn show
[app@tgypt-wxd33-wb04w ~]$ nmcli conn show
NAME UUID TYPE DEVICE
bond0 ad33d8b0-1f7b-cab9-9447-ba07f855b143 bond bond0
bond0.1602 ccfa8a45-3dc5-e648-ff22-88f36f1cbea7 vlan bond0.1602
bond1 72fff430-1f88-4497-8d75-b1c291bb7782 bond bond1
docker0 50f3f0b8-541d-4b22-91a9-ad26911d9e39 bridge docker0
eth0 245be406-8050-43d2-9a76-2e63d9e53828 ethernet eth0
eth1 04c04064-57b7-44ff-9d90-29fbe0e158cd ethernet eth1
eth2 c3833765-fac8-4689-9f14-97ca4608dddf ethernet eth2
eth4 11d663b1-8151-4f92-bc64-1515341fe3da ethernet eth4
eth5 d9ced338-a402-60eb-c131-0fd3ab4b5ab7 ethernet --
Wired connection 1 709e46f4-341e-342b-9cfd-b137b6275654 ethernet --
Wired connection 2 c0db9468-6034-3f48-93bf-b867ce42a51e ethernet --
Wired connection 3 2cff339d-e6e4-306f-a78a-cff506bc7649 ethernet --
Wired connection 4 96a2d2a3-9554-39e7-b54f-4d47431f646a ethernet --
Wired connection 5 b6413aeb-3ce2-33be-819a-a1c34f3e9050 ethernet --
查看DEVICE,一共有6张网卡,eth0-eth6,docker和bond是虚拟的设备
查看网卡状态
nmcli device status
[app@tgypt-wxd33-wb04w ~]$ nmcli device status
DEVICE TYPE STATE CONNECTION
bond0.1602 vlan connected bond0.1602
bond0 bond connected bond0
bond1 bond connected bond1
docker0 bridge connected docker0
eth0 ethernet connected eth0
eth1 ethernet connected eth1
eth2 ethernet connected eth2
eth4 ethernet connected eth4
eth3 ethernet disconnected --
eth5 ethernet unavailable --
lo loopback unmanaged --
其中eth3没开启,eth6没插卡