Understanding IP Multicast in ESXi/ESX
search cancel

Understanding IP Multicast in ESXi/ESX

book

Article ID: 339035

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article describes IP Multicast behavior in ESXi/ESX and several considerations relating to vMotion and NIC teaming.

Environment

VMware vSphere ESXi 

Resolution

IP Multicast sends data to a group of receivers in a single transmission using Multicast groups and the IGMP protocol. In ESX/ESXi, Multicast works the same way it does in a physical environment and the requirements and considerations are also the same.
 
In vSphere, vSwitches do not involve themselves in the IGMP messages that virtual machines send to join or leave multicast groups. The vSwitch (vNetwork Standard and Distributed) have inherent knowledge of the virtual machine's virtual NIC (vNIC) configuration tracks its multicast communication in the forwarding table. When the Guest OS of a virtual machine sends out IGMP messages, the vSwitch does not interpret them but simply forwards them to the physical switch as required.
 
When multicast traffic comes into the vSwitch, the vSwitch forwards copies of the traffic to subscribed virtual machines. The forwarding of multicast traffic is done in the same way unicast is, and is based on the destination MAC address. Since the vSwitch tracks which vNIC is interested in which multicast groups, it delivers packets only to right set of virtual machines. In this way the vSwitch does not deliver packet to all virtual machines, but only to vNICs that match the forwarding table lookup.
 
If a virtual machine leaves a multicast group, it will send a IGMP leave message which will be forwarded to the physical switch and then the virtual machine removes the multicast MAC address from its vNIC to stop receiving the stream. The vSwitch will then remove the vNIC from the forwarding table for that multicast group. If the virtual machine in question was the last one on the ESXi Server that had requested the multicast group, the physical switch will also remove the group from the list of multicast groups to send out of the physical port.

Multicast Filtering

Because of limitations in the original VMware vSwitch forwarding model and the construction of the multicast mechanism, multicast traffic passing through a vSwitch can be received by virtual machines which have not subscribed to the multicast group sending that traffic. Starting in vSphere 6.0, an additional multicast filtering mode exists which uses IGMP snooping to precisely route multicast traffic only to virtual machines which have subscribed to its source. For more information, see the Multicast Filtering section of vSphere 6.0 Networking.
Note: This has not changed as of vSphere 8.0u3 - See: What is Multicast Filtering

vMotion
 
When a virtual machine is migrated to another host using vMotion, its vNIC configuration goes with it. The destination hosts sees this vNIC configuration and updates its forwarding tables to forward the necessary multicast traffic it receives to the virtual machine. To prevent any transient multicast packet loss after a vMotion, the vSwitch also injects an IGMP query into the virtual machine, using its unicast MAC address, so that multicast receiver presence is known to the physical switches immediately. This avoids the virtual machine missing multicast traffic by having to wait for next IGMP query to come from a IGMP query on the network.
 
NIC Teaming
 
Physical NIC teaming is supported, but how it works is dependent on the type of load balancing scheme used.
 
If the physical NICs are all active and the teaming is virtual source port ID or MAC hash based, then the virtual machine's IGMP join messages go out of the configured physical NIC and the corresponding physical switch will update its multicast forwarding tables to send out the multicast group to the virtual machine on the associated physical port.
 
In cases where one of the physical NICs starts out in standby mode and virtual machines are failed over to it, the vSwitch will, like in the vMotion case above, inject IGMP queries into the virtual machines affected by the failover so that multicast receiver presence is known to the physical switch immediately to allow packets forwarding.


Additional Information