IP Multicast Protocol Fundamentals 4 (IGMPv2)

IGMPv2

IGMPv2 is an improved version to improve the two deficiencies of IGMPv1. One is that IGMPv2 adds an independent query mechanism (the querier in IGMPv1 is a designated router (DR) selected by the PIM protocol to act as a querier). Mechanism, including leave information, that allows rapid reporting of group membership terminations to the multicast routing protocol (PIM) (there is no leave mechanism in IGMPv1), which is very important for high-bandwidth multicast groups or volatile multicast members .

This document explains IGMPv2 according to the following topology diagram:
insert image description here

This topology diagram is also the topology diagram used in my last article: IP Multicast Protocol Basics (3) , but for the convenience of packet capture and observation, the network segments of RA and RB in this topology are both 192.168.1.0/24.

Topology configuration ideas:
1. IP configuration
2. Routing configuration to ensure topology interworking.
3. Configure PIM-DM (when enabled globally, enable all interfaces of the router)
4. Configure IGMPv2 (when enabled globally, enable on G0/0/1 of RA and RB)
5. Configure multicast sources G1 and G2, and Run the multicast application
6. PCs join their corresponding groups.
The detailed configuration will not be described in this article.

In the multicast network shown in the figure above, RA and RB are connected to the host network segment, and there are three receivers, HostA, B, and C, on the host network segment. Assuming that A and B want to receive data sent to the multicast group G1, C wants to receive data sent to the multicast group G2.

Querier Election Mechanism

IGMPv2 uses an independent querier election mechanism. When there are multiple multicast routers on a shared network segment, the router with the smallest IP address of the interface running IGMP becomes the querier .

Initially, all multicast routers (RA, RB) running IGMPv2 consider themselves to be queriers, and use 224.0.0.1 as the destination address to send query messages to all hosts and multicast routers in the network segment.

After RA and RB receive the general group query message sent by each other, they compare the source IP address of the message with their own interface addresses. Through the comparison, the multicast router with the smaller IP address will become the querier, and the other multicast routers will Become a non-querier (Non-Querier). In this topology diagram, since the interface address of RB is smaller than that of RA, RB becomes a querier. Afterwards, the querier RB sends general group query messages to all hosts and other multicast routers in the network segment, and the non-querier RA will no longer send query messages. As shown in the figure below: After the election, RB becomes the querier, and no query messages from RA (192.168.1.254) appear in the network segment.

insert image description here
Check the election status of IGMP queriers on RA and RB interfaces:
insert image description hereinsert image description here
In addition, a timer will be started on non-queriers (a timer for the existence time of other queriers: Other Querier Present Timer,The timer time of the queryer itself is 0s, as shown in the third last line in the above two figures), before the timer expires, if a message from the querier is received, the timer will be reset. Otherwise, the original querier is considered invalid and a new querier election process is initiated.

By default, the formula for calculating the Other Querier Present Timer (Other Querier Present Timer) is:
robustness factor × IGMP general query message sending interval + (1/2) maximum response time

  • Robust factor: It is the number of message retransmissions set to compensate for possible network packet loss. The value range is an integer from 2 to 5. The default value is 2 .
    insert image description here

  • IGMP general query message sending interval: that is, the time interval for sending query messages, the value range is 1~1800s, and the default is 60s .
    insert image description here

  • Maximum response time: The maximum response time of the query message, the value range is 1~25s, the default is 10s , the shorter the response time, the faster the IGMP device can learn the multicast members, but the network bandwidth and device resource occupation Also bigger.
    insert image description here
    The above parameters can be configured in the global view and interface view. The priority of the interface attempt is higher than that of the global configuration. Therefore, the survival time of other queriers in RA in this topology can be calculated according to the following figure: After calculation, the survival time of other queriers in RA
    insert image description here
    is The time is 25s. The other querier time in the above figure is 21s. In fact, the timer has started counting down and 4 seconds have passed. According to the above, when RA receives the query message from the querier (RB) again, the timer It will be reset again. In the figure above, the IGMP query message sending interval is 10s, which also means that the other queryer timeout of RA will be reset after 10s, that is, when it counts down to 15s, as shown in the figure below (quick CV Dafa capture Timer time):
    insert image description here
    Now, disconnect the interface connecting the RB and the switch, and check the change of the survival time of other queriers in RA:
    insert image description here
    You can see that due to the disconnection of RB, the time of other queriers in RA has been counting down to 0s. No query packets from other multicast routers are received in the network segment, so it becomes the querier itself.
    insert image description here

leave group mechanism

As mentioned earlier, compared with IGMPv1, IGMPv2 adds a group leaving mechanism in addition to the querier election mechanism.
In the topology, add the hosts A and B to the multicast source G1 first (restore the previous link connecting the RB and the switch): the
insert image description here
multicast router (take RA as an example) will automatically generate a (*, G1) corresponding IGMP group entry:
insert image description here

Assuming that host A exits G1 (255.1.1.1) at this time, host A will send a leave message for group G1 to all hosts and multicast routers in this network segment. When the multicast router receives the leave message of group members, A specific group query message will be sent to the group involved in the message (in this topology, the group G1 originally joined by host A) (by default, it will be sent once every 1s, twice in total). Another group member, HostB, exists, so after the querier sends a specific group query message, host B will immediately send a report message for G1, and the querier will continue to maintain the membership of the group (G1) after receiving the message. As shown below:
insert image description here

However, if there are no other members of G1 in the network segment, the querier will delete the IGMP corresponding to (*, G1) after sending two group-specific query messages after the querier no longer receives report messages for group G1. Group table entry, as shown in the figure below, remove host B from G1:
insert image description here
insert image description here
The above is my sharing of IGMPv2 learning, thank you for reading.
By the way, some students asked what CV Dafa is, isn’t it just copy and paste ( •̀ ω •́ ).

Guess you like

Origin blog.csdn.net/Sakura0156/article/details/124482943