This section describes the IGMP querier election principle and process.
The IGMP-enabled multicast device plays the following two roles on the network segment:
Querier
The querier is responsible for sending IGMP Query messages and receiving IGMP Report messages and Leave messages from hosts. In this way, the multicast device knows which multicast group has receivers (multicast group members) on the relevant network segment.
Non-querier
The non-querier only receives IGMP Report messages from hosts, and knows which multicast group on the network segment has receivers. Then, according to the action of the querier on the network segment, the multicast device identifies which receives leave the network segment.
Generally, only one querier exists on a network segment. Therefore, you must follow the principles to select the querier among multicast devices (take Router A, Router B, and Router C as an example):
After Router A is enabled with IGMP, Router A considers itself as the default querier of the network segment in the IGMP startup process, and sends IGMP Query messages on the network segment. If Router A receives the IGMP Query message from Router B that has a lower IP address, Router A is changed from the querier to the non-querier, starts the another-querier-existing timer, and records Router B as the querier of the network segment.
If Router A in the non-querier state receives the IGMP Query message from the querier Router B, the another-querier-existing timer is updated; if Router A in the non-querier status receives the IGMP Query message from Router C that has a lower IP address than the querier Router B, the querier is updated to be Router C, and the another-querier-existing timer is updated.
When Router A is in the non-querier status, the another-querier-existing timer expires. Then Router A is changed from the non-querier to the querier.
IGMPv1 does not support the querier election, and the querier in IGMPv1 is designated by the upper-layer protocol, such as the Protocol Independent Multicast (PIM). At present, only the querier election for multicast devices of the same network segment and same IGMP version is supported. Therefore, all multicast devices on the same network segment must be configured with the same IGMP version.