Internet Group Management Protocol (IGMP) is a TCP/IP network layer protocol used for
informing routers of the availability of multicast groups on the
network.
Figure 1. Multicast Distribution Tree
Multicast routing protocols are used to construct a multicast
tree along which multicast data can be sent from the first-hop router
to each multicast receiver avoiding users or network branches that
do not need the data. In the figure above, R1 is a first-hop router,
and R4, R5, and R6 last-hop routers. Multicast receivers and the
routers directly connected to them (last-hop routers) constitute
the third module. A multicast receiver, such as a PC that received
live multimedia content is a member of a multicast group —a group
of hosts who require the same content. In this figure, PC 1, PC
2, PC 3 are hosts / receivers.
IGMP is used by the last-hop
routers to learn whether multicast receivers exist on the attached
network segments and to maintain member relationships. IGMP is used by hosts to send Membership
Report messages when they want to receive the data of multicast
groups. The components in the tree modules collaborate with each
other to ensure the normal working of a multicast network.
By becoming a member of a group, a multicast receiver (host)
expresses int interest in receiving the data destined for the multicast
address of the group. A multicast IP address
can only be a destination address not a source address. Data packets
destined for multicast group address can be received only by hosts that
have joined the group.
To join a multicast group, a host must report its request for
membership to nearby routers. These routers periodically poll the
hosts in their locally attached networks to check on their membership
status. When a host first joins a multicast group, it sends an IGMP message (Host Membership Query
message) that is directed to a specific multicast address. The Internet
Assigned Numbers Authority (IANA)
has assigned that all IP multicast
group addresses should fall in the range from 224.0.0.0 through
239.255.255.255. IGMP version 1 uses 224.0.0.1 as a general query
address.
The routers poll the hosts regularly by sending Host Membership
Query messages to determine whether any of them are still members
of that group. If no hosts on the network belong to that group any
longer, the router stops advertising the information to other routers
so that multicast messages directed to that group are no longer
forwarded to it.
IGMP messages
IGMP messages are encapsulated
in IP datagrams. To indicate an IGMP packet, the IP header contains a protocol number
of 2. For IGMP version 2 (defined
by RFC 2236), the IP data field
contains the 8-octet IGMP message
shown in the figure below.
Figure 2. IGMP Message Format
The fields in the
IGMP message
contain the following information:
- Type—it specifies
the type of the IGMP packet (as
seen in chapter 4, RFC 3376):
- 0 x 11—specifies the type number
(hex) of a membership query packet. This is sent by a multicast
router. There are three subtypes of Query messages:
- General
Query
- Group-Specific Query
- Group-and-Source-Specific Query
- 0 x 12—specifies the type number (hex) of an IGMPv1 membership report packet.
This is sent by a multicast host to signal participation in a specific
multicast host group.
- 0 x 16—specifies the type number (hex) of an IGMPv2 membership report packet.
- 0 x 17—specifies an IGMPv2
Leave Group packet.
- Max resp time—this field is used in membership query
messages. It specifies the maximum allowed time a host can wait
before sending a corresponding report. Varying this setting allows
routers to tune the leave latency. This references the time between
the last host leaving a group and the time the routing protocol
is notified that there are no more members.
- checksum—this field contains a 16-bit checksum.
- Class D Address—this field contains a valid multicast
group address. It is used in a report packet.
IGMPv3 messages
TheIGMPv2 message format has
been extended in IGMP version
3, defined in RFC 3376 (which obsoletes RFC 2236). Version 3 allows
receivers to subscribe to or exclude a specific set of sources within
a multicast group. To accommodate this, the 0 x 11 type membership
query packet has been altered to 0 x 22. However, all IGMPv3 implementation
still supports packet types 0 x 12, 0 x 16, and 0 x 17.
Figure 3. IGMPv3 Membership Query Message Format (0 x 11)
The fields in the
IGMP v3
message contain the following information:
This
set of fields are a vector of
NIP unicast
addresses, where the value N corresponds to the Number or Sources
(N) field.
When a router receives an IGMP message
from a host on an attached network segment, the router learns that
a multicast group resides on that segment and starts forwarding
multicast traffic to the interface attached to it.
Types of IGMPv2 Messages
There are 5 types of
IGMPv2
messages:
- General Query—a standard query message periodically
sent by IGMP routers to obtain
information about multicast groups. Routers use General Query messages
to obtain information about all hosts on a network segment. These
messages are sent to 224.0.0.1 (all multicast hosts) and the group address
carried in them is 0.0.0.0. Hosts that receive a General Query message
respond with a Membership Report message if they require multicast
data. By default, the multicast routers send General Queries every
60 seconds.
- Group-Specific Query—when routers receive a Leave Group
message from a multicast group member, they respond by sending a
Group-Specific message to determine whether the group contains any
members. The destination Ip address of a Group-Specific Query is
the address of the group containing the host that sent the Leave
Group Message. Queriers send a second Group-Specific Query after
1 second to ensure that groups are not inadvertently considered
empty due to dropped or damaged packets. They only remove groups
after receiving no reply to the second query.
- Group-and-Source-Specific Query—is sent by a multicast
router to learn if any neighboring interface desires reception of
packets sent to a specified multicast address, from any of a specified
list of sources. In a Group-and-Source-Specific Query, the Group
Address field contains the multicast address of interest, and the
Source Address [i] fields contain the source address(es) of interest.
- Membership Report—a report message sent from hosts to
routers to join a multicast group or respond to Membership query
messages from an IGMP router.
- If a Membership Report packet is not received from a certain
segment within Query intervals, the router advertises the segment
as having no multicast group members, and does not send further
multicast data to the segment. The maximum response time included
in these General Queries indicates to hosts how much time they have
to respond with a Membership Report and is set to 10 seconds by
default.
- If no Membership Report message is received from a certain network
segment before the Multicast Listener interval expires, the router
advertises the segment as having no multicast group members and
does not sent further multicast data to the segment
The
multicast listener interval is equal to two Query Intervals plus
10 seconds, so its default value is 130 seconds (2 x 60 +10) seconds.
The Query interval and the maximum response values can be configured.
For details, see sections “Configuring IGMP Query Interval” and
“Configuring IGMP Query Interval”.
- Leave Group—a message sent from hosts to routers to indicate
their intention to leave a specified multicast group. Leave messages
are send by hosts to 24.0.0.2 to inform multicast routers on the attached
network segment that the host intends to leave the multicast group.These
messages include the address of the group that the host is leaving.
Upon the receiving of a Leave message multicast routers sent a Group-Specific
Query to the group being left as a way of determining whether any
members remain in the group. If there is no response to the query,
the router discontinues forwarding of multicast traffic to the group.
- Version 2 Membership Report—included for compatibility
with IGMPv1.
IGMPv2 Querier
On a LAN with multiple multicast
routers, it would be very inefficient for all those routers to send
their own IGMP queries. Instead,
the interface of one router is selected as the IGMP queries for that LAN. In IGMPv2,
routers check the source address of the General Query messages send
by other routers to determine their role. Any router that sees a
General Query with a lower source address than its own acts as a non-querier,
and in this way the router whose IP address is lowest becomes the IGMP querier.
Afterward, if routers do not receive a query message from the
querier within the Other Querier Present Interval (125 seconds by
default), they determine that the querier has gone down, and a new
querier is selected using the same process. Once IGMP is enabled on the first-hop
router R1, the router will begin sending periodically general queries
to this network segment. When the hosts PC 1 an PC 3 receive these queries,
the report delay timer on each host is started at a number chosen
uniformly between 0 and the value of the maximum response time included
in the query (10 seconds by default). This timer counts down to
0, at which points the host sends a Membership Report message.
IGMPv2 Leave Group Process
(Scenario 1)
- If the host PC1 wants to leave group 224.1.1.1, it sends
a Leave Group message to 224.0.0.2.
- The first-hop router R1 (theIGMPv2
Querier) responds to this message with two Group-Specific Queries
(at a 1 second interval) to determine whether the network segment
still contains any 224.1.1.1 members.
- If the other host PC3 has not left the group, it responds with
a Membership Report. R1 continues forwarding traffic to the group.
IGMPv2 Leave Group Process
(Scenario 2)
- If host PC1 wants to leave group 224.2.2.2, so it sends
a Leave Group message.
- The first-hop router R1 (theIGMPv2
Querier) responds to this message with two Group-Specific Queries
(at a 1 second interval). There are no 224.2.2.2 members on the
segment, so R1 does not receive a response.
- Shortly thereafter, R1 decides that there are no 224.2.2.2 members
remaining and stops forwarding that group multicast traffic to the
segment.
Multicast Routing Table
A multicast packet is sent to a group of hosts. The multicast
routers are responsible for sending the packet to all hosts that
require the data. Each multicast router maintain a multicast routing
table for ensuring correct data forwarding from upstream node to
downstream node. A multicast routing protocol must determine upstream
interface closer to data sources.
This chapter describes the purpose and scope of the document
and general configurations used in this document.