A message processing method and related device

By compressing the SID of the leaf node in the segment list of the multicast message and using the LNC type SID and public prefix method, the problem of too long SID in the multicast message is solved, the processing efficiency is improved and the application scenarios of MSR6 are expanded.

CN116527642BActive Publication Date: 2025-10-14BEIJING HUAWEI DIGITAL TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210067481.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2025-10-14
Estimated Expiration
2042-01-20

AI Technical Summary

Technical Problem

The segment list carrying the MSR6 SID of each node in the multicast message is too long, resulting in a long message header and affecting processing efficiency.

Method used

The second message is generated by compressing the leaf node SID in the segment list of the multicast message, using the LNC type SID to identify the leaf node, compressing it into a shorter C-SID, carrying the public prefix and M-SID in the IPv6 header, and modifying the DA field and segment left.

Benefits of technology

Without affecting message processing and forwarding, it effectively improves the SID compression efficiency of leaf nodes, reduces the message header length of multicast messages, and expands the application scenarios of MSR6.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527642B_ABST
    Figure CN116527642B_ABST
Patent Text Reader

Abstract

The application discloses a message processing method and related equipment, which is applied to a first network device and includes: obtaining a first message of MSR6, wherein a DA field of an IPv6 header of the first message includes a public prefix and a first M-SID, an MRH includes a segment list, MSR6 SIDs of the first network device and a second network device both include the public prefix, the MSR6 SID of the first network device further includes the first M-SID, the MSR6 SID of the second network device further includes a second M-SID, and the first M-SID indicates that a SID of the first network device is a leaf node compression LNC type of SID; based on the first M-SID, the second M-SID is obtained from the MRH, and the second M-SID includes a first C-SID; and based on the first message and the second M-SID, a second message is generated, wherein a DA field in an IPv6 header of the second message includes the public prefix and the second M-SID. It can be seen that in the method, the SID of the leaf node in the segment list is compressed to a C-SID shorter than the M-SID, the compression efficiency of the SID of the leaf node is effectively improved on the basis of not affecting the processing and forwarding of the message, and the application scenario of the MSR6 is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message processing method and related equipment. Background Art

[0002] Bit Index Explicit Replication (BIER) is a multicast technology that encapsulates the set of destination nodes of a multicast message as a bit string in the message header. This eliminates the need for intermediate nodes to establish a multicast tree for each multicast stream and save the multicast stream status. Instead, they only need to replicate and forward the multicast message based on the set of destination nodes in the multicast message header. Multicast Source Routing over Internet Protocol version 6 (MSR6) is a multicast source routing technology based on Internet Protocol version 6 (IPv6). It leverages the characteristics of source routing on the IPv6 data plane to provide simplified multicast Traffic Engineering (TE) and Best Effort (BE) services. MSR6-based multicast messages can carry the set of destination nodes of the multicast message through a segment list, and each node in the multicast tree can be identified by an MSR6 segment identity (SID). The argument field of the MSR6 SID contains a replication number and a pointer. The replication number indicates the number of messages that the current node needs to replicate, and the pointer indicates the position of the SID of the child node of the current node in the segment list.

[0003] If the multicast tree includes many nodes, the segment list carrying the MSR6 SID of each node in the multicast message will be very long, resulting in an excessively long message header, which affects message processing efficiency. Summary of the Invention

[0004] Based on this, an embodiment of the present application provides a message processing method and related equipment, which effectively compresses the multicast message of MSR6 by compressing the SID of the leaf node in the segment list of the multicast message, thereby improving the message processing efficiency.

[0005] In a first aspect, an embodiment of the present application provides a message processing method, which is applied to a first network device, wherein the first MSR6 SID of the first network device includes a common prefix and a first M-SID, the leaf node of the first network device includes a second network device, and the second MSR6 SID of the second network device includes the common prefix and the second M-SID. The method may include, for example: a first network device obtains a first message of MSR6, where the first message includes an IPv6 header and a multicast routing header (MRH), a destination address (DA) field in the IPv6 header includes a common prefix and a first M-SID, and the first M-SID is used to indicate that a segment list included in the MRH includes a first C-SID compressed by a second M-SID; the first network device can obtain a second M-SID from the MRH based on the first M-SID, where the second M-SID includes the first C-SID; thereby, the first network device generates a second message based on the first message and the second M-SID, where the DA field in the IPv6 header of the second message includes the common prefix and the second M-SID. In this way, through this method, the SID of the leaf node in the segment list is compressed to a C-SID shorter than the M-SID. When the network device determines that its own SID in the segment list is an LNC type SID, it can restore the M-SID of the leaf node of the network device according to the compression rule corresponding to the LNC type SID, modify the DA field in the IPv6 header and the segment left in the MRH to obtain the message sent to the leaf node, thereby effectively improving the compression efficiency of the leaf node SID without affecting the processing and forwarding of the message, and expanding the application scenario of MSR6.

[0006] In some implementations, the method may further include: the first network device sending a second message to the second network device.

[0007] In some implementations, the first network device obtaining the second M-SID from the MRH based on the first M-SID may include: the first network device obtaining the first C-SID based on an indication of a segment left in the MRH; and thereby obtaining the second M-SID based on the first C-SID.

[0008] As an example, the first C-SID may include the second node identifier (node ​​id) of the second network device and the first function (Function) in the second MSR6 SID.

[0009] As another example, the first C-SID can also include a first Function Index (FI) and a second node id of the second network device, the first FI is used to find a first Function in the second M-SR6 SID, and the first network device obtaining the second M-SID based on the first C-SID can include: the first network device obtaining the second node id and the first FI from the first C-SID; obtaining the first Function from the MRH based on the first FI; and combining the second node id and the first Function to obtain the second M-SID.

[0010] The first C-SID can be 16 bits.

[0011] In some implementations, if the first network device is a root node of the multicast tree, the method can further include: the first network device obtaining a segment list, and generating the first packet based on the segment list, wherein the segment list includes the first M-SID and the first C-SID.

[0012] In some implementations, the first M-SID includes a replication number and a pointer, a value of the replication number is used to indicate a number of the first network device replicating the first packet, and a value of the pointer is used to indicate a position of a leaf node of the first network device in the segment list.

[0013] As an example, if the leaf node of the first network device includes other leaf nodes in addition to the second network device, the method can further include: the first network device replicating the first packet based on the value of the replication number to obtain a third packet, the third packet being the same as the first packet. If the leaf node of the first network device further includes a third network device, a third M-SR6 SID of the third network device includes a common prefix and a third M-SID, the method can further include: the first network device obtaining the third M-SID from the MRH, the third M-SID including a second C-SID compressed from the third M-SID; generating a fourth packet based on the third packet and the third M-SID, the DA field in the IPv6 header of the fourth packet including the common prefix and the third M-SID; and sending the fourth packet to the third network device.

[0014] The first C-SID further includes a flag bit, and a value of the flag bit is used to indicate whether a next SID is a compressed SID. In one case, if the value of the flag bit of the first C-SID is used to indicate that the next SID is a compressed SID, the first network device obtaining the third M-SID from the MRH can include: the first network device obtaining the second C-SID from the segment list based on an indication of segment left in the MRH; and the first network device obtaining the third M-SID based on the second C-SID, the third M-SID including a second Function in the third MSR6 SID. In another case, if the value of the flag bit of the first C-SID is used to indicate that the next SID is a non-compressed SID, the first network device obtaining the third M-SID from the segment list can include: the first network device directly obtaining the third M-SID from the segment list based on the indication of segment left in the MRH.

[0015] In a second aspect, the embodiments of the present application further provide a packet processing apparatus applied to a first network device, the apparatus comprising: a first obtaining unit, a second obtaining unit, and a first generating unit. The first obtaining unit is configured to obtain a first packet of MSR6, the first packet comprising an IPv6 header and an MRH, a DA field in the IPv6 header comprising a public prefix and a first M-SID, the MRH comprising a segment list, a first MSR6 SID of the first network device comprising the public prefix and the first M-SID, a leaf node of the first network device comprising a second network device, a second MSR6 SID of the second network device comprising the public prefix and a second M-SID, the first M-SID being used to indicate that the second M-SID compressed first C-SID is included in the segment list. The second obtaining unit is configured to obtain the second M-SID from the MRH based on the first M-SID, the second M-SID comprising the first C-SID. The first generating unit is configured to generate a second packet based on the first packet and the second M-SID, a DA field in an IPv6 header of the second packet comprising the public prefix and the second M-SID.

[0016] In some implementations, the apparatus further comprises a first sending unit. The first sending unit is configured to send the second packet to the second network device.

[0017] In some implementations, the second obtaining unit comprises a first obtaining subunit and a second obtaining subunit. The first obtaining subunit is configured to obtain the first C-SID based on an indication of segment left in the MRH. The second obtaining subunit is configured to obtain the second M-SID based on the first C-SID.

[0018] As an example, the first C-SID includes the second node ID of the second network device and the first Function in the second MSR6 SID.

[0019] As another example, the first C-SID includes a first FI and a second node id of a second network device. The first FI is used to search for a first function in a second MSR6 SID. The second obtaining subunit is specifically configured to: obtain the second node id and the first FI from the first C-SID; obtain the first function from the MRH based on the first FI; and combine the second node id and the first function to obtain a second M-SID.

