IGMPv3 protocol message format reference

Source: Internet
Author: User

Reprinted Please note: http://blog.csdn.net/shanzhizi

The format of the three IGMP protocol packages is summarized. Because it is a simple summary, the fields are not described in detail, and the descriptions of individual fields may be inaccurate, for detailed descriptions of each field in V3, refer to the standard documentation of IGMPv3.

For more information about the IGMP protocol, see"IGMP Technical Summary"

Igmpv1 package format

Field description:

Version:

That is, the IGMP version number, which must be 0x1 in igmpv1.

Type:

IGMP packet type

1 = host Member Query

2 = host Member report

In igmpv2, this field is expanded to 8 bits.

Group address:

Specify the multicast group address in the report. The field is 0 in the query report.

Igmpv2 package format

Field description:

Type:

0x11 member Query

0x12 version 1 member report

0x16 version 2 member report

0x17 leave Group

In IGMP version 2, the old 4-bit version field and the old 4-bit type field form a new 8-bit type field, set the IGMP version 2 code of the member report packets of version 1 and Version 2 to 0x11 and 0x12 respectively, it ensures backward compatibility between IGMP version 1 and version 2.

Maximum response time:

The maximum time in 1/10 seconds before a response report is sent. The default value is 10 seconds.

The new maximum response time (in 1/10 seconds) field allows the router to specify an accurate query interval response time for its Query Packets. IGMP version 2 hosts use this limit when randomly selecting their response time values.

In this way, the query response interval helps to control response bursts.

 

Group address:

Multicast Group address (0.0.0.0 for general query)

Except for general query, this field is set to 0.0.0.0, which is the same as that in IGMP version 1.

IGMPv3 package format

IGMPv3 contains query messages and report messages in two different formats. The following describes the formats of the two messages.

Query message:

Field description:

Type ):

0x11 member relationship Query

Max_resp_code ):

The maximum response code field specifies the maximum time allowed before a response report is sent. The actual allowed time is called the maximum response time. The unit is 1/10 seconds. The conversion between it and the maximum response code is as follows:

If Max RSP Code <128 maximum response time = max RSP code

If Max RSP code> = 128 maxrsp Code actually represents the following floating point value:

0 1 2 3 4 5 6 7

1 | exp | mant |

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

The smallest value of the maximum response time allows the IGMPv3 router to adjust the "Departure delay" (the time point at which the last host leaves the group and the routing protocol are notified to the time point at which no member exists, time Difference between the two ). A larger value, especially in the exponential range, can be used to adjust the IGMP traffic explosion in the network.

Checksum

The Checksum is used to return the inverse sum of the entire IGMP data segment with 16 bits. To calculate the checksum, the checksum field must be set to 0 at the beginning. When you receive a data record, you must verify the checksum before processing it.

Groupaddress ):

When sending a common query, the Group address field must be set to 0. When sending a query to a specified group or sending a query to a specified group and source, you must be set to the IP Group address to be queried.

Resv ):

It is filled with 0 at the time of sending, not processed at the time of receiving, and ignored.

Flag S (vro prohibited ):

When it is set to 1, the s sign indicates that any receiving router is prohibited from updating the timer they want to update when receiving the query. However, it does not prohibit the queryer election or normal query on the vro (when the vro is a group member ).

Qqic: Query interval, in seconds;

Qrv)

If the value is not 0, qrv contains a [strong variable] value used by the queryer. If the value of the strong variable of the queryer exceeds 7, that is, the maximum value of the qrv field, therefore, qrv is set to 0. Routers use the qrv value in the most recently received query as their own robustness variable value, unless the recently received qrv value is 0. In this case, the receiver uses the default robustness variable value, or a static configuration value.

Query Interval code of the queryer (qqic)

The query Interval code field of the queryer specifies the [query interval] used by the queryer. The actual interval, called the query interval (qqi) of the queryer, is expressed in seconds. The method for converting the query Interval code of the queryer is as follows:
If qqic <128 qqi = qqic
If qqic> = 128 qqi represents the following floating point value:
0 1 2 3 4 5 6 7
1 | exp | mant |
Qqi = (mant | 0x10) <(exp + 3)
The multicast router that is currently not the queryer takes the qqi value from the recently received query as its [query interval] value, unless the recent received qqi is 0, in this case, the receiving router uses the default [query interval] value.

Source quantity number_of_source:

The source quantity (n) field indicates the number of source addresses in the query. In a common query or a specified group query, the value is 0. In a specified group and Source Query, the value is not 0.

Sourceaddress [I] (I ranges from 1 to n ):

An array of n ip Unicast addresses. n is the value of the number of sources (n) field.

Additional data:

If the fields of the datagram length in the IP header in the query result indicate that there are additional data in addition to the preceding fields, the implementation of IGMPv3 must include the data when calculating the checksum, however, when sending a query, you must ignore the data. An IGMPv3 implementation cannot contain any other data except the above fields.

There are three types of message query variants:

1. The "normal query" is sent by the multicast router and used to obtain the complete multicast receiving status of the adjacent interface (that is, the interface connected to the network to be queried. In a common query, the Group address field and the source quantity (n) field are both 0.

2. The "query by a specified group" is sent by a multicast router to learn the multicast receiving status related to an IP address in the adjacent interface. In a specified group query, the "Group address" field contains the Group address to be queried, and the source quantity (n) field is 0.

3. The "specified group and Source Query" is sent by a multicast router to determine whether the adjacent interface needs to receive multicast data packets from the specified source and sent to the specified group. In a query of a specified group and source, the Group address field contains the multicast address to be queried, and the source address [I] field contains the relevant source address.

Report packets

Field description:

Type (8bit)

0x22 member relationship report

Reserved (8bit) and reserved (16bit ):

All indicate reserved fields, but in IGMP, in order to keep both of them the corresponding length, there is a difference in length. It is filled with 0 at the time of sending, no processing is performed during receiving.

Checksum

The Checksum is used to calculate the inverse sum of the entire IGMP message in 16 bits. To calculate the checksum, the checksum field must be set to 0 first. When you receive a data record, you must verify the checksum before processing it.

Number_of_group_records (m ):

This field indicates that the report contains several groups of records.

Group record [I] (I from 1 to m ):

A host may require multicast services with multiple multicast addresses on demand. 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 whole piece of data, which contains information about the member relationship of the sender in 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:

Aux data Len:

The actual length of the auxiliary data contained in the group record. The unit is 32 bits. It may be 0, indicating that the secondary data does not exist.

Number_of_group_sources:

The source quantity (n) field indicates the number of source addresses in the group record.

Multicastaddress:

The multicast address field indicates the multicast IP address that the Group record belongs.

Sourceaddress [I]:

The Source Address [I] field is an array containing N unicast addresses. N is the value of the source quantity (n) field of the record.

Auxiliary Data:

If a secondary data field exists, it contains additional information about this group of records. Protocols described in this documentIGMPV3. No auxiliary data is defined. Therefore, the implementation of IGMPv3 should not contain any auxiliary data in any transferred group records (that is, the aux data LEN field must be set to 0 ). In addition, the existence of secondary data must be ignored in all group records received. The syntax and internal encoding of auxiliary data will be defined by IGMP or its extension using this field in future versions.

Additional data:

If the datagram length field of the IP header in the received report indicates that additional data exists after the last group record. The implementation of IGMPv3 must include the additional data when calculating and verifying the checksum, but the additional data must be ignored at the same time. When a report is sent, an IGMPv3 implementation cannot include additional data after the last group record.

Record type ):

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

 

-The "Current status record" is sent by a system to respond to queries received on an interface. It reports the current receiving status of an interface related to a multicast IP address. The record type of the current status record can be one of the following two values:

Value Name and meaning

1 mode_is_include-indicates that the filtering mode of an interface related to a specified multicast address is include. The Source Address [I] field in the record contains the source list of this interface related to this multicast address (if not empty ).

2 mode_is_exclude: indicates that the filtering mode of an interface related to a specified multicast address is exclude. The Source Address [I] field in the record contains the source list of this interface related to this multicast address (if not empty ).

 

-The "filter mode change record" is when the local ipmulticastlisten call causes the local interface layer to change the filter mode related to a specific multicast IP address (from include to exclude, or from exclude to include), issued by the system. This record is included in a report, and the report is sent from the changed interface. The record type of the filter mode change record is one of the following two values:
Value Name and meaning

3 change_to_include_mode indicates that the filtering mode of an interface related to a specified multicast address is changed to include. The Source Address [I] field in the record contains a new source list related to the specified multicast address (if not empty ).

4 change_to_exclude_mode indicates that the filtering mode of an interface related to a specified multicast address is changed to exclude. The Source Address [I] field in the record contains a new source list related to the specified multicast address (if not empty ).

 

 

-The "source list change record" means that when the local ipmulticastlisten call causes the source list of the Local interface layer to change related to a specific multicast IP address, in addition, this change is not in conflict with the change in the filtering mode, and is triggered by the system. This record is included in a report, and the report is sent from the changed interface. The record type of the source list change record is one of the following two values:

Value Name and meaning

5. allow_new_source indicates that the source address [I] field in the group record contains the list of new sources that the system wants to receive from a multicast address. If this is a change to an include list, these addresses will be added to the list. If this is a change to an exclude list, these addresses will be deleted from the list.

6 block_old_source: indicates that the source address [I] field in the group record contains a list of sources sent to a multicast address that the system does not want to receive again. If this is a change to an include list, these addresses will be deleted from the list. If this is a change to an exclude list, these addresses will be added to the list.

If the source list is changed by adding new sources and blocking old sources at the same time, the two group records will be sent to one multicast address at the same time, one is allow_new_source, and the other is block_old_source.

The change records in the filter mode and the source list are called state change records.

Unrecognized record type values must be discarded.

Pay attention to rest, regularly exercise cervical spine, and maintainCervical Spine healthIs a major event of life!

IGMPv3 provides the following improved functions:

1. Added host control capabilities;

How to implement: IGMP v3 can not only specify the multicast group G to be added, but also specify the target multicast source s to accept information. This also specifies the 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 groups of records:

Implementation: The response message of IGMP v1 v2 has the same message structure as the query message, that is, the message only contains the Group address information. The IGMP v3 response message contains a group address of 224.0.0.22, where one or more group records can be carried. In each group record, it contains source address information of multicast group addresses and numbers.

4. Cancel the response suppression mechanism:

Cause: the IGMP v3 response message contains both the source address and multicast address, and the include and exclude statuses. In order to reduce the burden on the host, no response suppression mechanism is required, that is, group members can independently report response messages.

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.