Un nœud de transport hôte ESXi prend en charge huit modèles de flux IPFIX de commutateur logique.
Le diagramme suivant montre le flux du trafic entre les machines virtuelles attachées à des hôtes ESXi surveillés par la fonctionnalité IPFIX :
Le modèle IPv4 encapsulé aura les éléments suivants :
- éléments standard
- SrcAddr : VTEP1
- DstAddr : VTEP2
- tenantSourceIPv4 : IP1
- tenantDestIPv4 : IP2
- tenantSourcePort : 10000
- tenantDestPort : 80
- tenantProtocol : TCP
- ingressInterfaceAttr : 0x03 (port de tunnel)
- egressInterfaceAttr : 0x01
- encapExportRole : 01
- virtualObsID : 89fd5032-2dc9-4fc3-993a-9bb4b616de54 (ID de port logique)
Modèle IPv4
ID de modèle : 256
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv4) IPFIX_TEMPLATE_FIELD(sourceIPv4Address, 4) IPFIX_TEMPLATE_FIELD(destinationIPv4Address, 4) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_TEMPLATE_FIELD(sourceTransportPort, 2) IPFIX_TEMPLATE_FIELD(destinationTransportPort, 2) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(encapId, 8) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) IPFIX_TEMPLATE_FIELD(tcpFlags, 1) IPFIX_TEMPLATE_FIELD(IPv4TOS, 1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) // Specify the Interface port- Uplink Port, Access port,N.A IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_PADDING(paddingOctets, 1) IPFIX_TEMPLATE_END()
Modèle IPv4 encapsulé
ID de modèle : 257
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv4_ENCAP) IPFIX_TEMPLATE_FIELD(sourceIPv4Address, 4) IPFIX_TEMPLATE_FIELD(destinationIPv4Address, 4) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_TEMPLATE_FIELD(sourceTransportPort, 2) IPFIX_TEMPLATE_FIELD(destinationTransportPort, 2) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) IPFIX_TEMPLATE_FIELD(tcpFlags, 1) IPFIX_TEMPLATE_FIELD(IPv4TOS, 1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) IPFIX_TEMPLATE_FIELD(encapId, 8) IPFIX_VMW_TEMPLATE_FIELD(tenantSourceIPv4, 4) IPFIX_VMW_TEMPLATE_FIELD(tenantDestIPv4, 4) IPFIX_VMW_TEMPLATE_FIELD(tenantSourcePort, 2) IPFIX_VMW_TEMPLATE_FIELD(tenantDestPort, 2) IPFIX_VMW_TEMPLATE_FIELD(tenantProtocol, 1) // Specify the Interface port - Uplink Port, Access port, N.A IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) // TUNNEL-GW or no. IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_END()
Modèle IPv4 ICMP
ID de modèle : 258
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv4_ICMP) IPFIX_TEMPLATE_FIELD(sourceIPv4Address, 4) IPFIX_TEMPLATE_FIELD(destinationIPv4Address, 4) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) IPFIX_TEMPLATE_FIELD(IPv4TOS, 1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) IPFIX_TEMPLATE_FIELD(encapId, 8) // Specify the Interface port - Uplink Port, Access Port, or NA. IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_PADDING(paddingOctets, 2) IPFIX_TEMPLATE_END()
Modèle IPv4 ICMP encapsulé
ID de modèle : 259
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv4_ICMP_ENCAP) IPFIX_TEMPLATE_FIELD(sourceIPv4Address, 4) IPFIX_TEMPLATE_FIELD(destinationIPv4Address, 4) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_TEMPLATE_FIELD(sourceTransportPort, 2) IPFIX_TEMPLATE_FIELD(destinationTransportPort, 2) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) IPFIX_TEMPLATE_FIELD(IPv4TOS, 1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) IPFIX_TEMPLATE_FIELD(encapId, 8) IPFIX_VMW_TEMPLATE_FIELD(tenantSourceIPv4, 4) IPFIX_VMW_TEMPLATE_FIELD(tenantDestIPv4, 4) IPFIX_VMW_TEMPLATE_FIELD(tenantProtocol, 1) // Specify the Interface port- Uplink Port, Access port,N.A IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) // TUNNEL-GW or no. IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_PADDING(paddingOctets, 1) IPFIX_TEMPLATE_END()
Modèle IPv6
ID de modèle : 260
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv6) IPFIX_TEMPLATE_FIELD(sourceIPv6Address, 16) IPFIX_TEMPLATE_FIELD(destinationIPv6Address, 16) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_TEMPLATE_FIELD(sourceTransportPort, 2) IPFIX_TEMPLATE_FIELD(destinationTransportPort, 2) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(encapId, 8) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) IPFIX_TEMPLATE_FIELD(tcpFlags, 1) IPFIX_TEMPLATE_FIELD(IPv6TOS,1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) // Specify the Interface port - Uplink Port, Access Port, or NA. IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_PADDING(paddingOctets, 1) IPFIX_TEMPLATE_END()
Modèle IPv6 encapsulé
ID de modèle : 261
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv6_ENCAP) IPFIX_TEMPLATE_FIELD(sourceIPv4Address, 4) IPFIX_TEMPLATE_FIELD(destinationIPv4Address, 4) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_TEMPLATE_FIELD(sourceTransportPort, 2) IPFIX_TEMPLATE_FIELD(destinationTransportPort, 2) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) IPFIX_TEMPLATE_FIELD(tcpFlags, 1) IPFIX_TEMPLATE_FIELD(IPv6TOS, 1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) //ENCAP specific IPFIX_TEMPLATE_FIELD(encapId, 8) IPFIX_VMW_TEMPLATE_FIELD(tenantSourceIPv6, 16) IPFIX_VMW_TEMPLATE_FIELD(tenantDestIPv6, 16) IPFIX_VMW_TEMPLATE_FIELD(tenantSourcePort, 2) IPFIX_VMW_TEMPLATE_FIELD(tenantDestPort, 2) IPFIX_VMW_TEMPLATE_FIELD(tenantProtocol, 1) // Specify the Interface port - Uplink Port, Access Port, or NA IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) // TUNNEL-GW or no. IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_END()
Modèle IPv6 ICMP
ID de modèle : 262
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv6_ICMP) IPFIX_TEMPLATE_FIELD(sourceIPv6Address, 16) IPFIX_TEMPLATE_FIELD(destinationIPv6Address, 16) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) IPFIX_TEMPLATE_FIELD(IPv6TOS, 1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) IPFIX_TEMPLATE_FIELD(encapId, 8) // Specify the Interface port - Uplink Port, Access Port, or NA. IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_PADDING(paddingOctets, 2) IPFIX_TEMPLATE_END()
Modèle IPv6 ICMP encapsulé
ID de modèle : 263
IPFIX_TEMPLATE_START(IPFIX_FLOW_TYPE_IPv6_ICMP_ENCAP) IPFIX_TEMPLATE_FIELD(sourceIPv4Address, 4) IPFIX_TEMPLATE_FIELD(destinationIPv4Address, 4) IPFIX_TEMPLATE_FIELD(octetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(packetDeltaCount, 8) IPFIX_TEMPLATE_FIELD(flowStartSysUpTime, 8) IPFIX_TEMPLATE_FIELD(flowEndSysUpTime, 8) IPFIX_VMW_TEMPLATE_FIELD(sourceTransportPort, 2) IPFIX_VMW_TEMPLATE_FIELD(destinationTransportPort, 2) IPFIX_TEMPLATE_FIELD(ingressInterface, 4) IPFIX_TEMPLATE_FIELD(egressInterface, 4) IPFIX_TEMPLATE_FIELD(protocolIdentifier, 1) IPFIX_TEMPLATE_FIELD(IPv6TOS, 1) IPFIX_TEMPLATE_FIELD(maxTTL, 1) IPFIX_TEMPLATE_FIELD(flowDir, 1) IPFIX_TEMPLATE_FIELD(flowEndReason, 1) //ENCAP Specific IPFIX_TEMPLATE_FIELD(encapId, 8) IPFIX_VMW_TEMPLATE_FIELD(tenantSourceIPv6, 16) IPFIX_VMW_TEMPLATE_FIELD(tenantDestIPv6, 16) IPFIX_VMW_TEMPLATE_FIELD(tenantProtocol, 1) // Specify the Interface port - Uplink Port, Access Port, or NA IPFIX_VMW_TEMPLATE_FIELD(ingressInterfaceAttr, 2) IPFIX_VMW_TEMPLATE_FIELD(egressInterfaceAttr, 2) // TUNNEL-GW or no. IPFIX_VMW_TEMPLATE_FIELD(encapExportRole, 1) IPFIX_VMW_TEMPLATE_VAR_LEN_FIELD(virtualObsID, virtualObsDataLen) IPFIX_TEMPLATE_PADDING(paddingOctets, 1) IPFIX_TEMPLATE_END()