Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the relevant knowledge points of IGMP protocol

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "what are the relevant knowledge points of IGMP protocol?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can gain something after reading this article. Let's take a look at this article "what are the relevant knowledge points of IGMP protocol?"

A brief introduction to IGMP

IGMP (Internet Group Management Protocol) Internet Group Management Protocol is a protocol responsible for the management of IP multicast members in the TCP/IP protocol family, which is used to establish and maintain multicast group membership between IP hosts and their directly adjacent multicast routers.

So far, there are three versions of IGMP:

IGMPv1 (defined by RFC 1112) IGMPv2 (defined by RFC 2236) IGMPv3 (defined by RFC 3376) all versions of IGMP support the ASM (Any-Source Multicast, arbitrary Source Multicast) model; IGMPv3 can be directly applied to the SSM (Source-Specific Multicast) model, while IGMPv1 and IGMPv2 can only be applied to the SSM model with the support of IGMP SSM Mapping technology.

II. The working mechanism of IGMP

1. IGMPv1 working mechanism

IGMPv1 is mainly based on query and response mechanism to complete the management of multicast group members. When there are multiple multicast routers in a network segment, because they can all receive IGMP membership report messages (Membership Report Message) from the host.

Therefore, it is sufficient for one of the routers to send an IGMP query message (Query Message). At this point, a Querier election mechanism is needed to determine which router is the IGMP querier.

For IGMPv1, the only multicast information forwarder DR (Designated Router, designated router) is selected by the multicast routing protocol (such as PIM) as the IGMP querier.

As shown in the figure above, assuming that Host B and Host C want to receive multicast data destined for multicast group G1 and Host A wants to receive multicast data destined for multicast group G2, the basic process for hosts to join multicast groups and IGMP querier (Router B) to maintain multicast group membership is as follows:

1) the host will actively send an IGMP membership report message to the multicast group to which it wants to join, instead of waiting for the IGMP query message sent by the IGMP querier.

2) the IGMP querier periodically sends IGMP query messages to all hosts and routers in the local network segment (destination address is 224.0.0.1).

3) after receiving the query message, follow one of Host B and Host C of G1 (depending on whose delay timer expires 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.

Because all hosts and routers on 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 for G1, because the IGMP routers (Router An and Router B) already know that there are hosts interested in G1 in the local network segment.

This mechanism is called the IGMP membership report inhibition mechanism on the host, and it helps to reduce the information traffic of the local network segment.

4) at the same time, because Host An is focused on G2, it will still send a multicast report message to G2 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 multicast forwarding items (G1) and (G2) are generated by multicast routing protocols (such as PIM) as the basis for forwarding multicast data, where "*" represents any multicast source.

6) when the multicast data sent from the multicast source to G1 or G2 is routed to the IGMP router, because there are (, G1) and (, G2) multicast forwarding items on the IGMP router, the multicast data is forwarded to the local network segment, and the receiver host can receive the multicast data.

IGMPv1 does not specifically define a message to leave a multicast group. When a host running IGMPv1 leaves a multicast group, a report message will not be sent to the multicast group it is leaving. When the members of the multicast group no longer exist in the network segment, the IGMP router will not receive any report messages sent to the multicast group, so the IGMP router deletes the multicast forwarding items corresponding to the multicast group after a period of time.

2. Improvement of IGMPv2

Compared with IGMPv1, IGMPv2 adds querier election mechanism and leave group mechanism.

(1) querier election mechanism

In IGMPv1, when there are multiple multicast routers on a shared network segment, the designated router selected by a multicast routing protocol, such as PIM, acts as a querier.

In IGMPv2, an independent querier election mechanism has been added, and the election process is as follows:

All IGMPv2 routers initially think of themselves as queriers and send IGMP Universal Group query (General Query) messages to all hosts and routers on the local network segment (destination address 224.0.0.1); other IGMPv2 routers in the local network segment, after receiving the message, compare the source IP address of the message with their interface address. By comparison, the router with the lowest IP address becomes the querier and the other routers become non-querier (Non-Querier); a timer (that is, the time-of-existence timer Other Querier Present Timer of the other querier) is started on all non-querier. Before the timer expires, if an IGMP query message from the querier is received, the timer is reset; otherwise, the original querier is considered invalid and a new querier election process is initiated. (2) leave the group mechanism

In IGMPv1, the host does not send any notification to the multicast router when it leaves the multicast group, so that the multicast router can only rely on the response timeout of the multicast group member query to know the departure of the multicast group member.

In IGMPv2, when a host leaves a multicast group:

The host sends a Leave Group message to all multicast routers in the local network segment (destination address is 224.0.0.2); when the querier receives the message, it sends a specific group query (Group-Specific Query) message to the multicast group that the host declares to leave (both the destination address field and the group address field are filled with the multicast group address to be queried) If there are other members of the multicast group in the network segment, after receiving the query message of the specific group, these members will send the membership report message within the maximum response time (Max Response Time) set in the message. If the membership report message sent by other members of the multicast group is received within the maximum response time, the querier will continue to maintain the membership of the multicast group. Otherwise, the querier will assume that there are no members of the multicast group in the network segment, so the membership of the multicast group is no longer maintained.

