Message processing method and device and network equipment

By updating the message compression table in the MLAG environment and encapsulating the compressed IGMP message, the problem of increasing processing pressure on IGMP message on the Peer-link link is solved, and network reliability is improved.

CN120050232APending Publication Date: 2025-05-27MAIPU COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311612203.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-27
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the MLAG environment, the number of multicast receiving devices on the Peer-link link is too many packets or out of grouping messages generated when a large number of multicast receiving devices are added or left-of-group, resulting in increased pressure on IGMP packet processing, which may lead to some IGMP packets being discarded.

Method used

The message compression table is updated by parsing the multicast group address, multicast source address, IGMP message type and multicast receiving device characteristic information in the received IGMP message. When the message compression table meets the preset conditions, the compressed IGMP message is encapsulated and encapsulated into MLAG messages are sent to the peer-link.

Benefits of technology

This reduces the pressure on message processing on the Peer-link link, improves network reliability, and avoids the risk of IGMP packets being discarded.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050232A_ABST
    Figure CN120050232A_ABST
Patent Text Reader

Abstract

The invention provides a message processing method and device and network equipment, and the network equipment analyzes and obtains a multicast group address, a multicast source address, an IGMP message type and multicast receiving equipment feature information in an IGMP message after receiving the IGMP message sent by multicast receiving equipment. And updating the message compression table based on the multicast group address, the multicast source address, the IGMP message type and the multicast receiving equipment feature information. Moreover, when the message compression table satisfies a preset condition, a compressed IGMP message is obtained through packaging based on the message compression table, an MLAG message is packaged based on the compressed IGMP message, and the MLAG message is sent to the opposite terminal device through a Peer-link, so that the opposite terminal device obtains the compressed IGMP message from the MLAG message and restores the compressed IGMP message. Thus, through the mode of extracting the compressed information and packaging the MLAG message, the message processing pressure on the Peer-link can be reduced, and the network reliability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technologies, and in particular, to a method and apparatus for processing packets and a network device. Background Art

[0002] With the maturity of the Multi-Chassis Link Aggregation Group (MLAG) technology, it has been widely promoted in the market, and various service requirements in the MLAG scenario have emerged. The requirement for the MLAG technology to carry multicast services has also appeared in the scope of customer applications. The MLAG device can be used as a multicast source or a multicast receiver to meet multicast services.

[0003] When the MLAG device is used as a multicast receiving device, when the Master or Slave of the MLAG receives an Internet Group Management Protocol (IGMP) packet from the multicast receiving device, the packet will be encapsulated in an MLAG packet and sent to the peer device through the Peer-link between the MLAG devices. After receiving the MLAG packet, the peer device will de-encapsulate and then process it. In the MLAG environment, there are various service overlays, and the synchronization messages or service packets on the Peer-link will also increase significantly. If a large number of multicast receiving devices join a group or leave a group, a large number of join packets or leave packets will be forwarded on the Peer-link at this time. When there are too many service packets on the Peer-link, some IGMP packets may not be processed in time and thus be discarded. Summary of the Invention

[0004] The objectives of this application include, for example, providing a method and apparatus for processing packets and a network device, which can reduce the message processing pressure on the Peer-link and improve network reliability.

[0005] The embodiments of this application can be implemented as follows:

[0006] In a first aspect, this application provides a method for processing packets, which is applied to a network device in a Multi-Chassis Link Aggregation Group (MLAG). The method includes:

[0007] After receiving an IGMP packet sent by a multicast receiving device, parsing to obtain the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information in the IGMP packet;

[0008] Update a packet compression table based on the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information;

[0009] When the packet compression table meets a preset condition, encapsulate a compressed IGMP packet based on the packet compression table, encapsulate an MLAG packet based on the compressed IGMP packet, and send the MLAG packet to a peer device through a Peer-link, so that the peer device can obtain the compressed IGMP packet from the MLAG packet and restore it.

[0010] In an optional implementation, the step of generating compression description information of the IGMP packet based on the multicast group address and the multicast source address includes:

[0011] Determine a compression identifier and a compression quantity according to the multicast group address and the multicast source address;

[0012] Determine a compression start address based on the multicast group address and the multicast source address;

[0013] Obtain an IGMP packet type and multicast receiving device characteristic information from the IGMP packet;

[0014] Update the packet compression table according to the compression identifier, the compression quantity, the compression start address, the IGMP packet type, and the multicast receiving device characteristic information.

[0015] In an optional implementation, the compression identifier is used to indicate whether to compress the multicast group address in the IGMP packet or to compress the multicast source address;

[0016] The compression quantity is the number of consecutive multicast group addresses in the IGMP packet, or the number of consecutive multicast source addresses in the IGMP packet;

[0017] The compression start address is the starting multicast group address in the IGMP packet, or the starting multicast source address in the IGMP packet;

[0018] The IGMP packet type is the type of the IGMP packet, including IGMPv1, IGMPv2, and IGMPv3;

[0019] The characteristic information of the multicast group receiving device includes the source IP address and Vlan information in the IGMP packet.

[0020] In an optional implementation, the step of updating the packet compression table according to the compression identifier, the compression quantity, the compression start address, the IGMP packet type, and the multicast receiving device characteristic information includes:

[0021] If there is an entry in the packet compression table that matches the IGMP packet type and the multicast receiving device characteristic information, and the compression start address in the entry is consecutive with the compression end address in the existing entries in the packet compression table, then update the information in the existing entries based on the compression identifier, compression quantity, compression start address, IGMP packet type, and multicast receiving device characteristic information;

[0022] If the compression start address is not consecutive with the compression end address in the entry, then add a corresponding entry in the packet compression table based on the compression start address, compression quantity, compression identifier, and the corresponding IGMP type and multicast receiving device characteristic information;

