From CCIE Study Wiki
IGMP enables communication between multicast hosts and their local router. IGMP allows the router to make a decision on whether or not to forward multicast traffic on to a particular LAN.
Theory
There are three versions of IGMP. v1 is more or less obsolete and not on the Cisco Lab blueprint, while v3 is not in wide use yet. v2 is where the focus should be (as of 2/4/2009)
IGMP messages are sent with IP protocol number 2 and the TTL field set to 1. IGMP packets are LAN only and not forwarded by routers (due to the TTL field). The two most important goals of IGMP are:
- To inform a local multicast router that a host wants to receive traffic for a particular group
- To inform a local multicast router that a host wants to leave a multicast group.
IGMPv2 message format:
- 1st 32 bits - 4 bit version filed, 4 bits Type field, 8 unused bits (or 8-bit Max response time field included in Query messages), and 16 bit checksum
- 2nd 32 bits - multicast group address
There are four possible messages in the Type field for v2:
- Membership Query - code 0x11 - Used by multicast routers to discover the presence of group members on a subnet. A General Membership Query message sets the Group Address field to 0.0.0.0, while a Group-Specific Query sets the address field to the address of the group being queried. It is sent by a router after receiving a Leave Group message from a host in order to determine if the group has any remaining members on a subnet. A general query is sent every 125 seconds.
- v1 Membership Report - code 0x12 - Used by v2 hosts for backward compatibility with v1
- v2 Membership Report - code 0x16 - Sent by a group member to inform the router that at least one member is present on the subnet.
- Leave Group - code 0x17 - Sent by a group member if it was the last member to send a Membership Report to inform the router that it is leaving the group.
The IGMP Max Response Time is included only in Query messages. The units are in 1/10 of a second, with 100 (10 seconds) being the default. Values range from 1 to 255.
Checksum is computed by the source and is computed over the whole IP payload.
IGMPv2 codes 0x11 and 0x12 match the codes for IGMPv1 for backward compatibility.
One of the main features of v2 over v1 are features allowing for a better Leave mechanism for IGMP including:
- Leave Group Messages - Allow host to inform routers they are leaving the group.
- Group-Specific Query Messages - Permit the router to send a query for a specific group instead of all groups
- Max Response Time - Allows for tuning the response time for the Host Membership Report. Can be useful when a large number of groups are active on a subnet and you want to decrease the burstiness of the responses by spreading them out over a longer period of time.
- Querier election process - Provides method for selecting the preferred router for sending Query messages when multiple routers are connected to the same subnet.
Host Membership Queries are sent by routers only on LAN interfaces to see if any additional group members are on that particular LAN. IGMP messages sent to all hosts use the 224.0.0.1 address.
Hosts use Host Membership Reports to reply to IGMP queries and to communicate what multicast groups they want to receive traffic from. Host send Membership reports under two conditions:
- After receiving an IGMPv2 Query from a router, the host replies with a Host Membership report.
- A host receiving a Query does not immediately respond to that query. Instead, it randomly picks a time between 0 and the Max Response Time (MRT) and starts a timer. If that timer expires and no other host has sent a Membership Report to the router, the host will go ahead and send a Membership Report of its own. However, if the host receives a membership report for the queried group form another host, the report is suppressed and not sent out. This obviously saves network resources.
- When a host joins a new group, it immediately sends a Host membership message to inform a local router that it wants to receive multicast traffic for that group.
An IGMPv2 host will send a Leave Group message when leaving a particular multicast group (RFC2236) describing this process recommends that a host send a Leave Group message only if it was the last host to send a Membership Report in response to a Query, but this recommendation has not been followed.
- After receiving the Leave Group message the local router will send out a Group-Specific Query in response in order to find out if there are any hosts left still subscribed to that group.
- Any hosts still subscribed can answer with a Membership Report. If no hosts respond to the Query, the router will stop forwarding multicast traffic for that group on to the subnet.
- The router will use an MRT of 10 for Group-Specific Queries. The Last Member Query Count is the number of consecutive GSCs sent out for the same group before the router concludes there are no active members on the subnet, has a default value of 2.
IGMPv2 Querier - v2 defines a Querier process that is used when multiple routers are attached to a subnet which allows one router to become the default querier for multicast traffic.
When v2 routers start, then send a General Query message to 224.0.0.1 using their interface as a source address. When a router receives a General Query, it compares the source IP with it's own interface address. The router with the lowest IP address is elected the IGMP Querier, and the nonquerier routers stop sending their queries.
Non-querier routers monitor how frequently the querier is sending general IGMP Queries. When the Querier does not send a query for two consecutive Query Intervals plus one half of one Query Response Interval it is considered to be dead, and a new querier is elected.
- This interval is referred to as the Other Querier Present Interval
- Has a default value of 255 seconds (2 Query Intervals (125 secs) plus half a Query response interval (10 secs))
v2 Hosts can detect if a router is running IGMPv1 by looking at the MRT fields of General IGMP queries. In IGMPv1 this field is 0. If it determines a router is a v1 router, it will stop sending v2 messages to it. It also starts a 400-second Version 1 Router Present Timeout timer. If this timer times out without the host receiving a v1 packet, the host will start sending v2 messages again.
An IGMPv2 router can detect a v1 host by the type of membership report they send out (Type 0x12 for v1 hosts vs. Type 0x16 for v2 hosts).
- v1 hosts respond the same generally for v2 Queries
- When there is a v1 host on the subnet, a v2 router will ignore Leave messages and not issue the triggered Group-Specific Queries because the v1 hosts will understand these Queries. So if there is at least one v1 host listening to a particular group, the router will suspends the v2 optimizations that reduce leave latency.
- IGMPv2 routers continue to ignore Leave messages until the IGMPv1-host-present countdown timer expires. This starts at a timer interval equal to the Group Membership Interval (180secs for v1 and 260secs for v2). If the router does not receive a v1 Report in this time, the timer expires and the router starts responding to Leave messages again.
Commands
Default Settings
- Max Response Time - 100, or 10 seconds
- General IGMP Query sending interval - 125 seconds (60 secs w/ v1)
- Group IGMP Host Membership sending interval - 60 seconds
- Last Member Query - 2
- Other Querier Present Interval - 255 seconds
- Version 1 Router Present timer - 400 seconds
- IGMPv1-host-present countdown timer - 180 or 260 seconds
Verification
Troubleshooting, Tips, and Tricks
Online Resources
Have something to contribute? See a mistake on this page? Have a hint or a link to share?
The CCIE Study Wiki is open to everyone to edit! All you need to do is to create an account to start contributing.
Please be sure to follow our posting guidelines when editing the wiki.
Maybe you have just have some thoughts or suggestions for this entry?
Use the Discussion link on the top or bottom menu to create or join the CCIE forum post on this topic.
You can also go straight to the CCIE Forums and start a new discussion in the forum of your choice.
If you'd rather just contact us with your thoughts, we'd love to hear what you have to say.