[0020] The first C-SID is 16 bits.

[0021] In some implementations, the apparatus further includes a third obtaining unit and a second generating unit, wherein the third obtaining unit is configured to obtain a segment list including the first M-SID and the first C-SID; and the second generating unit is configured to generate the first message based on the segment list.

[0022] The first M-SID includes a replication number and a pointer. The value of the replication number is used to indicate the number of times the first network device replicates the first message, and the value of the pointer is used to indicate the position of the SID of the leaf node of the first network device in the segment list.

[0023] In some implementations, the apparatus further includes a replication unit configured to replicate the first message based on a value of the replicationnumber to obtain a third message, where the third message is identical to the first message.

[0024] As an example, the leaf node of the first network device further includes a third network device, and the third MSR6 SID of the third network device includes a common prefix and a third M-SID. The apparatus further includes: a fourth obtaining unit, a third generating unit, and a second sending unit. The fourth obtaining unit is configured to obtain a third M-SID from the MRH, where the third M-SID includes a second C-SID compressed from the third M-SID; the third generating unit is configured to generate a fourth message based on the third message and the third M-SID, where the DA field in the IPv6 header of the fourth message includes the common prefix and the third M-SID; and the second sending unit is configured to send the fourth message to the third network device.

[0025] As an example, the first C-SID also includes a flag bit, the value of which is used to indicate that the next SID is a compressed SID. The fourth obtaining unit includes a third obtaining subunit and a fourth obtaining subunit. The third obtaining subunit is used to obtain the second C-SID from the segment list based on the indication of segment left in the MRH; the fourth obtaining subunit is used to obtain a third M-SID based on the second C-SID, where the third M-SID includes the second function in the third MSR6 SID.

[0026] As another example, the first C-SID also includes a flag bit, the value of the flag bit is used to indicate that the next SID is a non-compressed SID, and the fourth obtaining unit is specifically used to: directly obtain the third M-SID from the segment list based on the indication of segment left in the MRH.

[0027] It should be noted that the message processing device provided in the fifth aspect is used to perform the relevant operations mentioned in the first aspect above. Its specific implementation method and the effects achieved can be found in the relevant description of the first aspect above, and will not be repeated here.

[0028] In a third aspect, an embodiment of the present application further provides a communication device, comprising: a processor and a memory, wherein: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the communication device executes the method provided in any possible implementation of the first aspect above.

[0029] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which program code or instructions are stored, which, when executed on a computer, enables the computer to execute the method provided in any possible implementation of the first aspect above.

[0030] In a fifth aspect, an embodiment of the present application further provides a computer program product, which, when running on a network device, enables the network device to execute the method provided in any possible implementation of the first aspect.

[0031] In a sixth aspect, the present application provides a chip comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the method provided in any possible implementation of the first aspect above.

[0032] Optionally, the chip only comprises a processor, and the processor is configured to read and execute a computer program stored in a memory, and when the computer program is executed, the processor executes the method provided in any one of the possible implementation manners of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art according to these drawings.

[0034] Figure 1 The schematic diagram of the MSR6 SID in the present application;

[0035] Figure 2 The schematic diagram of a multicast tree structure in the present application;

[0036] Figure 3a The schematic diagram of the message 1 of an MSR6 in the present application;

[0037] Figure 3b The schematic diagram of the message 1 of another MSR6 in the present application;

[0038] Figure 4 The schematic diagram of the M-SID in the present application;

[0039] Figure 5a The schematic diagram of the C-SID in the present application;

[0040] Figure 5b The schematic diagram of another C-SID in the present application;

[0041] Figure 6a The schematic diagram of the message 1 of an MSR6 provided in the present application;

[0042] Figure 6b The schematic diagram of the message 1 of another MSR6 provided in the present application;

[0043] Figure 7 The flowchart of the message processing method 100 provided in the present application;

[0044] Figure 8a The schematic diagram of the first message provided in the present application;

[0045] Figure 8b The schematic diagram of the first message provided in the present application;

[0046] Figure 9 The schematic diagram of the MRH of the first message provided in the present application;

[0047] Figure 10a a structure diagram of another multicast tree of the present application;

[0048] Figure 10b a structure diagram of another multicast tree of the present application; Figure 10a a structure diagram of a segment list corresponding to the multicast tree shown in FIG. 7;

[0049] Figure 11 a structure diagram of a packet processing device 1100 provided by the present application;

[0050] Figure 12 a structure diagram of a communication device 1200 provided by the present application;

[0051] Figure 13 a structure diagram of a communication device 1300 provided by the present application. DETAILED DESCRIPTION

[0052] Currently, the MSR6 SID of a network device in a multicast tree can be seen from Figure 1 as shown, including a location (Locator) field, a function (Function) field and an argument (Arguments) field, wherein the Arguments field includes a replication number and a pointer, wherein the value of the replication number indicates the number of packets that need to be replicated by the current node, and the value of the pointer is used to indicate the position of the SID of the leaf node of the current node in the segment list.

[0053] Take the multicast tree shown in Figure 2 as an example for subsequent description.

[0054] Referring to Figure 2The multicast tree includes network device A, network device B, network device C, network device D, network device E, network device F, and network device G, wherein the leaf node of network device A includes network device B and network device C, the leaf node of network device B includes network device D and network device E, and the leaf node of network device C includes network device F and network device G. The MSR6 SID A of network device A can include Locator A, FunctionEnd.RL, replication number = 1, and pointer = 2, the MSR6 SID B of network device B can include Locator B, FunctionEnd.RL, replication number = 1, and pointer = 4, the MSR6 SID C of network device C can include Locator C, FunctionEnd.RL, replication number = 1, and pointer = 6, the MSR6 SID D of network device D can include Locator D, FunctionEnd.RL, replication number = 0, and pointer = 0, the MSR6 SID E of network device E can include Locator E, FunctionEnd.RL, replication number = 0, and pointer = 0, the MSR6 SID F of network device F can include Locator F, FunctionEnd.RL, replication number = 0, and pointer = 0, and the MSR6 SID G of network device G can include Locator G, FunctionEnd.RL, replication number = 0, and pointer = 0.In the above, the length of each MSR6 SID is 128 bits; Function End.RL is used to indicate that the network device corresponding to the MSR6 SID needs to perform the function of replicating the packet; replication number = 1 is used to indicate that the network device corresponding to the MSR6 SID replicates one copy of the received packet, that is, the network device obtains two identical packets, replication number = 0 is used to indicate that the network device corresponding to the MSR6 SID does not need to replicate the received packet; pointer = 2 is used to indicate that the MSR6 SID of the leaf node of the network device A in the segment list starts from the 2nd MSR6 SID, pointer = 4 is used to indicate that the MSR6 SID of the leaf node of the network device B in the segment list starts from the 4th MSR6 SID, pointer = 6 is used to indicate that the MSR6 SID of the leaf node of the network device C in the segment list starts from the 6th MSR6 SID, and pointer = 0 is used to indicate that the network device corresponding to the MSR6 SID has no leaf node.

[0055] Taking the MSR6 TE as an example, the network device A needs to send a multicast packet to the network device D, the network device E, the network device F and the network device G. The A node generates a packet 1, and the packet 1 includes an IPv6 header and an MRH. The IPv6 header can include a version (Version) field, a traffic type (Traffic Type) field, a flow label (Flow Label) field, a payload length (PayloadLength) field, a next packet header (NextHeader) field, a hop limit (Hop Limit) field, a source address (Source Address, SA) field and a destination address (Destination Address, DA) field. The meanings of the fields in the IPv6 header can refer to the explanation in Request for Comments (RFC) 8200. The MRH can include a next packet header (NextHeader) field, a header extension length (Hdr Ext Len) field, a routing type (Routing Type) field, a segment left (segment left) field, an MRH type (MRH Type) field, a reserved (Reserved) field and a segment list. The meanings of the fields in the MRH can refer to the explanation in the draft “draft-geng-msr6-traffic-engineering-00”.

[0056] In some implementations, asFigure 3a As shown, the DA field of the packet 1 is MSR6 SID A (i.e. the first MSR6 SID in the segment list, which can also be denoted as segment list[0]), the segment left field = 0, and the segment list sequentially includes segment list[6], segment list[5], segment list[4], segment list[3], segment list[2], segment list[1] and segment list[0], which can also be denoted as MSR6 SID G, MSR6 SID F, MSR6 SID E, MSR6 SID D, MSR6 SID C, MSR6 SID B and MSR6 SID A.

