1. Introduction to IGMP IGMP (Internet Group Management Protocol) is a protocol in the TCP/IP protocol suite responsible for IP multicast member management. It is used to establish and maintain multicast group membership between an IP host and its directly adjacent multicast routers.
So far, there are three versions of IGMP:
All versions of IGMP support the ASM (Any-Source Multicast) model; IGMPv3 can be directly applied to the SSM (Source-Specific Multicast) model, while IGMPv1 and IGMPv2 require the support of IGMP SSM Mapping technology to be applied to the SSM model. IGMP Working Mechanism 1. IGMPv1 working mechanism IGMPv1 mainly manages multicast group members based on the query and response mechanism. When there are multiple multicast routers in a network segment, they can all receive IGMP membership report messages from the host. Therefore, it is sufficient for only one router to send an IGMP query message. At this time, a querier election mechanism is required to determine which router will serve as the IGMP querier. For IGMPv1, the multicast routing protocol (such as PIM) elects a unique multicast information forwarder DR (Designated Router) as the IGMP querier. IGMP query response diagram As shown in the figure above, assuming that Host B and Host C want to receive multicast data sent to multicast group G1, and Host A wants to receive multicast data sent to multicast group G2, the basic process of hosts joining multicast groups and IGMP querier (Router B) maintaining multicast group membership is as follows: 1) The host will actively send an IGMP membership report message to the multicast group it wants to join to declare joining without having to wait for the IGMP query message sent by the IGMP querier; 2) The IGMP querier periodically sends IGMP query messages (destination address is 224.0.0.1) to all hosts and routers in the local network segment in multicast mode; 3) After receiving the query message, one of Host B and Host C that pays attention to G1 (depending on whose delay timer times out first), for example, Host B will first send an IGMP membership report message to G1 in multicast mode to declare that it belongs to G1. Since all hosts and routers in the local network segment can receive the report message sent by Host B to G1, when Host C receives the report message, it will no longer send the same report message to G1, because the IGMP routers (Router A and Router B) already know that there are hosts interested in G1 in the local network segment. This mechanism is called IGMP membership report suppression on hosts, which helps reduce the amount of information traffic on the local network segment; 4) At the same time, since Host A is concerned about G2, it will still send a report message to G2 in multicast mode to declare that it belongs to G2; 5) After the above query and response process, the IGMP router learns that there are members of G1 and G2 in the local network segment, so the multicast routing protocol (such as PIM) generates (*, G1) and (*, G2) multicast forwarding items as the basis for forwarding multicast data, where "*" represents any multicast source; 6) When the multicast data sent by the multicast source to G1 or G2 reaches the IGMP router through the multicast routing, since there are (*, G1) and (*, G2) multicast forwarding items on the IGMP router, the multicast data is forwarded to the local network segment, and the receiving host can receive the multicast data. IGMPv1 does not specifically define messages for leaving a multicast group. When a host running IGMPv1 leaves a multicast group, it will not send a report message to the multicast group it is leaving. When there are no more members of the multicast group in the network segment, the IGMP router will not receive any report messages sent to the multicast group, so the IGMP router will delete the multicast forwarding item corresponding to the multicast group after a period of time. 2. Improvements to IGMPv2 Compared with IGMPv1, IGMPv2 adds the querier election mechanism and the leave group mechanism. (1) Querier election mechanism In IGMPv1, when there are multiple multicast routers on a shared network segment, the designated router elected by the multicast routing protocol (such as PIM) acts as the querier. In IGMPv2, an independent querier election mechanism is added, and the election process is as follows:
(2) Leaving Group Mechanism In IGMPv1, when a host leaves a multicast group, no notification is sent to the multicast router. As a result, the multicast router can only learn about the departure of a multicast group member by the timeout of the response to the multicast group member query. In IGMPv2, when a host leaves a multicast group:
3. Improvements to IGMPv3 IGMPv3 is compatible with and inherits IGMPv1 and IGMPv2, and further enhances the control capability of the host and the functions of query and report messages. (1) Enhanced host control capabilities IGMPv3 adds filtering modes (INCLUDE/EXCLUDE) for multicast sources, so that when a host joins a multicast group G, it can explicitly request to receive or reject multicast information from a specific multicast source S. When a host joins a multicast group:
Specify the multicast stream path of the source group As shown in the figure above, there are two multicast sources, Source 1 (S1) and Source 2 (S2), in the network, both sending multicast messages to multicast group G. Host B is only interested in the information sent from Source 1 to G, but not in the information from Source 2. If IGMPv1 or IGMPv2 is running between the host and the router, Host B cannot select a multicast source when joining multicast group G. Therefore, multicast information from Source 1 and Source 2 will be delivered to Host B regardless of whether Host B needs it or not. After IGMPv3 is running between the host and the router, Host B can request to receive only the multicast information from Source 1 and sent to G (S1, G), or request to reject the multicast information from Source 2 and sent to G (S2, G). In this way, only the multicast information from Source 1 can be delivered to Host B. (2) Enhanced query and report functions a. Query message carrying source address IGMPv3 not only supports the general group query of IGMPv1 and the specific group query of IGMPv2, but also adds support for specific source group query:
b. Report message containing multiple sets of records The destination address of the IGMPv3 report message is 224.0.0.22, and it can carry one or more group records. Each group record contains a list of multicast group addresses and multicast source addresses. Group records can be divided into multiple types, as follows:
4. Classification of multicast models Based on how receivers process multicast sources, multicast models are classified into the following three categories: (1) ASM model: Any-Source Multicast In the ASM model, any sender can act as a multicast source to send information to a multicast group address. Many receivers join the multicast group identified by the multicast group address to obtain the multicast information sent to the multicast group. In the ASM model, receivers cannot know the location of the multicast source in advance, but can join or leave the multicast group at any time. (2) SFM model: Source-Filtered Multicast This model inherits the ASM model. From the sender's perspective, the multicast group membership of the two models is exactly the same. The SFM model extends the ASM model in terms of functionality. In the SFM model, the upper-layer software checks the source address of the received multicast messages and allows or prohibits the messages from certain multicast sources from passing. Therefore, the receiver can only receive multicast data from some multicast sources. From the receiver's point of view, only some multicast sources are valid, and the multicast sources have been filtered. (3) SSM model: Source-Specific Multicast In real life, users may only be interested in multicast information sent by certain multicast sources, and may not want to receive information sent by other sources. This model provides users with a transmission service that allows them to specify multicast sources on the client. The fundamental difference between the SSM model and the ASM model is that the receivers in the SSM model already know the specific location of the multicast source through other means. The SSM model uses a multicast address range different from the ASM/SFM model to directly establish a dedicated multicast forwarding path between the receiver and its designated multicast source. 5. IP Multicast (1) For IP multicast, the following issues need to be considered:
(2) IP multicast is an end-to-end service. The multicast mechanism consists of the following four parts:
In order for the multicast source and multicast group members to communicate, a network layer multicast address, namely an IP multicast address, needs to be provided. At the same time, there must be a technology to map the IP multicast address to a link layer multicast MAC address. (3) IP multicast address IANA (Internet Assigned Numbers Authority) allocates Class D address space for IPv4 multicast use, ranging from 224.0.0.0 to 239.255.255.255. The specific classification and its meaning are shown in the following table. Scope and meaning of IPv4 multicast addresses illustrate:
(4) Ethernet multicast MAC address
Mapping relationship between IPv4 multicast address and MAC address
Therefore, 32 IPv4 multicast addresses are mapped to the same IPv4 multicast MAC address. Therefore, during the Layer 2 processing, the device may need to receive some multicast data outside the IPv4 multicast group, and these redundant multicast data need to be filtered by the upper layer of the device. 6. Multicast Protocol Usually, we call IP multicast working at the network layer "Layer 3 multicast", and the corresponding multicast protocols are called "Layer 3 multicast protocols", including IGMP, PIM, MSDP, MBGP, etc.; IP multicast working at the data link layer is called "Layer 2 multicast", and the corresponding multicast protocols are called "Layer 2 multicast protocols", including IGMP Snooping, multicast VLAN, etc. (1) Layer 3 multicast protocol The three-layer multicast protocol includes two types: multicast group management protocol and multicast routing protocol. Their application locations in the network are shown in the following figure. Application location of Layer 3 multicast protocol a. Multicast Group Management Protocol The multicast group management protocol IGMP is usually used between the host and the three-layer multicast device directly connected to it. This protocol specifies the mechanism for establishing and maintaining multicast group membership between the host and the three-layer multicast device. b. Multicast routing protocol The multicast routing protocol runs between Layer 3 multicast devices to establish and maintain multicast routes and to forward multicast data packets correctly and efficiently. Multicast routing establishes a loop-free data transmission path from one data source to multiple receivers, namely, a multicast distribution tree. For the ASM model, multicast routing can be divided into two categories: intra-domain and inter-domain:
For the SSM model, there is no intra-domain and inter-domain division. Since the receiver knows the specific location of the multicast source in advance, it only needs to use the channel built by PIM-SM to realize the transmission of multicast information. (2) Layer 2 multicast protocol Layer 2 multicast protocols include IGMP Snooping and multicast VLAN, and their application locations in the network are shown in the following figure. Application location of Layer 2 multicast protocol a. IGMP Snooping IGMP Snooping (Internet Group Management Protocol Snooping) is a multicast restriction mechanism running on Layer 2 devices. It manages and controls multicast groups by snooping and analyzing IGMP messages exchanged between hosts and Layer 3 multicast devices, thereby effectively suppressing the spread of multicast data in the Layer 2 network. b. Multicast VLAN In the traditional multicast on-demand mode, when users connected to a Layer 2 device and belonging to different VLANs perform multicast on-demand respectively, the Layer 3 multicast device needs to send a copy of the multicast data to each VLAN of the Layer 2 device; and when the Layer 2 device runs multicast VLAN. |
>>: Where can I find the IP address of my router?
[[391593]] The pandemic has forced government age...
According to the latest report released by the In...
In November 2019, my country established the Nati...
5G is considered a key part of delivering edge co...
spinservers has released a special package for th...
TCP initial sequence number Hi, my name is Robert...
4G has not yet been fully popularized, but the re...
Author | Lei Ge Source | Java interview questions...
Today I tweeted some thoughts about how the OSI m...
[[389359]] Data from the Global Mobile Suppliers ...
who I am Hello everyone, my name is NGCSS (Next G...
When it comes to the Internet domain name service...
The last time I shared news about Ramnode was in ...
A few years ago, LET often carried out voting act...
HostYun has recently opened several new data cent...