[0023] If there is no entry in the packet compression table that matches the IGMP packet type and the multicast receiving device characteristic information, then add a corresponding entry in the packet compression table based on the compression start address, compression quantity, compression identifier, and the corresponding IGMP packet type and multicast receiving device characteristic information.

[0024] In an alternative embodiment, the step of encapsulating the compressed IGMP packet based on the packet compression table when the packet compression table meets a preset condition includes:

[0025] Use the TLV format to encapsulate the information of each entry in the packet compression table into an IGMP packet in the corresponding IGMP type format, so as to encapsulate multiple IGMP packets in the TLV format into an MLAG packet.

[0026] In an alternative embodiment, the step of determining that the packet compression table meets a preset condition includes:

[0027] When the packet compression table reaches a preset transmission time threshold or the number of entries in the packet compression table reaches a preset transmission length threshold, it is determined that the preset condition is met.

[0028] In a second aspect, the present application provides a packet processing device, which is applied to a network device in a Multi-Chassis Link Aggregation Group (MLAG). The device includes:

[0029] A receiving module, configured to receive an IGMP packet sent by a multicast receiving device;

[0030] A processing module, configured to parse and obtain the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information in the IGMP packet, update the packet compression table based on the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information, encapsulate a compressed IGMP packet based on the packet compression table when the packet compression table meets a preset condition, and encapsulate an MLAG packet based on the compressed IGMP packet;

[0031] A sending module, configured to send the MLAG message to a peer device through a Peer-link, so that the peer device can obtain the compressed IGMP message from the MLAG message and restore it.

[0032] In a third aspect, the present application provides a network device, including: at least one processor and a memory communicatively connected to the at least one processor, where the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the message processing method described in the foregoing first aspect.

[0033] The beneficial effects of the embodiments of the present application include, for example:

[0034] The present application provides a message processing method, apparatus, and network device. After receiving an IGMP message sent by a multicast receiving device, the network device parses and obtains the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information in the IGMP message. The message compression table is updated based on the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information. And when the message compression table meets a preset condition, a compressed IGMP message is encapsulated based on the message compression table, an MLAG message is encapsulated based on the compressed IGMP message, and the MLAG message is sent to a peer device through a Peer-link, so that the peer device can obtain the compressed IGMP message from the MLAG message and restore it. In this way, by extracting compression information and encapsulating the MLAG message, the message processing pressure on the Peer-link can be reduced, and the network reliability can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 A schematic diagram of the application scenario of the message processing method provided by the embodiments of the present application;

[0037] Figure 2 A flowchart of the message processing method provided by the embodiments of the present application;

[0038] Figure 3 For Figure 2 A flowchart of the sub-steps included in step S12 in

[0039] Figure 4 In the message processing method provided by the embodiments of this application, it is the flowchart of the message compression table synchronization update method;

[0040] Figure 5 In the embodiments of this application, it is the functional module block diagram of the message processing device;

[0041] Figure 6 In the embodiments of this application, it is the structural block diagram of the network device. Detailed implementation manners

[0042] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. Usually, the components of the embodiments of this application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0043] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of this application that is claimed, but merely represents selected embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without making creative efforts fall within the scope of protection of this application.

[0044] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0045] In the description of this application, it should be noted that if terms such as "upper", "lower", "inner", "outer", etc. are used to indicate the orientation or positional relationship, it is based on the orientation or positional relationship shown in the accompanying drawings or the orientation or positional relationship in which the product of this application is usually placed during use. It is only for the convenience of describing this application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to this application.

[0046] In addition, if terms such as "first", "second", etc. are used only for distinguishing descriptions, they cannot be understood as indicating or implying relative importance.

[0047] It should be noted that, without conflict, the features in the embodiments of this application can be combined with each other.

[0048] The following first explains some proprietary terms used in the embodiments of this application:

[0049] MLAG (Multi-Chassis Link Aggregation Group): Multi-device Link Aggregation Group, which realizes redundancy of links and nodes. There are two roles in paired nodes, one is the Master and the other is the Slave.

[0050] Peer-link: A direct connection aggregation link between two paired MLAG devices, used to exchange MLAG protocol messages and transmit part of the data traffic.

[0051] IGMP (Internet Group Management Protocol): Internet Group Management Protocol, which is a protocol in the TCP / IP protocol family responsible for IPv4 multicast member management, used to establish and maintain multicast group member relationships between IP hosts and their directly adjacent multicast routers. There are three versions: IGMPv1, IGMPv2, and IGMPv3.

[0052] MLAG GroupId: The ID of the cross-device aggregation group between the device accessing the MLAG dual-active system in a dual-homed manner and the MLAG dual-active system.

[0053] Source Address: The multicast source address carried in the IGMPv3 message. If the IGMPv2 message does not carry the multicast source, it is recorded as 0.0.0.0.

[0054] Multicast Address: Multicast group address.

[0055] Please refer to Figure 1 , which is a schematic diagram of the application scenario of the message processing method provided in the embodiment of this application. The multicast MLAG networking architecture shown in this application scenario includes an MLAG_master device, an MLAG_slave device, and a multicast receiving device. In addition, it may also include multiple network devices connected to the networking architecture, such as STD1, STD2, and STD3. Among them, each device in the networking architecture can be a switch, a server, etc.

[0056] The MLAG_master device and the MLAG_slave device form an MLAG, and are connected by a Peer-link. The MLAG_master device and the MLAG_slave device are two switches. The MLAG_master device and the MLAG_slave device can be connected to other network devices in the networking architecture and achieve link aggregation and redundancy through MLAG technology.

[0057] When the MLAG_master device and the MLAG_slave device act as multicast receivers, when the MLAG_master device or the MLAG_slave device receives a group join message or a group leave message from a multicast receiving device, the MLAG_master device or the MLAG_slave device will encapsulate the group join message or the group leave message into an MLAG message and forward it to the peer device through the Peer-link link. When there are various service overlays in the MLAG environment, the synchronization messages or service packets on the Peer-link link will also increase significantly. When a large number of multicast receiving devices go online or offline, a large number of group join messages or group leave messages will be forwarded on the Peer-link link. When there are too many service packets on the Peer-link link, it may cause some IGMP packets to not be processed in time and thus be discarded.

