This article provides information on obtaining information about Layer 2 network configuration between the VMware ESXi physical network interface card NICs and the virtual NICs of a given virtual machine and how to obtain port status and statistics.
The MIB modules are:
The MIB modules are:
In the IfTable/ifXTable table, the SNMP reports for ESXi physical NICs which are vSwitch uplinks. The ESXi agent also report vSwitch aggregate statistics and virtual interfaces used by the ESXi host. A stock ESXi host configuration on a system with one physical NIC report:
ifIndex 1, ifType.1 6(ethernet), ifDecr.1 "vmnic0 at 0:0:.."
ifIndex 2, ifType.2 53(propVirtual), ifDescr.2 "vswitch vSwitch0 type: traditional"
ifIndex 3, ifType.3 258(vmwareVirtualNic), ifDescr.3 "virtual ethernet interface vmk0 at ..."
For more information on ifTypes table, see https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
ifStackTable provides how these three ifTable entries are related:
IF-MIB::ifStackStatus.1.0 = INTEGER: active(1)
IF-MIB::ifStackStatus.2.1 = INTEGER: active(1)
IF-MIB::ifStackStatus.3.2 = INTEGER: active(1)
IF-MIB::ifStackStatus.0.3 = INTEGER: active(1)
ENTITY-MIB::entLogicalDescr.1 = STRING: ieee8021BridgeBaseComponentId: 3, DVSID: 64 76 73 77 69 74 63 68-00 00 00 00 00 00 00 00
ENTITY-MIB::entLogicalType.1 = OID: IEEE8021-BRIDGE-MIB::ieee8021BridgeMib
ENTITY-MIB::entLogicalTAddress.1 = ""
ENTITY-MIB::entLogicalTDomain.1 = OID: TRANSPORT-ADDRESS-MIB::transportDomainUdpIpv4
snmpwalk -mall -v3 -u joe -l noAuthNoPriv 192.0.2.1 ieee8021BridgeBasePortIfIndex
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortIfIndex.1.3 = INTEGER: 1
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortIfIndex.1.5 = INTEGER: 7
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortIfIndex.1.11 = INTEGER: 0
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortIfIndex.2.3 = INTEGER: 2
VMWARE-VMINFO-MIB::vmwVmMAC[2][14] = STRING: 0:c:29:38:90:29
VMWARE-VMINFO-MIB::vmwVmDisplayName[2] = STRING: cloudvm build 2467266
IEEE8021-Q-BRIDGE-MIB::ieee8021QBridgeTpFdbPort[1][1][STRING: 0:c:29:38:90:29] = Gauge32: 13
IEEE8021-Q-BRIDGE-MIB::ieee8021QBridgeTpVlanPortInFrames[1][13][4096] = Counter64: 37801 framesIEEE8021-Q-BRIDGE-MIB::ieee8021QBridgeTpVlanPortOutFrames[1][13][4096] = Counter64: 5368872 frames IEEE8021-Q-BRIDGE-MIB::ieee8021QBridgeTpVlanPortInDiscards[1][13][4096] = Counter64: 4 frames
IEEE8021-BRIDGE-MIB::ieee8021BridgeTpPortInFrames[1][13] = Counter64: 37801 frames
IEEE8021-BRIDGE-MIB::ieee8021BridgeTpPortOutFrames[1][13] = Counter64: 5368872 frames
IEEE8021-BRIDGE-MIB::ieee8021BridgeTpPortInDiscards[1][13] = Counter64: 4 frames
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortName[1][13] = STRING: 33554444
IEEE8021-BRIDGE-MIB::ieee8021BridgeTpPortMaxInfo[1][13] = INTEGER: 1500 bytes
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortIfIndex[1][3] = INTEGER: 1
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortIfIndex[1][5] = INTEGER: 6
IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortIfIndex[1][13] = INTEGER: 0
where ifIndex 3 is the uplink
IF-MIB::ifDescr[3] = STRING: Device vmnic2 at 03:00.2 tg3
IF-MIB::ifType[3] = INTEGER: ethernetCsmacd(6)
and ifIndex 6 is the vmk0
IF-MIB::ifDescr[6] = STRING: Virtual interface: vmk0 on vswitch vSwitch0 portgroup: Management Network
IF-MIB::ifType[6] = INTEGER: vmwareVirtualNic(258)
For more information on standard documents that VMware ESXi SNMP follows, see: