IGMP Snooping
About
This document gives a brief overview of multicast, with a focus on IP multicast, and how it can be controlled using IGMP snooping. It also covers non-IGMP capable devices and how they can be integrated into a network with IGMP enabled.
Introduction
Multicast, as opposed to unicast, is a very efficient means of communicating information to more than one receiver. The main difference between multicast and broadcast is that multicast can be controlled. When disabling its control mechanisms, like IGMP, multicast behaves like broadcast.
Thus, when distributing IP multicast data in a switched network, switches within the LAN can:
- treat multicast traffic as broadcast, i.e., forward it on all ports (in the same VLAN), or
- limit forwarding of multicast only to subscribers
The latter method requires switches to inspect Internet Group Management Protocol (IGMP) control messages exchanged by hosts and routers to learn which ports lead to subscribers – this mechanism is referred to as IGMP snooping, RFC 4541. With IGMP Snooping enabled, switches dynamically keep track of up to 2048 multicast addresses.
The IGMP snooping support also features support for acting as an IGMP querier – a role which is usually handled by a multicast router. Having switches with IGMP querier capabilities enables efficient distribution of IP multicast in networks without multicast routers.
Note: Most switches only limit the broadcast effects of multicast on layer-2, i.e. MAC level, it is therefore important to design IPv4 multicast networks so that groups do not overlap. E.g. 225.1.2.3 and 226.1.2.3 map to the same multicast MAC address and will effectively be treated as the same group in the switch fabric. Meaning, both groups will be forwarded by switches and may potentially overload the intended receiver. See RFC 1112, for details on how IP multicast groups map to MAC multicast addresses.
IGMP Snooping
The switch is capable of efficiently distributing IP multicast traffic on LAN interfaces by means of IGMP snooping. IGMP Snooping is enabled by default per VLAN.
IGMP Snooping can also be disabled globally, when disabled the per-VLAN settings are ignored and IGMP Snooping is completely disabled on the device. When IGMP Snooping is enabled, globally the per-VLAN settings control multicast filtering per VLAN.
-
With IGMP snooping enabled on a VLAN, IP multicast packets are only forwarded to ports leading to a subscriber of that IP multicast group, and to ports leading to an IP multicast router
-
With IGMP snooping disabled on a VLAN, multicast traffic is forwarded on all ports in that VLAN, i.e., like broadcast traffic
-
Ports shared between multiple VLANs may have different IGMP snooping settings on different VLANs, i.e., one VLAN may have IGMP snooping enabled and another may have it disabled. The disabled mode takes precedence on such ports, i.e., multicast will be flooded on ports where at least one VLAN has IGMP Snooping disabled.
As part of the IGMP snooping functionality, the switch can also act as an IGMP Querier, and settings for querier mode, and query interval are provided.
- Querier mode
-
Auto mode is the default querier mode. It implements the IGMP standard to elect1 a designated IGMP querier on each LAN. In this mode all multicast, both known and unknown, is flooded to the elected querier, which acts as a distribution point for the LAN. This is an important aspect when designing networks and calculating the required bandwidth of individual links.
Proxy mode is the alternative querier mode. Useful in networks where the switch should never take part in the querier election and only act as a silent forwarder of IGMP queries (and reports). However, to prevent loss of multicast distribution on LANs where there is no elected IGMP querier, the switch by default send proxy queries2. A feature useful for optimizing low-bandwidth setups.
On VLANs where the network interface is not assigned an IP address, the switch will automatically fall back to proxy mode on that VLAN, regardless of the global querier mode setting.
The proxy query feature can confuse IGMP implementations from some vendors. This may result in other switches forwarding all multicast towards the switch originating the proxy query, severely impacting performance by saturating links. Therefore, this feature can be disabled, leaving the switch to only forward any IGMP reports (join/leave messages) and IGMP queries, acting as a pure proxy.
- Query interval
- The switch can be configured to send out queries on intervals 12, 30, 70 and 150 seconds, default 12 sec. This interval is also used when timing out multicast to end devices that for some reason stop answering the queries.
- Multicast router timeout
- When a multicast router, or a switch acting as IGMP querier, goes
down, the lack of IGMP Query messages will cause a re-election to
establish a new IGMP querier. This timeout can be configured via
the CLI
multicast-router-timeout
setting. Default: 300 sec.
When a multicast receiver attached to a switch port leaves a multicast group (i.e., stops subscribing to an IP multicast address or is simply disconnected from the port), the IGMP snooping leave latency (the time until the switch stops forwarding the associated multicast data) is within 2-3 times the configured Query Interval.
Multicast Router Ports
With IGMP snooping enabled, the switch learns on which ports there are interested receivers of multicast. It accomplishes this by listening to IGMP report messages sent by all subscribers. Thus, the switch only forwards IP multicast on ports that are members of multicast groups.
The switch also forwards all multicast traffic, both subscribed (known) and unknown, on ports leading to multicast routers. The following ports are considered as multicast router ports:
-
Ports configured as multicast router ports
-
Ports where IGMP Queries are received, usually queries are sent by multicast routers, but also by IGMP snooping aware switches like \weos{}
-
FRNT Ring Coupling ports and Multi-link Dual-Homing ports: To provide fast fail-over of multicast traffic, FRNT Ring Coupling and Multi-link Dual-Homing uplinks are added to the list of multicast router ports. This is both done at the Ring Coupling nodes and Dual-Homing nodes, as well as on switches on the remote side of the uplink3
FRNT ring ports are no longer considered multicast router ports. The Fast Reconnect feature of FRNT is instead handled per multicast group: if a multicast receiver is located on a ring port, the other ring port is automatically added. In case of ring breakage this practice ensures next to zero reconfiguration time for multicast over FRNT.
IGMP Fast Leave
IGMP snooping supports IGMP Leave by default and Fast Leave can be
enabled on a per-port basis. The CLI igmp-fast-leave-ports
setting
allows the keyword all
. The Fast Leave feature is recommended only
for access ports.
example:/#> configure example:/config/#> ip example:/config/ip/#> no igmp-fast-leave-ports example:/config/ip/#> igmp-fast-leave-ports eth3, eth6 example:/config/ip/#> leave Configuration activated. Remember "copy run start" to save to flash (NVRAM). example:/#> copy run start example:/#> show ip igmp Static Multicast ports ------------------------------------------------------------------------------- Static router ports : --- Dual homing/Coupling ports : --- FRNT ports : --- VID Querier IP Querier MAC Port Interval Timeout ------------------------------------------------------------------------------- 1 0.0.0.0 LOCAL VID Multicast Group Filtered MAC Addr Active ports ------------------------------------------------------------------------------- 1 239.255.255.250 01:00:5E:7F:FF:FA 6 1 224.0.0.251 01:00:5E:00:00:FB 3, 6 1 225.1.2.3 01:00:5E:01:02:03 6 ------------------------------------------------------------------------------- Total: 3 filters, max 2048, in 1 VLAN. example:/#>
When an IGMP Leave is received on a port configured with Fast Leave it issues a group specific query for the group being left and then immediately cuts the multicast stream for that group. With Fast Leave disabled, a standard grace period is honored for the benefit of any multicast receivers attached on downstream port splitters (hubs or unmanaged switches). When no membership report/reply is received the multicast group will time-out within three query intervals.
Low Bandwidth Networks
In low-bandwidth topologies you typically cannot afford wasting bandwidth on unwanted traffic. With the IGMP Proxy Mode and Fast Leave settings for IGMP snooping this can be avoided.
In the standard auto mode of IGMP all multicast, both known and unknown, must (according to standard) be forwarded to the elected querier. But if there is no elected querier, or if all switches have proxy mode enabled, unknown multicast will be stopped before entering the low-bandwidth ring.
Only when a subscriber appears will the traffic be classified as known and forwarded on the ring to the receiver. By also enabling Fast Leave, on access port towards the receiver, the multicast overhead can be kept to a near minimum.
-
The querier with the lowest IP address on each LAN is elected. Usually the gateway or multicast router. ↩
-
Proxy queries use source IP address 0.0.0.0, which is reserved and must never take part in the IGMP querier election process, as clearly stated in RFC 4541. ↩
-
An exception is when connecting a Dual-Homing uplink to a non-FRNT switch, the fail-over of multicast traffic will instead occur on the next reception of an IGMP Report (if IGMP snooping is enabled). ↩