IGMP V3 protocol packet format

IGMPv3 packet format

     IGMPv3 includes two different formats of the query message and the report message. The format of the two messages is briefly described below.

     Query message:


Field Description:

Type:

     0x11 Membership query

Maximum response code (Max_Resp_Code):

The Maximum Response Code field specifies the maximum time allowed before sending a response report. The actual time allowed is called the maximum response time, and its unit is 1/10th of a second. It is converted to the maximum response code as follows:

if Max Rsp Code < 128 maximum response time=Max Rsp Code

if Max Rsp Code >= 128 MaxRsp Code actually represents a floating point value as follows:

0 1 2 3 4 5 6 7

1 | exp | mant |

max response time = (mant | 0x10)<< (exp + 3)

Small values ​​for maximum response time allow IGMPv3 routers to adjust the "leave delay" (the time difference between the time the last host leaves the group and the time the routing protocol is notified that the member no longer exists). Larger values, especially in the exponential range, can moderate the explosion of IGMP traffic in the network.

checksum

The checksum is the negation and summation of the entire IGMP datagram in 16-bit segments. In order to calculate the checksum, the checksum field must initially be set to 0. When a data is received, the checksum must be verified before processing

GroupAddress:

When sending a normal query, the group address field MUST be set to 0. When sending a group-specific query or sending a group-and-source query, it must be set to the IP group address to be queried.

Reservation (Resv):

It is filled with 0 when sending, and it is ignored when receiving.

Flag bit S (prohibit router processing):

When set to 1, the S flag indicates that any receiving routers are prohibited from updating those timers that they update when they receive a query. But it does not prohibit querier election or normal host-side query processing performed on the router (when the router is a member of a group).

QQIC: query interval time, in seconds;

Queryer's Robust Variable (QRV)

If not 0, the QRV contains the value of one of the [robust variables] used by the queryer. If the value of the queryer's robust variable exceeds 7, which is the maximum value of the QRV field, then the QRV is set to 0. Routers take the QRV value from the most recently received query as the value of their own robustness variable, unless the most recently received QRV is 0, in which case the receiver uses the default robustness variable value, or a Statically configured value.

Inquirer's Query Interval Code (QQIC)

     The Inquirer's Inquiry Interval Code field specifies the [Inquiry Interval] used by the inquirer. The actual interval, called the query interval of the queryer (QQI), is expressed in seconds. The conversion method from the query interval code of the queryer is as follows:
    if QQIC < 128 QQI=QQIC
    if QQIC >= 128 QQI represents the following A float value:
    0 1 2 3 4 5 6 7
    1|exp |mant|
    QQI = (mant | 0x10 ) << (exp + 3)
    The multicast router that is currently a non-querier takes the query from the most recent received The QQI value is used as its own [Query Interval] value, unless the most recently received QQI is 0, in which case the receiving router uses the default [Query Interval] value.

Number of sources Number_of_Source:

The Number of Sources (N) field indicates how many source addresses are present in this query. This value is 0 in normal queries or group-specific queries, and non-zero in group-specific and source-specific queries.

Sourceaddress[i] (i takes value from 1 to n):

An array of n IP unicast addresses, where n is the value of the Number of Sources(N) field.

Additional data:

If the datagram length field in the IP header of the received query indicates that additional data exists in addition to the above fields, the IGMPv3 implementation must include this data when calculating the checksum, but when sending the query , these data must be ignored, an implementation of IGMPv3 cannot contain other data beyond the above fields.

    

There are three types of variants of query messages:

1. The "common query" is sent by the multicast router to learn the complete multicast reception status of the adjacent interfaces (ie, the interfaces connected in the network to which the query is transmitted). In a normal query, both the group address field and the number of sources (N) fields are zero.

2. The "specified group query" is sent by a multicast router to learn the multicast reception status related to a certain IP address in the adjacent interface. In the specified group query, the "group address" field contains the group address to be queried, and the source number (N) field is 0.

3. The "specified group and source query" is sent by a multicast router to know whether the adjacent interface needs to receive multicast datagrams sent to the specified group from the specified sources. In a query specifying a group and source, the group address field contains the multicast address to be queried, and the source address[i] field contains the associated source address.


report message


Field Description:

Type(8bit)

     0x22 Membership report

Reserved( 8bit)和Reserved( 16bit):

All indicate reserved fields, but in IGMP, in order to keep them at the corresponding length, there is a difference in length. It is filled with 0 when it is sent, and nothing is processed when it is received.

checksum

The checksum is the negation and summation of the entire IGMP message in a 16-bit segment. In order to calculate the checksum, the checksum field must first be set to 0. When a piece of data is received, the checksum must be verified before processing.

Number_of_Group_Records(M):

This field indicates how many group records are included in the report packet

Group Record[i] (i from 1 to M):

A host may need to order multicast services with multiple multicast addresses. Each record contains information such as the source address list corresponding to one of the multicast addresses, which is affected by the size of Number_of_Group_Records.

Each group record field is a block of data that contains information about the sender's membership of a multicast group on the report sending interface.

 

The internal format of each Group Reocrd is as follows:

Record Type(8bit) 

Aux_Data_Len(8bit)

(16bit)Number_of_Group_Sources (N)

Multicast Address(32bit) 

Source  Address [i]  (i from 1 to N)  

Auxiliary  Data

 

Field Description:

To Data Len:

The auxiliary data length contains the actual length of the auxiliary data in the group record, and its unit is 32bit words. It may be 0, which means that auxiliary data does not exist.

Number_of_Group_Sources:

The Number of Sources (N) field indicates how many source addresses are present in the group record.

MulticastAddress:

The multicast address field identifies the multicast IP address to which this group record belongs.

SourceAddress[i]:

The source address[i] field is an array containing n unicast addresses. n is the value of the Number of Sources (N) field of this record.

Auxiliary Data:

     The auxiliary data field, if present, contains some additional information about the set of records. The protocol described in this document, IGMP v3, does not define any auxiliary data. Therefore, IGMPv3 implementations SHOULD NOT contain any auxiliary data in any transmitted group record (ie, the Aux Data Len field must be set to 0). And in all group records received, the presence of auxiliary data must be ignored. The syntax and internal encoding for auxiliary data will be defined by future versions of IGMP or its extensions that use this field.

Additional data:

     If the Datagram Length field of the IP header in the received report indicates that there is additional data present after the last group record. Implementations of IGMPv3 MUST include this additional data when computing and verifying checksums, but MUST ignore these additional data at the same time. An IGMPv3 implementation MUST NOT include additional data after the last group record when sending a report.

Group Record Type:

     In a report message, there are a number of different types of group records:

 

    - "Current Status Records" are issued by a system in response to queries received on an interface. It reports the current receive state of the interface associated with a multicast IP address. The record type of the current state record can be one of the following two values:

    Value Name and Meaning

    1 MODE_IS_INCLUDE - Indicates that the filtering mode of the interface relative to a specified multicast address is INCLUDE. The source address[i] field in the group record contains the source list (if non-empty) for this interface associated with this multicast address.

2 MODE_IS_EXCLUDE-indicates that the filtering mode of the interface related to a specified multicast address is EXCLUDE. The source address[i] field in the group record contains the source list (if non-empty) for this interface associated with this multicast address.

 

    - "Filter Mode Change Record" is when a local IPMulticastListen call causes a local interface layer filter mode change with respect to a particular multicast IP address (ie from INCLUDE to EXCLUDE, or from EXCLUDE to INCLUDE), issued by the system. This record is contained in a report from the interface where the change occurred. The record type of a filter mode change record is one of two values:
          value name and meaning

    3 CHANGE_TO_INCLUDE_MODE, indicating that the filtering mode of the interface related to a specified multicast address is changed to INCLUDE. The source address[i] field in the group record contains the new source list (if non-empty) associated with the specified multicast address.

    4 CHANGE_TO_EXCLUDE_MODE, indicating that the filtering mode of the interface related to a specified multicast address is changed to EXCLUDE. The source address[i] field in the group record contains the new source list (if non-empty) associated with the specified multicast address.

 

 

    - "Source list change record" is sent by the system when the local interface layer's source list related to a particular multicast IP address is changed by the local IPMulticastListen call, and the change does not conflict with the change of the filter mode. The record is contained in a report from the interface where the change occurred. The record type of the source list change record is one of the following two values:

    Value Name and Meaning

    5 ALLOW_NEW_SOURCE, indicating that the source address [i] field in the group record contains a list of new sources that the system wishes to receive addressed to a multicast address. If this is a change to an INCLUDE list then these addresses are added to the list, if this is a change to an EXCLUDE list then these addresses are removed from the list.

    6 BLOCK_OLD_SOURCE, indicating that the source address[i] field in the group record contains a list of sources destined for a multicast address that the system does not wish to receive anymore. If this is a change to an INCLUDE list then these addresses are removed from the list, if this is a change to an EXCLUDE list then these addresses are added to the list.

    If the source list change is to add new sources and block old sources at the same time, both group records will be sent to one multicast address, one ALLOW_NEW_SOURCE and the other BLOCK_OLD_SOURCE.

    We refer to both filter mode change records and source list change records as state change records.

    Unrecognized record type values ​​MUST be discarded.

 Pay attention to rest, regularly exercise the cervical spine, and keep the cervical spine healthy is a major event in life!

In IGMPV3 it has the following improvements:

1. Increase the control ability of the host;

How to implement: IGMP V3 can not only specify the multicast group G to join, but also specify which specified multicast source S to receive information from, which is also the specified source multicast function.

2. The query message can carry the source address; (the source address is the program stream address)

3. The response message contains multiple sets of records:

How to implement: The response message and the query message of IGMP V1 V2 have the same message structure, that is, the message only contains the group address information. The group address contained in the IGMP V3 response message is 224.0.0.22, which can carry one or more group records, and each group record contains multicast group address and source address information of varying numbers.

4. The suppression mechanism for canceling the response:

Cause: Since the IGMP V3 response message carries both the source address and the multicast group address, and includes two states, Include and Exclude, no response suppression mechanism is required to reduce the burden on the host, that is, group members can independently report response messages.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325997248&siteId=291194637