[0057] The process of multicasting message 1 may include: S11, network device A copies message 1 according to replication number = 1 in MSR6SIDA in the DA field (i.e., MSR6 SIDA), obtains message 1 and message 2, and message 2 is the same as message 1; S12, network device A obtains the second MSR6SID - MSR6 SID B from the segment list according to pointer = 2 in the DA field (i.e., MSR6 SIDA), modifies the value of the segment left field of message 1 so that the segment left field points to MSR6SID B (for example, the value of the segment left field is modified to 1), and modifies the value of the DA field of message 1 to MSR6 SIDB, to obtain message 1'; then, obtains the next MSR6 SID - MSR6 SIDC of MSR6 SID B from the segment list, modifies the value of the segment left field of message 2 so that the segment left field points to MSR6 SID C, and modifies the value of the DA field of message 2 to MSR6 SID C obtains message 2'; S13, network device A sends message 1' to network device B, and network device A sends message 2' to network device C; S14, network device B copies message 1' according to replication number = 1 in the DA field (i.e., MSR6 SID B), and obtains message 1' and message 1", which are the same as message 1'; S15, network device B obtains the fourth MSR6 SID - MSR6SID D from the segment list according to pointer = 4 in MSR6 SID B, modifies the value of the segment left field of message 1' so that the segment left field points to MSR6 SID D, and modifies the value of the DA field of message 1' to MSR6SID D, and obtains message 3; then, it obtains the next MSR6 SID - MSR6 SID E from the segment list, modifies the value of the segment left field of message 1" so that the segment left field points to MSR6 SID C, and modifies the value of the DA field of message 1' to MSR6 SID E, obtaining message 4; S16, network device B sends message 3 to network device D, and network device B sends message 4 to network device E. Similarly, in S17, network device C replicates message 2' based on the replication number = 1 in the DA field (i.e., MSR6 SID C), obtaining messages 2' and 2'. Message 2' and message 2' are identical.S18, the network device C obtains the sixth MSR6 SID, MSR6 SID F, from the segment list according to the pointer=6 in the MSR6 SID C in the packet 2', modifies the value of the segment left field of the packet 2' so that the segment left field points to the MSR6 SID F, and modifies the value of the DA field of the packet 2' to the MSR6 SID F, to obtain a packet 5; then, obtains the next MSR6 SID of the MSR6 SID F, MSR6 SID G, from the segment list, modifies the value of the segment left field of the packet 2' so that the segment left field points to the MSR6 SID G, and modifies the value of the DA field of the packet 2' to the MSR6 SID G, to obtain a packet 6; S19, the network device C sends the packet 5 to the network device F, and the network device C sends the packet 6 to the network device G. It should be noted that S14-S16 and S17-S19 can be executed simultaneously, or S14-S16 can be executed first and then S17-S19 can be executed, or S17-S19 can be executed first and then S14-S16 can be executed.

[0058] It can be seen that the packet of the MSR6 carries the MSR6 SID of all network devices in the multicast tree, and if the multicast tree is large, the packet header of the packet of the MSR6 is too long, which affects the processing efficiency of the packet of the MSR6, and is not conducive to the implementation and promotion of the MSR6 technology.

[0059] In some other implementations, considering that the Locator part of the MSR6 SID A, the MSR6 SID B, the MSR6 SID C, the MSR6 SID D, the MSR6 SID E, the MSR6 SID F and the MSR6 SID G has the same part, in order to shorten the packet header length of the packet 1 of the MSR6, the same part of the Locator of each MSR6 SID can be extracted and only appears once in the packet 1, specifically, the extracted part can be recorded as a common prefix, and appears in the DA field of the IPv6 header of the packet 1; the part of the MSR6 SID other than the Common Prefix is recorded as M-SID, for example, the MSR6 SID A can be recorded as Common Prefix+M-SID A. Wherein, the length of the M-SID can be 32 bits, so that in the segment list of the MRH of the packet 1, the plurality of 128-bit MSR6 SIDs can be shortened to the same number of 32-bit M-SIDs.

[0060] As an example, as Figure 4As shown, the M-SID may include: a node identification (node ​​id) field, a Function field, and an Arguments field, wherein the node id may be assigned by the local area network and used to uniquely identify the network device corresponding to the M-SID (or MSR6SID), and the Arguments field may include a replication number and a pointer. For example, M-SIDA may include: node idA, Function End.RL, replication number=1, and pointer=2.

[0061] like Figure 3b As shown in the figure, in message 1, the DA field includes the Common Prefix and M-SID A, the segment left field = 0, and the segment list includes: segment list[6]', segment list[5]', segment list[4]', segment list[3]', segment list[2]', segment list[1]', and segment list[0]' in sequence. The segment list can also be expressed as M-SID G, M-SID F, M-SID E, M-SID D, M-SID C, M-SID B, and M-SIDA.

[0062] The process of the multicast message 1 can include: S21, the network device A obtains the message 1 and the message 2 according to the replication number = 1 in the M-SID of the DA field, and the message 2 is the same as the message 1; S22, the network device A obtains the second M-SID, M-SID B, from the segment list according to the pointer = 2 in the M-SID A of the DA field, modifies the value of the segment left field of the message 1 so that the segment left field points to the M-SID B, and modifies the M-SID A of the DA field of the message 1 to the M-SID B to obtain the message 1'; then, obtains the next M-SID, M-SID C, of the M-SID B from the segment list, modifies the value of the segment left field of the message 2 so that the segment left field points to the M-SID C, and modifies the M-SID A of the DA field of the message 2 to the M-SID C to obtain the message 2'; S23, the network device A sends the message 1' to the network device B, and the network device A sends the message 2' to the network device C; S24, the network device B obtains the message 1' and the message 1'' according to the replication number = 1 in the M-SID B of the DA field, and the message 1'' is the same as the message 1'; S25, the network device B obtains the fourth M-SID, M-SID D, from the segment list according to the pointer = 4 in the M-SID B, modifies the value of the segment left field of the message 1' so that the segment left field points to the M-SID D, and modifies the M-SID B of the DA field of the message 1' to the M-SID D to obtain the message 3; then, obtains the next M-SID, M-SID E, of the M-SID D from the segment list, modifies the value of the segment left field of the message 1'' so that the segment left field points to the M-SID E, and modifies the M-SID B of the DA field of the message 1'' to the M-SID E to obtain the message 4; S26, the network device B sends the message 3 to the network device D, and the network device B sends the message 4 to the network device E; similarly, S27, the network device C obtains the message 2' and the message 2'' according to the replication number = 1 in the M-SID C of the DA field, and the message 2'' is the same as the message 2';S28, the network device C obtains the sixth M-SID, M-SID F, from the segment list according to the pointer=6 in the M-SID C, modifies the value of the segment left field of the packet 2' so that the segment left field points to the M-SID F, and modifies the M-SID C in the DA field of the packet 2' to the M-SID F, obtaining a packet 5; then, obtains the next M-SID, M-SID G, of the M-SID F from the segment list, modifies the value of the segment left field of the packet 2' so that the segment left field points to the M-SID G, and modifies the M-SID C in the DA field of the packet 2' to the M-SID G, obtaining a packet 6; S29, the network device C sends the packet 5 to the network device F, and the network device C sends the packet 6 to the network device G. It should be noted that S24-S26 and S27-S29 can be executed simultaneously, or S24-S26 can be executed first and then S27-S29 can be executed, or S27-S29 can be executed first and then S24-S26 can be executed.

[0063] It can be seen that the same Common Prefix in the Locator of the M-SID of all network devices in the multicast tree is extracted, and the Common Prefix is carried in only one place of the packet of the MSR6 (namely, in the DA field of the IPv6 header), and the M-SID of all network devices in the multicast tree is carried in the segment list of the MRH of the packet of the MSR6, and the M-SID is the remaining part of the MSR6 SID after the Common Prefix is removed, and compared with the 128-bit MSR6 SID, the M-SID is only 32 bits long, and for the same multicast tree, the length of the packet header of the packet of the MSR6 is effectively reduced.

[0064] However, referring to Figure 3b It can be seen that the replication number and the pointer in the M-SID of the leaf nodes (namely, the network device D, the network device E, the network device F, and the network device G) in the multicast tree are both 0, and have no substantial meaning, and especially for the multicast tree including many leaf nodes, the two fields invalid for the leaf nodes also occupy the space of the packet of the MSR6, in order to fully reflect the advantage of the multicast and further reduce the length of the packet header of the packet of the MSR6, the embodiment of the application provides a method for compressing the MSR6 SID of the leaf node of the multicast tree, and the replication number and the pointer in the leaf node of the multicast tree can be removed.

[0065] It should be noted that, in the embodiments of the present application, the leaf node of the multicast tree refers to a node without a leaf node itself, for example Figure 2 The leaf nodes of the multicast tree shown in FIG. 1 include network device D, network device E, network device F and network device G; the parent node of the multicast tree refers to a node without a parent node itself, for example Figure 2 The parent node of the multicast tree shown in FIG. 1 is network device A. The leaf node of a certain node refers to a leaf node directly connected to the node, for example Figure 2 The leaf nodes of network device A in the multicast tree shown in FIG. 1 include network device B and network device C, and the leaf nodes of network device B include network device D and network device E; the parent node of a certain node refers to a parent node directly connected to the node, for example Figure 2 The parent nodes of network device B and network device C in the multicast tree shown in FIG. 1 are network device A.

[0066] It should be noted that the network device and the node in the embodiments of the present application refer to the same meaning and can be understood and used alternately. The network device can refer to a switch, a router, a virtual routing device or a virtual forwarding device, and the like, which is a communication device with a message forwarding function.

[0067] In the embodiments of the present application, a new SID type suitable for the MSR6 message is defined, which can be referred to as a leaf node compression (LNC) type of SID. The SID of the LNC type is used to identify the SID of the leaf node of the current network device, and the SID of the leaf node of the current network device includes a compressed SID. The type of the SID can be indicated based on the value of Function in the SID, for example, the Function of the SID of the LNC type can be 0x10.

