Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Configuring IGMP Snooping (CLI Procedure)

    Note: This topic uses Junos OS for EX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that does not support ELS, see: Configuring IGMP Snooping. For ELS details see, Getting Started with Enhanced Layer 2 Software.

    Internet Group Management Protoco (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. In IGMPv2, only one host on a interface sends a membership report in response to a group-specific 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 only one interested host at any given time.

    By default, IGMP snooping is enabled on the default VLAN. For many networks, IGMP snooping requires no further configuration.

    You can perform the following optional configurations for each VLAN:

    • Selectively enable IGMP snooping on specific VLANs.
    • Enable immediate leave on a VLAN or all VLANs. Enabling immediate leave ensures that the switch stops forwarding multicast traffic immediately after the last member host on the interface leaves the group.
    • Configure an interface as a static multicast-router interface for a VLAN 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.

    This topic covers:

    Enabling IGMP Snooping on VLANs

    This topic describes how you can selectively enable IGMP snooping on VLANs. It assumes that you are beginning with the factory default configuration.

    • To enable IGMP snooping on a VLAN:
      [edit protocols igmp-snooping]
      user@switch# set vlan vlan-name

    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

    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, which allows the switch to keep track of the hosts on an 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.

    To enable immediate leave on a VLAN:

    [edit protocols]
    user@switch# set igmp-snooping vlan vlan-name 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. 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.
    • 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: All unregistered multicast packets, whether they are IPv4 or IPv6 packets, are forwarded only to the multicast-router interface.

    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 on a VLAN vlan100 on the switch:

    [edit protocols]
    user@switch# set igmp-snooping vlan vlan100 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.

    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 vlan100 as a static member of multicast group 233.252.0.1:

    [edit protocols]
    user@switch# set igmp-snooping vlan vlan100 interface ge-0/0/11.0 static group 233.252.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 EX Series switches, the default values of the IGMP and IGMP snooping timers and counters 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 modify 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.

    You can configure the following timers and counters 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-snooping vlan 
      vlan-name 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-snooping vlan vlan-name
      
      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 traffic 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-snooping vlan vlan-name 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 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 the robust-count and then adding query-response-interval to the product:

    (query-interval * 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 * 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.

    Modified: 2016-06-20