Search
Home Search Center IP Encyclopedia Online Courses

What Is IGMP?

The Internet Group Management Protocol (IGMP) is a part of the TCP/IP protocol suite used to manage IPv4 multicast group membership. IGMP sets up and maintains membership between receiver hosts and directly connected multicast routers by exchanging IGMP messages between them. IGMP messages are encapsulated in IP packets.

Why Do We Need IGMP?

IP multicast routing transmits packets from a source to a group of receivers. In the multicast communications model, the sender only needs to send data to a specified destination address and does not need to know the exact locations of the receivers. To forward multicast data packets to the receivers, the multicast router connected to the network segment of receiver hosts must know which receiver hosts are present on the network segment and ensure that these hosts have joined the specific group. IGMP implements this by setting up and maintaining membership between receiver hosts and directly connected multicast routers. Figure shows how the IGMP protocol is deployed on a multicast network.

IGMP deployment on a multicast network

IGMP deployment on a multicast network

What Are Application Scenarios of IGMP?

IGMP runs between member hosts and directly connected multicast routers to manage and maintain multicast group membership. To forward multicast data from multicast sources to receivers, multicast routers must run Protocol Independent Multicast (PIM) to set up forwarding paths. Figure illustrates a typical IGMP network topology.

Typical IGMP network topology

Typical IGMP network topology

How Does IGMP Work?

Currently, there are three versions of IGMP:
  • IGMPv1
  • IGMPv2
  • IGMPv3

IGMPv1 defines the group membership query and report processes. IGMPv2 extends IGMPv1 by adding the querier election and member leave mechanisms. IGMPv3 extends IGMPv2 by allowing hosts to specify the multicast sources they do or do not want to receive data from.

All IGMP versions support the any-source multicast (ASM) model. IGMPv3 can be directly applied to the source-specific multicast (SSM) model. IGMPv1 and IGMPv2, however, can be applied to the SSM model only when IGMP SSM mapping is configured.

Comparison of IGMP Versions

Table1 compares the three IGMP versions.

Table 1-1 Comparison of IGMP versions

Item

IGMPv1

IGMPv2

IGMPv3

Querier election

Through Protocol Independent Multicast (PIM)

Through competition among multicast routers on a local network segment

Through competition among multicast routers on a local network segment

General Query message

Supported

Supported

Supported

Report message

Supported

Supported

Supported

Group-Specific Query message

Not supported

Supported

Supported

Leave message

Not supported

Supported

No specific Leave message is defined. Instead, group members send a specified type of Report message to notify multicast routers that they are leaving a group.

Group-and-Source-Specific Query message

Not supported

Not supported

Supported

Specifying multicast source in Report messages

Not supported

Not supported

Supported

Protocol message versions supported

IGMPv1

IGMPv1, IGMPv2

IGMPv1, IGMPv2, IGMPv3

ASM model

Supported

Supported

Supported

SSM model

IGMP SSM mapping required

IGMP SSM mapping required

Supported

Compatibility Between IGMP Versions

IGMP versions are backward compatible. This means that a multicast router running a later IGMP version can identify IGMP messages sent from hosts running an earlier IGMP version, despite the format of IGMP messages in different versions being different. For example, a multicast router running IGMPv2 can correctly process Report messages from IGMPv1 hosts, and a multicast router running IGMPv3 can correctly process Report messages from IGMPv1 and IGMPv2 hosts. When a multicast router receives an IGMP Report message from a host running an earlier IGMP version, the router automatically downgrades the version of the corresponding multicast group so it can operate in the same version as the host.

For example, when a multicast router running IGMPv2 or IGMPv3 receives a Report message from an IGMPv1 host, the router downgrades the version of the corresponding multicast group to IGMPv1. Then, the router ignores the IGMPv2 Leave messages for this multicast group. In addition, when a multicast router running IGMPv3 receives a Report message from an IGMPv2 host, the router downgrades the version of the corresponding multicast group to IGMPv2. Then, the router ignores the multicast source list in IGMPv3 BLOCK messages, TO_IN messages, and TO_EX messages, which prohibits the hosts from selecting multicast sources. If a multicast router is manually upgraded to a later version, a multicast group will still work in the earlier IGMP version until all hosts running this version have left the multicast group.