[0058] To solve the above problems, an embodiment of the present application provides a packet processing solution. After receiving an IGMP packet sent by a multicast receiving device, the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information in the IGMP packet are parsed and obtained. The packet compression table is updated based on the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information. And, when the packet compression table meets a preset condition, a compressed IGMP packet is encapsulated based on the packet compression table, an MLAG packet is encapsulated based on the compressed IGMP packet, and the MLAG packet is sent to the peer device through the Peer-link, so that the peer device can obtain the compressed IGMP packet from the MLAG packet and restore it. In this way, by extracting compression information and encapsulating IGMP packets, the message processing pressure on the Peer-link can be reduced and the network reliability can be improved.

[0059] Figure 2 It is a schematic flowchart of a packet processing method provided by an embodiment of the present application. This packet processing method is applied to a network device in an MLAG environment. For example, the network device can be the above-mentioned MLAG_master device, and the MLAG_slave device can be used as the peer device, or the network device can be the above-mentioned MLAG_slave device, and the MLAG_master device is used as the peer device.

[0060] As Figure 2 shown, the packet processing method provided by an embodiment of the present application mainly includes the following steps:

[0061] S11, after receiving an IGMP packet sent by a multicast receiving device, parse and obtain the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information in the IGMP packet.

[0062] S12. Update the packet compression table based on the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information.

[0063] S13. When the packet compression table meets the preset conditions, encapsulate the compressed IGMP packet based on the packet compression table, encapsulate the MLAG packet based on the compressed IGMP packet, and send the MLAG packet to the peer device through the Peer-link, so that the peer device can obtain the compressed IGMP packet from the MLAG packet and restore it.

[0064] In this embodiment, when the multicast receiving device goes online or offline, it will send a group join packet or a group leave packet to the network device, such as the above-mentioned MLAG_master device or MLAG_slave device. After receiving the group join packet or the group leave packet, the network device will update the multicast table entry. In order to avoid flooding within the Vlan and wasting bandwidth resources, the network device also needs to synchronize the group join message or the group leave message to the peer device to achieve synchronous update of the multicast table entry.

[0065] When the network device receives an IGMP packet sent by the multicast receiving device, where the IGMP packet is a group join packet or a group leave packet, the multicast group address and the multicast source address of the multicast group to be joined or the multicast group address and the multicast source address of the multicast group to be left are carried in the IGMP packet. It should be noted that for a group join packet or a group leave packet without a multicast source, the default multicast source address is 0.0.0.0.

[0066] The multicast group address in the IGMP packet can be one or more. Similarly, the multicast source address can be one or more. In the case where the multicast group address or the multicast source address is multiple, it will especially increase the message processing pressure on the Peer-link. The solution provided in this embodiment can specifically solve the problem of large processing pressure caused by the multicast group address or the multicast source address being multiple in the IGMP packet.

[0067] In this embodiment, the network device can generate a packet compression table based on the parsed multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information. The packet compression table is information that represents the IGMP packet carrying the multicast group address and the multicast source address with relatively short information.

[0068] For example, in the case where there are multiple multicast group addresses in an IGMP message, such as five consecutive multicast group addresses 225.0.0.1, 225.0.0.2, 225.0.0.3, 225.0.0.4, and 225.0.0.5. Then in the corresponding message compression table, (225.0.0.1, 5) can be used to represent the above five consecutive multicast group addresses. It can be seen that the message compression table can represent a relatively large number of messages in a short information form.

[0069] In addition, for the case where there are multiple multicast source addresses in an IGMP message, such as n consecutive multicast source addresses starting from 1.1.1.1, then in the corresponding message compression table, (1.1.1.1, n) can be used to represent the n consecutive multicast source addresses.

[0070] In this embodiment, the network device updates the message compression table according to the multicast group address, the multicast source address, the IGMP message type, and the multicast receiving device characteristic information, where the message compression table stores entries corresponding to the group-join messages or group-leave messages related to the multicast receiving device. The entries in the message compression table can be used to provide a basis for the network device to forward messages.

[0071] In this embodiment, when the message compression table meets a preset condition, for example, when the message compression table reaches a preset sending time interval or the number of entries in the message compression table reaches a preset sending length threshold, the network device encapsulates the compressed IGMP message based on the message compression table, and encapsulates the MLAG message based on the compressed IGMP message.

[0072] The encapsulated MLAG message includes the original destination MAC address, source MAC address, belonging VLAN, message type, etc. In addition, it also includes the compressed description information encapsulated into the MLAG message.

[0073] The network device sends the encapsulated MLAG message to the peer device through the Peer-link. After receiving the MLAG message, the peer device can obtain the compressed IGMP message from the encapsulated MLAG message, and decompress and restore the IGMP message.

[0074] It should be noted that, as can be seen from the above, both the MLAG_master device and the MLAG_slave device can receive IGMP packets sent by the multicast receiving device. Therefore, in the process of parsing the IGMP packet to obtain the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information, compressing based on the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information to obtain a packet compression table, and encapsulating the information in the packet compression table into an MLAG packet and sending it to the peer device through the Peer-link, this series of processes can be implemented by the MLAG_master device or by the MLAG_slave device. In the case of being implemented by the MLAG_slave device, the MLAG_master device can receive the encapsulated MLAG packet sent by the MLAG_slave device and perform decompression and restoration of the MLAG packet.

[0075] The packet processing method provided in this embodiment updates the packet compression table based on the multicast group address, multicast source address, GMP packet type, and multicast receiving device characteristic information in the IGMP packet, encapsulates to obtain the compressed IGMP packet based on the packet compression table, and encapsulates the MLAG packet based on the compressed IGMP packet and sends it to the peer device through the Peer-link. By simplifying the messages in the IGMP packet, especially a large number of messages in the case of having multiple consecutive multicast group addresses and multicast source addresses, the message processing pressure on the Peer-link can be reduced, and the network reliability can be improved.

[0076] Please refer to Figure 3 , in this embodiment, in the step of updating the packet compression table based on the multicast group address, multicast source address, IGMP packet type, and multicast receiving device characteristic information, it may include the following sub-steps:

[0077] S121, determine the compression identifier and compression quantity according to the multicast group address and the multicast source address.

[0078] S122, determine the compression start address based on the multicast group address and the multicast source address.

[0079] S123, obtain the IGMP packet type and the multicast receiving device characteristic information according to the said IGMP packet.

[0080] S124, update the packet compression table according to the compression identifier, compression quantity, compression start address, IGMP packet type, and multicast receiving device characteristic information.

[0081] In this embodiment, in order to facilitate the distinction between compressing the multicast group address and compressing the multicast source address, it is necessary to determine the corresponding compression identifier. For example, when compressing the multicast group address in the IGMP message, the compression identifier GZ is used, and when compressing the multicast source address in the IGMP message, the compression identifier SZ is used.

[0082] In this embodiment, two compression identifiers can be set, namely GZ and SZ. Among them, GZ is used to identify the compression of the multicast group address, and SZ is used to identify the compression of the multicast source address. In the embodiments of the present invention, the compression identifier value can be freely defined as long as it can distinguish between multicast group address compression and multicast source address compression.

[0083] In addition, for the case of multiple consecutive multicast group addresses or multiple consecutive multicast source addresses, it is also necessary to determine the compression quantity, which is the number of consecutive multicast group addresses in the IGMP message or the number of consecutive multicast source addresses in the IGMP message.

[0084] As can be seen from the above, the message compression table represents a relatively large amount of information of multiple multicast source addresses or multiple multicast source addresses with relatively short information. The message compression table includes the compression quantity, that is, the number of multicast group addresses or multicast source addresses to be compressed. When determining the compression quantity, it is necessary to combine the compression start address, so as to know from which address the message compression table entry starts for the corresponding number of consecutive addresses.

[0085] Among them, the compression start address is the starting multicast group address in the IGMP message or the starting multicast source address in the IGMP message.

[0086] It should be noted that when the multicast group address is the dependent variable in the IGMP message, if the multicast group address is only one, the compression start address is the multicast group address, and if the multicast group address is multiple consecutive ones, the compression start address is the first multicast group address among the multiple multicast group addresses. In addition, when the multicast source address is the dependent variable in the IGMP message, if the multicast source address is only one, the compression start address is the multicast source address, and if the multicast source address is multiple consecutive ones, the compression start address is the first multicast source address among the multiple multicast source addresses.

[0087] For example, if an IGMPv3 group addition message (i.e., the multicast source address is defaulted to 0.0.0.0) without a multicast source address and with n consecutive multicast group addresses is received from a multicast receiving device, and the multicast group address starts from 225.0.0.1, then the message compression table entry is GZ (multicast receiving device IP address, Vlan, 0x22, 0.0.0.0, 225.0.0.1, n).

[0088] Suppose the multicast receiving device sends n non - consecutive multicast group addresses (x multicast groups starting from 226.0.0.1, y multicast groups starting from 227.0.0.10, z multicast groups starting from 228.0.0.9) in an IGMPv3 add - group message carrying the multicast source address 1.1.1.1, then the message compression table entries are GZ (multicast receiving device IP address, Vlan, 0x22, 1.1.1.1, 226.0.0.1, x) + GZ (multicast receiving device IP address, Vlan, 0x22, 1.1.1.1, 227.0.0.10, y) + GZ (multicast receiving device IP address, Vlan, 0x22, 1.1.1.1, 228.0.0.9, z).

[0089] In addition, if the multicast receiving device sends an IGMPv3 with the multicast group address 225.0.0.1 and an add - group message carrying n non - consecutive multicast source addresses (a multicast sources starting from 1.1.1.1, b multicast sources starting from 2.2.2.2, c multicast sources starting from 3.3.3.3), then the message compression table entries are SZ (multicast receiving device IP address, Vlan, 0x22, 1.1.1.1, 225.0.0.1, a) + SZ (multicast receiving device IP address, Vlan, 0x22, 2.2.2.2, 225.0.0.1, b) + SZ (multicast receiving device IP address, Vlan, 0x22, 3.3.3.3, 225.0.0.1, c).

[0090] In this embodiment, the network device updates the message compression table saved by itself in the above - mentioned manner. The message compression table includes a compression identification field, a multicast source field, a multicast group field, a compression quantity field, etc. In addition, it may also have a description field, and the description field is used to describe the corresponding multicast group address information or multicast source address information stored in the corresponding table entry. The following table schematically shows the information stored in each table entry of the message compression table.

[0091]

[0092]

[0093] The description addresses corresponding to the above - mentioned each table entry are as follows:

[0094] 225.0.0.1 - 225.0.0.10

[0095] 225.0.0.15 - 225.0.0.35

[0096] 226.0.0.2 - 226.0.0.102

[0097] 1.1.1.1 - 1.1.1.3

[0098] In this embodiment, when the network device updates the packet compression table based on the multicast group address, multicast source address, GMP packet type, and multicast receiving device characteristic information in the IGMP packet, it can be implemented in the following manner:

[0099] If there is an entry in the packet compression table that matches the IGMP packet type and the multicast receiving device characteristic information, and the compression start address in the entry is consecutive with the compression end address in the existing entry in the packet compression table, and the packet compression table does not meet the preset conditions, then update the compression description information in the existing entry based on the compression description information. Among them, the compression end address in the existing entry is obtained according to the compression start address and the compression quantity in the existing entry, and the multicast receiving device characteristic information includes the IP address, VLAN ID, etc.

[0100] For example, if there is an entry stored in the packet compression table with the information GZ (multicast receiving device IP address, Vlan, 0x22, 0.0.0.0, 225.0.0.1, 5). The compression end address can be obtained as 225.0.0.5 according to the compression start address and the compression quantity in this entry. When the packet compression table does not meet the preset conditions, if the network device receives an IGMPv3 join group packet without a multicast source sent by the multicast receiving device with a multicast group address of 225.0.0.6. At this time, the compression start address 225.0.0.6 corresponding to this packet is consecutive with the compression end address 225.0.0.5 in the above existing entry. In this case, the compression description information in the existing entry can be updated based on this packet. For example, the information stored in the updated existing entry is (multicast receiving device IP address, Vlan, 0x22, 0.0.0.0, 225.0.0.1, 6).

[0101] In addition, if the multicast group address or the multicast source address of the received IGMP packet is not consecutive with the compression end address in the existing entry in the packet compression table, then add a corresponding entry in the packet compression table based on the compression description information and the corresponding IGMP type and multicast receiving device characteristic information.

[0102] For example, taking the above as an example, when the packet compression table does not meet the preset conditions, if the network device receives IGMPv2 join group packets of 3 consecutive multicast groups (starting with 226.1.1.1) sent by the multicast receiving device. At this time, the multicast group address of this packet is not consecutive with the compression end address in any entry in the packet compression table, then a new entry can be added to the packet compression table, and the information stored in this entry is GZ (multicast receiving device IP address, Vlan, 0x16, 0.0.0.0, 226.1.1.1, 3).

[0103] It should be noted that the situation where the compression start address is not continuous with the compression end address in the existing entries in the packet compression table can be specifically divided into the case where the compression start address and the compression end address are not continuous but belong to the same compression identifier, and the case where they belong to different compression identifiers.

[0104] In addition, if there is no entry in the packet compression table that matches the IGMP packet type and the multicast receiving device characteristic information, a corresponding entry is newly added to the packet compression table based on the IGMP packet type and the multicast receiving device characteristic information.

[0105] In this embodiment, while the network device updates its own packet compression table, when the packet compression table meets the preset conditions, a compressed IGMP packet can be encapsulated based on the packet compression table. In one possible implementation, it can be achieved through the following method:

[0106] Use the TLV format to encapsulate the information of each entry in the packet compression table into an IGMP packet in the corresponding IGMP type format, so as to facilitate encapsulating multiple IGMP packets in the TLV format into an MLAG packet.

[0107] The TLV format is a data encoding format, and TLV usually represents Tag-Length-Value. The information of each entry in the packet compression table is encapsulated according to the TLV format to obtain a compressed IGMP packet.

[0108] In this embodiment, when encapsulating multiple IGMP packets in the TLV format into an MLAG packet, a new field, namely the type flag bit MultiType, can be added to the MLAG packet to record the compression identifier.

[0109] In the case of compressing the multicast group address, that is, when the compression start address is the first address in the continuous multicast group addresses in the IGMP packet, information such as the multicast source address, the compression start address, and the compression quantity is added to the MLAG packet.

[0110] In this case, the encapsulated MLAG packet can be as follows:

[0111] The MLAG header of the MLAG packet is as follows:

[0112]

[0113] The format of the IGMP message header encapsulated in the MLAG packet is as follows:

[0114]

[0115] The encapsulation of the IGMPv2 message content is as follows:

[0116]

[0117] The encapsulation of the IGMPv3 message content is as follows:

[0118]

[0119] In this case, after the peer device receives the MLAG packet from the Peer-link, by identifying the type flag bit MultiType in the MLAG packet to determine that the compression identifier represents multicast group address compression, the values in the fields of Source Address, Multicast Address, n, etc. in the MLAG packet are taken out to restore the IGMP packet.

[0120] In addition, in the case of compressing the multicast source address, that is, when the compression start address is the first address in the consecutive multicast source addresses in the IGMP packet, the multicast group address, the compression start address, and the compression quantity are added to the MLAG packet.

[0121] In this case, the MLAG header format, the IGMP message header format, and the encapsulation format of the IGMPv3 message content in the encapsulated MLAG packet can be referred to above.

[0122] In this case, after the peer device receives the MLAG packet from the Peer-link, by identifying the value of the type flag bit MultiType in the MLAG packet to determine that the compression identifier is SZ, and taking out the Multicastaddress, Source address, n in the MLAG packet, the IGMP packet is restored.

[0123] In order to avoid excessive processing pressure on the Peer-link caused by frequent transmission of MLAG packets on the Peer-link, when the message compression table reaches the preset sending time threshold or the number of entries in the message compression table reaches the preset sending length threshold, it is determined that the message compression table meets the preset conditions. Then, the compressed IGMP packet is encapsulated based on the message compression table, the MLAG packet is encapsulated based on the compressed IGMP packet, and then sent to the peer device through the Peer-link.

[0124] In this way, by reducing the frequency of information synchronization, the processing pressure of synchronization information on the Peer-link can be further alleviated to a certain extent.

[0125] As can be seen from the above, the peer device can receive the IGMP packet sent by the multicast receiving device, and after obtaining the encapsulated MLAG packet based on the message compression table, send it to the network device so that the network device can decompress and restore the IGMP packet. In this case, please refer to Figure 4, as the end that executes decompression and restores the IGMP message, the message processing method provided in this embodiment may further include the following steps:

[0126] S21, when receiving the MLAG message sent by the peer device, parse the compressed IGMP message in the MLAG message.

[0127] S22, restore the compressed IGMP message.

[0128] In this embodiment, after receiving the MLAG message, the above network device can parse the compression identifier therein. When the compression identifier indicates that the multicast group address in the IGMP message is compressed, extract the compression start address, multicast source address, and compression quantity, and restore the IGMP message based on the compression start address, multicast source address, and compression quantity.

[0129] When the compression identifier indicates that the multicast source address in the IGMP message is compressed, extract the compression start address, multicast group address, and compression quantity, and restore the IGMP message based on the compression start address, multicast group address, and compression quantity.

[0130] For a clearer introduction to the message processing method provided in this embodiment, the following will be combined with Figure 1 the MLAG environment shown in to further illustrate the message processing flow.

[0131] Figure 1 In, MLAG_master, MLAG_slave, STD1, STD2, and STD3 are all devices within the PIM domain. MLAG_master and MLAG_slave act as multicast receivers to receive messages from multicast receiving devices.

[0132] The MLAG_master device receives 5 IGMPv2 join messages with consecutive multicast group addresses (starting with 225.0.0.1) sent by the multicast receiving device (192.1.1.1), and obtains an IGMP message compression table based on the join messages. The form of the message compression table is as follows:

[0133] MultiType ReporterIP Vlan igmpType Multicast Source Multicast Group Compression Number GZ 192.1.1.1 10 0x16 0.0.0.0 225.0.0.1 5

[0134] When the MLAG_master device receives the IGMPv2 join message with the multicast group 225.0.0.6 sent by the multicast receiving device (192.1.1.1) again within the preset sending time threshold or when the number of entries in the message compression table is within the preset sending length threshold, query and update the message compression table. The updated message compression table is as follows:

[0135] MultiType ReporterIP Vlan IGMPType Multicast Source Multicast Group Compression Number GZ 192.1.1.1 10 0x16 0.0.0.0 225.0.0.1 6

[0136] When the MLAG_master device receives three consecutive IGMPv3 join group messages with multicast source S and multicast group addresses starting with 226.1.1.1 sent by the multicast receiving device (192.1.1.3) within the preset transmission time threshold or when the number of entries in the message compression table is within the preset transmission length threshold, query and update the message compression table. The updated message compression table is as follows:

[0137] MultiType ReporterIP Vlan IGMPType Multicast Source Multicast Group Compression Number GZ 192.1.1.1 10 0x16 0.0.0.0 225.0.0.1 6 GZ 192.1.1.3 10 0x22 S 226.1.1.1 3

[0138] In addition, when the MLAG_master device reaches the preset transmission time threshold or the number of entries in the message compression table reaches the preset transmission length threshold, encapsulate the message compression table into an MLAG message and send the MLAG message to the peer device (MLAG_slave device) through the Peer-link. The encapsulated MLAG message is as follows:

[0139] The MLAG header of the MLAG message is as follows:

[0140]

[0141] The format of the IGMP message header encapsulated in the MLAG message is as follows:

[0142]

[0143] The encapsulation of the IGMPv2 message content is as follows:

[0144]

[0145] The encapsulation of the IGMPv3 message content is as follows:

[0146]

[0147]

[0148] After receiving the MLAG message, the MLAG_slave device recognizes that the compression flag MultiType value is GZ, extracts the compression information of IGMPv2 with Multicast Address 225.0.0.1 and N = 6 to decompress six IGMP messages; extracts the compression information of IGMPv3 with Source Address S, Multicast Address 226.1.1.1, and N = 3 to decompress the IGMPv3 message.

[0149] On the other hand, if the MLAG_master device receives an IGMPv3 group addition message sent by a multicast receiving device (192.1.1.2) carrying 5 consecutive multicast sources (starting with 1.1.1.1) and the multicast group is G, the group addition message is recorded in the packet compression table. The form of the packet compression table is as follows:

[0150] MultiType ReporterIP Vlan igmpType Multicast Source Multicast Group N SZ 192.1.1.2 10 0x22 1.1.1.1 G 5

[0151] When the MLAG_master device receives again an IGMPv3 group addition message sent by the multicast receiving device (192.1.1.2) carrying 6 consecutive multicast sources (starting with 1.1.1.2) and the multicast group is G at the preset sending time threshold and the number of entries in the packet compression table is within the preset sending length threshold, the packet compression table is queried and updated. The updated packet compression table is as follows:

[0152] MultiType ReporterIP Vlan igmpType Multicast Source Multicast Group N SZ 192.1.1.2 10 0x22 1.1.1.1 G 6

[0153] When the MLAG_master device receives again an IGMPv3 group addition message sent by the multicast receiving device (192.1.1.14) carrying 6 consecutive multicast sources (starting with 2.2.2.1) and the multicast group is G2 at the preset sending time threshold and the number of entries in the packet compression table is within the preset sending length threshold, the packet compression table is queried and updated. The updated packet compression table is as follows:

[0154] MultiType ReporterIP Vlan igmpType Multicast Source Multicast Group N SZ 192.1.1.2 10 0x22 1.1.1.1 G 6 SZ 192.1.1.14 10 0x22 2.2.2.1 G2 6

[0155] When the MLAG_master device reaches the preset sending time threshold or the number of entries in the packet compression table reaches the preset sending length threshold, the packet compression table is encapsulated into an MLAG packet, and the MLAG packet is sent to the peer device (MLAG_slave device) through the Peer-link. The encapsulated MLAG packet is as follows:

[0156]

[0157] The IGMP message header format encapsulated in the MLAG packet is as follows:

[0158]

[0159] The encapsulation of the IGMPv2 message content is as follows:

[0160]

[0161] The encapsulation of the IGMPv3 message content is as follows:

[0162]

[0163] After the MLAG_slave device receives the MLAG message, it recognizes that the compression identifier MultiType value is SZ, extracts the compressed information of IGMPv3 with Source Address as 1.1.1.1 and Multicast Address as G, and N as 6 to decompress the IGMPv3 message; extracts the compressed information of IGMPv3 with Source Address as 2.2.2.1 and Multicast Address as G2, and N as 6 to decompress the IGMPv3 message.

[0164] The message processing solution provided in this embodiment can solve the drawback that in the MLAG environment, when there are too many messages transmitted between Peer-links, a large number of continuous multicast groups or multicast source information in multiple IGMP messages may cause some IGMP messages to be lost during message synchronization. By compressing the multicast group address and multicast source address, the number of messages between Peer-links is reduced, that is, the number of intensive message transmissions between devices is reduced, thereby improving the processing performance of IO-intensive services and relatively improving the network reliability.

[0165] This embodiment of the present application also provides a message processing device. Refer to Figure 5 , which is a schematic structural diagram of a message processing device provided corresponding to this embodiment of the present application. Corresponding to the message processing method provided in this embodiment of the present application, since the message processing device provided in this embodiment of the present application corresponds to the message processing method provided in this embodiment of the present application, the implementation manners of the foregoing message processing method are also applicable to the message processing device provided in this embodiment.

[0166] In this embodiment, the message processing device includes a receiving module, a processing module, and a sending module.

[0167] The receiving module is used to receive the IGMP message sent by the multicast receiving device;

[0168] The processing module is used to parse and obtain the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information in the IGMP message, update the message compression table based on the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information, and when the message compression table meets the preset conditions, encapsulate the compressed IGMP message based on the message compression table, and encapsulate the MLAG message based on the compressed IGMP message;

[0169] The sending module is used to send the MLAG message to the peer device through the Peer-link, so that the peer device can obtain the compressed IGMP message from the MLAG message and restore it.

[0170] In this embodiment, it can be understood that the receiving module, the processing module, and the sending module can be used to execute the above steps S11 to S13. For the detailed implementation manners of the receiving module, the processing module, and the sending module, reference can be made to the content related to the above steps S11 to S13.

[0171] In a possible implementation manner, the above processing module can be used to update the packet compression table in the following manner:

[0172] Determine a compression identifier and a compression quantity according to the multicast group address and the multicast source address;

[0173] Determine a compression start address based on the multicast group address and the multicast source address;

[0174] Obtain the IGMP packet type and the multicast receiving device feature information according to the IGMP packet;

[0175] Update the packet compression table according to the compression identifier, the compression quantity, the compression start address, the IGMP packet type, and the multicast receiving device feature information.

[0176] In a possible implementation manner, the compression identifier indicates whether to compress the multicast group address in the IGMP packet or the multicast source address;

[0177] The compression quantity is the number of consecutive multicast group addresses in the IGMP packet, or the number of consecutive multicast source addresses in the IGMP packet;

[0178] The compression start address is the starting multicast group address in the IGMP packet, or the starting multicast source address in the IGMP packet.

[0179] The IGMP packet type is the type of the IGMP packet, including IGMPv1, IGMPv2, and IGMPv3;

[0180] The feature information of the multicast group receiving device includes the source IP address and the Vlan information in the IGMP packet.

[0181] In a possible implementation manner, the above processing module can be used to update the packet compression table in the following manner:

[0182] If there is an entry in the packet compression table that matches the IGMP packet type and the multicast receiving device feature information, and the compression start address in the entry is consecutive with the compression end address in the existing entry in the packet compression table, then update the information in the existing entry based on the compression identifier, the compression quantity, the compression start address, the IGMP packet type, and the multicast receiving device feature information;

[0183] If the multicast group address or multicast source address of the received IGMP message is not continuous with the compression termination address in the entry, a corresponding entry is newly added to the message compression table based on the compression start address, compression quantity, compression identifier, and the corresponding IGMP type and multicast receiving device characteristic information;

[0184] If there is no entry in the message compression table that matches the IGMP message type and multicast receiving device characteristic information, a corresponding entry is newly added to the message compression table based on the compression identifier, compression quantity, compression start address, and the corresponding IGMP message type and multicast receiving device characteristic information.

[0185] In a possible implementation manner, the above processing module may be used to encapsulate to obtain a compressed IGMP message in the following manner:

[0186] Use the TLV format to encapsulate the information of each entry in the message compression table into an IGMP message in the corresponding IGMP type format, so as to encapsulate multiple IGMP messages in the TLV format into an MLAG message.

[0187] In a possible implementation manner, the above processing module may be used to determine whether the message compression table meets a preset condition in the following manner:

[0188] When the message compression table reaches the preset sending time threshold or the number of entries in the message compression table reaches the preset sending length threshold, it is determined that the preset condition is met.

[0189] In addition, an embodiment of the present application further provides a network device. As Figure 6 shown, the network device may include: at least one processor and a memory communicatively connected to at least one processor. Among them, the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor so that at least one processor can:

[0190] After receiving an IGMP message sent by a multicast receiving device, parse to obtain the multicast group address, multicast source address, IGMP message type, and multicast receiving device characteristic information in the IGMP message;

[0191] Update the message compression table based on the multicast group address, multicast source address, IGMP message type, and multicast receiving device characteristic information;

[0192] When the message compression table meets the preset condition, encapsulate to obtain a compressed IGMP message based on the message compression table, encapsulate an MLAG message based on the compressed IGMP message, and send the MLAG message to the peer device through the Peer-link, so that the peer device can obtain the compressed IGMP message from the MLAG message and restore it.

[0193] The embodiment of the present application also provides a non-volatile computer storage medium storing computer-executable instructions, and the computer-executable instructions are configured to:

[0194] After receiving an IGMP message sent by a multicast receiving device, parse to obtain the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information in the IGMP message;

[0195] Update the message compression table based on the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information;

[0196] When the message compression table meets a preset condition, encapsulate to obtain a compressed IGMP message based on the message compression table, encapsulate an MLAG message based on the compressed IGMP message, and send the MLAG message to the peer device through Peer-link, so that the peer device can obtain the compressed IGMP message from the MLAG message and restore it.

[0197] The embodiments of the present application are all described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, equipment, and non-volatile computer storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the partial description of the method embodiments for the relevant parts.

