Supported Platforms
Related Documentation
Configuring IGMP Snooping (CLI Procedure)
IGMP snooping constrains the flooding of IPv4 multicast traffic on a VLAN. When IGMP snooping is enabled, a switch examines IGMP messages between hosts and multicast routers and learns which hosts are interested in receiving multicast traffic for a multicast group. Based on what it learns, the switch then forwards multicast traffic only to those interfaces connected to interested receivers instead of flooding the traffic to all interfaces.
The factory default configuration enables IGMP snooping on all VLANs. For many networks, IGMP snooping requires no further configuration.
You can perform the following optional configurations per VLAN:
- Selectively enable IGMP snooping on specific VLANs.
Note: You cannot configure IGMP snooping on a secondary VLAN.
- Specify the IGMP version for the general query that the switch sends on an interface when the interface comes up.
- Enable immediate leave on a VLAN or all VLANs. Immediate leave reduces the length of time it takes the switch to stop forwarding multicast traffic when the last member host on the interface leaves the group.
- Configure an interface as a static multicast-router interface for a VLAN or for all VLANs so that the switch does not need to dynamically learn that the interface is a multicast-router interface.
- Configure an interface as a static member of a multicast group so that the switch does not need to dynamically learn the interface’s membership.
- Change the value for certain timers and counters to match the values configured on the multicast router serving as the IGMP querier.
- Configure multicast VLAN registration (MVR). MVR allows hosts that are not part of a multicast source VLAN (MVLAN) to still receive multicast streams from the MVLAN, allowing an MVLAN to be shared across a Layer 2 network. See Configuring Multicast VLAN Registration (CLI Procedure) for more information.
![]() | Tip: When you configure IGMP snooping using the vlan all statement, any VLAN that is not individually configured for IGMP snooping inherits the vlan all configuration. Any VLAN that is individually configured for IGMP snooping, on the other hand, inherits none of its configuration from vlan all. Any parameters that are not explicitly defined for the individual VLAN assume their default values, not the values specified in the vlan all configuration. For example, in the following configuration: protocols { igmp-snooping { vlan all { robust-count 8; } vlan employee { interface ge-0/0/8.0 { static { group 225.0.0.1; } } } } } all VLANs, except employee, have a robust count of 8. Because employee has been individually configured, its robust count value is not determined by the value set under vlan all. Instead, its robust count is the default value of 2. |
This topic covers:
Enabling or Disabling IGMP Snooping on VLANs
The factory default configuration on EX Series switches enables IGMP snooping on all VLANs by including the following configuration:
protocols { igmp-snooping { vlan all; }
This topic describes how you can selectively enable or disable IGMP snooping on VLANs. It assumes you are starting from the factory default configuration.
- To disable IGMP snooping on a VLAN:[edit protocols igmp-snooping]
user@switch# set vlan vlan-name disable - To enable IGMP snooping on only a few VLANs:
- Disable IGMP snooping on all VLANs:[edit protocols igmp-snooping]
user@switch# set vlan all disable - Enable IGMP snooping on each individual VLAN:[edit protocols igmp-snooping]
user@switch# set vlan vlan-name
For example, to enable IGMP snooping only on VLANs sales and support:
[edit protocols igmp-snooping]
user@switch# set vlan all disable[edit protocols igmp-snooping]
user@switch# set vlan sales[edit protocols igmp-snooping]
user@switch# set vlan support - Disable IGMP snooping on all VLANs:
You can also deactivate the IGMP snooping protocol on the switch without changing the IGMP snooping VLAN configurations:
[edit]
user@switch# deactivate protocols igmp-snooping
Configuring the IGMP Version
You can configure the version of IGMP queries sent by a switch when IGMP snooping is enabled. By default, the switch uses IGMP version 2 (IGMPv2). If you are using Protocol-Independent Multicast source-specific Multicast (PIM-SSM), we recommend that you configure the switch to use IGMPv3.
Typically, a switch passively monitors IGMP messages sent between multicast routers and hosts and does not send IGMP queries. The exception is when a switch detects that an interface has come up. When an interface comes up, the switch sends an immediate general membership query to all hosts on the interface. By doing so, the switch enables the multicast routers to learn group memberships more quickly than they would if they had to wait until the IGMP querier sent its next general query.
The IGMP version of the general query determines the IGMP version of the host membership reports as follows:
- IGMP version 1 (IGMPv1) general query—IGMPv1, IGMPv2, and IGMPv3 hosts respond with an IGMPv1 membership report.
- IGMPv2 general query—IGMPv2 and IGMPv3 hosts respond with an IGMPv2 membership report, while IGMPv1 hosts respond with a IGMPv1 membership report.
- IGMPv3 general query—IGMPv3 hosts respond with an IGMPv3 membership report, while IGMPv1 and IGMPv2 hosts are unable to respond to the query.
By default, the switch sends IGMPv2 queries. If your VLAN contains IGMPv3 multicast routers and hosts and the routers are running PIM-SSM, we recommend that you configure IGMP snooping for IGMPv3. Doing so enables the routers to quickly learn which multicast sources the hosts on the interface want to receive traffic from.
![]() | Note: Configuring the IGMP version does not limit the version of IGMP messages that the switch can snoop. A switch can snoop both IGMPv1, IGMPv2,, and IGMPv3 messages regardless of the IGMP version configured. |
To configure the IGMP version on a switch:
[edit protocols]
user@switch# set igmp-snooping vlan vlan-name version number
For example, to set the IGMP version to version 3 for VLAN marketing:
[edit protocols]
user@switch# set igmp-snooping vlan marketing version 3
Enabling Immediate Leave
By default, when a switch with IGMP snooping enabled receives an IGMP leave report on a member interface, it waits for hosts on the interface to respond to IGMP group-specific queries to determine whether there still are hosts on the interface interested in receiving the group multicast traffic. If the switch does not see any membership reports for the group within a set interval of time, it removes the interface’s group membership from the multicast forwarding table and stops forwarding multicast traffic for the group to the interface.
You can decrease the leave latency created by this default behavior by enabling immediate leave on a VLAN.
When you enable immediate leave on a VLAN, host tracking is also enabled, allowing the switch to keep track of the hosts on a interface that have joined a multicast group. When the switch receives a leave report from the last member of the group, it immediately stops forwarding traffic to the interface and does not wait for the interface group membership to time out.
Immediate leave is supported for both IGMP version 2 (IGMPv2) and IGMPv3. However, with IGMPv2, we recommend that you configure immediate leave only when there is only one IGMP host on an interface. In IGMPv2, only one host on a interface sends a membership report in response to a group-specifc query—any other interested hosts suppress their reports to avoid a flood of reports for the same group. This report-suppression feature means that the switch only knows about one interested host at any given time.
To enable immediate leave on a VLAN:
[edit protocols]
user@switch# set igmp-snooping vlan vlan-name immediate-leave
To enable immediate leave on all VLANs:
[edit protocols]
user@switch# set igmp-snooping vlan all immediate-leave
Configuring an Interface as a Multicast-Router Interface
When IGMP snooping is enabled on a switch, the switch determines which interfaces face a multicast router by monitoring interfaces for IGMP queries or Protocol Independent Multicast (PIM) updates. If the switch receives these messages on an interface, it adds the interface to its multicast forwarding table as a multicast-router interface.
In addition to dynamically learned interfaces, the multicast forwarding table can include interfaces that you explicitly configure to be multicast router interfaces. Unlike the table entries for dynamically learned interfaces, table entries for statically configured interfaces are not subject to aging and deletion from the forwarding table.
Examples of when you might want to configure a static multicast-router interface include:
- You have an unusual network configuration that prevents IGMP snooping from reliably learning about a multicast-router interface through monitoring IGMP queries or PIM updates.
- Your implementation does not require an IGMP querier.
- You have a stable topology and want to avoid the delay the dynamic learning process entails.
![]() | Note: If the interface you are configuring as a multicast-router interface is a trunk port, the interface becomes a multicast-router interface for all VLANs configured on the trunk port even if you have not explicitly configured it for all the VLANs. In addition, all unregistered multicast packets, whether they are IPv4 or IPv6 packets, are forwarded to the multicast-router interface, even if the interface is configured as a multicast-router interface only for IGMP snooping. |
To configure an interface as a static multicast-router interface:
[edit protocols]
user@switch# set igmp-snooping vlan vlan-name interface interface-name multicast-router-interface
For example, to configure ge-0/0/5.0 as a multicast-router interface for all VLANs on the switch:
[edit protocols]
user@switch# set igmp-snooping vlan all interface ge-0/0/5.0 multicast-router-interface
Configuring Static Group Membership on an Interface
To determine how to forward multicast packets, a switch with IGMP snooping enabled maintains a multicast forwarding table containing a list of host interfaces that have interested listeners for a specific multicast group. The switch learns which host interfaces to add or delete from this table by examining IGMP membership reports as they arrive on interfaces on which IGMP snooping is enabled.
In addition to such dynamically learned interfaces, the multicast forwarding table can include interfaces that you statically configure to be members of multicast groups. When you configure a static group interface, the switch adds the interface to the forwarding table as a host interface for the group. Unlike an entry for a dynamically learned interface, a static interface entry is not subject to aging and deletion from the forwarding table.
Examples of when you might want to configure static group membership on an interface include:
- You want to simulate an attached multicast receiver for testing purposes.
- The interface has receivers that cannot send IGMP membership reports.
- You want the multicast traffic for a specific group to be immediately available to a receiver without any delay imposed by the dynamic join process.
You cannot configure multicast source addresses for a static group interface.
![]() | Note: The switch does not simulate IGMP membership reports on behalf of a statically configured interface. Thus a multicast router might be unaware that the switch has an interface that is a member of the multicast group. You can configure a static group interface on the router to ensure that the switch receives the group multicast traffic. |
To configure a host interface as a static member of a multicast group:
[edit protocols]
user@switch# set igmp-snooping vlan vlan-name interface interface-name static group ip-address
For example, to configure interface ge-0/0/11.0 in VLAN ip-camera-vlan as a static member of multicast group 225.0.0.1:
[edit protocols]
user@switch# set igmp-snooping vlan ip-camera-vlan interface ge-0/0/11.0 static group 225.0.0.1
Changing the Timer and Counter Values
IGMP uses various timers and counters to determine how often an IGMP querier sends out membership queries and when group memberships time out. On Juniper Networks EX Series Ethernet Switches, the IGMP and IGMP snooping timers and counters default values are set to the values recommended in RFC 2236, Internet Group Management Protocol, Version 2. These values work well for most multicast implementations.
There might be cases, however, where you might want to adjust the timer and counter values—for example, to reduce burstiness, to reduce leave latency, or to adjust for expected packet loss on a subnet. If you change a timer or counter value for the IGMP querier on a VLAN, we recommend that you change the value for all multicast routers and switches on the VLAN so that all devices time out group memberships at approximately the same time.
The following timers and counters are configurable on a switch:
- query-interval—The length of time the IGMP
querier waits between sending general queries (the default is 125
seconds). You can change this interval to tune the number of IGMP
messages on the subnet; larger values cause general queries to be
sent less often.
You cannot configure this value directly for IGMP snooping. IGMP snooping inherits the value from the IGMP value configured on the switch, which is applied to all VLANs on the switch.
To configure the IGMP query-interval:
[edit protocols]
user@switch# set igmp query-interval seconds
- query-response-interval—The maximum length
of time the host can wait until it responds (the default is 10 seconds).
You can change this interval to adjust the burst peaks of IGMP messages
on the subnet. Set a larger interval to make the traffic less bursty.
You cannot configure this value directly for IGMP snooping. IGMP snooping inherits the value from the IGMP value configured on the switch, which is applied to all VLANs on the switch.
To configure the IGMP query-response-interval:
[edit protocols]
user@switch# set igmp query-response-interval seconds
- query-last-member-interval—The length of
time the IGMP querier waits between sending group-specific membership
queries (the default is 1 second). The IGMP querier sends a group-specific
query after receiving a leave report from a host. You can decrease
this interval to reduce the amount of time it takes for multicast
traffic to stop forwarding after the last member leaves a group.
You cannot configure this value directly for IGMP snooping. IGMP snooping inherits the value from the IGMP value configured on the switch, which is applied to all VLANs on the switch.
To configure the IGMP query-last-member-interval:
[edit protocols]
user@switch# set igmp query-last-member-interval seconds
- robust-count—The number of times the querier
resends a general membership query or a group-specific membership
query (the default is 2 times). You can increase this count to tune
for higher expected packet loss.
For IGMP snooping, you can configure robust-count for a specific VLAN. If a VLAN does not have robust-count configured, the robust-count value is inherited from the value configured for IGMP.
To configure robust-count for IGMP snooping on a VLAN:
[edit protocols]
user@switch# set igmp-snooping vlan vlan-name robust-count number
The values configured for query-interval, query-response-interval, and robust-count determine the multicast listener interval—the length of time the switch waits for a group membership report after a general query before removing a multicast group from its multicast forwarding table. The switch calculates the multicast listener interval by multiplying query-interval by robust-count and then adding query-response-interval:
(query-interval x robust-count) + query-response-interval = multicast listener interval
For example, the multicast listener interval is 260 seconds when the default settings for query-interval, query-response-interval, and robust-count are used:
(125 x 2) + 10 = 260
You can display the time remaining in the multicast listener interval before a group times out by using the show igmp-snooping membership command.