3. Improvement of IGMPv3

Based on the compatibility and inheritance of IGMPv1 and IGMPv2, IGMPv3 further enhances the control ability of the host, and enhances the function of querying and reporting messages.

(1) the enhancement of host control ability

IGMPv3 adds a filtering mode (INCLUDE/EXCLUDE) for multicast sources, which enables hosts to explicitly request to receive or reject multicast information from a specific multicast source S while joining a multicast group G. When a host joins a multicast group:

If you are required to receive only from specified multicast sources such as S1, S2, …... Then its report message can be marked as INCLUDE Sources (S1 dint S2, …) If you refuse to receive from specified multicast sources such as S1, S2, …... Then its report message can be marked as EXCLUDE Sources (S1 dint S2, …) .

As shown in the figure above, there are two multicast sources in the network, Source 1 (S1) and Source 2 (S2), both of which send multicast messages to multicast group G. Host B is only interested in information sent from Source1 to G, but not from Source 2.

If IGMPv1 or IGMPv2,Host B is running between the host and the router, the multicast source cannot be selected when joining multicast group G, so multicast information from Source 1 and Source 2 will be passed to Host B regardless of whether Source B needs it or not.

When the IGMPv3 is running between the host and the router, Host B can request that only multicast messages from Source 1 to G (S1 Magi G) be received, or multicast messages sent to G from Source 2 be rejected (S2 Magi G), so that only multicast messages from Source 1 can be transmitted to Host B.

(2) Enhancement of query and report message function

a. Query message with source address

IGMPv3 not only supports IGMPv1's universal group query and IGMPv2's specific group query, but also adds support for specific source group queries:

The universal group query message carries neither the group address nor the source address; in the specific group query message, it carries the group address, but not the source address; in the specific source group query message, it carries not only the group address, but also one or more source addresses. b. A report message containing multiple sets of records

The destination address of the IGMPv3 report message is 224.0.0.22 and can carry one or more group records. In each group record, there is a list of multicast group addresses and multicast source addresses. Group records can be divided into several types, as follows:

IS_IN: indicates that the filtering mode between the multicast group and the multicast source list is INCLUDE, that is, only multicast data sent from the specified multicast source list to the multicast group is received. IS_EX: indicates that the filtering mode between the multicast group and the multicast source list is EXCLUDE, that is, only multicast data sent to the multicast group from multicast sources other than the specified multicast source list is received. TO_IN: indicates that the filtering mode between the multicast group and the multicast source list has changed from EXCLUDE to INCLUDE. TO_EX: indicates that the filtering mode between the multicast group and the multicast source list has changed from INCLUDE to EXCLUDE. ALLOW: indicates that you want to receive multicast data from some multicast sources in addition to the existing state. If the current correspondence is INCLUDE, these multicast sources are added to the list of existing multicast sources, and if the current correspondence is EXCLUDE, they are removed from the list of existing multicast sources. BLOCK: indicates that you no longer want to receive multicast data from some multicast sources based on the existing state. If the current correspondence is INCLUDE, these multicast sources are removed from the list of existing multicast sources, and if the current correspondence is EXCLUDE, these multicast sources are added to the list of existing multicast sources.

4. Multicast model classification

According to the different ways of the receiver to deal with the multicast source, the multicast model is divided into three categories:

(1) ASM Model: Any-Source Multicast, Multicast from any Source

In the ASM model, any sender can send information to a multicast group address as a multicast source. A plurality of receivers obtain multicast information sent to the multicast group by joining a multicast group identified by the multicast group address.

In the ASM model, the receiver can not 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, Source filtering Multicast

This model inherits the ASM model, and from the sender's point of view, the membership of the two multicast groups is exactly the same. The SFM model extends the ASM model functionally.

In the SFM model, the upper layer software checks the source address of the received multicast packets and allows or forbids the packets from some multicast sources to pass through.

Therefore, the receiver can only receive multicast data from some multicast sources. From the receiver's point of view, only some of the multicast sources are valid, and the multicast sources are filtered.

(3) SSM model: Source-Specific Multicast, specify source multicast

In real life, users may only be interested in the multicast information sent by some multicast sources, but do not want to receive the information sent by other sources. The model provides a transmission service for users to specify multicast sources on the client side.

The fundamental difference between the SSM model and the ASM model is that the receiver in the SSM model already knows the specific location of the multicast source in advance by other means. The SSM model uses a different range of multicast addresses from the ASM/SFM model to establish a dedicated multicast forwarding path between the receiver and its designated multicast source.

5. IP Multicast

(1) for IP Multicast, you need to pay attention to the following issues:

Where does the multicast source transmit the multicast information? That is, the multicast addressing mechanism; who are the recipients in the network? That is, host registration; which multicast source do these recipients need to receive information from? That is, multicast source discovery; how to transmit multicast information? That is, multicast routing. (2) IP Multicast is an end-to-end service, and the multicast mechanism includes the following four parts:

Addressing mechanism: with the help of multicast address, information is sent from the multicast source to a group of receivers; host registration: allows the recipient host to dynamically join and leave a multicast group to realize the management of multicast members; Multicast routing: construct a multicast packet distribution tree (that is, the tree forwarding path of multicast data in the network), and transmit the message from the multicast source to the receiver through the distribution tree Multicast applications: multicast sources and receivers must install software that supports multicast applications such as video conferencing, and TCP/IP protocol stack must support the sending and receiving of multicast information. In order to enable the multicast source to communicate with the members of the multicast group, it is necessary to provide the network layer multicast address, that is, the IP multicast address. At the same time, there must be a technology to map IP multicast addresses to multicast MAC addresses at the link layer. (3) IP Multicast address

IANA (Internet Assigned Numbers Authority, Internet assigned numbers Committee) allocates class D address space for IPv4 multicast, ranging from 224.0.0.0 to 239.255.255.255. Description:

The members of a multicast group are dynamic, and hosts can join or leave the multicast group at any time. GLOP is a multicast address allocation mechanism between AS (Autonomous System). The AS number is filled in the middle two bytes of the multicast address in this range, and each AS can get 255multicast addresses. For a detailed introduction to GLOP, see RFC 2770. (4) Ethernet Multicast MAC address

When Ethernet transmits unicast IP messages, the destination MAC address uses the receiver's MAC address. However, when transmitting a multicast packet, its destination is no longer a specific receiver, but a group whose members are uncertain, so a multicast MAC address is used. IANA stipulates that the highest 24 bits of the IPv4 multicast MAC address are 0x01005E, the 25th bit is 0, and the lower 23 bits are the lower 23 bits of the IPv4 multicast address. Because the top 4 bits of the IPv4 multicast address is 1110, which represents the multicast identity, while only 23 bits of the lower 28 bits are mapped to the IPv4 multicast MAC address, 5 bits of the IPv4 multicast address are lost. As a result, 32 IPv4 multicast addresses are mapped to the same IPv4 multicast MAC address, so during the layer 2 processing, the device may have to receive some multicast data outside the IPv4 multicast group, and these excess multicast data need to be filtered by the upper layer of the device.

6. Multicast protocol

Generally speaking, IP multicast working in the network layer is called "layer 3 Multicast", and the corresponding multicast protocol is called "layer 3 Multicast Protocol", including IGMP, PIM, MSDP, MBGP and so on. IP Multicast working in the data link layer is called "layer 2 Multicast", and the corresponding multicast protocol is called "layer 2 Multicast Protocol", including IGMP Snooping, Multicast VLAN and so on.

(1) layer 3 Multicast Protocol

There are two types of layer 3 multicast protocols: multicast group management protocol and multicast routing protocol.

a. Multicast group management protocol

The multicast group management protocol IGMP is usually used between the host and the layer 3 multicast devices directly connected to it, which provides the mechanism for establishing and maintaining the multicast group membership between the host and the layer 3 multicast equipment.

b. Multicast routing protocol

The multicast routing protocol runs between layer 3 multicast devices, which is used to establish and maintain multicast routes and forward multicast packets correctly and efficiently.

Multicast routing establishes a loop-free (loop-free) data transmission path from one data source to multiple receivers, that is, multicast distribution tree.

For the ASM model, multicast routing can be divided into intra-domain and inter-domain categories:

Intra-domain multicast routing is used to discover multicast sources within the AS and build a multicast distribution tree to transmit multicast information to the receiver. Among many intra-domain multicast routing protocols, PIM (Protocol Independent Multicast, Protocol Independent Multicast) is a typical one. According to the different forwarding mechanism, PIM can be divided into two modes: DM (Dense Mode) and SM (Sparse Mode). Inter-domain multicast routing is used to realize the transmission of multicast information between AS. At present, the more formed solutions are: MSDP (Multicast Source Discovery Protocol, Multicast Source Discovery Protocol) can propagate the information of multicast sources across AS, while MP-BGP (MultiProtocol Border Gateway Protocol, Multi-Protocol Border Gateway Protocol) Multicast extension MBGP (Multicast BGP) can propagate multicast routing across AS. For the SSM model, there are no intra-domain and inter-domain partitions. Because the receiver knows the specific location of the multicast source in advance, the multicast information can be transmitted only with the help of the channel built by PIM-SM.

(2) layer 2 Multicast Protocol

Layer 2 Multicast protocols include IGMP Snooping and Multicast VLAN. A. IGMP Snooping

IGMP Snooping (Internet Group Management Protocol Snooping, Internet Group Management Protocol snooping) is a multicast constraint mechanism running on layer 2 devices. It manages and controls multicast groups by snooping and analyzing the IGMP messages exchanged between hosts and layer 3 multicast devices, which can effectively restrain the spread of multicast data in layer 2 networks.

b. Multicast VLAN

In the traditional multicast-on-demand mode, when users connected to layer 2 devices and belonging to different VLAN carry out multicast on demand respectively, layer 3 multicast devices need to send a copy of multicast data to each VLAN of the layer 2 devices, and when layer 2 devices run multicast VLAN.

The above is the content of this article on "what are the relevant knowledge points of the IGMP protocol?" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report