How IGMPv1 Works

IGMPv1 uses a query-report mechanism to manage multicast groups. When there are multiple multicast routers on a network segment, all multicast routers can receive Membership Report messages from hosts. Therefore, only one multicast router needs to send Query messages to the network segment. The router selected to send Query messages is regarded as the IGMP querier. In IGMPv1 implementation, a unique Assert winner or designated router (DR) is selected by Protocol Independent Multicast (PIM) as the querier. The querier is the only device that sends Host Membership Query messages on the local network segment.

RouterA and RouterB connect to a network segment with three receivers: HostA, HostB, and HostC. RouterA is the IGMP querier on the network segment. HostA and HostB want to receive data sent to group G1, and HostC wants to receive data sent to group G2.

Multicast network

IGMPv1 involves three mechanisms: general query and report mechanism, join mechanism, and leave mechanism.


Multicast network

General query and report mechanism

By sending General Query messages and receiving Report messages, an IGMP querier knows which groups have members on the local network segment.

IGMPv1 general query and report process

IGMPv1 general query and report process

Figure shows the general query and report process:

  1. The IGMP querier sends a General Query message, with destination address 224.0.0.1 (indicating all hosts and routers on the network segment). All group members start a timer when they receive the General Query message.

    The IGMP querier sends General Query messages at intervals. The interval is configurable and defaults to 60 seconds. HostA and HostB are members of G1 and start a timer for G1 (Timer-G1). The timer length is a random value between 0 and the maximum response time (10 seconds by default).

  2. The host whose timer expires first sends a Report message for the group.

    In this example, Timer-G1 on HostA expires first, and HostA sends a Report message with the destination address G1. When HostB receives the Report message sent by HostA, it stops Timer-G1 and does not send a Report message for G1. This mechanism reduces the number of Report messages transmitted on the network segment, lowering loads on multicast routers.

  3. After the IGMP querier receives the Report message from HostA, it knows that group G1 has members on the local network segment. The IGMP querier uses the multicast routing protocol to create a (*, G1) entry, in which * stands for any multicast source. Once the IGMP querier receives data sent to G1, it forwards the data to this network segment.

Join mechanism

IGMPv1 join process

IGMPv1 join process

Figure shows how HostC joins group G2:

  1. HostC sends a Report message for G2 without waiting for a General Query message.
  2. After receiving the Report message, the IGMP querier knows that a member of G2 has connected to the local network segment, and creates a (*, G2) entry. Once the IGMP querier receives data sent to G2, it forwards the data to this network segment.

Leave mechanism

IGMPv1 does not define a Leave message. After a host leaves a group, it no longer responds to General Query messages. On the network in Figure:

  • If HostA leaves group G1

    When HostA receives General Query messages from the IGMP querier, it does not send a Report message for G1. Group G1 has another member HostB on the network segment, which still sends Report messages for G1 in response to General Query messages. Therefore, the IGMP querier is unaware HostA has left the group.

  • If HostC leaves group G2

    When HostC receives General Query messages from the IGMP querier, it does not send a Report message for G2. Because G2 has no other members on this network segment, the IGMP querier no longer receives Report messages for G2. After a certain period (130 seconds by default), the IGMP querier deletes the (*, G2) entry.

How IGMPv2 Works

IGMPv2 introduces the querier election and leave mechanisms.

Figure shows a multicast network running IGMPv2. RouterA and RouterB connect to a network segment with three receivers: HostA, HostB, and HostC. HostA and HostB want to receive data sent to group G1, and HostC wants to receive data sent to group G2.
Multicast network

