IGMP: Internet Group Management Protocol

Source: Internet
Author: User


1. Introduction
TCP is a connection-oriented protocol, which means there is a connection between the two processes running on the two hosts (determined by the port number. Therefore, broadcast and multicast are only applicable to UDP.
To understand broadcast and multicast, you need to understand the filtering process of frames transmitted by channels by the host. Figure 12-1 illustrates this process.



NIC: determines whether the target address is a frame of the physical or broadcast address of the NIC (check and error will also be discarded ).
Device Driver: first, the Protocol (I P, A R P, and so on) to be used must be specified in the frame type ). Then, perform multicast filtering to check whether the host belongs to the multicast group with the multicast address description.
IP layer: perform more detection based on the source address and target address (inspection and error will also be discarded ).
UDP/TCP: filter data based on the port number. If no process currently uses this port number, the packet is discarded and an ICMP port inaccessible packet is generated (inspection and error will also be discarded ).

The problem with broadcast is that it increases the processing load of hosts that are not interested in broadcast data. Take a broadcast application using u d p as an example. If there are 5 0 hosts in the network, but only 2 0 are involved in the application, each time one of the 2 0 hosts sends u d p broadcast data, the remaining 3 0 hosts have to process these broadcast datagram. Until the u d p layer, the received u d p broadcast datagram will be discarded. The three 0 hosts discard the u d p broadcast datagram because these hosts do not use this destination port. The emergence of multicast reduces the processing load of hosts that are not interested in applications. With multicast, the host can join one or more multicast groups. In this way, the network adapter will know which multicast group the host belongs to, and then only receive those multicast frames in the multicast group where the host is located.
2. Broadcast
2.1 restricted Broadcast
The 32-bit IP Address "255.255.255.255.255" is the restricted broadcast address. It is used to send a group to all hosts in the network in broadcast mode, and the vro blocks the group from passing through, restrict its broadcast function within this website.
2.2 broadcast pointing to the network
The broadcast address pointing to the network is the address of host number 1. The broadcast address of A-type network is n e t I d. 2 5 5. 2 5 5. 2 5 5. Where n e t I d is the network number of A-type network.

2.3 broadcast pointing to Subnet
The address that points to the subnet's broadcast address. The I P address as the subnet direct broadcast address needs to understand the subnet mask. For example, if the router receives a packet sent to 1 2 8. 1. 2. 2 5 5 datagram, when B type network 1 2 8. the subnet mask of 1 is 2 5 5. 2 5 5. 2 5 5. 0, the address is the broadcast address pointing to the subnet; but if the subnet mask is 2 5. 2 5 5. 2 5 4. 0. This address is not a broadcast address pointing to the subnet. Why not? Because the 9th-bit value is 1, the vertices must be singular (in decimal order ).

2.4 broadcast pointing to all subnets
To broadcast to all subnets, you also need to understand the subnet mask of the destination network to distinguish it from the broadcast address that points to the network. The subnet number pointing to the broadcast address of all subnets and the host number is all 1. For example, if the destination subnet mask is 2 5. 2 5 5. 2 5 5. 0, so I P address 1 2 8. 1. 2 5 5. 2 5 is a broadcast address pointing to all subnets. However, if the network is not divided into subnets, It is a broadcast pointing to the network.
3. Multicast
Figure 1 2-2 shows the format of class d I P address.



Unlike other class I p addresses (A, B, and C), the allocated 28 BITs are used as multicast group numbers instead of other types.
Multicast Group addresses include up to 4-bit and multicast group numbers of 1110. They can usually be expressed as the dot decimal number, ranging from 2 2 4. 0. 0. 0 to 2 3 9. 2 5 5. 2 5 5. 2 5 5 5.
4. IGMP: Internet Group Management Protocol
I n t e r n e t Group Management Protocol (I G M P) is used to support multicast on hosts and routers. It allows all systems on a physical network to know the multicast group in which the host is currently located. Multicast routers need this information to know the interfaces to which multicast data packets should be forwarded.
Like ICMP, IGMP is also part of the IP layer and encapsulated in IP datagram.
4.1IGMP Message format



Version 1 indicates the query message sent by the multicast router. Version 2 indicates the report message sent by the host.
The Group address is a Class d ip address. Set the Group address in the query message to 0 and the Group address in the report to be added to the group address.
4.2 join a multicast group
The basis of multicast is the concept of a process (the term process refers to a program executed by the operating system). A process is added to a multicast group on a given interface of a host. Members in multicast groups on a given interface are dynamic-they change at any time because the process joins or leaves multicast groups.
It implies that a host identifies a multicast group through the Group address and interface. The host must keep a table that contains all multicast groups containing at least one process and the number of processes in the multicast group.
4.3IGMP report and query
Multicast routers use the I G M P report to record the changes of group members in the network connected to the vro. The rules are as follows:
1) when the first process is added to a group, the host sends an I G M P report. If multiple processes of a host are added to the same group, only one I G M P report is sent. This report is sent to the same interface where the process joins the group.

2) When a process leaves a group, the host does not send an I G M P report, even if the last process in the group leaves. After the host knows that no group members are in the specified group, it will not send report packets in the I G M P query that is received subsequently.

3) The multicast router regularly sends an I G M P query to check whether any multicast group contains any multicast group processes. The multicast router must send an I G M P query to each interface. Because the router wants the host to send a report to each multicast group it joins, the Group address in the I G M P query packet is set to 0.
4) The host sends an I g m p report to respond to an I g m p query, and sends the I G M P report back to each group that contains at least one process.
With these query and report packets, the multicast router maintains a table for each interface. The table records that the interface contains at least one multicast group of the host. When the vro receives the multicast data report to be forwarded, it only forwards the Report to the interface of the group host (using the corresponding multicast link layer address.
Figure 1 3-3 shows two I G M P packets. One is the report sent by the host, and the other is the query sent by the router. The router is requesting each host on that interface to describe each multicast group it joins.



3.5TTL Field
In Figure 1 3-3, we note that the I G M P report and query survival time (T L) are set to 1, this involves the t l field in the header of I P. A Multicast datagram with an initial t l of 0 will be restricted to the same host. By default, the t l of the multicast datagram to be transmitted is set to 1, which limits the multicast datagram to be transmitted only within the same subnet. A larger t l value can be forwarded by multicast routers.
No I C M P error is generated for the datagram sent to a multicast address. When the t l value is 0, the multicast Router does not produce an I C M P "timeout" error.
The special address space from 2. 0. 0 to 2 2 4. 0. 0. 2 5 5 is intended for applications with a multicast range of no more than 1 hop. Regardless of the value of t l, multicast routers do not forward data from any of these addresses as the destination address.
3.6 All host groups
In Figure 1 3-3, we can see that the I g m p query of the router is sent to the destination I P address 2 2 4. 0. 0. 1. This address is called the addresses of all host groups. It involves all the hosts and routers with multicast capabilities in a physical network. After the interface is initialized, all hosts with multicast capability interfaces are automatically added to this multicast group. Members of this group do not need to send I G M P reports.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.