[0068] Before generating the message of the MSR6, the network devices in the multicast tree all publish SIDs capable of identifying themselves, wherein the parent node of the SID of the leaf node of the current network device including the compressed SID publishes the SID of the LNC type. In addition, the parent node of the multicast tree also needs to obtain the segment list corresponding to the multicast tree. In one case, the segment list corresponding to the multicast tree can be generated by the controller based on the SIDs published by the network devices and sent to the parent node of the multicast tree; in another case, the segment list corresponding to the multicast tree can also be generated by the parent node of the multicast tree based on the SIDs published by the network devices; in yet another case, the segment list corresponding to the multicast tree can also be manually configured to the parent node of the multicast tree.

[0069] Based on this, the packet processing method provided in the embodiments of the present application describes the processing procedure of the first packet of the MSR6 from the perspective of the first network device having a leaf node, the leaf node of the first network device includes the second network device, the SID published by the first network device is the LNC type of SID, and the LNC type of SID is used to indicate that the compressed SID of the second network device is included in the segment list of the multicast tree. In specific implementation, the first network device obtains the first packet of the MSR6, the first packet includes an IPv6 header and an MRH, the DA field in the IPv6 header includes a public prefix and a first M-SID, the MRH includes a segment list, the MSR6 SID of the first network device and the second network device both include the public prefix, the MSR6 SID of the first network device further includes the first M-SID, the MSR6 SID of the second network device further includes a second M-SID, the first M-SID indicates that the SID of the first network device is the leaf node compressed LNC type of SID, and it can also be understood that the first M-SID is used to indicate that the first C-SID compressed by the second M-SID is included in the segment list; then, the first network device can obtain the second M-SID from the MRH based on the first M-SID, the second M-SID includes the first C-SID; then, the first network device can generate a second packet based on the first packet and the second M-SID, the DA field in the IPv6 header of the second packet includes the public prefix and the second M-SID, and the segment left field in the MRH of the second packet points to the first C-SID. Thus, the first network device can send the second packet to the second network device. In the method provided in the embodiments of the present application, the SID of the leaf node in the segment list is compressed to the C-SID shorter than the M-SID, and when the network device determines that the own SID in the segment list is the LNC type of SID, the M-SID of the leaf node of the network device can be restored according to the compression rule corresponding to the LNC type of SID, the DA field in the IPv6 header and the segment left in the MRH are modified to obtain the packet sent to the leaf node. It can be seen that the embodiments of the present application effectively improve the compression efficiency of the SID of the leaf node on the basis of not affecting the processing and forwarding of the packet, and expand the application scenario of the MSR6.

[0070] As an example, the C-SID can be the SID after the replication number and the pointer of the M-SID are omitted, and can include the node id and the Function as shown in Figure 5a .

[0071] For example, still taking Figure 2The multicast tree shown is an example, such as Figure 5b As shown, in the message 1, the DA field includes the Common Prefix and the M-SID A, the segment left field = 0, and the segment list includes, in turn, the segment list[6]”, the segment list[5]”, the segment list[4]”, the segment list[3]”, the segment list[2]”, the segment list[1]” and the segment list[0]”. The segment list can also be expressed as C-SID G, C-SID F, C-SID E, C-SID D, M-SID C, M-SID B and M-SID A. Among them, the M-SID B and the M-SID C are SIDs of the LNC type.

[0072] The process of the multicast message 1 can include S31-S39, wherein S31-S34 refer to S21-S24 described above, S35, the network device B obtains the fourth SID, C-SID D, from the segment list according to the pointer=4 in the M-SID B, modifies the value of the segment left field of the message 1' so that the segment left field points to the C-SID D, and fills up the C-SID D with the replication number=0 and the pointer=0 to obtain the M-SID D, modifies the M-SID B in the DA field of the message 1' to the M-SID D to obtain the message 3, then obtains the next SID, C-SID E, of the M-SID D from the segment list, modifies the value of the segment left field of the message 1' so that the segment left field points to the C-SID E, and fills up the C-SID E with the replication number=0 and the pointer=0 to obtain the M-SID E, modifies the M-SID B in the DA field of the message 1' to the M-SID E to obtain the message 4, S36, the network device B sends the message 3 to the network device D, and the network device B sends the message 4 to the network device E, S37, similarly, the network device C obtains the message 2' and the message 2'' by duplicating the message 2' according to the replication number=1 in the M-SID C in the DA field, the message 2'' is the same as the message 2', S38, the network device C obtains the sixth SID, C-SID F, from the segment list according to the pointer=6 in the M-SID C, modifies the value of the segment left field of the message 2' so that the segment left field points to the C-SID F, and fills up the C-SID F with the replication number=0 and the pointer=0 to obtain the M-SID F, modifies the M-SID C in the DA field of the message 2' to the M-SID F to obtain the message 5, then obtains the next SID, C-SID G, of the M-SID F from the segment list, modifies the value of the segment left field of the message 2'' so that the segment left field points to the C-SID G, and fills up the C-SID G with the replication number=0 and the pointer=0 to obtain the M-SID G, modifies the M-SID C in the DA field of the message 2'' to the M-SID G to obtain the message 6, S39, the network device C sends the message 5 to the network device F, and the network device C sends the message 6 to the network device G.It should be noted that S34-S36 and S37-S39 can be executed simultaneously, or S34-S36 can be executed first and then S37-S39, or S37-S39 can be executed first and then S34-S36.

[0073] It can be seen that in the method shown in the example, the SID included in the segment list of the multicast message is compressed to less than 32 bits by omitting the replication number and the pointer in the SID of the leaf node of the multicast tree. In the scenario where the multicast tree is large and the number of leaf nodes of the multicast tree is large, the length of the message header of the multicast message can be effectively reduced, thereby improving the forwarding efficiency of the multicast message.

[0074] As another example, considering that the Functions in the M-SIDs of many network devices are the same, in order to further compress the M-SIDs, the Functions in multiple M-SIDs with the same Function can also be extracted to other fields in the MRH, and the C-SIDs included in the segment list can include a node id and a Function Index (FI) as shown in Figure 6a The FI is used to look up the Function in the MRH. In this way, the C-SIDs in the segment list not only omit the replication number and the pointer, but also do not need to embody the Function, and only need to carry the FI occupying a smaller size.

[0075] For example, still taking the multicast tree shown in Figure 2 as an example, as shown in Figure 6b In the message 1, the DA field includes a Common Prefix and an M-SID A, the MRH includes a Function segment left field = 0, and the segment list includes segment list[6]”’, segment list[5]”’, segment list[4]”’, segment list[3]”’, segment list[2]”’, segment list[1]”’, and segment list[0]”’ in turn. The segment list can also be represented as C-SID G, C-SID F, C-SID E, C-SID D, M-SID C, M-SID B, and M-SID A. Among them, M-SID B and M-SID C are SIDs of the LNC type.

[0076] The process of the multicast message 1 can include S41-S49, wherein S41-S44 refer to S21-S24 described above, S45, the network device B obtains the fourth SID, C-SID D, from the segment list according to the pointer=4 in the M-SID B, modifies the value of the segment left field of the message 1' so that the segment left field points to the C-SID D, and obtains the Function 1 from the MRH according to the FI 1 in the C-SID D, obtains the M-SID D according to the Function 1, the C-SID D, the replication number=0 and the pointer=0, modifies the M-SID B in the DA field of the message 1' to the M-SID D to obtain the message 3, then obtains the next SID, C-SID E, of the M-SID D from the segment list, modifies the value of the segment left field of the message 1' so that the segment left field points to the C-SID E, and obtains the Function 2 from the MRH according to the FI 2 in the C-SID E, obtains the M-SID E according to the Function 2, the C-SID E, the replication number=0 and the pointer=0, modifies the M-SID B in the DA field of the message 1' to the M-SID E to obtain the message 4; S46, the network device B sends the message 3 to the network device D, and the network device B sends the message 4 to the network device E; similarly, S47, the network device C obtains the message 2' and the message 2'' by copying the message 2' according to the M-SID C in the DA field and the replication number=1, the message 2'' is the same as the message 2'; S48, the network device C obtains the fifth SID, C-SID F, from the segment list according to the pointer=5 in the M-SID C, modifies the value of the segment left field of the message 2' so that the segment left field points to the C-SID F, and obtains the Function 3 from the MRH according to the FI 3 in the C-SID F, obtains the M-SID F according to the Function 3, the C-SID F, the replication number=0 and the pointer=0, modifies the M-SID C in the DA field of the message 2' to the M-SID F to obtain the message 5;Then, the next SID of M-SID F, C-SID G, is obtained from the segment list, the value of the segment left field of packet 2" is modified so that the segment left field points to C-SID G, and Function 4 is obtained from the MRH according to FI 4 in C-SID G, M-SID G is obtained according to Function 4, C-SID G, replication number = 0 and pointer = 0, the M-SID C of the DA field of packet 2" is modified to M-SID G to obtain packet 6; S49, network device C sends packet 5 to network device F, and network device C sends packet 6 to network device G. It should be noted that S44-S46 and S47-S49 can be executed simultaneously, or S44-S46 can be executed first and then S47-S49, or S47-S49 can be executed first and then S44-S46. Wherein, FI 1, FI 2, FI 3 and FI 4 can be all the same or partially the same, and Function 1, Function 2, Function 3 and Function 4 can be all the same or partially the same. The Function can be carried in any field of the MRH that can be expanded to carry the Function, for example, the Function can be carried in the Reserved field of the MRH. Figure 6b The example is illustrated with the same Function 1 and Function 2, and the same Function 3 and Function 4.

