IP Multicast Support in Open vSwitch*

ID 659765
Updated 9/25/2018
Version Latest




IP multicast is a method of sending network packets to a group of interested receivers in a single transmission. This article provides information about multicast support in Open vSwitch* (OvS) and how to configure it.

The following two protocols are widely used for multicast support in any network topology:

  • Internet Group Management Protocol (IGMP) is used among hosts and the routers (and multilayer switches) on a LAN to track the multicast groups of which hosts are members.
  • Protocol-Independent Multicast (PIM) protocol is used among routers and multilayer switches to track which multicast packets to forward to each other and to their directly connected LANs.

If the scope of a multicast application is limited to a single physical/virtual network, IGMP-based multicast is used. However, most of the multicast applications span across a single LAN (broadcast domain), hence the network requires PIM along with IGMP.

OvS in Multicast Network Architecture

A simple multicast network architecture using PIM and IGMP looks something like the following:

multicast traffic diagram

Figure 1. A simple multicast network using IGMP and PIM.

Video is streamed from the video server to all of the multicast subscribed clients with the help of PIM and IGMP. PIM is used for tracking multicast traffic between LANs. IGMP protocol is operated between hosts and a local multicast router in a single LAN. IGMP messages are exchanged between the router and hosts to query, join, or leave a multicast group. OvS featuring IGMP snooping in a network collects useful information from these IGMP message exchanges. The implementation details of PIM and IGMP protocols are out of scope of this document as we are only covering how OvS is handling IGMP messages and multicast traffic in a deployment.

IGMP Snooping in OvS

At the time of writing, OvS can only support IGMP snooping, as it is primarily used as an L2 virtual switch in a network. An IGMP snooping switch doesn’t generate or respond to any multicast messages; instead it passively snoops on IGMP query, report, and leave (IGMP version 2) messages transferred between IP multicast routers/switches and IP multicast hosts to determine the multicast group membership.

open switch

Figure 2. OvS enabled with IGMP snooping.

Consider the example shown in Figure 2, where OvS is enabled with IGMP snooping. OvS is connected to four virtual machines (VMs) in the same machine and an external multicast router. Two multicast groups are configured in this test setup:

Multicast Group Name

Multicast Group Address

Hosts/VMs in Multicast Group

Green VM1, VM2
Blue VM3, VM4

Let’s look at the message communication between router and VMs for the multicast group Blue.

  • The multicast router periodically sends IGMP query messages for all configured multicast groups. In this example, it’s for multicast groups Green and Blue.
  • On receiving an IGMP query message, OvS snoops the message first and learns that a multicast router is connected to its physical port.
  • OvS then floods the query message to every port except the physical port, as it is the source port.
  • On receiving the query message for multicast group Blue, VM3 and VM4 confirm the group membership by replying with an IGMP report message.
  • OvS snoops those report messages as well and updates the snooping table with this information. Now OvS has learned how to reach multicast hosts and routers for the group Blue.
  • When OvS receives multicast traffic from the router for multicast group Blue it forwards the traffic only to VM3 and VM4, since OvS has already learned that VM3 and VM4 are the only hosts in the group Blue.
  • Similarly, while leaving the multicast group, VMs send an IGMP leave message. OvS learns this information too and updates its table so that no more multicast traffic will be forwarded to the specific VM.

Configuring IGMP Snooping in OvS

IGMP snooping is supported for both the OvS kernel and DPDK data paths. To make multicast snooping work properly, IGMP and multicast packets must hit the OvS flow with action NORMAL.

To enable IGMP snooping on an OvS bridge “br0”:

ovs-vsctl set Bridge br0 mcast_snooping_enable=true

Similarly, to disable the multicast snooping:

ovs-vsctl set Bridge br0 mcast_snooping_enable=false

To list the learned multicast table entries on a bridge “br0”:

ovs-appctl mdb/show br0

Also, the user can flush out all the learned multicast entries on a bridge “br0” with:

ovs-appctl mdb/flush br0

To clear entire multicast entries in OvS:

ovs-appctl mdb/flush


In this article we discussed multicast support in OvS and how to configure it. OvS can support only IGMP snooping which is an optimization for layer-3 IGMP. IGMP snooping allows OvS to forward multicast traffic to the links that have solicited them.

Additional Information

For questions on multicast support in OvS, feel free to follow up with a query on the Open vSwitch discussion mailing list thread.

  1. Internet Group Management Protocol, Version 2
  2. Internet Group Management Protocol, Version 3
  3. Considerations for Internet Group Management Protocol (IGMP) and Multicast Listener Discovery (MLD) Snooping Switches

About the Author

Sugesh Chandran is a network software engineer with Intel. His work is primarily focused on accelerated software switching solutions in user space running on Intel® architecture. His contributions to OvS with DPDK are mainly focused on hardware acceleration enablement and tunneling.