Multicast network

The following describes the querier election and leave processes on the network in Figure.

Querier election mechanism

IGMPv2 defines an independent querier election mechanism. When multiple multicast routers are present on a local network segment, the router with the smallest IP address is elected as the querier.

IGMPv2 querier election process

IGMPv2 querier election process

Figure shows how an IGMPv2 querier is elected:

  1. All IGMPv2 routers (RouterA and RouterB in this example) consider themselves queriers and send General Query messages to all hosts and routers on the shared network segment.

    When the routers receive a General Query message, they compare the source IP address of the message with their own interface IP addresses. The router with the smallest IP address becomes the querier, and the other routers are considered non-queriers. In this example, RouterA has a smaller interface IP address than RouterB. Therefore, RouterA becomes a querier, and RouterB becomes a non-querier.

  2. The IGMP querier (RouterA) sends General Query messages to all hosts and other multicast routers on the local network segment. The non-querier (RouterB) no longer sends General Query messages.

    RouterB starts the other querier present timer. If RouterB receive a Query message from the querier before the timer expires, it resets the timer. Otherwise, it triggers a querier election.

Leave mechanism

IGMPv2 leave process

IGMPv2 leave process

Figure shows message exchanges when HostA leaves group G1:

  1. HostA sends a Leave message for G1 to all multicast routers on the local network segment. The destination address of the Leave message is 224.0.0.2.
  2. When the querier receives the Leave message, it sends Group-Specific Query messages for G1 at intervals to check whether G1 has other members on the network segment. The query interval and count are configurable. By default, the querier sends Group-Specific Query messages twice, at an interval of 1 second. In addition, the querier starts the group membership timer. The timer length is the product of the group-specific query interval and count.
  3. There is another member of G1 on the network segment, HostB, which sends a Report message for G1 immediately after receiving a Group-Specific Query message. The querier therefore continues maintaining the membership of G1.

    If G1 has no members on the network segment, the querier will not receive a Report message for G1. When the group membership timer times out, the querier deletes the (*, G1) entry. Thereafter, if the querier receives multicast data sent to G1, it does not forward the data downstream.

How IGMPv3 Works

IGMPv3 differs from IGMPv2 and IGMPv3 in that it allows hosts to select specific multicast sources.

Joining a specific source and group

IGMPv3 Report messages have a destination address of 224.0.0.22, which represents all IGMPv3-capable multicast routers on the same network segment. A Report message contains Group Record fields, allowing hosts to specify the multicast sources from which they do or do not want to receive data when joining a multicast group. Figure shows two multicast sources, S1 and S2, sending data to multicast group G. The host only wants to receive data sent from S1 to G.

IGMPv3 source-and-group-specific multicast data flow
IGMPv3 source-and-group-specific multicast data flow

If IGMPv1 or IGMPv2 is running between the host and the routers, the host cannot select multicast sources when it joins group G. The host receives data from both S1 and S2, regardless of whether it requires the data. If IGMPv3 is running between the host and the routers, the host can choose to receive only data from S1 using either of the following methods:

  • Send an IGMPv3 Report (G, INCLUDE, (S1)), requesting to receive only the data sent from S1 to G.
  • Send an IGMPv3 Report (G, EXCLUDE, (S2)), notifying the upstream router that it does not want to receive data from S2. Only data sent from S1 is then forwarded to the host.

Group-and-Source-Specific Query

When an IGMP querier receives a Report message with Filter-Mode-Change Records or Source-List-Change Records (such as CHANGE_TO_INCLUDE_MODE or CHANGE_TO_EXCLUDE_MODE), it sends a Group-and-Source-Specific Query message. If members want to receive data from any source in the source list, they send Report messages. The IGMP querier updates the source list of the corresponding group according to the received Report messages.

About This Topic
  • Author: Ge Kairong
  • Updated on: 2025-01-21
  • Views: 7143
  • Average rating:
Share link to