[0077] In this way, in the method illustrated in the example, the SID included in the segment list of the multicast packet omits the replication number and the pointer of the SID of the leaf node of the multicast tree, and extracts multiple same Functions from the segment list to appear only once in the MSH, so that the SID of the leaf node of the multicast tree is compressed to less than 32 bits, for example, the SID of the leaf node of the multicast tree can be only 16 bits long, in the scenario where the multicast tree is large and the number of leaf nodes of the multicast tree is large, the length of the packet header of the multicast packet can be effectively reduced, thereby improving the forwarding efficiency of the multicast packet.

[0078] The above is an introduction to the embodiments of the present application in the form of a scenario example. Next, the specific implementation manner of a packet processing method in the embodiments of the present application will be described in detail through an example in combination with the drawings.

[0079] Figure 7A flow chart of a message processing method 100 provided by the present application. In order to more clearly introduce the present application, the method 100 is described with the first network device as the execution subject. The first network device may refer to the parent node of the leaf node of the multicast tree that compresses the SID according to the embodiment of the present application. The MSR6 SID of the first network device in the segment list of the multicast message is an LNC type SID. Figure 2 Taking the multicast tree shown as an example, the first network device may be network device B or network device C.

[0080] In a specific implementation, the method 100 may include, for example, the following S101 to S103:

[0081] S101. A first network device obtains a first MSR6 message, where the first message includes an IPv6 header and an MRH. The DA field in the IPv6 header includes a common prefix and a first M-SID. The MRH includes a segment list. A first MSR6 SID of the first network device includes the common prefix and the first M-SID. The leaf node of the first network device includes a second network device. A second MSR6 SID of the second network device includes the common prefix and the second M-SID. The first M-SID is used to indicate that the segment list includes a first C-SID compressed by the second M-SID.

[0082] In some implementations, the first network device may be a parent node of a multicast tree. Then, S101 may, for example, include: S1011, the first network device obtains the segment list, which includes a first M-SID and a first C-SID; S1012, the first network device generates the first message based on the segment list.

[0083] For S1011, in one case, the first network device obtains the segment list, which may include: the first network device receives the segment list sent by the controller; in another case, the first network device obtains the segment list, which may include: the first network device obtains the segment list locally, wherein the local segment list of the first network device can be manually configured or automatically generated by the first network device based on the SID published by each network device.

[0084] In the implementation, before S101, the method 100 can further include: each network device of the multicast tree publishes a MSR6 SID, including that the first network device publishes a first MSR6 SID and the second network device publishes a second MSR6 SID, wherein the first network device publishes a MSR6 SID including a LNC type of SID, for example, the first MSR6 SID is a LNC type of SID, and the LNC type of SID of the first network device is used to indicate that the SID of the leaf node of the first network device includes a compressed SID. Then, the controller or the first network device or the artificial obtains a segment list according to the MSR6 SID of each network device, and the segment list can include: a first M-SID obtained by removing a Common Prefix from the first MSR6 SID, and a first C-SID obtained by compressing the second M-SID obtained by removing the Common Prefix from the second MSR6 SID.

[0085] It should be noted that if the SID of the leaf node of the first network device includes both a compressed SID and a non-compressed SID, then the SID of the leaf node of the first network device in the segment list of the first message is arranged in the order of the compressed SID first and then the non-compressed SID.

[0086] It should be noted that the compressed SID in the embodiments of the present application refers to a C-SID obtained by compressing a M-SID, and the non-compressed SID refers to a M-SID.

[0087] In some implementations, the first network device can also be a parent node of the leaf node of the multicast tree, and S101 can include, for example: the first network device receives the first message from the parent node thereof. In the implementation, the first message can be a message obtained by copying, modifying a DA field in an IPv6 header, and modifying a segment left in an MRH, after the first message is generated or received by the parent node of the first network device.

[0088] The first MSR6 SID can include: a Common Prefix and a first M-SID, wherein the first M-SID includes a replication number and a pointer, the value of the replication number is used to indicate the number of the first network device replicating the first message, and the value of the pointer is used to indicate the position of the SID of the leaf node of the first network device in the segment list.

[0089] The second MSR6 SID can include: the Common Prefix, a second node identifier node id, a first Function, a replication number = 0, and a pointer = 0, or can be expressed as: the second MSR6 SID includes the Common Prefix and a second M-SID. The second M-SID can include the second node id, the first Function, the replication number = 0, and the pointer = 0.

[0090] As an example, the first C-SID can include: the second node id and the first Function. In this way, the length of the SID in the segment list of the second network device is less than 32 bits. Taking an architecture as an example, in which a multicast tree includes a first network device, a second network device, and a third network device, and the second network device and the third network device are leaf nodes of the first network device, a third MSR6 SID of the third network device can include: the Common Prefix, a third node id, a second Function, a replication number = 0, and a pointer = 0, or can be expressed as: the third MSR6 SID includes the Common Prefix and a third M-SID, that is, the third M-SID can include the third node id, the second Function, the replication number = 0, and the pointer = 0. A compressed second C-SID of the third M-SID can include: the third node id and the second Function, where the second Function and the first Function can be the same or different. A first packet obtained by the first network device can be seen from Figure 8a As shown, the DA field of the IPv6 header includes the Common Prefix and the first M-SID, and the segment list in the MRH includes: the second C-SID, the first C-SID, and the first M-SID.

[0091] As another example, the first C-SID can include: the second node id and a first FI, the first FI is used to find the first Function in the MRH. Still taking the architecture that the multicast tree includes the first network device, the second network device and the third network device, and the second network device and the third network device are leaf nodes of the first network device as an example, wherein the third MSR6 SID of the third network device can include: the Common Prefix, the third node id, the second Function, replication number = 0 and pointer = 0, which can also be represented as: the third MSR6 SID includes the Common Prefix and the third M-SID, that is, the third M-SID can include the third node id, the second Function, replication number = 0 and pointer = 0. The second C-SID after compression of the third M-SID can include: the third node id and the second FI, the second FI is used to find the second Function in the MRH, wherein the second Function and the first Function can be the same or different, taking the second Function and the first Function as the same as an example, the first message obtained by the first network device can refer to Figure 8b As shown, the DA field of the IPv6 header includes the Common Prefix and the first M-SID, the MRH includes the first Function and the segment list, and the segment list includes: the second C-SID, the first C-SID and the first M-SID.

[0092] Taking the example of extracting the same Function, the C-SID can be 16 bits. In addition to including the node id and the FI, the C-SID can also include a compression flag bit f, the value of f is used to indicate whether the SID after the C-SID is compressed, for example, the last bit in the C-SID is f, when f = 0, it represents that the SID after the C-SID is an M-SID; on the contrary, when f = 1, it represents that the SID after the C-SID is a C-SID.

