VMware vCenter Server 7.x
VMware ESXi 7.x
VMware vCenter Server 8.x
VMware ESXi 8.x
esxcfg-vswitch -l
The output appears similar to:
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 2990 3 128 8000 #####0
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 110 0 #####0 Note: Your virtual switch and PortGroup names may be different.
esxcfg-vswitch -p "portgroup_name" -v VLAN_ID virtual_switch_nameWhere portgroup_name is the name of your portgroup, and virtual_switch_name is the name of your virtual switch. esxcfg-vswitch -p "VM Network" -v 111 vSwitch0esxcfg-vswitch -l
The output appears similar to:
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 2990 3 128 8000 vmnic0
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 111 0 vmnic0To resolve connectivity and configuration issues, use these commands to link (add) or unlink (remove) a VMNIC on Standard vSwitches
esxcfg-vswitch -U vmnic vSwitch esxcfg-vswitch -L vmnic vSwitch