[0198] In summary, for the message processing method, device, and network device provided by the embodiments of the present application, after receiving an IGMP message sent by a multicast receiving device, the network device parses to obtain the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information in the IGMP message. The message compression table is updated based on the multicast group address, multicast source address, IGMP message type, and multicast receiving device feature information. Moreover, when the message compression table meets a preset condition, a compressed IGMP message is encapsulated based on the message compression table, an MLAG message is encapsulated based on the compressed IGMP message, and the MLAG message is sent to the peer device through Peer-link, so that the peer device can obtain the compressed IGMP message from the MLAG message and restore it. In this way, by extracting compression information and encapsulating the MLAG message, the message processing pressure on Peer-link can be reduced, and the network reliability can be improved.

[0199] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A message processing method, It is characterized in that Applied to a network device in a cross-device link aggregation group MLAG, the method includes: After receiving an IGMP message sent by a multicast receiving device, parsing and obtaining the multicast group address, multicast source address, IGMP message type and multicast receiving device characteristic information in the IGMP message; Updating the message compression table based on the multicast group address, the multicast source address, the IGMP message type and the multicast receiving device characteristic information; When the message compression table meets the preset conditions, a compressed IGMP message is encapsulated based on the message compression table, an MLAG message is encapsulated based on the compressed IGMP message, and the MLAG message is sent to the opposite device through the Peer-link, so that the opposite device obtains the compressed IGMP message from the MLAG message and restores it.

2. The message processing method according to claim 1, It is characterized in that The step of updating the message compression table based on the multicast group address, the multicast source address, the IGMP message type and the multicast receiving device characteristic information comprises: Determine a compression identifier and a compression quantity according to the multicast group address and the multicast source address; Determine a compression start address based on the multicast group address and the multicast source address; Obtaining IGMP message type and multicast receiving device characteristic information according to the IGMP message; The message compression table is updated according to the compression identifier, compression quantity, compression start address, IGMP message type and multicast receiving device characteristic information.

3. The message processing method according to claim 2, It is characterized in that The compression flag is used to indicate whether compression is performed on the multicast group address in the IGMP message or on the multicast source address; The compression quantity is the number of consecutive multicast group addresses in the IGMP message, or the number of consecutive multicast source addresses in the IGMP message; The compression start address is the start multicast group address in the IGMP message, or the start multicast source address in the IGMP message; The IGMP message type is the type of the IGMP message, including IGMPv1, IGMPv2, and IGMPv3; The characteristic information of the multicast group receiving device includes the source IP address and Vlan information in the IGMP message.

4. The message processing method according to claim 3, It is characterized in that The step of updating the message compression table according to the compression identifier, compression quantity, compression start address, IGMP message type and multicast receiving device characteristic information comprises: If there is a table entry in the message compression table that matches the IGMP message type and the multicast receiving device characteristic information, and the compression start address in the table entry is continuous with the compression end address in the existing table entry in the message compression table, then the information in the existing table entry is updated based on the compression identifier, the compression quantity, the compression start address, the IGMP message type and the multicast receiving device characteristic information; If the compression start address is not continuous with the compression end address in the table entry, adding a corresponding table entry in the message compression table based on the compression start address, the compression quantity, the compression flag, and the corresponding IGMP type and multicast receiving device feature information; If there is no table entry in the message compression table that matches the IGMP message type and multicast receiving device characteristic information, a corresponding table entry is added to the message compression table based on the compression identifier, compression quantity, compression start address and the corresponding IGMP message type and multicast receiving device characteristic information.

5. The message processing method according to claim 3, It is characterized in that When the message compression table meets a preset condition, the step of encapsulating the compressed IGMP message based on the message compression table includes: The information of each table item of the message compression table is sequentially encapsulated into an IGMP message of a corresponding IGMP type format using the TLV format, so as to encapsulate multiple IGMP messages of the TLV format into an MLAG message.

6. The message processing method according to any one of claims 1 to 5, It is characterized in that The step of determining whether the message compression table meets a preset condition comprises: The message compression table reaches a preset sending time threshold or the number of entries in the message compression table reaches a preset sending length threshold, and it is determined that the preset condition is met.

7. A message processing device, It is characterized in that The device is applied to a network device in a cross-device link aggregation group MLAG, and the device includes: A receiving module, used for receiving IGMP messages sent by a multicast receiving device; a processing module, configured to parse and obtain the multicast group address, the multicast source address, the IGMP message type, and the characteristic information of the multicast receiving device in the IGMP message, update the message compression table based on the multicast group address, the multicast source address, the IGMP message type, and the characteristic information of the multicast receiving device, and when the message compression table meets a preset condition, encapsulate the compressed IGMP message based on the message compression table, and encapsulate the MLAG message based on the compressed IGMP message; The sending module is used to send the MLAG message to the opposite device through the Peer-link, so that the opposite device obtains the compressed IGMP message from the MLAG message and restores it.

8. The message processing device according to claim 7, It is characterized in that The processing module is used to update the message compression table in the following manner: Determine a compression identifier and a compression quantity according to the multicast group address and the multicast source address; Determine a compression start address based on the multicast group address and the multicast source address; Obtaining IGMP message type and multicast receiving device characteristic information according to the IGMP message; The message compression table is updated according to the compression identifier, compression quantity, compression start address, IGMP message type and multicast receiving device characteristic information.

9. The message processing device according to claim 8, It is characterized in that The compression flag is used to indicate whether compression is performed on the multicast group address in the IGMP message or on the multicast source address; The compression quantity is the number of consecutive multicast group addresses in the IGMP message, or the number of consecutive multicast source addresses in the IGMP message; The compression start address is the start multicast group address in the IGMP message, or the start multicast source address in the IGMP message; The IGMP message type is the type of the IGMP message, including IGMPv1, IGMPv2, and IGMPv3; The characteristic information of the multicast group receiving device includes the source IP address and Vlan information in the IGMP message.

10. A network device, It is characterized in that include: At least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method of any one of claims 1-6.