[0093] In some implementations, for the compression scheme including extracting the same Function, the length of the FI can limit the number of extracting different Functions, for example, the FI is 4 bits, then the first message can extract (2 4 = 16) different Functions at most, then the node id can occupy 10 bits, and f occupies 1 bit; for another example, the FI is 5 bits, then the first message can extract (2 5If there are 32 different Functions, then the node id can occupy 9 bits and f occupies 1 bit. If the multicast tree is large, the length of the node id is greater than the length reserved for the node id in the C-SID, the first 5 bits or the last 5 bits of the node id can also be extracted to other positions of the MRH.

[0094] Similarly, in order to further compress the length of the C-SID, if the node id in multiple C-SIDs has the same part, the part can also be extracted from multiple C-SIDs in the segment list and appear only once in a position of the MRH, for example, the first 5 bits of the node id can be extracted in the Reserved of the MRH, which can be denoted as Prefix-node id.

[0095] As an example, for the scenario that the M-SIDs of multiple leaf nodes of the multicast tree include multiple groups of the same Function, the FI needs to be longer, in order not to increase the length of the C-SID, the same part in multiple node ids can also be extracted from the C-SIDs in the segment list to other fields of the MRH, for example, the first 5 bits or the last 5 bits of the node id can be extracted in the Reserved of the MRH, so as to leave longer space for the FI.

[0096] As an example, the MRH can further include a field for indicating the number of extracted Functions, which can be denoted as Function Num, when Function Num = 3, it means that 3 different Functions are extracted from all the C-SIDs in the first message.

[0097] For example, the MRH of the first message obtained by the first network device can refer to Figure 9 As shown, it can include: 5-bit Prefix-node id, Function Num = 1, first Function, and segment list, the segment list includes: 16-bit second C-SID, 16-bit first C-SID, and 32-bit first M-SID. The first C-SID includes 10-bit second S-node id, 5-bit first FI, and 1-bit f. The second C-SID includes 10-bit third S-node id, 5-bit first FI, and 1-bit f. The node id of the second network device (i.e., second node id) can include the Prefix-node id and the second S-node id, and the node id of the third network device (i.e., third node id) can include the Prefix-node id and the third S-node id.

[0098] After the first network device obtains the first packet, the first network device can copy the first packet based on the value of the replication number in the first M-SID to obtain a plurality of same packets. For example, the replication number in the first M-SID is 1, and then the first network device can copy the first packet to obtain a third packet that is completely same as the first packet. The third packet can be a packet that needs to be processed and sent to the third network device. It should be noted that in the embodiments of the present application, the first packet and the third packet can be alternatively understood as two packets that are completely same.

[0099] S102, the first network device obtains the second M-SID from the MRH based on the first M-SID, and the second M-SID includes the first C-SID.

[0100] In some implementations, S102 can include: S1021, the first network device obtains the first C-SID based on the indication of segment left in the MRH; and S1022, the first network device obtains the second M-SID based on the first C-SID.

[0101] As an example, if the first C-SID includes the second node id and the first Function, S1022 can include: the first network device supplements replication number = 0 and pointer = 0 based on the first C-SID to obtain the second M-SID.

[0102] As another example, if the first C-SID includes the first FI and the second node id, and the first FI is used to find the first Function, the first network device can also be configured with a corresponding rule (which can also be understood as a rule for compressing the SID to synthesize the M-SID) for S1022 to execute, and S1022 can include: the first network device obtains the second node id and the first FI from the first C-SID; obtains the first Function from the MRH based on the first FI; combines the second node id and the first Function, and supplements replication number = 0 and pointer = 0 at the end to obtain the second M-SID.

[0103] S103, the first network device generates a second packet based on the first packet and the second M-SID, and a DA field in an IPv6 header of the second packet includes the public prefix and the second M-SID.

[0104] In some implementations, S103 may, for example, include that the first network device replaces the first M-SID in the DA field of the IPv6 header of the first packet with the second M-SID obtained by S102, and modifies the value of segment left in the MRH so that the segment left field points to the second C-SID, and the modified packet is recorded as a second packet.

[0105] As an example, after S103, the method 100 may, for example, further include that the first network device sends the second packet to the second network device.

[0106] For the scenario that the leaf node of the first network device further includes a third network device, the method 100 may, for example, further include:

[0107] S201, the first network device obtains the third M-SID from the MRH;

[0108] S202, the first network device generates a fourth packet based on the third packet and the third M-SID, the DA field in the IPv6 header of the fourth packet includes the public prefix and the third M-SID;

[0109] S203, the first network device sends the fourth packet to the third network device.

[0110] If the first C-SID further includes a flag bit f, the value of f is used to indicate that the next SID (i.e., the SID corresponding to the third network device) is a compressed SID, then S201 may, for example, include: S2011, the first network device obtains the second C-SID from the segment list based on the indication of segment left in the MRH; S2012, the first network device obtains the third M-SID based on the second C-SID, the third M-SID includes a second Function in the third MSR6 SID. If the second Function and the first Function are the same, they can be extracted to a position outside the segment list in the MRH, and the second C-SID and the first C-SID include the same first FI, which is used to query the same Function. It should be noted that the rule for synthesizing the third M-SID can be the same as the rule for synthesizing the second M-SID.

[0111] If the first C-SID further includes a flag bit f, the value of f is used to indicate that the next SID (i.e., the SID corresponding to the third network device) is a compressed SID, then S201 may, for example, include: S2011, the first network device obtains the second C-SID from the segment list based on the indication of segment left in the MRH; S2012, the first network device obtains the third M-SID based on the second C-SID, the third M-SID includes a second Function in the third MSR6 SID. If the second Function and the first Function are the same, they can be extracted to a position outside the segment list in the MRH, and the second C-SID and the first C-SID include the same first FI, which is used to query the same Function. It should be noted that the rule for synthesizing the third M-SID can be the same as the rule for synthesizing the second M-SID.

[0112] In some implementations, if both compressed SIDs and uncompressed SIDs exist in the SIDs of the leaf nodes of a certain network device in the segment list, the compressed SIDs are arranged first and then the uncompressed SIDs are arranged. For example, as shown in the multicast tree of FIG. 6, the SID of the leaf node D of the network device B and the SID of the leaf node D are compressed SIDs, and the SID of the leaf node H of the network device B is an uncompressed SID, the network device H further includes two leaf nodes I and J, and the segment list of the multicast tree is shown in FIG. 7, which includes M-SID A, M-SID B, M-SID C, C-SID D, C-SID E, M-SID H, C-SID I, C-SID J, C-SID F and C-SID G. It should be noted that, Figure 10a Figure 10b Figure 10b FIG. 7 is a schematic diagram of the segment list of the multicast tree of FIG. 6, which is only for illustrating the order, and in the segment list of the actual multicast packet, the SID of the node accessed earlier by the multicast packet is closer to the payload of the multicast packet, and the SID of the node accessed later is closer to the IPv6 header of the multicast packet, that is, the order of the segment list in the actual multicast packet is segment list[6]~segment list[0], segment list[0] is M-SID A, and segment list[6] includes C-SID F and C-SID G.

[0113] ​​It can be seen that, by the packet processing method provided in the embodiments of the present application, considering that there are some invalid and omitted fields in the SID of the leaf node of the multicast tree, the fields are compressed and the SID of the parent node of the leaf node corresponding to the compressed SID is defined as the LNC type of SID, so that after the SID of the leaf node is compressed to the C-SID shorter than the M-SID in the segment list, when the network device determines that the own SID in the segment list is the LNC type of SID, the M-SID of the leaf node of the network device can be restored according to the compression rule corresponding to the LNC type of SID, the DA field in the IPv6 header and the segment left in the MRH are modified to obtain the packet sent to the leaf node. In this way, on the basis of not affecting the processing and forwarding of the packet, the compression efficiency of the SID of the leaf node is effectively improved, and the application scenario of the MSR6 is expanded. The compressed fields can include the replication number and the pointer. In addition, if the functions of the plurality of leaf nodes are the same, the same function appearing multiple times in the SID of the leaf node in the segment list can be extracted to appear only once in the MRH, and a shorter FI is added in the SID of the leaf node, which is used to indicate the position of the extracted function in the MRH. The C-SID of the leaf node can further include a flag bit indicating whether the next SID is a compressed SID, to indicate the packet processing mode based on the next SID.

[0114] Correspondingly, the embodiments of the present application also provide a packet processing device 1100, as shown in Figure 11 The device 1100 is applied to a first network device and can include a first obtaining unit 1101, a second obtaining unit 1102 and a first generating unit 1103.

[0115] The first obtaining unit 1101 is configured to obtain a first packet of MSR6, the first packet including an IPv6 header and an MRH, a DA field in the IPv6 header including a public prefix and a first M-SID, the MRH including a segment list, a first MSR6 SID of the first network device including the public prefix and the first M-SID, a leaf node of the first network device including a second network device, a second MSR6 SID of the second network device including the public prefix and a second M-SID, and the first M-SID being used to indicate that the segment list includes a first C-SID compressed from the second M-SID. The first obtaining unit 1101 can perform S101 as shown in Figure 7

[0116] ​The second obtaining unit 1102 is configured to obtain, based on the first M-SID, a second M-SID from the MRH, the second M-SID including the first C-SID. The second obtaining unit 1102 can perform the operation shown in S102. Figure 7

[0117] The first generating unit 1103 is configured to generate, based on the first packet and the second M-SID, a second packet, a DA field in an IPv6 header of the second packet including a public prefix and the second M-SID. The first generating unit 1103 can perform the operation shown in S103. Figure 7

[0118] In some implementations, the apparatus 1100 further includes a first sending unit. The first sending unit is configured to send the second packet to the second network device.

[0119] In some implementations, the second obtaining unit 1102 includes a first obtaining sub-unit and a second obtaining sub-unit. The first obtaining sub-unit is configured to obtain, based on an indication of segment left in the MRH, the first C-SID; and the second obtaining sub-unit is configured to obtain, based on the first C-SID, the second M-SID.

[0120] As an example, the first C-SID includes a second node id of the second network device and a first Function in the second MSR6 SID.

[0121] As another example, the first C-SID includes a first FI and a second node id of the second network device, the first FI being used to find the first Function in the second MSR6 SID, and the second obtaining sub-unit is specifically configured to: obtain the second node id and the first FI from the first C-SID; obtain, based on the first FI, the first Function from the MRH; and combine the second node id and the first Function to obtain the second M-SID.

[0122] The first C-SID is 16 bits.

[0123] In some implementations, the apparatus 1100 further includes a third obtaining unit and a second generating unit. The third obtaining unit is configured to obtain a segment list, the segment list including the first M-SID and the first C-SID; and the second generating unit is configured to generate, based on the segment list, the first packet.

[0124] ​​The first M-SID includes a replication number and a pointer, a value of the replication number is used to indicate a number of times of copying the first message by the first network device, and a value of the pointer is used to indicate a position of a SID of a leaf node of the first network device in the segment list.

[0125] In some implementations, the apparatus 1100 further includes a copying unit. The copying unit is configured to copy the first message based on the value of the replication number to obtain a third message, and the third message is the same as the first message.

[0126] As an example, the leaf node of the first network device further includes a third network device, a third MSR6 SID of the third network device includes a common prefix and a third M-SID, and the apparatus 1100 further includes a fourth obtaining unit, a third generating unit, and a second sending unit. The fourth obtaining unit is configured to obtain the third M-SID from the MRH, and the third M-SID includes a second C-SID after compression of the third M-SID. The third generating unit is configured to generate a fourth message based on the third message and the third M-SID, and the DA field in the IPv6 header of the fourth message includes the common prefix and the third M-SID. The second sending unit is configured to send the fourth message to the third network device.

[0127] As an example, the first C-SID further includes a flag bit, a value of the flag bit is used to indicate that the next SID is a compressed SID, and the fourth obtaining unit includes a third obtaining subunit and a fourth obtaining subunit. The third obtaining subunit is configured to obtain the second C-SID from the segment list based on an indication of segment left in the MRH. The fourth obtaining subunit is configured to obtain the third M-SID based on the second C-SID, and the third M-SID includes a second function in the third MSR6 SID.

[0128] As another example, the first C-SID further includes a flag bit, a value of the flag bit is used to indicate that the next SID is a non-compressed SID, and the fourth obtaining unit is specifically configured to directly obtain the third M-SID from the segment list based on an indication of segment left in the MRH.

[0129] It should be noted that, in this example Figure 11 The message processing apparatus 1100 shown in the figure can be the first network device in the embodiment shown in the figure, and therefore, various specific implementation manners of the message processing apparatus 1100 in this example can be referred to the related description of the corresponding method, and details are not described herein. Figure 7 The message processing apparatus 1100 shown in the figure can be the first network device in the embodiment shown in the figure, and therefore, various specific implementation manners of the message processing apparatus 1100 in this example can be referred to the related description of the corresponding method, and details are not described herein. Figure 7 The message processing apparatus 1100 shown in the figure can be the first network device in the embodiment shown in the figure, and therefore, various specific implementation manners of the message processing apparatus 1100 in this example can be referred to the related description of the corresponding method, and details are not described herein.

[0130] Referring to Figure 12 The embodiment of the present application provides a communication device 1200. The communication device 1200 can be the first network device in any of the above-mentioned embodiments, for example, the first network device in the embodiment shown in FIG. 7. The communication device 1200 can realize the functions of various network devices in the above-mentioned embodiments. The communication device 1200 comprises at least one processor 1201, a bus system 1202, a memory 1203 and at least one communication interface 1204.

[0131] The communication device 1200 is a hardware structure device, which can be used to realize the functions of the packet processing device 1100 shown in the above-mentioned embodiments. For example, the first obtaining unit 1101, the second obtaining unit 1102 and the first generating unit 1103 in the packet processing device 1100 shown in the above-mentioned embodiments can be realized by the at least one processor 1201 calling the code in the memory 1203. Figure 11 Figure 11 The communication device 1200 is a hardware structure device, which can be used to realize the functions of the packet processing device 1100 shown in the above-mentioned embodiments. For example, the first obtaining unit 1101, the second obtaining unit 1102 and the first generating unit 1103 in the packet processing device 1100 shown in the above-mentioned embodiments can be realized by the at least one processor 1201 calling the code in the memory 1203.

[0132] Optionally, the communication device 1200 can also be used to realize the functions of the network device in any of the above-mentioned embodiments.

[0133] Optionally, the processor 1201 can be a general central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC) or one or more integrated circuits for controlling the execution of programs of the present application.

