Read the original speed -TCP / IP (IGMP protocol)

Chapter 13 IGMP: Internet Group Management Protocol

13.3 IGMP protocol

13.3.1 join a multicast group

Multicast foundation is the concept of a process (the term refers to the process of using a program operating system performed), the process joined a multicast group on a given interface to a host computer. To the members in a multicast group on a given interface is dynamic - it at any time due to the process of joining and leaving the multicast group changes.

Process referred to here must be some way to join a multicast group on a given interface. The process can also leave a multicast group previously added. These are multicast support a necessary part of any API host. Use the qualifier "Interface" because the multicast group members are associated with the interface. A process can join the same multicast group on multiple interfaces.

S tanford University of Berkeley U nix version of IP multicast detailed description of the changes associated socket API, these changes in Solaris 2.x and ip (7) of the document also provided. Here imply a host to identify a multicast group by group addresses and interfaces. The host must reserve a table, this table contains all of the multicast group and the number of multicast groups in the process contains at least one process.

13.3.2 IGMP reports and queries

Multicast routers use IGMP packets to the router connected to record changes in group membership network. Use the following rules:

  1. When the first process to join a group, the host sends an IGMP report. If more than one process to join a host of the same group, just send an IGMP report. This report is sent to the process of accession to the same interface group is located.
  2. When the process leave a group, the host does not send IGMP report, even if the last process in the group to leave. After the host knows the group has determined there is no longer a member of the group, in the subsequent IGMP query received is no longer sends a report.
  3. Whether multicast router periodically sends IGMP queries to understand as well as any host includes processes belonging to a multicast group. An IGMP multicast router must send a query to each interface. Because each router wish it hosts join the multicast group were sent back a report, so the group address IGMP query packet is set to 0.
  4. IGMP host in response to a query by sending IGMP report for each group also contains at least one process are to be sent back IGMP report.

Use these queries and report messages, the multicast router maintains a table for each interface, at least on the interface table record also contains a host of a multicast group. When a router receives a multicast datagram to be forwarded, it only forwards the datagram to the (using a corresponding multicast link-layer address) also has an interface belonging to that host group.

Figure 13--3 shows two IGMP messages, a report is sent by the host, and the other is a query sent by the router. The router is requesting that each host on the interface description of each multicast group it added.
Here Insert Picture Description
We will introduce the TTL field later in this section.

13.3.3 implementation details

To improve the efficiency of the protocol, there are many implementation details to consider. First, when a host sends an IGMP report for the first time (when the first process to join a multicast group), it does not guarantee that the report is reliable reception (because of the use of the IP service delivery).

The next report will be sent after a time lag. This time interval is randomly selected by the host in the range of 0 to 10 sec. Secondly, when a host receives a query sent from the router does not respond immediately, but after a certain time interval after the issue some response (a "response" is the plural form of the host because it must participate in each sending a response to both groups). Since multiple hosts to participate in the same multicast group can send a report, they transmit interval can be set to a random delay. All hosts in a physical network will receive all the reports sent by other hosts in the same group, as shown in FIG 1 3 - destination address of the report shown in Figure 3 is that group address. This means that if a host in the process of waiting to be sent in the report, but received the same report sent from other hosts, the response of the host you do not have to be sent. Because multicast routers do not care how many hosts belong to the group, but only care about whether the group still has at least one host. Indeed, one multicast router which the host does not even care about belong to a multicast group. It also just want to know if there is at least one host in a multicast group on a given interface.

In the absence of any single physical network multicast router, the only IGMP traffic is the addition of a new report of a multicast group, to support IP multicasting host issued by the host.

13.3.4 time to live field

In Figure 13-- 3, we note that the survival time of IGMP queries and reports (TTL) are set to 1, which involves IP TTL field in the header. An initial TTL 0 multicast datagrams will be limited to the same host. By default, the pending multicast datagrams TTL is set to 1, which will allow only limited multicast datagrams transmitted in the same subnet. TTL greater value can be multicast router forwarding.

Recall from Section 6.2 of the datagram sent to a multicast address from the ICMP error does not occur. When the TTL value is 0, the multicast router does not generate ICMP "time out" error.

Under normal circumstances, the user does not care about process outgoing datagram TTL. However, one exception is Tr aceroute program (Chapter 8), which is mainly based on TTL value is set to complete. Since multicast applications must be able to set the TTL value of the packets to be transmitted, which means programming interface must provide this capability for the user process.

By increasing the value of the TTL method, an application may be implemented expanding ring search for a particular server (expanding ring search). The first multicast datagrams sent to TTL is equal to 1. If no response, try the TTL is set to 2, then 3, and so on. In this way, the application can find the nearest server to the hop count metric.

From 224. 0.0. 0 and is intended for a range of 1 hop multicasting application specific address space of not more than 224. 0.0. 255 to. Whether TTL value is the number, not a multicast router forwards packets to any destination address is an address of these addresses.

13.3.5 all host group

In FIG 1 3 - 3, we see the IGMP query is sent to the destination IP address 224,001.... This address is called the all-hosts group address. It involves a physical network with multicast capability of all hosts and routers. When the interface is initialized, all hosts have the ability to interface to multicast are automatically added to the multicast group. Members of this group do not need to send IGMP report.

Released 1493 original articles · won praise 1398 · Views 120,000 +

Guess you like

Origin blog.csdn.net/weixin_42528266/article/details/104742105