The selection of which IGMP version(s) to run on your network is dependent on the operating systems and behavior of the multicast application(s) in use. Generally speaking, the capability of the operating system determines the IGMP version(s) you are running on your network. There are three versions of IGMP, version 1, 2, and 3. Each of these has unique characteristics. As of this writing, the default IGMP version enabled on most Cisco devices is version 2.
The original specification for IGMP was documented in RFC 988 back in 1986. That RFC, along with RFC 1054, was made obsolete by RFC 1112, which is known as IGMPv1 today. IGMPv1 offers a basic query-and-response mechanism to determine which multicast streams should be sent to a particular network segment.
IGMPv1 works largely like the explanation given in Figure 2-7, with two major exceptions, a primary issue with using version one. IGMPv1 has no mechanism for a host to signal that it wants to leave a group. When a host using IGMPv1 leaves a group, the router will continue to send the multicast stream until the group times out. As you can imagine, this can create a large amount of multicast traffic on a subnet if a host joins groups very quickly. This will occur if the host is “channel-surfing” using IPTV, for example.
In order to determine the membership of a group, the querier (router) sends a message to every host on the subnet. The functionality of the querier is to maintain a list of hosts in the subnet interested in multicast flows. Yes, even those that were never interested in receiving any multicast streams. This is accomplished by sending the query to the “all-hosts” multicast address of 184.108.40.206. When a single host responds to the query, all others suppress sending a report message.
IGMPv1 also does not have the capability of electing a querier. If there are multiple queriers (routers) on the subnet, a designated router (DR) is elected using PIM to avoid sending duplicate multicast packets. The elected querier is the router with the highest IP address. IGMPv1 is rarely used in modern networks and the default for Cisco devices has been set to v2 because of these limitations.
As with every invention, we make improvements as we find shortcomings. IGMPv2, as defined in RFC 2236, made improvements over IGMPv1. One of the most significant changes was the addition of the leave process. A host using IGMPv2 can send a leave-group message to the querier indicating that it is no longer interested in receiving a particular multicast stream. This eliminates a significant amount of unneeded multicast traffic by not having to wait for the group to timeout; the trade-off is that routers need to track membership to efficiently prune when required.
IGMPv2 added the capability of group-queries. This feature allows the querier to send a message to the host(s) belonging to a specific multicast group. Every host on the subnet is no longer subjected to receiving a multicast message.
The querier election process offers the capability to determine the querier without having to use PIM. In addition, the querier and the DR function are decoupled. This process requires that each device send a general query message to all hosts 220.127.116.11. If there are multiple routers on a subnet, the DR is the device with the highest IP address and the querier is the device with the lowest IP address.
IGMPv2 also added the Maximum Response Time field, which is used to tune the query-response process to optimize leave latency.
Food for thought: Is a multicast message sent to all-host 18.104.22.168 a broadcast?
Figure 2-8 shows the format for IGMPv1 and IGMPv2 messages.
Figure 2-8 IGMPv1 and IGMPv2 Message Format
IGMP message types for IGMPv1 and IGMPv2 are as follows:
General query message used to determine group membership of any group
Group-specific query used to verify if any hosts are part of a specific group
0x12—IGMPv1 membership report
0x16—IGMPv2 membership report
The maximum response time (MRT) is calculated in one-tenth of a second increments and is used only with membership query messages. This parameter allows routers to manage the time between the moment the last host leaves a group and the moment the routing protocol is notified. When a host receives an IGMP query packet, it kicks off a timer that begins with a random value that is less than the MRT. If no other host responds with a membership report before this random timer expires, the host will then reply with a report. This decreases the number of total IGMP reports needed to maintain the group state as well as preserves local bandwidth, because the host suppresses its own reports unless absolutely necessary. IGMPv1 does not use MRT; instead, it has a timer that is always set to 10 seconds. Of course, this means the MRT cannot be less than the query-interval, making the maximum configurable MRT 25 seconds (1 byte MRT field; 1/10s*255 = 25 seconds).
The checksum is a value calculated using information within the message used to detect errors.
Example 2-1 shows a packet capture of an IGMPv2 membership query. Items of interest include the source and destination MAC address. The source of this request is the router (192.168.12.1) and the destination is the multicast MAC address for 22.214.171.124, which includes all devices on the subnet. Referring to the packet capture in Example 2-1, you see the IGMP type is 0x11, the maximum response time is 0x64 (hex for 10 seconds, the default for IGMPv2), the checksum, and the group address of 0.0.0.0, which indicates that it is a general query message. Also, pay particular attention to the time to live (TTL) field. This message has the TTL set to 1, which means that it will not be sent to multiple subnets. If you are troubleshooting multicast problems, you should always make sure the multicast sender has a TTL value greater than or equal to the diameter of your network.
Example 2-1 IGMPv2 Membership Query Packet Capture
Ethernet Packet: 60 bytes
Dest Addr: 0100.5E00.0001, Source Addr: 0022.5561.2501
IP Version: 0x4, HdrLen: 0x6, TOS: 0xC0 (Prec=Internet Contrl)
Length: 32, ID: 0x03E6, Flags-Offset: 0x0000
TTL: 1, Protocol: 2 (IGMP), Checksum: 0x7387 (OK)
Source: 192.168.12.1, Dest: 126.96.36.199
Options: Length = 4
Router Alert Option: 94 0000
IGMP VersionType: 0x11, Max Resp: 0x64, Checksum: 0xEE9B (OK)
Version 2 Membership Query
Group Address: 0.0.0.0
Remember that IGMP is a LAN-based protocol, used to manage hosts. Managing hosts is often considered a chatty process. Several configurable timers, including the MRT, within the IGMP implementation can be adjusted to modify protocol message timing and processing. Look at the IGMP interface configuration timers that are listed in the show ip igmp interface x/x command output in Example 2-2.
Example 2-2 show ip igmp interface Command Output
Router#show ip igmp interface e1/0
Loopback0 is up, line protocol is up
Internet address is 192.168.2.2/32
IGMP is enabled on interface
Current IGMP host version is 2
Current IGMP router version is 2
IGMP query interval is 60 seconds
IGMP configured query interval is 60 seconds
IGMP querier timeout is 120 seconds
IGMP configured querier timeout is 120 seconds
IGMP max query response time is 10 seconds
Last member query count is 2
Last member query response interval is 1000 ms
Inbound IGMP access group is not set
IGMP activity: 3 joins, 0 leaves
Multicast routing is enabled on interface
Multicast TTL threshold is 0
Multicast designated router (DR) is 192.168.2.2 (this system)
IGMP querying router is 192.168.2.2 (this system)
Multicast groups joined by this system (number of users):
188.8.131.52(1) 184.108.40.206(1) 220.127.116.11(1)
The respective timers in this output are all using implementation default values. In generic multicast deployments, these timers are not tweaked and are kept “default.” Administrators may tweak them based on specific application requirements (not commonly seen). It is beneficial to understand the functionality of these timers:
ip igmp query-interval [interval in secs]: Hosts on a segment will send a report of their group membership in response to queries received from the IGMP querier. The query interval defines the amount of time the router will store the IGMP state if it does not receive a report for the particular group. This hold period is three times the query interval time.
ip igmp query-max-response-time [time-in-seconds]: When a host receives a query from the IGMP querier, it starts the countdown of the maximum response time before sending a report to the router. This feature helps reduce the chatter between hosts and the first hop router. The max-response time cannot be less than the query interval value.
ip igmp query-timeout [timeout]: This timer is used for the querier election process described earlier, especially when multiple routers are in the LAN segment. A router that loses the election will assume quierier malfunction based on the expiry of this timer. When the timer is expired, the router restarts the querier election process.
ip igmp last-member-query-count [number]: This timer tracks the time the router must wait after the receipt of the leave message before removing the group state from local state tables. The timer is overwritten if a router is configured with the command ip igmp immediate-leave group-list [list]. With the ip igmp immediate-leave group command, the router treats these groups as having a single host member. After the reception of a leave message, the router immediately removes the multicast group.
The addition of IGMPv3 (RFCs 3376 and 4604) brought with it signification changes over IGMPv1 and v2. Although there are vast improvements, backward compatibility between all three versions still exists. To understand why, examine Figure 2-9, which shows the IGMPv3 header format. New header elements of importance include a Number of Sources field, a Source Address(es) field, and a change from a Max Response Time field to a Max Response Code field.
Figure 2-9 IGMPv3 Message Format
As the header shows, the most signification addition to IGMPv3 is the capability to support specific source filtering. Why is this a big deal? With IGMPv1 and v2, you could not specify the host from which you wanted to receive a multicast stream; consequently, multiple sources could be sending to the same multicast IP address and port number, and the host would now have a conflict with which stream to receive. Source filtering allows the host to signal membership with either an include or an exclude group list. This way, the host can specify which device(s) it is interested in receiving a stream from, or it can indicate which devices that it is not interested in receiving a stream from. This adds an additional security component that can be tapped at the application level. IGMPv3 is used at Layer 2 for source-specific multicast (SSM). SSM is covered in Chapter 3.
In addition to this change, the MRT was updated once again in IGMPv3; in fact, it was changed in RFC 3376 to a maximum response code (MRC). Similar to the MRT field in IGMPv2, the max response code field indicates the maximum time allowed before a report for a group must be received. The maximum response code (MRC) can still incorporate the MRT, which is represented in units of one-tenth of a second. There are 8 bits in the MRC field, and the value of those bits indicates how the MRC is to be read. If the MRC is less than 128, the Max Response Time is equal to the Max Response Code value. If the MRC is greater than or equal to 128, the MRC has a floating point value to reflect much longer periods of time. This makes the total maximum timer configurable up to 55 minutes.
The response time was modified in IGMPv3 to better accommodate different types of network connectivity. Using a smaller timer allows the network administrator to more accurately tune the leave latency of hosts. Using a larger timer can accommodate network types where the burstiness of group management traffic is less desirable, e.g. low bandwidth wireless networks.
Example 2-3 shows a packet capture of a membership report from an IGMPv3 host with the IP address of 192.168.7.14 with a group membership request to receive a multicast stream from 18.104.22.168 from the source of 192.168.8.10.
Example 2-3 IGMPv3 Membership Report Packet Capture
Ethernet II, Src: (80:ee:73:07:7b:61), Dst: (01:00:5e:00:00:16)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.7.14, Dst: 22.214.171.124
Header length: 24 bytes
Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00:
Not-ECT (Not ECN-Capable Transport))
Total Length: 52
Identification: 0x0000 (0)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 1
Protocol: IGMP (2)
Header checksum: 0x3c37 [validation disabled]
Options: (4 bytes), Router Alert
Internet Group Management Protocol
[IGMP Version: 3]
Type: Membership Report (0x22)
Header checksum: 0x4a06 [correct]
Num Group Records: 2
Group Record : 126.96.36.199 Mode Is Include
Record Type: Mode Is Include (1)
Aux Data Len: 0
Num Src: 1
Multicast Address: 188.8.131.52
Source Address: 192.168.8.10
Group Record : 184.108.40.206 Mode Is Exclude
Record Type: Mode Is Exclude (2)
Aux Data Len: 0
Num Src: 0
Multicast Address: 220.127.116.11
Notice the destination IP address of the IPv4 packet; it is being sent to 18.104.22.168. This is the IP address to which all hosts send their membership report.