[0134] The bus system 1202 can comprise a path for transmitting information between the above-mentioned components.

[0135] The communication interface 1204 is used for communication with other devices or communication networks.

[0136] ​The memory 1203 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory can exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.

[0137] The memory 1203 is configured to store application program codes for implementing the solutions of the present application, and the processor 1201 is configured to control the execution of the application program codes. The processor 1201 is configured to execute the application program codes stored in the memory 1203, so as to realize the functions in the methods of the present application.

[0138] In a specific implementation, as an example, the processor 1201 can include one or more CPUs, such as the CPU0 and the CPU1 in FIG. 1. Figure 12

[0139] In a specific implementation, as an example, the communication device 1200 can include multiple processors, such as the processor 1201 and the processor 1207 in FIG. 1. Figure 12 Each of the processors can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (for example, computer program instructions).

[0140] Figure 13 FIG. 13 is a structural schematic diagram of another communication device 1300 provided by an embodiment of the present application. The communication device 1300 can be the first network device in any of the above embodiments, for example, can be the first network device in the embodiment shown in FIG. 1. Figure 7 The communication device 1300 can realize the functions of various network devices in the above embodiments.

[0141] The communication device 1300 includes a main board 1310 and an interface board 1330. ​

[0142] The master board 1310 is also called a main processing unit (MPU) or a route processor card. The master board 1310 controls and manages various components in the communication device 1300, including route calculation, device management, device maintenance, and protocol processing functions. The master board 1310 includes a central processor 1311 and a memory 1312.

[0143] The interface board 1330 is also called a line processing unit (LPU), a line card, or a service board. The interface board 1330 is used to provide various service interfaces and implement forwarding of data packets. The service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, and the like. The Ethernet interface is, for example, a Flexible Ethernet Client (FlexE Client). The interface board 1330 includes a central processor 1331, a network processor 1332, a forwarding table item memory 1334, and a physical interface card (PIC) 1333.

[0144] The central processor 1331 on the interface board 1330 is used to control and manage the interface board 1330 and communicate with the central processor 1311 on the master board 1310.

[0145] The network processor 1332 is used to implement forwarding processing of a message. The network processor 1332 can be in the form of a forwarding chip. Specifically, processing of an uplink message includes processing of a message entry interface, forwarding table lookup, and the like. Processing of a downlink message includes forwarding table lookup and the like.

[0146] The physical interface card 1333 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 1330 through the physical interface card 1333, and processed messages are sent out from the physical interface card 1333. The physical interface card 1333 includes at least one physical interface, also called a physical port. The physical interface card 1333 corresponds to a FlexE physical interface in the system architecture. The physical interface card 1333 is also called a daughter card and can be installed on the interface board 1330. The physical interface card 1333 is responsible for converting an optical-electric signal into a message and forwarding the message to the network processor 1332 for processing after performing a legality check. In some embodiments, the central processor 1331 of the interface board 1330 can also perform the function of the network processor 1332, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1332 is not needed in the physical interface card 1333.

[0147] Optionally, the communication device 1300 includes multiple interface boards, for example, the communication device 1300 further includes an interface board 1340, the interface board 1340 includes: a central processor 1341, a network processor 1342, a forwarding table item storage 1344, and a physical interface card 1343.

[0148] Optionally, the communication device 1300 further includes a switching fabric board 1320. The switching fabric board 1320 can also be referred to as a switch fabric unit (SFU). In the case that the network device has multiple interface boards 1330, the switching fabric board 1320 is used to complete data switching between the interface boards. For example, the interface board 1330 and the interface board 1340 can communicate through the switching fabric board 1320.

[0149] The main control board 1310 and the interface board 1330 are coupled. For example, the main control board 1310, the interface board 1330, and the interface board 1340, and the switching fabric board 1320 are connected through a system bus and a system backboard to realize intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 1310 and the interface board 1330, and the main control board 1310 and the interface board 1330 communicate through the IPC channel.

[0150] In logic, the communication device 1300 includes a control plane and a forwarding plane, the control plane includes the main control board 1310 and the central processor 1331, and the forwarding plane includes various components that perform forwarding, such as the forwarding table item storage 1334, the physical interface card 1333, and the network processor 1332. The control plane performs functions such as generating a forwarding table, processing signaling and protocol packets, configuring and maintaining a state of the device, and the like. The control plane distributes the generated forwarding table to the forwarding plane, and in the forwarding plane, the network processor 1332 performs table lookup and forwarding on a packet received by the physical interface card 1333 based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane can be stored in the forwarding table item storage 1334. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0151] If the communication device 1300 is configured as the first network device, the network processor 1332 can trigger the physical interface card 1333 to obtain a first packet of the MSR 6, the first packet comprising an IPv6 header and a Multicast Routing Header (MRH), a Destination Address (DA) field in the IPv6 header comprising a public prefix and a first M-SID, the first M-SID being used to indicate that the first C-SID after compression of the second M-SID is included in a segment list included in the MRH; the central processor 1311 can obtain the second M-SID from the MRH based on the first M-SID, wherein the second M-SID comprises the first C-SID; the central processor 1311 can further generate a second packet based on the first packet and the second M-SID, a DA field in the IPv6 header of the second packet comprising the public prefix and the second M-SID; and the physical interface card 1333 can further send the second packet to the second network device.

[0152] It should be understood that the first obtaining unit 1101 and the first sending unit in the packet processing apparatus 1100, and the communication interface 1204 in the communication device 1200 can be equivalent to the physical interface card 1333 or the physical interface card 1343 in the communication device 1300; the second obtaining unit 1102, the first generating unit 1103 in the packet processing apparatus 1100, and the processor 1201 in the communication device 1200 can be equivalent to the central processor 1311 or the central processor 1331 in the communication device 1300.

[0153] It should be understood that the operations on the interface board 1340 in the embodiments of the present application are consistent with the operations of the interface board 1330, and for the sake of brevity, will not be described again. It should be understood that the communication device 1300 in the embodiments of the present application can correspond to the packet processing apparatus or the network device in the above-mentioned various method embodiments, and the main control board 1310, the interface board 1330 and / or the interface board 1340 in the communication device 1300 can implement the functions and / or various steps implemented by the packet processing apparatus 1100 or the communication device 1200 in the above-mentioned various method embodiments, and for the sake of brevity, will not be described again.

[0154] It should be understood that the master board can have one or more, and when there are multiple, it can include a master master board and a backup master board. The interface board can have one or more, and the stronger the data processing capability of the network device, the more interface boards it provides. The physical interface card on the interface board can also have one or more. The switching network board can have none or one or more, and when there are multiple, they can collectively implement load sharing and redundancy. Under the centralized forwarding architecture, the network device can not need a switching network board, and the interface board undertakes the processing function of the entire system of the business data. Under the distributed forwarding architecture, the network device can have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, and a large-capacity data exchange and processing capability is provided. Therefore, the data access and processing capability of the network device of the distributed architecture is greater than that of the device of the centralized architecture. Alternatively, the form of the network device can also be only one board card, that is, the functions of the interface board and the master board are integrated on the one board card, at this time the central processor on the interface board and the central processor on the master board can be combined into one central processor on the one board card, and the functions of the two are superimposed, and the data exchange and processing capability of such a form device is low (for example, low-end switches or routers and other network devices). Which architecture to use depends on the specific network deployment scenario.

[0155] In some possible embodiments, each of the network devices or network devices described above can be implemented as a virtualized device. For example, the virtualized device can be a virtual machine (VM) running a program for sending a message function, and the virtual machine is deployed on a hardware device (for example, a physical server). The virtual machine refers to a complete computer system running in a completely isolated environment by software simulation with complete hardware system function. The virtual machine can be configured as each network device in the embodiments of the present application. For example, each network device or network device can be implemented based on a general-purpose physical server combined with network function virtualization (NFV) technology. Each network device or network device is a virtual host, a virtual router or a virtual switch. Those skilled in the art can virtualize each network device or network device with the above functions on a general-purpose physical server by reading the present application in combination with the NFV technology, which will not be described here.

[0156] It should be understood that the network devices of the above various product forms have any function of each network device or communication device in the method embodiments described above, which will not be described here.

[0157] The chip system provided by the embodiment of the present application comprises a processor and an interface circuit. The interface circuit is configured to receive instructions and transmit the instructions to the processor. The processor, for example, can be a specific implementation form of the packet processing apparatus in the embodiment of the present application, and can be configured to execute the packet processing method described above. The processor is coupled with a memory, and the memory is configured to store programs or instructions. When the programs or instructions are executed by the processor, the chip system implements the method in any method embodiment described above.

[0158] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is configured to read software codes stored in the memory.

[0159] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor or arranged separately from the processor, which is not limited in the present application. For example, the memory can be a non-transient processor, for example, a read-only memory (ROM), which can be integrated on the same chip as the processor or arranged on different chips respectively, and the type of the memory and the arrangement manner of the memory and the processor are not limited in the present application.

[0160] For example, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0161] In addition, the embodiment of the present application further provides a computer readable storage medium, which stores program codes or instructions. When the program codes or instructions are run on a computer, the computer executes the method in any implementation manner described in the above embodiment. Figure 7

[0162] ​In addition, the embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the above Figure 7 A method under any one of the implementation modes in the illustrated embodiments.

[0163] It should be understood that "based on determining B according to A" mentioned in the embodiments of the present application does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.

[0164] The "first" in the names of "first message" mentioned in this application is only used as a name identifier and does not mean the first in order. The same rule applies to "second" and so on.

[0165] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment or certain parts of the embodiments of the present application.

[0166] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system embodiments and device embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The device and system embodiments described above are merely schematic. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without making any creative effort.

[0167] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. It should be noted that those skilled in the art may make several improvements and modifications without departing from the scope of protection of the present application, and such improvements and modifications should also be considered as within the scope of protection of the present application.

Claims

1. A message processing method, characterized in that: Applied to a first network device, the method includes: Obtaining a first message of a multicast source route MSR6 based on Internet Protocol version 6, the first message including an Internet Protocol version 6 IPv6 header and a multicast routing header MRH, the destination address DA field in the IPv6 header including a common prefix and a first M-SID, the MRH including a segment list, a first MSR6 SID of the first network device including the common prefix and the first M-SID, the leaf node of the first network device including a second network device, a second MSR6 SID of the second network device including the common prefix and the second M-SID, and the first M-SID being used to indicate that the segment list includes a first C-SID compressed by the second M-SID; Obtaining, from the MRH based on the first M-SID, the second M-SID, where the second M-SID includes the first C-SID; generating a second message based on the first message and the second M-SID, wherein the DA field in the IPv6 header of the second message includes the common prefix and the second M-SID; The M-SID is the portion of the MSR6 SID excluding the common prefix. The common prefix is ​​the same portion in the locator of each MSR6 SID. The C-SID is the SID after omitting the replication number and pointer from the M-SID. The C-SID includes the node id and function.

2. The method according to claim 1, characterized in that The method further comprises: Send the second message to the second network device.

3. The method according to claim 1, characterized in that The obtaining the second M-SID from the MRH based on the first M-SID includes: Obtaining the first C-SID based on an indication of a segment left in the MRH; The second M-SID is obtained based on the first C-SID.

4. The method according to claim 3, characterized in that The first C-SID includes the second node identifier of the second network device and the first function Function in the second MSR6 SID.

5. The method according to claim 3, characterized in that The first C-SID includes a first function index FI and a second node identifier of the second network device, where the first function index FI is used to search for the first function Function in the second MSR6SID. The obtaining the second M-SID based on the first C-SID includes: Obtain the second node identifier node id and the first function index FI from the first C-SID; Obtaining the first function Function from the MRH based on the first function index FI; The second node identifier Node ID and the first function Function are combined to obtain the second M-SID.

6. The method according to any one of claims 1 to 5, characterized in that The first C-SID is 16 bits.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Obtain the segment list, where the segment list includes the first M-SID and the first C-SID; Generate the first message based on the segment list.

8. The method according to any one of claims 1 to 5, characterized in that The first M-SID includes a replication number and a pointer. The value of the replication number is used to indicate the number of times the first network device replicates the first message, and the value of the pointer is used to indicate the position of the SID of the leaf node of the first network device in the segment list.

9. The method according to claim 8, characterized in that The method further comprises: Based on the value of the replication number, the first message is replicated to obtain a third message, where the third message is identical to the first message.

10. The method according to claim 9, characterized in that The leaf node of the first network device further includes a third network device, the third MSR6 SID of the third network device includes the common prefix and a third M-SID, and the method further includes: Obtain the third M-SID from the MRH, where the third M-SID includes the second C-SID compressed by the third M-SID; generating a fourth message based on the third message and the third M-SID, wherein the DA field in the IPv6 header of the fourth message includes the common prefix and the third M-SID; Send the fourth message to the third network device.

11. The method according to claim 10, characterized in that The first C-SID further includes a flag bit, where a value of the flag bit is used to indicate that the next SID is a compressed SID. Obtaining the third M-SID from the MRH includes: Obtain a second C-SID from the segment list based on the indication of segment left in the MRH; The third M-SID is obtained based on the second C-SID, where the third M-SID includes the second Function in the third MSR6 SID.

12. The method according to claim 10, characterized in that The first C-SID further includes a flag bit, where a value of the flag bit is used to indicate that the next SID is a non-compressed SID. Obtaining the third M-SID from the MRH includes: Based on the indication of segment left in the MRH, the third M-SID is directly obtained from the segment list.

13. A message processing device, characterized in that: Applied to a first network device, the apparatus includes: a first obtaining unit, configured to obtain a first message of a multicast source route MSR6 based on Internet Protocol version 6, the first message including an Internet Protocol version 6 IPv6 header and a multicast routing header MRH, the destination address DA field in the IPv6 header including a common prefix and a first M-SID, the MRH including a segment list, a first MSR6 SID of the first network device including the common prefix and the first M-SID, the leaf node of the first network device including a second network device, a second MSR6 SID of the second network device including the common prefix and the second M-SID, and the first M-SID being used to indicate that the segment list includes a first C-SID compressed by the second M-SID; a second obtaining unit, configured to obtain, from the MRH based on the first M-SID, the second M-SID including the first C-SID; a first generating unit, configured to generate a second message based on the first message and the second M-SID, wherein the DA field in the IPv6 header of the second message includes the common prefix and the second M-SID; The M-SID is the portion of the MSR6 SID excluding the common prefix. The common prefix is ​​the same portion in the locator of each MSR6 SID. The C-SID is the SID after omitting the replication number and pointer from the M-SID. The C-SID includes the node id and function.

14. A communication device, characterized in that: The communication device comprises: a processor and a memory, wherein: The memory is used to store instructions or computer programs; The processor is configured to execute instructions or computer programs in the memory, so that the communication device performs the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method, device and system for forwarding message in SR network

    CN112583745A

  • Method, device and system for forwarding message

    CN113824638A