CN114697254A - Message processing method and related device - Google Patents

Message processing method and related device Download PDF

Info

Publication number
CN114697254A
CN114697254A CN202011644072.1A CN202011644072A CN114697254A CN 114697254 A CN114697254 A CN 114697254A CN 202011644072 A CN202011644072 A CN 202011644072A CN 114697254 A CN114697254 A CN 114697254A
Authority
CN
China
Prior art keywords
sid
value
identifier
format
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011644072.1A
Other languages
Chinese (zh)
Inventor
平善明
张永康
于树松
王其华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN202011644072.1A priority Critical patent/CN114697254A/en
Publication of CN114697254A publication Critical patent/CN114697254A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The embodiment of the application provides a message processing method and a related device. The method provided by the implementation of the application can analyze the format of the next SID of the current SID according to the preset identification in the message, and update the target address DA field of the message header according to the format of the next SID, so as to bypass the fault intermediate node, perform proxy forwarding and realize SRv6 TE FRR.

Description

Message processing method and related device
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a message processing method and a related device.
Background
In a Segment Routing Traffic Engineering Policy (SR-TE Policy) based on Internet Protocol Version 6 (IPv 6), an upstream node of an intermediate node (Midpoint) may replace the intermediate node to complete the processing of Forwarding a packet, and such an upstream node may be referred to as a Proxy Forwarding node.
Fig. 1 is a schematic diagram of a communication system in which an intermediate node fails. In the communication system, normally, a packet is sent from node a, sequentially passes through node B, node D, and node E, and reaches node F, as shown by the dashed arrow in fig. 1. However, in a certain accident or emergency, intermediate node D has failed. At this time, the upstream node B (proxy forwarding node) of the intermediate node D may sense the interface failure of the next hop (intermediate node D) of the packet, and then the node B modifies the parameters in the packet, so that the packet bypasses the failed node D, passes through the nodes C and E, and reaches the node F, as shown by the solid arrow in fig. 1. The scheme is called Segment Routing IPv6Traffic Engineering Fast route (SRv 6 TE FRR) based on Ipv 6.
When modifying the parameters in the message, the node B needs to update the Segment Identifier (SID) of the next hop of the node D in the message into the header. Currently, there are two types of SIDs, one is an uncompressed SID and the other is a compressed SID. When the message including multiple SIDs is mixed-coded by the uncompressed SID and the compressed SID, the node B cannot know whether the next-hop SID of the node D is specifically the uncompressed SID or the compressed SID from the message, so that the node B cannot update the next-hop SID of the node D into the header of the message, and cannot realize SRv6 TE FRR.
Disclosure of Invention
The embodiment of the application provides a message processing method and a related device, which can analyze the format of the next SID of the current SID according to a preset identifier in a message, update the target address DA field of a message header according to the format of the next SID, bypass the fault intermediate node, perform proxy forwarding and realize SRv6 TE FRR.
In a first aspect, an embodiment of the present application provides a method for message processing, including: acquiring a message; if the node corresponding to the current segment identification SID is a failed intermediate node, executing the following steps: analyzing the format of the next SID of the current SID according to the preset identification in the message, wherein the preset identification in the message comprises compressed information of all SIDs in the message, and the format of the next SID comprises a compressed format and a non-compressed format; updating the target address DA field of the message header according to the format of the next SID; and forwarding the message according to the updated DA field. The method provided by the implementation of the application can analyze the format of the next SID of the current SID according to the preset identification in the message, and update the target address DA field of the message header according to the format of the next SID, so as to bypass the fault intermediate node, perform proxy forwarding and realize SRv6 TE FRR.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, after obtaining the packet, the method further includes: and if the node corresponding to the current segment identification SID is not the failed intermediate node, forwarding the message according to a set rule. In this implementation, if no fault occurs, the message may be forwarded according to a normal flow.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, analyzing a format of a SID next to a current SID according to a preset identifier in a message includes: reading a continuous compression COC mark of the current SID from a DA field of a message header, wherein the format of the COC mark for the next SID is a compression format or a non-compression format; and determining the format of the next SID according to the COC mark of the current SID. In the implementation mode, the format of the next SID is determined by COC marking, which is simple and convenient.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, analyzing a format of a SID next to a current SID according to a preset identifier in a message includes: reading a first identification value from a source address SA field of the message header, wherein the first identification value is a first preset value and indicates that a DA field of the message header comprises a second identification, the first identification value is a second preset value and indicates that the DA field of the message header does not comprise the second identification, and the second identification is used for indicating the number of lines of the residual compressed SID; and if the first identification value is a second preset value, determining that the format of the next SID is a non-compressed format. In this implementation, it can be determined whether the DA field includes a second identifier indicating the number of lines of the remaining compressed SID by using the first identifier, and if there is no second identifier, the format of the next SID can be directly determined to be the uncompressed format.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, after reading the first identifier value from the source address SA field of the packet header, the method further includes: if the first identification value is a first preset value, reading the value of a second identification from a DA field of the message header; and if the value of the second identifier is greater than 0, determining that the format of the next SID is a compressed format. In this implementation manner, if the value of the second identifier is greater than 0, it indicates that there is at least one row of compressed SID remaining, and the format of the next SID can be directly determined to be a compressed format.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, after reading a value of the second identifier from a DA field of the header, the method further includes: if the value of the second identifier is equal to 0, reading the value of an SID index parameter from a DA field of the message header, wherein the SID index parameter is used for indicating the position of the compressed SID; if the value of the SID index parameter is 0, determining that the position of the next SID is in the next row, and the format of the next SID is the non-compressed format. In this implementation manner, when the value of the second identifier is equal to 0, it indicates that the SID in the same row of the current SID is the last row of compressed SID, and the SID in the next row is the uncompressed SID, and further determines whether the current SID is the last SID in the row by using the SID index parameter. When the value of the SID index parameter is 0, the current SID is the last SID of the row, and the next SID is in the next row, and the next SID is an uncompressed SID.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, after reading a value of an SID index parameter from a DA field of a header, the method further includes: if the value of the SID index parameter is greater than 0, judging whether the position of the SID index parameter minus one has SID; if the position of the SID index parameter minus one has SID, determining the SID of the position of the SID index parameter minus one as the next SID, and the format of the next SID is a compressed format; if the position of the SID index minus one has no SID, then the position of the next SID is determined to be in the next row, and the format of the next SID is uncompressed. In this implementation, if the value of the SID index parameter is greater than 0, which indicates that the current SID is not located at the last position of the line, it is further determined whether the next position of the current SID has a SID, if so, the SID is a compressed SID, and if not, the next SID is located at the next line, and the next SID is an uncompressed SID.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, updating a destination address DA field of a packet header according to a format of a next SID includes: reading a value of a third identifier from an SA field of the message header, wherein the third identifier is used for indicating a segment residual SL parameter value corresponding to the SID of the next compression header; and if the SL value corresponding to the next SID is the same as the third identifier, determining that the next SID is a compression header SID, updating the preset value of the second identifier in the compression header SID to the DA field of the message header, updating the preset value of the third identifier in the compression header SID to the SA field of the message header, and determining the value of the first identifier according to the updating condition of the second identifier in the DA field. In this implementation manner, since the compression header stores the information of the second identifier and the third identifier, when the next SID is the compression header SID, the SA field and the DA field in the packet header may be updated according to the information of the second identifier and the third identifier in the compression header SID, and the value of the first identifier is determined according to the update condition of the second identifier in the DA field. By updating the first identifier, the second identifier and the third identifier, the first identifier, the second identifier and the third identifier in the header of the message can be ensured to be up-to-date and accurate, and the format of the next SID can be ensured to be accurately judged.
With reference to the first aspect, in an implementation manner of this embodiment of the present application, updating the destination address DA field of the header according to the format of the next SID further includes: and updating the second identifier according to the value of the second identifier when the value of the SL corresponding to the next SID is different from the third identifier and the SL is decreased by one, including: if the second identifier does not take the value, the second identifier is not updated; if the value of the second identifier is 0, deleting the second identifier to ensure that the second identifier has no value; and if the second identifier is larger than 0, subtracting one from the second identifier. In this implementation, if the next SID is not a compression header and SL is decremented by one, then the second identity may be updated in the manner described above.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, analyzing a format of a SID next to a current SID according to a preset identifier in a message includes: acquiring a preset compression marker array in the message, wherein the compression marker array comprises at least one compression marker, the third preset value of the compression marker indicates that the corresponding SID is in a non-compression format, and the fourth preset value of the compression marker indicates that the corresponding SID is in a compression format; the format of the SID next to the current SID is determined from the compressed tag array. The format of each SID can be determined from the compressed tag array. In some cases, zhang, it may also be determined from the compression tag array whether the SID is a compression header.
In a second aspect, an embodiment of the present application provides an apparatus for message processing, including: the acquisition module is used for acquiring the message; a processing module, configured to, if a node corresponding to the current segment identifier SID is a failed intermediate node, execute the following steps: analyzing the format of the next SID of the current SID according to the preset identification in the message, wherein the preset identification in the message comprises compressed information of all SIDs in the message, and the format of the next SID comprises a compressed format and a non-compressed format; updating the target address DA field of the message header according to the format of the next SID; and the forwarding module is used for forwarding the message according to the updated DA field.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the forwarding module is configured to: and if the node corresponding to the current segment identification SID is not the failed intermediate node, forwarding the message according to a set rule.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: reading a continuous compression COC mark of the current SID from a DA field of a message header, wherein the format of the COC mark for the next SID is a compression format or a non-compression format; and determining the format of the next SID according to the COC mark of the current SID.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: reading a first identification value from a source address SA field of a message header, wherein the first identification value is that a first preset value indicates that a DA field of the message header comprises a second identification, the first identification value is that a second preset value indicates that the DA field of the message header does not comprise the second identification, and the second identification is used for indicating the row number of the residual compressed SID; and if the first identification value is a second preset value, determining that the format of the next SID is a non-compressed format.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: if the first identification value is a first preset value, reading the value of a second identification from a DA field of the message header; and if the value of the second identifier is greater than 0, determining that the format of the next SID is a compressed format.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: if the value of the second identifier is equal to 0, reading the value of an SID index parameter from a DA field of the message header, wherein the SID index parameter is used for indicating the position of the compressed SID; if the value of the SID index parameter is 0, determining that the position of the next SID is in the next row, and the format of the next SID is the non-compressed format.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: if the value of the SID index parameter is greater than 0, judging whether the position of the SID index parameter minus one has SID; if the position of the SID index parameter minus one has SID, determining the SID of the position of the SID index parameter minus one as the next SID, and the format of the next SID is a compressed format; if the position of the SID index minus one has no SID, then the position of the next SID is determined to be in the next row, and the format of the next SID is uncompressed.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: reading a value of a third identifier from an SA field of the message header, wherein the third identifier is used for indicating a segment residual SL parameter value corresponding to the SID of the next compression header; if the SL value corresponding to the next SID is the same as the third identifier, determining that the next SID is a compression header SID, updating the preset value of the second identifier in the compression header SID to the DA field of the message header, updating the preset value of the third identifier in the compression header SID to the SA field of the message header, and determining the value of the first identifier according to the updating condition of the second identifier in the DA field.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: and updating the second identifier according to the value of the second identifier when the value of the SL corresponding to the next SID is different from the third identifier and the SL is decreased by one, including: if the second identifier does not take a value, the second identifier is not updated; if the value of the second identifier is 0, deleting the second identifier to ensure that the second identifier has no value; and if the second identifier is larger than 0, subtracting one from the second identifier.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is configured to: acquiring a preset compression marker array in the message, wherein the compression marker array comprises at least one compression marker, the third preset value of the compression marker indicates that the corresponding SID is in a non-compression format, and the fourth preset value of the compression marker indicates that the corresponding SID is in a compression format; the format of the SID next to the current SID is determined from the compressed tag array.
In a third aspect, an embodiment of the present application provides a device for packet processing, including: a network interface, a processor, and a memory; the network interface is used for receiving the message; the memory is used for storing program instructions; the processor is adapted to execute the program instructions to implement the method of the first aspect.
Drawings
FIG. 1 is a schematic diagram of a communication system with a failure of an intermediate node;
fig. 2 is an exemplary diagram of a message format in the embodiment of the present application;
FIG. 3a is one of the schematic diagrams of a segment list field;
FIG. 3b is a second schematic diagram of a segment list field;
FIG. 4 is a diagram of a SID field;
FIG. 5 is an exemplary diagram of a message hybrid coded by uncompressed SID and compressed SID;
fig. 6 is a schematic diagram illustrating a packet transmission situation using a hybrid SID in the prior art;
fig. 7 is an exemplary diagram of a method for message processing according to an embodiment of the present application;
FIG. 8 is a flowchart of an implementation of step 703 in the embodiment of the present application;
FIG. 9a is a schematic diagram of an architecture of an application example I of the present application;
FIG. 9b is a schematic diagram of an SRH extension header of a message in the application example of the present application;
FIG. 10a is a schematic diagram of an architecture of a second application example of the present application;
FIG. 10b is a schematic diagram of an SRH extension header of a message of application example two in the present application;
fig. 11a is a schematic diagram of an SRH expansion header in application example three of the present application;
FIG. 11b is a schematic diagram of an application flow provided in the application example of the present application;
fig. 12 is a schematic diagram of a message processing apparatus according to an embodiment of the present application;
fig. 13 is a schematic diagram of a message processing device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a message processing method and a related device, which can analyze the format of the next SID of the current SID according to a preset identifier in a message, update the target address DA field of a message header according to the format of the next SID, bypass the fault intermediate node, perform proxy forwarding and realize SRv6 TE FRR.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
For clarity and conciseness of the following descriptions of the various embodiments, a brief introduction to the related art is first given:
fig. 1 is a schematic diagram of a communication system in which an intermediate node fails. When the intermediate node D fails, the forwarding process of the message is as follows:
1. the node a forwards the packet to the destination node F, and specifies that the packet passes through the intermediate node D in an SR extension Header (SRH) of the packet. The following briefly introduces the format of the message in the embodiment of the present application:
fig. 2 is an exemplary diagram of a message format in the embodiment of the present application. The format of the packet may include, but is not limited to, three parts, the first part being an IPv6 header 201, which includes a version field for indicating the corresponding IPv6 protocol version of the packet. A Next Header field for indicating the type of the Next Header. Illustratively, the value of the next-level header field is 43, which indicates that the next-level header of the IPv6 header 201 is SRH. A source address field for indicating the source address of the message. A Destination Address field (Destination Address) for indicating a Destination Address of the packet. The second part is SRH202, which includes a Segment Left (SL) field, which corresponds to an index for instructing the device to read the information of the next intermediate node (destination node when SL is 0) that the current packet should access. A Segment List (Segment List) field, which is used for carrying information of an intermediate node or information of a destination node through which the message needs to pass. It will be appreciated that Segment List [0] is generally the destination node's information. It will be appreciated that a node may first read the value of SL and then read the corresponding Segment List according to the value of SL. Illustratively, if the node reads SL with a value of 1, the node will read Segment List [1 ]. The SL and Segment List in the message are matched, so that the next intermediate node which the current message needs to reach is updated through the change of the SL in the message forwarding process. The third part is the message payload (IPv6 payload)203 of IPv6, which is used for carrying the data of the message.
In practical applications, the message actually further includes some existing fields, and for brief description, this is omitted in this embodiment of the present application and is not described again. The message may further include other fields to implement other functions, which is not limited in this embodiment.
Fig. 3a is one of the schematic diagrams of a segment list field. The Segment List is generally 128 bits, and the embodiment of the present application is described by taking 128 bits as an example. When the SID is in uncompressed format, the field of the SID is also 128 bits, and the row Segment List is a SID. FIG. 3b is a second diagram of the segment list field. When the SID is in a compressed format, the field of the SID only needs 32 bits, and the row Segment List may include 4 SIDs. It is understood that, when the number of compressed SIDs is not up to 4 in practical cases (for example, only 3 SIDs are included in a row of Segment List), the corresponding position may be left blank, and specifically, the left blank may be indicated by a way that the values of the corresponding position are all set to zero. That is, the Segment List (Segment List) includes one uncompressed Segment identifier (Segment ID, SID) or includes a plurality of compressed SIDs. When a plurality of compressed SIDs are included in the segment list, the location of the SID may be determined by a SID Index (SI) parameter and SL. Illustratively, if SI is 0, the last SID of the segment list is represented, and SL is 5, SI is 0, the last SID of the segment list corresponding to SL is 5 is represented.
Fig. 4 is a diagram illustrating the SID field. In general, the uncompressed SID field may include 3 parts, a location identification (Locator) field, a Function (Function) field, and a variables (Args) field. The Locator field includes a common prefix part (common prefix) and a device identification part (nodeid), the Function field is used to indicate the functions supported by the node, and the Args field can be used to implement a custom role or to carry some parameters.
A compressed SID will typically omit the common prefix portion and the parameter portion, such that the length of the SID is reduced to 32 bits, as compared to an uncompressed SID. In practical applications, the compressed format may adopt a general Segment Identifier (G-SID), and may also adopt other compressed formats, which is not limited in this embodiment of the present application.
In fig. 1, when node a sends a message (message state one), the destination address of IPv6 part in the message is 4:, which indicates that the next intermediate node in the message is node D. The device identification of the first SID of the SRH portion is 6:, indicating that the destination node of the message is node F, and the device identification of the second SID is 4:, indicating that the message is designated to pass through intermediate node D.
2. When the message reaches the node B, the node D fails, the upstream node B senses the next hop interface failure of the message, the next hop is just the current destination address 4 of the message, and the SL is more than 0 at the moment, so the node B executes the proxy forwarding action. Specifically, the node B subtracts SL by 1 and copies the lower layer SID 6:tothe destination address field of the outer IPv6 header (i.e. the SID of the next hop of the intermediate node is copied, it needs to know first whether the SID type of the next hop of the intermediate node is compressed or uncompressed, and the default is uncompressed SID in the example of FIG. 1). At this time, since SL is 0, the node B may remove the SRH extension header and then forward the packet by looking up the table according to the destination address 6:. At this time, the packet is processed by the node B to be in state two.
3. And after the node B processes the message into the second state, the node B establishes a path from the message to the node F according to the message condition of the second state. Since the Cost between the paths B-D-E-F is 30 (the Cost between each node is 10 except for the special label) and the Cost between the paths B-C-E-F is 1020 in the path between the node B and the destination address 6:. Thus, for node B, the primary next hop for destination address 6:, is still node D. Because the main next hop of the destination address 6:isstill the node D, but the node B is not the penultimate hop of the destination address, and SL is 0, the node B does not conform to the proxy forwarding condition any more, but switches to the backup path for forwarding according to the normal TI-LFA forwarding flow, the replay Segment List of the backup path is <3::5>, the node B encapsulates the Segment List 3::5 in an h.insert' manner, adds 1 SRH extension packet header (SL is set to one), and the packet is sent out by the node B in state three and forwarded to the node F through the backup path.
4. According to the TI-LFA process, when the node A senses that the node D has a fault and the IGP finishes convergence, the node A deletes a route forwarding table entry of the node D, so that the node A cannot hit the route when looking up the table for forwarding according to 4:, at the moment, the node A is used as a proxy forwarding node to execute proxy forwarding action, SL is reduced by 1, the lower-layer SID 6:isupdated to an outer-layer IPv6 message header, and then looking up the table for forwarding to the node B according to the destination address 6:. If the node B finishes convergence, forwarding the message to a node F according to the shortest path after convergence; if the node B does not finish convergence, the node B forwards the information to the node F through a backup path according to a TI-LFA process. In this way, the failed node D is bypassed.
However, it is desirable to use a mixture of compressed and uncompressed SIDs in a communication system to reduce the message overhead. Specifically, the practical deployment of SRv6 technology in networks currently faces two major challenges: firstly, SRv6 has large message overhead and low network link bandwidth utilization rate, and the bandwidth utilization rate is only about 60% under the condition that the 256byte packet is 8-layer SID long; secondly, SRv6 message processing has high requirements on chips, the existing network equipment is difficult to support deep SRH header copy and operation, and 128-bit SID processing can reduce the processing efficiency of the existing chips. Aiming at the problems of the standard SRv6 technology, compression optimization needs to be performed on the SRH of the standard SRv6, a simpler and shorter G-SID, such as a typical 32-bit SID identifier, is used to optimize the SID of SRv6, and the SID of the standard 128bit is represented by the G-SID of 32bit and replaces the encapsulation in the SRH header, so that the SRH encapsulation overhead of the standard SRv6 is optimized, and the performance of SRv6 is greatly optimized while the function of SRv6 is supported. Illustratively, the format of the compressed SID is NodeID + compressed func, where NodeID is the global unique identifier of a device and compressed func is the functional field of the compressed SID. As shown in fig. 5, fig. 5 is an exemplary diagram of a message using a mixture of an uncompressed SID and a compressed SID. For simplicity, FIG. 5 only shows the Segment List portion. The message comprises both the uncompressed SID and the compressed SID, so that the message overhead can be saved, and the chip processing efficiency can be improved.
When the proxy forwarding node processes the message mixed by the uncompressed SID and the compressed SID, if the current SID in the message fails, the proxy forwarding node cannot determine whether the next SID type of the current SID is compressed or uncompressed, cannot copy the next SID of the current SID to the destination address field of the IPv6 message header, cannot bypass the failed node, and cannot realize SRv6 TE FRR.
Specifically, fig. 6 is a schematic diagram of a packet transmission situation in the prior art that uses a hybrid SID. In the process of transmitting the message carrying the non-compressed SID and the compressed SID from the node PE-A to the node PE-B, the message header received by the network equipment A is as follows: (S, SIDA) (VPNSID, SIDC, SIDB, SIDA, SIDX; SL ═ 3). When network device B fails, device a needs to skip SIDB and replace SIDC to DA to direct forwarding. Since the format of the SIDC is indicated by the flag of the SIDB, the network device a does not know the flag of the SIDB during forwarding, so that the network device a cannot copy the SIDC to the DA in the IPv6 header without knowing the format (compressed or uncompressed) of the SIDC.
The existing scheme is TE FRR downgrade, i.e. directly set SL to 0, replace last VPN SID in SRH to DA to obtain packet (S, VPNSID) (VPNSID, SIDC, SIDB, SIDA, SIDX; SL ═ 0) or (S, VPNSID), and then forward it. However, TE FRR degradation is unacceptable in some cases because after degradation to SRv6-BE, traffic is forwarded exactly according to IGP shortest paths, completely losing the capacity of traffic engineering, which for some networks may cause traffic to go onto paths that it should not go, such as low bandwidth links, resulting in traffic loss.
In view of the above problems, embodiments of the present application provide a method for message processing, which can carry information required by a node to analyze an SRH in the SRH, so that the node can analyze the entire SRH, and therefore the node can bypass a failed node without degrading a TE FRR, thereby implementing SRv6 TE FRR.
Fig. 7 is an exemplary diagram of a method for processing a message according to an embodiment of the present application. The method may be performed by a node (network device) that receives a packet, and the process includes:
701. acquiring a message;
in this embodiment, the node may receive a packet from a previous-hop node. The message generally includes IPv6 header, SRH and IPv6 payload portions, similar to the message format described above with reference to fig. 2, but some parameter fields may be added in some embodiments, and refer to the following steps.
In this embodiment of the present application, if the node receiving the packet is an intermediate node, after receiving the packet, the intermediate node may copy the next SID to the DA to implement the forwarding function of the intermediate node, and then determine whether to perform proxy forwarding in the subsequent steps according to whether the packet and the next intermediate node are faulty. If the node receiving the message is not an intermediate node, the node may forward the message according to the SID in the DA.
In the embodiment of the present application, the intermediate node generally refers to a node corresponding to the SID, and is configured to subtract one from the SL in the message, and copy the corresponding SID to a DA field in an IPv6 header, thereby implementing a forwarding function of the message.
702. Judging whether the node corresponding to the current SID is a failed intermediate node, if so, executing step 703, otherwise, executing step 70X;
in this embodiment of the present application, the current SID may be read from the DA field in the IPv6 header in the message received by the node.
If the node corresponding to the current SID is the failed intermediate node, it indicates that the packet cannot be forwarded normally after reaching the failed intermediate node, and the failed intermediate node should be bypassed. Therefore, in the embodiment of the present application, the failed intermediate node is bypassed through step 703 and subsequent steps, and proxy forwarding is performed, so that SRv6 TE FRR is implemented.
If the node corresponding to the current SID is not a failed intermediate node, for example, a normally operating intermediate node, the node receiving the packet may forward the packet to the normally operating intermediate node according to a conventional scheme.
It will be appreciated that in general, the last hop network device of a failed intermediate node may determine whether the intermediate node failed. For example, the previous-hop network device may determine whether the intermediate node fails by sending a detection packet or the like. In some cases, other related network devices may also determine whether the intermediate node fails in a certain manner, which is not limited in this embodiment of the present application.
703. Analyzing the format of the SID next to the current SID according to the identifier in the message;
in this embodiment of the present application, when the SID in the packet includes both an uncompressed SID and a compressed SID, to implement proxy forwarding, first, a format of a SID next to a current SID is determined. Specifically, in the embodiment of the present application, when a packet is produced, the compressed information of all the SIDs is stored in the packet in a preset identifier form, so that a subsequent node can analyze the format of the next SID of the current SID according to the identifier in the packet after receiving the packet. Wherein, predetermined sign can be set for according to actual conditions, and this application embodiment provides three kinds of predetermined signs as follows:
first, the format of the SID next to the current SID is determined by a continuous of compression (COC) flag.
In this implementation, when the header node generates a packet in which an uncompressed SID and a compressed SID are mixed, the header node may design a COC flag in a Function field (Function) of each SID to indicate whether the next SID is an uncompressed SID or a compressed SID.
Therefore, when the node receives the message, the COC flag of the current SID can be read from the DA field in the IPv6 header. According to the COC mark of the current SID, the node receiving the packet may determine the format of the SID next to the current SID.
It will be appreciated that for uncompressed SIDs, when a node copies the SID into the DA field, the parameter field (Arg field) is also copied up. For a compressed SID, the compressed SID generally includes a node id (nodeid) portion and a Function (Function, which may be a compression Function, compressed func) field portion. In this embodiment, the compressed SID may further include a parameter field, where the parameter field includes a COC flag. Therefore, when the node copies the SID into the DA field, the parameter field (Arg field, with COC flag) is also copied together. Therefore, for both uncompressed SID and compressed SID, the node can read COC mark of current SID from DA field in IPv6 header.
It can be understood that, in the embodiment of the present application, the COC flag is set in the parameter field for example, and in practical applications, the COC flag may also be set in the function field or other fields.
Second, the format of the Next SID of the current SID is determined by a number of remaining Compressed SID Lines Left (CSLL) field, a Next Compressed Header Index (NCHI) field, and a DA contained CSLL (DA contact CSLL) field.
The CSLL is used to indicate when the current continuous compressed SID is over. The CSLL has 3 cases, one is no value, which indicates that the current SID is not a compressed SID and the next row SID is not a compressed SID, the other is a value of 0, which indicates that the current row SID is the last row compressed SID and the next row SID is an uncompressed SID, and the other is a value greater than 0, which indicates that the subsequent n rows compressed SID, and n is a value of CSLL. It can be understood that the value of CSLL in the embodiment of the present application is greater than or equal to 0.
When the uncompressed SID and the compressed SID are mixed and coded in the message, the message has both the uncompressed SID and the compressed SID, and the previous uncompressed SID of the compressed SID is called a compressed header SID. The compression header SID is a kind of uncompressed SID, and generally has a size of 128 bits. Illustratively, the format of the compression header SID is: block + NodeID + compressed func + NCHI + CSLL + SI, where Block is a prefix common to the universe, NodeID is a universe unique identifier for a device, NodeID + compressed func constitutes the compressed SID, and SI is used to indicate the location of the current compressed SID in a row.
The preset value of CSLL is typically stored in the compression header SID. When the device corresponding to the compression header SID forwards the message, or when the device corresponding to the compression header SID fails and the message is forwarded by other device agents, the CSLL in the compression header SID is copied to the DA field in the IPv6 message header for reading. When the device corresponding to the other SID (i.e. not the compressed header SID) forwards the packet, if there is a CSLL in the DA field and the CSLL is not 0, the CSLL in the DA field is decremented by one, if there is a CSLL in the DA field and the CSLL is 0, the CSLL in the DA field is removed, and if there is no CSLL in the DA field, no special processing is performed.
DACCSLL is used to indicate whether there is a CSLL in the DA field. The node receiving the message may determine whether to read CSLL from the DA field based on the DACCSLL. Illustratively, a DACCSLL value of 1 indicates the presence of CSLL in the DA field, and a DACCSLL value of 0 indicates the absence of CSLL in the DA field. In practical applications, other values may also be used to indicate whether there is CSLL in the DA field, which is not limited in this embodiment of the present application.
After the node receiving the message processes the CSLL in the DA field, the value of DACCSLL may be determined according to the CSLL in the DA field. And finally, forwarding the message, so that a subsequent node can determine whether to read CSLL from the DA field according to the value of DACCSLL.
DACCSLL may be set in the SA field in the IPv6 header for reading. In practical application, the DACCSLL may also be set in other parts of the message, which is not limited in this embodiment of the present application.
The NCHI is used to indicate the location of the next compression head. Specifically, the value of the NCHI is the SL index corresponding to the next compression header. For example, when the NCHI value is 9, the SID corresponding to SL ═ 9 is the compressed header SID.
The preset value of NCHI is generally stored in the compression header SID. When the device corresponding to the compression header SID forwards the message, or when the device corresponding to the compression header SID fails and the message is forwarded by other device agents, NCHI in the compression header SID is copied to SA field in the header of IPv6 for reading.
In the embodiment of the present application, the first current values of CSLL, NCHI, and DACCSLL may all be specified by the head node. It is understood that the current values of CSLL, NCHI and DACCSLL refer to values read in SA or DA. The default values of CSLL and NCHI are generally stored in the compression header SID, and the default values can be read to update the current values when necessary. It can be understood that, since the header node determines the compression condition of all the SIDs when generating the packet, the header node may set a specific value of the preset value and an initial value of the current value when generating the packet.
When the head node arranges the SIDList table, the CSLL and NCHI of each compressed head SID are automatically calculated, the two identifications are carried in the corresponding compressed head SID, and the current DACCSLL value (the SA field arranged in the IPv6 message header) is determined. By the above identification, a node receiving a packet can know the position of a compression header and the number of rows of the compressed SIDs following the compression header, thereby determining where each segment of the compressed SID starts and ends, and determining the compression condition (i.e., both non-compressed and compressed) of all the SIDs of the packet, thereby determining the format of the SID next to the current SID. The node also determines whether to read the CSLL according to the DACCSLL value, and prevents the CSLL from being read by mistake.
Fig. 8 is a flowchart of an implementation step of step 703 in this embodiment of the present application. In this implementation, the node may execute the following procedure to parse the format of the SID next to the current SID according to the identifier in the message:
801. reading a DACCSLL value in the SA, if the value is 1, executing a step 803, and if the value is not 1, executing a step 802;
in the embodiment of the present application, the node first reads the DACCSLL value from the SA field in the IPV6 header, and if the DACCSLL value is 1, it indicates that the DA field contains the CSLL value, and the node can read the CSLL value to make a further determination. If not, it means that the DA field does not contain a CSLL value, indicating that the current SID is not a compressed SID and the next row SID is not a compressed SID, and the next SID is an uncompressed SID.
In the embodiment of the present application, a DACCSLL value is 1 to indicate that a DA field contains a CSLL value, and in practical applications, other values may be used to indicate the DA field, which is not limited in the embodiment of the present application.
802. The next SID is an uncompressed SID;
the node may determine that the next SID is an uncompressed SID, as described in step 801.
In step 802, the node may update values of some of the identifiers, and specifically, the node may determine whether the next SID is a compressed header SID by reading NCHI in the SA. Illustratively, the value of NCHI is the same as the value of SL minus one, which indicates that the next SID is the compressed header SID. When the next SID is a compressed header SID, the node may replace an NCHI update in the compressed header SID with an SA in the IPV6 header, and replace a CSLL update in the compressed header SID with a DA in the IPV6 header. And the node can also update the value of DACCSLL according to the condition whether the DA includes CSLL or not.
If the next SID is not the compressed header SID but a normal uncompressed SID, the value of CSLL is still not available, and the value of DACCSLL is still 0.
803. Reading a CSLL value in the DA, if the CSLL value is 0, executing a step 805, and if the CSLL value is not 0, executing a step 804;
in this embodiment, the node may read the CSLL value in the DA field in the IPV6 header, and if it is 0, it indicates that the SID of this row is the compressed SID of the last row, the SID of the next row is the uncompressed SID, and whether the SID of the next row is in the current row or in the next row needs to be further determined. It is understood that the SID of the current row in the embodiment of the present application is the SID of the row where the current SID is located, and the SID of the next row is SL minus one corresponding row of SIDs.
If the value of CSLL is not 0 (in the embodiment of the present application, the value of CSLL is greater than or equal to 0), which indicates that at least one row of compressed SID remains, the next SID is always a compressed SID, and step 804 may be performed.
804. The next SID is a compressed SID;
the node may determine that the next SID is a compressed SID, as described in step 803.
In the case of step 804, the node may update values of some of the identifiers, specifically, in the case of step 804, the CSLL value is greater than 0, and then the node may further determine whether the next SID is in the same row or the next row of the current SID. If the next SID is in the same row as the current SID, the node may decrement the SI value by one. If the next SID is in the next row of the current SID, the node may subtract the value of CSLL by one, subtract SL by one, and set the value of SI to 3 (in this embodiment, a row may include 4 compressed SIDs, so the value of SI is at most 3).
805. Reading the value of the SI in the DA, if the value is 0, executing the step 806, and if the value is not 0, executing the step 807;
it will be appreciated that the SI parameter is used to indicate the location of the SID in the row. For example, if the SI value is 0, the current SID is located at the last position of the row, and if the SI value is 1, the current SID is located at the penultimate position of the row, and so on.
In the embodiment of the present application, the node may determine whether the next SID is in the current row or the next row according to the value of the SI. Specifically, if the node reads that the SI value is 0, which indicates that the SID is at the last position of the current row, and the next SID is at the next row, it may be determined that the next SID is an uncompressed SID by combining the CSLL value read in step 803 as 0 (indicating that the next row SID is an uncompressed SID).
If the value of SI is not 0, it indicates that the SID is not located at the last position of the current row, and it needs to determine whether there is a SID at a position behind the SID in the current row.
806. The SID of SL minus one corresponding position is uncompressed SID.
As described in step 805, the node may determine that the next SID is an uncompressed SID and that the next SID is in the next row. Thus, the node may determine that the SID of the SL minus one corresponding location (i.e., the next row SID) is an uncompressed SID.
In step 806, the node may update values of some of the identifiers, specifically, in step 806, the next SID is an uncompressed SID in the next row, and the CSLL is 0, the node may read the value of the ncil and compare the value with the SL to determine whether the next SID is a compressed header SID, and if yes, the node may replace the update of the ncil in the compressed header SID with an SA in the IPV6 packet header and replace the update of the CSLL in the compressed header SID with a DA in the IPV6 packet header. And the node can also update the value of the DACCSLL according to the condition whether the DA comprises the CSLL or not.
If the next SID is not the compressed header SID, the node may delete the value of CSLL and set DACCSLL to zero.
807. And judging whether the SI minus one corresponding position has SID, if not, executing step 808, and if so, executing step 809.
In this embodiment, the node may check whether there is a SID in the SRH extension header at the location where SI is decremented by one. Illustratively, if the node detects that all positions of SI minus one are zeroed (in the embodiment of the present application, all positions corresponding to SIDs are zeroed to indicate that there is no SID in the position), it indicates that there is no SID in the position, and then the next SID is generally in the next row. In some embodiments, the node may check whether the SID exists in the SI minus one corresponding location, and then check whether the SID exists in the SI minus one corresponding location, until all locations following the SID in the row are checked for the absence of SIDs, and then determine that the next SID is in the next row. In combination with the CSLL value read in step 803 being 0 (indicating that the next row SID is an uncompressed SID), it may be determined that the next SID is an uncompressed SID.
If the node checks that there is a SID at the SI minus one position in the SRH extension header, the SID is the next SID and is the compressed SID. Illustratively, if the node checks that the SI minus one position is not all zeroed, it indicates that the position has a SID. And in combination with the CSLL read in 803 taking the value of 0 (indicating that the SID of the current line is the compressed SID of the last line), the node may determine that the next SID is the SID of the next position of the current line and is the compressed SID.
808. The SID of SL minus one corresponding position is the uncompressed SID.
As described in step 807, the node may determine that the next SID is an uncompressed SID and that the next SID is in the next row. Thus, the node may determine that the SID of the SL minus one corresponding location (i.e., the next row SID) is an uncompressed SID.
In step 808, the node may update values of some of the identifiers, specifically, in step 808, the next SID is an uncompressed SID in the next row, and the CSLL value is 0, the node may read the value of the NCHI and compare the value with the SL to determine whether the next SID is a compressed header SID, and if yes, the node may update the NCHI in the compressed header SID to the SA in the IPV6 packet header and update the CSLL in the compressed header SID to the DA in the IPV6 packet header. And the node can also update the value of DACCSLL according to the condition whether the DA includes CSLL or not.
If the next SID is not a compression header SID, the node may delete the value of CSLL and set DACCSLL to zero.
809. The SID of the SI minus one corresponding location is the compressed SID.
The node may determine that the next SID is a compressed SID, as described in step 807, and that the next SID is at the next position in the row. Thus, the node may determine that the SI minus the SID of the corresponding location (i.e., the SID of the next location in the row) is a compressed SID.
In step 809, the node may update values of some of the identifiers, specifically, in step 809, the next SID is at a next position in the same row as the current SID, and then the node may decrease the value of the SI by one.
And thirdly, determining the format of the SID next to the current SID through a TLV field in the SRH extension header.
In this implementation, when the head node generates a packet, a row of TLV fields may be added to the SRH extension header of the packet to determine the format of the SID next to the current SID. Specifically, the SRH extension header and trailer of the packet may add a TLV Compressed Flag Array (CFA) field, where the format of the TLV Compressed Flag Array (CFA) field is: type + length + value. The value is composed of a plurality of compressed identifiers, the compressed identifiers correspond to the compression conditions of the SID in the SRH expansion header one by one, and the number of the identifiers is generally the same as the number of rows of the SID in the SRH expansion header. The identifiers may represent compression conditions of the SID in the SRH expansion header row by row from top to bottom, and may also represent compression conditions of the SID in the SRH expansion header row by row from bottom to top, which is not limited in this embodiment of the present application. The two values of each identifier respectively indicate that the storage format of the row where the SID is located is compressed or uncompressed. Illustratively, if the identifier value is 0, it indicates that the SID of the corresponding line is uncompressed, and if the identifier value is 1, it indicates that the SID of the corresponding line is compressed.
Further, the node can know the compression condition of all SIDs in the SRH expansion header through CFA. In some cases, the node may determine whether the current SID includes an SI parameter according to other methods, determine a SL corresponding to the next SID according to the SI parameter and related conditions, and finally determine a storage format of the next SID according to a CFA corresponding to the SL. When determining whether the current SID includes the SI parameter without using other methods, the application example of the present application provides an application process that can determine the storage format of the next SID completely according to the CFA and the related situation. Specifically, reference may be made to the description related to fig. 11b, which is not described herein again.
It is understood that the TLV _ CFA field generally does not need to be modified when forwarding a packet, and thus has no impact on forwarding performance. It will be appreciated that when a node receives such a packet, it can determine the compression (i.e., both non-compression and compression) of all the SIDs of the packet from the TLV _ CFA field, and thus can determine the format of the SID next to the current SID.
704. Updating DA of the header of the IPv6 message according to the format of the next SID;
if the format of the next SID is a non-compressed format, the next SID is entirely replaced to the DA of the IPv6 message header;
if the format of the next SID is a compressed format, the next SID is replaced to the node ID + CompressFUNC of the DA of the IPv6 header. Illustratively, if the next SID is in a compressed format and specifically includes NodeID2+ compressed func2, and the DA field of the IPv6 header is a1+ NodeID1+ compressed func1+ D1, the node may replace the DA field with a1+ NodeID2+ compressed func2+ D1.
In some implementation manners, the node that receives the packet further needs to update current values of some identifiers, which may specifically refer to each embodiment corresponding to fig. 8, and details are not described here again. In practical applications, the modification of the second identifier may be summarized as:
when copying the SID to replace the DA for updating the header of the IPv6 message, if the SL value corresponding to the copied SID is the same as the value of the currently read NCHI, the copied SID is the compressed header SID. At this time, the node may replace the NCHI update in the compressed header SID with the SA in the IPV6 header, and replace the CSLL update in the compressed header SID with the DA (copy-time update) in the IPV6 header.
When the SID is copied to replace the DA for updating the IPv6 header, if the copied SID is not the compressed header SID, the node may update the CSLL according to the value of the CSLL. The method is divided into three cases, and if the current CSLL does not take a value, the node does not need to update the CSLL. If the value of the current CSLL is 0, the node may delete the value of the CSLL. If the value of the current CSLL is greater than 0, the node may subtract the value of CSLL by one.
After copying the SID to replace the DA updating the IPv6 header, the node may also update the value of DACCSLL according to whether the DA includes CSLL. In some cases, for example, when the copied SID is a compressed SID and the current SID and the copied SID are in the same row, the node may directly determine that the value of CSLL is unchanged and the value of DACCSLL is unchanged, so that updating is not needed to simplify the processing steps. Of course, if the node checks whether CSLL is included in the DA after updating the DA of the IPv6 header each time (or checks whether CSLL is updated in the process, and updates DACCSLL simultaneously if CSLL is updated), so as to update the value of DACCSLL, the stability of the scheme can be improved, and errors are not easily caused.
705. And forwarding the message according to the DA of the updated IPv6 message header.
In this embodiment of the present application, when a node receives a packet, it may be determined whether a node corresponding to a current SID is a failed intermediate node according to the manner in step 702. If yes, the node executes steps 703 to 705, determines the next SID format of the current SID, updates the DA of the IPv6 header, and then forwards the packet. If not, step 706 is executed, and the message is forwarded according to the normal flow.
It can be understood that, when the packet is forwarded according to the DA of the updated IPv6 packet header in step 705, the node may return to step 702 to determine again whether the node corresponding to the current SID is a failed intermediate node. If yes, the node executes step 703 to step 705 to implement the proxy forwarding function, and if no, executes step 706. Thus, if there are consecutive failed intermediate nodes, the node may continuously proxy forwarding, thereby bypassing consecutive failed intermediate nodes.
706. And forwarding the message according to a normal flow.
In the embodiment of the present application, if the node determines that the node corresponding to the current SID is not the failed intermediate node, the node may forward the SID according to a normal flow without skipping the intermediate node.
In the embodiment of the application, after receiving the message, the node judges whether the node corresponding to the current SID is a failed intermediate node. If yes, determining the next SID format of the current SID according to the identifier in the message, updating DA of an IPv6 message header according to the format and forwarding the message, thereby bypassing the failed intermediate node and carrying out proxy forwarding to realize SRv6 TE FRR.
In practical application, the embodiment of the present application provides three application examples to explain a specific form of the identifier in the message.
1. Application example one:
fig. 9a is a schematic diagram of an architecture of an application example of the present application. The message is transmitted from the device 4 to the device 0 sequentially through the device 3, the device 2, and the device 1. The device 4, the device 3, the device 2, and the device 1 are all intermediate nodes corresponding to the SID, specifically, the device corresponding to the SID4 is the device 4, the device corresponding to the SID3 is the device 3, the device corresponding to the SID2 is the device 2, and the device corresponding to the SID1 is the device 1. Device 0 is the destination node. It will be appreciated that there may be common forwarding nodes for forwarding between the above devices, such as device X.
Fig. 9b is a schematic diagram of an SRH extension header of a message in the application example of the present application. The identifier in the message includes compressed information of all SIDs in the message, and the identifier is in the form of the first identifier in step 703 in each embodiment corresponding to fig. 7, that is, a COC mark is designed in each SID to indicate whether the next SID is an uncompressed SID or a compressed SID. In this application example, a value of 1 for the flag indicates that the next SID of the SID is a compressed SID, and a value of 0 for the flag indicates that the next SID of the SID is an uncompressed SID. For example, the flag in SID4 is 1, indicating that SID3 is a compressed SID; the flag in SID1 is 0, indicating that SID0 is an uncompressed SID.
1.1, application scenario one (device 3 failed):
when the device 3 fails and the message is sent to the device 4, because the device 4 is an intermediate node, after receiving the message, the device 4 reads the COC flag in the DA field of the current IPV6 message header (i.e., reads the COC flag 1 of the SID 4), determines that the SID3 is a compressed SID, and then replaces the SID3 in the DA field of the IPV6 message header of the message.
Then, the device 4 determines that the node corresponding to the current SID (SID3) is a failed intermediate node (i.e., a failed device 3), and then the device 4 may determine that the format of the next SID (SID2) of the current SID is a compressed format according to reading the COC flag in the DA field of the header of the current IPV6 packet (i.e., reading the COC flag of SID3) and may replace SID2 in the DA field of the header of the IPV6 packet of the packet, so as to implement a proxy forwarding function.
1.2, application scenario two (device 2 failed):
when the device 2 fails and the message reaches the device X, the DA field of the IPV6 header in the message received by the device X is SID 2. After receiving the message, the device X may determine that the DA field (SID2) of the current IPV6 message header is a failed intermediate node, and determine that the format of the next SID (SID1) of the current SID is a compressed format according to reading the COC flag (i.e., reading the COC flag 1 of SID2) in the DA field of the current IPV6 message header, and may replace SID1 in the DA field of the IPV6 message header of the message, thereby implementing a proxy forwarding function.
2. Application example two:
fig. 10a is a schematic diagram of an architecture of a second application example of the present application. The message is transmitted from device 14 through devices 13, … …, device 1, and device 0 in sequence. The device 14, the device 13, the device … …, and the device 1 are all intermediate nodes corresponding to the SID, specifically, the device corresponding to the SID14 is the device 14, and the device corresponding to the SID13 is the device 13 … …, and the device corresponding to the SID1 is the device 1. Device 0 is the destination node. It will be appreciated that there may be common forwarding nodes for forwarding between the above devices.
Fig. 10b is a schematic diagram of an SRH extension header of a message in application example two according to the present application. The identifier in the message contains the compressed information of all the SIDs in the message, and the identifier is in the form of the first identifier in step 703 in each embodiment corresponding to fig. 7, that is, the format of the SID next to the current SID is determined by CSLL, NCHI, and DACCSLL. In fig. 9b, the SID corresponding to SL ═ 7 is the compression header SID, the compression header SID includes CSLL whose value is 1, which indicates the compression SID of the subsequent row, and the NCHI whose value is 4 indicates that the next compression header is the compression header corresponding to SL ═ 4. Table 1 is an identification example corresponding to the present application example.
Figure BDA0002879813870000151
TABLE 1
It is understood that the value of SL in Table 1 may be read from the SRH extension header of the packet, CSLL may be read from the DA field of the IPV6 header, and NCHI and DACCSLL may be read from the SA field of the IPV6 header. In practical applications, the identifiers may be designed in other positions to facilitate reading or to be compatible with a protocol, which is not limited in this application.
As can be seen from table 1, when a message is generated, SL is 9, CSLL has no value, ncil is 7, and DACCSLL is 0; the current values of these identifications are determined by the head node that produced the message. For simplicity and illustrative description of the present application, the message may be represented by (SA:0, 7, DA: SID14) (SL ═ 9), where the first identifier in the SA is DACCSLL and the second identifier is NCHI.
2.1, application scenario three (device 13 has failed);
when a message is sent from a head node to a device 14, and the device 13 has a fault, the device 14 receives the message, firstly, the SL is reduced by one, the current SID in the message is modified into SID13, and the message is modified into (SA:0, 7, DA: SID13) (SL ═ 8). It can be understood that, for the intermediate node, the intermediate node first completes its own forwarding function, and then determines whether a proxy forwarding function is required.
Device 14 then determines that the current SID (SID13) is a failed intermediate node, device 14 may perform a proxy forwarding function. The proxy forwarding step includes: reading DACCSLL value as 0, and determining the next SID as a non-compressed SID; reading the value of NCHI to be 7, determining the next SID as a compressed header SID (i.e. 7) as the same as SL minus one, updating CSLL in DA and NCHI in SA according to a CSLL preset value and an NCHI preset value in the compressed header SID, and then updating DACCSLL in SA, so that the message is modified to be (SA:1, 4, DA: SID12 (containing CSLL ═ 1 and SI ═ 0)) (SL ═ 7). Device 14 then forwards the message, bypassing the failed device 13, towards device 12, achieving SRv6 TE FRR.
2.2, application scenario four (device 13 failed):
after the message normally passes through the device 14, the message is modified to (SA:0, 7, DA: SID13) (SL ═ 8).
When a message is transmitted to a forwarding node between the device 14 and the device 13, if the device 13 has a fault, the forwarding node receives the message and then determines that the current SID (SID13) is a faulty intermediate node, and then the forwarding node may execute the proxy forwarding step executed by the device 14 in the application scenario three, so that the message bypasses the faulty device 13 and is forwarded to the device 12, thereby implementing a SRv6 TE FRR. The specific process of the proxy forwarding step may refer to the application scenario three described above, and is not described herein again.
2.3, application scenario five (device 12 failed):
when a message is sent from a head node to the device 13, and the device 12 has a failure, the device 13, after receiving the message, subtracts one from SL, modifies the current SID in the message to SID12, and determines SID12 to be a compressed head SID, updates CSLL in DA and NCHI in SA according to the CSLL preset value and NCHI preset value in SID12, and then updates dacsll in SA, so that the message is modified to (SA:1, 4, DA: SID12 (containing CSLL ═ 1, SI ═ 0)) (SL ═ 7).
Then, the device 13 determines that the current SID (SID12) is a failed intermediate node, and the device 13 may perform a proxy forwarding function. The proxy forwarding step includes: reading the value of DACCSLL as 1, and determining that the DA contains a CSLL value; further reading CSLL (1) in DA, determining the SID of the next row as a compressed SID, and SID11 as a compressed SID; reading SI 0, determining that the next SID (SID11) is next to the current SID, the device 13 decrements SL by one, SI is set to 3, and replaces SID11 with node id + compressed func, CSLL of DA by one. The message is thus modified to (SA:1, 4, DA: SID11 (containing CSLL 0, SI 3)) (SL 6) and forwarded out, bypassing the failed device 12 and forwarding towards device 11, implementing SRv6 TE FRR.
2.4, application scenario six (device 12 failed):
after the message normally passes through the device 13, the message is modified to (SA:1, 4, DA: SID12 (containing CSLL ═ 1 and SI ═ 0)) (SL ═ 7).
When a message is transmitted to a forwarding node between the device 13 and the device 12, if the device 12 has a fault, the forwarding node receives the message and then determines that the current SID (SID12) is a faulty intermediate node, and then the forwarding node may execute the proxy forwarding step executed by the device 13 in the application scenario five, so that the message bypasses the faulty device 12 and is forwarded to the device 11, thereby implementing a SRv6 TE FRR. The specific process of the proxy forwarding step may refer to the application scenario five, which is not described herein again.
2.5, application scenario seven (device 11 failed):
when a message is sent from a head node to a device 12, if the device 11 has a fault, after the device 12 receives the message, the SL is decreased by one, the SI is set to 3, the current SID in the message is modified to SID11, and the CSLL is decreased by one. The message is thus modified to (SA:1, 4, DA: SID11 (containing CSLL 0, SI 3)) (SL 6). It can be understood that, for the intermediate node, the intermediate node first completes its own forwarding function, and then determines whether a proxy forwarding function is required.
Device 12 then determines that the current SID (SID11) is a failed intermediate node, device 12 may perform a proxy forwarding function. The proxy forwarding step includes: reading the value of DACCSLL as 1, and determining that the DA contains a CSLL value; further reading CSLL (0) in the DA, determining that the SID of the same line of the current SID is a compressed SID and the SID of the next line is an uncompressed SID; reading SI & lt3 & gt, which indicates that the current SID is not the last SID of the line; further, if the SI minus one position is determined to have a SID (SIA10), the next SID (SID10) is determined to be a compressed SID. Thus, device 12 may decrement the SI by one and replace SID10 to the node id + CompressFUNC of the DA. The message is thus modified to (SA:1, 4, DA: SID10 (containing CSLL 0, SI 2)) (SL 6) and forwarded out, bypassing the failed device 11 and forwarding towards device 10, implementing SRv6 TE FRR.
2.6, application scenario eight (device 11 failed):
after the message normally passes through the device 12, the message is modified to (SA:1, 4, DA: SID11 (containing CSLL-0, SI-3)) (SL-6).
When a message is transmitted to a forwarding node between the device 12 and the device 11, if the device 11 has a fault, the forwarding node receives the message and then determines that the current SID (SID11) is a faulty intermediate node, and then the forwarding node may execute the proxy forwarding step executed by the device 12 in the application scenario seven, so that the message bypasses the faulty device 11 and is forwarded to the device 10, thereby implementing a SRv6 TE FRR. The specific process of the proxy forwarding step may refer to the application scenario seven, which is not described herein again.
2.7, application scenario nine (device 10 failed):
when a message is sent from the head node to the device 11, and the device 10 has a failure, the device 11 receives the message, decrements the SI, and replaces the SID10 with the node id + compressed func of the DA. The message is thus modified to (SA:1, 4, DA: SID10 (containing CSLL 0, SI 2)) (SL 6).
Then, the device 11 determines that the current SID (SID10) is a failed intermediate node, and the device 11 may perform a proxy forwarding function. The proxy forwarding step includes: reading the value of DACCSLL as 1, and determining that the DA contains a CSLL value; further reading CSLL (0) in the DA, determining that the SID of the same line of the current SID is a compressed SID and the SID of the next line is an uncompressed SID; reading SI 2, which shows that the current SID is not the last SID of the line; further, if the SI minus one position is determined to have a SID (SID9), the next SID (SID9) is determined to be a compressed SID. Thus, the device 11 may decrement the SI by one and replace the SID9 to the node id + CompressFUNC of the DA. The message is thus modified to (SA:1, 4, DA: SID9 (containing CSLL 0, SI 1)) (SL 6) and forwarded out, bypassing the failed device 10 and forwarding towards device 9, implementing SRv6 TE FRR.
2.8, application scenario ten (device 10 failed):
after the message normally passes through the device 11, the message is modified to (SA:1, 4, DA: SID10 (containing CSLL-0 and SI-2)) (SL-6).
When a message is transmitted to a forwarding node between the device 11 and the device 10, if the device 10 has a fault, the forwarding node receives the message and then determines that the current SID (SID10) is a faulty intermediate node, and then the forwarding node may execute the proxy forwarding step executed by the device 11 in the application scenario nine described above, so that the message bypasses the faulty device 10 and is forwarded to the device 9, thereby implementing a SRv6 TE FRR. The specific process of the proxy forwarding step may refer to the application scenario nine described above, and details are not described here.
2.9, application scenario eleven (device 9 failed):
when a message is sent from the head node to the device 10, and the device 9 has a failure, the device 10 receives the message, decrements the SI, and replaces the SID9 with the node id + compressed func of the DA. The message is thus modified to (SA:1, 4, DA: SID9 (containing CSLL 0, SI 1)) (SL 6).
Then, the device 10 determines that the current SID (SID9) is a failed intermediate node, the device 10 may perform a proxy forwarding function. The proxy forwarding step includes: reading the value of DACCSLL as 1, and determining that the DA contains a CSLL value; further reading CSLL (0) in the DA, determining that the SID of the same line of the current SID is a compressed SID and the SID of the next line is an uncompressed SID; reading SI as 1, and showing that the current SID is not the last SID of the line; further determining that the SI minus one position has no SID, the next SID (SID8) is determined to be in the next row and is an uncompressed SID. Thus, device 10 may zero or delete SI, SL minus one, replace SID8 to DA, CSLL delete, DACCSLL zero. The message is thus modified to (SA:0, 4, DA: SID8) (SL ═ 5) and forwarded out, bypassing the failed device 9, forwarding towards device 8, implementing a SRv6 TE FRR.
2.10, application scenario twelve (device 9 failed):
after the message normally passes through the device 10, the message is modified to (SA:1, 4, DA: SID9 (containing CSLL ═ 0 and SI ═ 1)) (SL ═ 6).
When a message is transmitted to a forwarding node between the device 10 and the device 9, if the device 9 has a fault, the forwarding node receives the message and then determines that the current SID (SID9) is a faulty intermediate node, and then the forwarding node may execute the proxy forwarding step executed by the device 10 in the above-mentioned application scenario eleven, so that the message bypasses the faulty device 9 and is forwarded to the device 8, thereby implementing a SRv6 TE FRR. The specific process of the proxy forwarding step may refer to the above-mentioned application scenario eleven, and details are not described here.
2.11, application scenario thirteen (device 3 failed):
when a message is sent from the head node to the device 4, and the device 3 has a failure, the device 4 receives the message, decrements the SI, and replaces the SID3 with the node id + compressed func of the DA. The message is thus modified to (SA:1, 0, DA: SID3 (containing CSLL 1 and SI 0)) (SL 3).
Then, device 4 determines that the current SID (SID3) is a failed intermediate node, device 4 may perform a proxy forwarding function. The proxy forwarding step includes: reading the value of DACCSLL as 1, and determining that the DA contains a CSLL value; further reading CSLL (1) in DA, determining the SID of the next row of the current SID as a compressed SID; reading SI ═ 0, which indicates that the current SID is the last SID of the line, then the next SID (SID2) is determined to be in the next line and is the compressed SID. Thus, device 4 may set SI to 3, SL minus one, replace SID2 to node id + compressed func, CSLL minus one of the DA. The message is thus modified to (SA:1, 0, DA: SID2 (including CSLL ═ 0, SI ═ 3)) (SL ═ 2) and forwarded out, thereby bypassing the failed device 3 and forwarding towards device 2, thus achieving SRv6 TE FRR.
2.12, application scenario fourteen (device 3 failed):
after the message normally passes through the device 4, the message is modified to (SA:1, 0, DA: SID3 (containing CSLL ═ 1 and SI ═ 0)) (SL ═ 3).
When a message is transmitted to a forwarding node between the device 4 and the device 3, if the device 3 has a fault, the forwarding node receives the message and then determines that the current SID (SID3) is a faulty intermediate node, and then the forwarding node may execute the proxy forwarding step executed by the device 4 in the thirteenth application scenario, so that the message bypasses the faulty device 3 and is forwarded to the device 2, thereby implementing a SRv6 TE FRR. The specific process of the proxy forwarding step may refer to the above application scenario thirteen, and is not described herein again.
3. Application example three:
fig. 11a is a schematic diagram of an SRH expansion header in application example three of the present application. The tail of the extension header is provided with a TLV field, wherein an array (namely CFA) of [001000110 … … ] is included, wherein 0, 1, and the like are compression marks and represent the compression condition of each 128bit (also referred to as each row). It can be understood that the device corresponding to SID13 is device 13 … …, and the device corresponding to SID1 is device 1. Device 0 is the destination node. It will be appreciated that there may be common forwarding nodes for forwarding between the above devices.
Specifically, it can be represented by table 2:
SL 8 7 6 5 4 3 2 1 0
SID 128 128 32_32_32_0 128 128 32_32_32_32 32_0_0_0 128 128
CFA 0 0 1 0 0 1 1 0 0
TABLE 2
In the application example of the present application, in table 2, if the CFA is 0, one SID corresponding to the SL is an uncompressed SID, and if the CFA is 1, all SIDs corresponding to the SL are compressed SIDs. In this application example, the node forwarding the packet can know the compression condition of all SIDs in the SRH extension header through the CFA.
It is understood that in this application example, the CFA identifiers correspond to the SLs in reverse order in the TLV field, i.e., the first CFA identifier is the CFA identifier corresponding to SL-8, the second CFA identifier is the CFA identifier corresponding to SL-7, and so on. In other application cases, the CFA id may also correspond to the SL in the TLV field in forward order, i.e., the first CFA id is the CFA id corresponding to SL ═ 0, the second CFA id is the id corresponding to SL ═ 1, and so on. The embodiment of the present application does not limit the ordering manner of the CFA identifiers.
In the embodiment of the present application, a node can know the compression condition of all SIDs in the SRH extension header through CFA. In some cases, the node may determine whether the current SID includes an SI parameter according to other methods, determine a SL corresponding to the next SID according to the SI parameter and related conditions, and finally determine a storage format (i.e., a compressed format or a non-compressed format) of the next SID according to a CFA corresponding to the SL. When determining whether the current SID includes the SI parameter without using other methods, the application example of the present application provides an application process that can determine the storage format of the next SID completely according to the CFA and the related situation. Fig. 11b is a schematic application flow diagram provided in the application example of the present application. The process comprises the following steps:
1101. acquiring a compression mark;
in this application example, the node may read the CFA of the whole TLV field and then obtain the relevant compression flag as needed, or may obtain the relevant compression flag as actually needed, which is not limited in this embodiment of the application. In the application example of the present application, the node may use three compression marks, which are a compression mark corresponding to the current SL, a compression mark corresponding to the current SL-1, and a compression mark corresponding to the current SL-2.
1102. If the consecutive compression flag is 000, the next SID is a normal uncompressed SID;
in the application example of the present application, when the three consecutive compressed tags are 000, it indicates that three consecutive rows of SIDs are all uncompressed SIDs, it may be determined that the first two rows of SIDs are all normal uncompressed SIDs, and the last row of SIDs may be normal uncompressed SIDs or compressed header SIDs. Therefore, the next SID is the SID of the second row, which is a normal uncompressed SID.
1103. If the continuous compression flag is 001, the next SID is the compression header SID;
in the application example of the present application, when the three consecutive compressed tags are 001, it indicates that two consecutive rows of SIDs are uncompressed SIDs, and the third row of SIDs is compressed SIDs. It can be determined that the SID in the first row (the row corresponding to the current SL) is a normal uncompressed SID, the SID in the second row (the row corresponding to the current SL-1) is a compressed header SID, and the SID in the third row (the row corresponding to the current SL-2) is several compressed SIDs. Therefore, the next SID is the SID of the second row, which is the compressed header SID.
1104. If the consecutive compression flag is X1X, then the next SID is the compressed SID;
in the application example of the present application, when the three consecutive compression marks are X1X (X represents that the mark is an arbitrary compression mark, and may be 0 or 1), and represents that the SID in the second row (the row corresponding to the current SL-1) is a plurality of compressed SIDs, the SID in the first row is a compression header SID or a plurality of compressed SIDs. In both cases, if the DA field of the Ipv6 header has an SI parameter, the node may determine the SL corresponding to the next SID according to the SI parameter and the relevant condition, and finally determine the storage format of the next SID according to the compression tag corresponding to the SL. The method specifically comprises the following steps:
if the SI parameter is 0, the current SID is a compressed header SID or the last SID of several compressed SIDs, the next SID needs to wrap around, i.e. the next SID is in the next row, and the SL corresponding to the next SID is SL-1, i.e. the next SID is in the second row (the row corresponding to the current SL-1), which is the compressed SID. Then the node may assign SL-1 to the current SL, set the SI parameter to 3 (in this application, at most four compressed SIDs form one row, so the maximum value of the SI parameter is 3, in practical applications, the SI parameter may be set to other values, which is not limited in this application), then update the DA field of the Ipv6 header according to the format of the next SID (SRH [ SL ] [ SI ] is replaced to DA, SI in DA is set to 3, SRH [ SL ] [ SI ] represents the SID corresponding to SL and SI in the SRH extension header), and finally forward the packet according to the updated DA field.
If the SI parameter is greater than 0, then the current SID is the non-last SID of the plurality of compressed SIDs, the node may subtract one from the SI parameter, and then determine whether the value of the position corresponding to the subtraction of one from the SI parameter is all 0. If so, subtracting one from the SI parameter by the corresponding position without SID, generally setting the next SID in the next row, then the node may assign SL-1 to the current SL, set the SI parameter to 3, then the node updates the DA field of the Ipv6 header according to the format of the next SID (SRH [ SL ] [ SI ] is replaced to DA, SI in DA is set to 3), and finally forwards the message according to the updated DA field. If the numerical value of the SI parameter minus one corresponding position is not all 0, the SI parameter minus one corresponding position is provided with a SID, the SID is the next SID, the SID is a compressed SID, the node can update the DA field of the Ipv6 message header according to the format of the next SID (replace SRH [ SL ] [ SI ] to DA), and finally forward the message according to the updated DA field.
1105. If the continuous compression flag is 10X, the current DA contains SI parameters;
in the application example of the present application, when the three consecutive compressed tags are 10X, it indicates that the SID in the first row is several compressed SIDs, and the SID in the second row is a compressed header SID or a normal uncompressed SID. Since the SID in the first row is several compressed SIDs, which indicates that the DA field of the header of Ipv6 has an SI parameter, the node may determine the SL corresponding to the next SID according to the SI parameter and the relevant condition, and finally determine the storage format of the next SID according to the compressed flag corresponding to the SL. The method specifically comprises the following steps:
if the SI parameter is 0, the current SID is the last SID of a plurality of compressed SIDs, the next SID needs to be rewound, that is, the next SID is in the next row, the SL corresponding to the next SID is SL-1, that is, the next SID is in the second row (the row corresponding to the current SL-1), and is a compressed header SID or a normal uncompressed SID, the node may assign the SL-1 to the current SL, then the node updates the DA field of the Ipv6 header according to the format of the next SID (replaces the next SID with the DA), and finally forwards the packet according to the updated DA field.
If the SI parameter is greater than 1, the current SID is the non-last SID of the compressed SIDs, and the node may subtract one from the SI parameter, and then determine whether the value of the position corresponding to the subtraction of one from the SI parameter is all 0. If so, the SI parameter is decremented by one corresponding position without SID, and the next SID is generally in the next row (the next row is a compressed header SID or a normal uncompressed SID), then the node may assign SL-1 to the current SL, then the node updates the DA field of the Ipv6 header according to the format of the next SID (replaces the next SID with the DA), and finally forwards the packet according to the updated DA field. If the numerical value of the SI parameter minus one corresponding position is not all 0, the SI parameter minus one corresponding position is provided with a SID, the SID is the next SID, the SID is a compressed SID, the node can update the DA field of the Ipv6 message header according to the format of the next SID (replace SRH [ SL ] [ SI ] to DA), and finally forward the message according to the updated DA field.
It can be understood that the CFA of the TLV field in the embodiment of the present application already includes compressed information corresponding to all SIDs, so in practical applications, a designer may design different method flows to parse the compressed information according to practical situations, and fig. 11b is only one example, and should not be construed as a limitation of the scheme in the embodiment of the present application.
3.1, application scenario fifteen:
device 12 fails when the message is forwarded to device 13 or a forwarding node between device 13 and device 12. The device 13 or the forwarding node may continuously read the compression tags corresponding to SL ═ 7, 6, and 5 according to the current message SL ═ 7, and obtain the identifier combination as 010, then the node may read that the SI parameter in the DA is 0, which indicates that the next SID needs to be rewound, and indicates that the next SID (SID11) is in the second row, which is the compression SID. Then, the device 13 or the forwarding node may replace and update the SID11 in the DA field of the IPV6 header according to the compression format (SRH [ SL ═ 6] [ SI ═ 3] is replaced in the DA, and SI is set to 3 in the DA).
3.2, application scenarios sixteen:
device 11 fails when the message is forwarded to device 12 or a forwarding node between device 12 and device 11. The device 12 or the forwarding node may continuously read the compression flag corresponding to the current message SL ═ 6, SL ═ 5, and SL ═ 4, to obtain an identifier combination of 100, and if the node can read the SI parameter in the DA of 3, it is determined whether the position number value corresponding to the SI ═ 2 is all 0. In this application scenario, the position corresponding to SI 2 is not always 0, and since the SID10 corresponds to the position corresponding to SI 2, the SID10 can be determined as the next SID, which is a compressed SID according to the process of fig. 11 b. Then, the device 12 or forwarding node may update the SID10 replacement into the DA field of the IPV6 header according to the compression format (replace SRH [ SL ═ 6] [ SI ═ 2] into the DA).
3.3, application scenario seventeen:
device 10 fails when the message is forwarded to device 11 or a forwarding node between device 11 and device 10. The device 11 or the forwarding node may continuously read the compression flag corresponding to SL ═ 6, 5, and 4 according to the current message SL ═ 6, and the obtained identifier combination is 100, and if the node can read the SI parameter in the DA to be 2, it is determined whether the position values corresponding to SI ═ 1 are all 0. In this application scenario, the location corresponding to SI ═ 1 is represented by SID9, so that SID9 can be determined as the next SID according to the process of fig. 11b, which is a compressed SID. Then, the device 11 or forwarding node may update the SID9 replacement into the DA field of the IPV6 header according to the compression format (replace SRH [ SL ═ 6] [ SI ═ 1] into the DA).
3.4, application scene eighteen:
the device 9 fails when the message is forwarded to the device 10 or a forwarding node between the device 10 and the device 9. The device 10 or the forwarding node may continuously read the compression flag corresponding to SL ═ 6, 5, and 4 according to the current message SL ═ 6, and the obtained identifier combination is 100, and if the node can read that the SI parameter in the DA is 1, it is determined whether the position values corresponding to SI ═ 0 are all 0. In this application scenario, if the position values corresponding to SI ═ 0 are all 0, then the next SID is determined to be in the next row according to the flow of fig. 11b, and is the normal uncompressed SID. Then, the device 10 or forwarding node may update the SID8 replacement into the DA field of the IPV6 header (replace SRH [ SL ═ 5] into the DA).
3.5, application scenarios nineteen:
the device 8 fails when the message is forwarded to the device 9 or a forwarding node between the device 9 and the device 8. If the device 9 or the forwarding node can continuously read the compression tags corresponding to SL ═ 5, SL ═ 4, and SL ═ 3 according to the current packet SL ═ 5, and the obtained identifier combination is 001, then it can be determined that the next SID is in the next row and is the compression header SID according to the flow in fig. 11 b. Then, the device 9 or forwarding node may update the SID7 replacement into the DA field of the IPV6 header (replace SRH [ SL ═ 4] into the DA).
Fig. 12 is a schematic diagram of a message processing apparatus according to an embodiment of the present application. The apparatus 1200 includes:
an obtaining module 1201, configured to execute step 701 in each embodiment corresponding to fig. 7;
a processing module 1202, configured to execute step 702, step 703, and step 704 in each embodiment corresponding to fig. 7, or execute each step corresponding to fig. 8, or each step corresponding to fig. 11 b.
A forwarding module 1203, configured to execute step 705 or step 706 in each embodiment corresponding to fig. 7 described above.
Fig. 13 is a schematic diagram of a message processing device according to an embodiment of the present application. The apparatus includes a network interface, a processor, and a memory; the network interface is used for receiving the message; the memory is used for storing program instructions; the processor is configured to execute the program instructions to implement the method in the embodiments corresponding to fig. 7. The network interface may be an ethernet interface or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the present disclosure as defined by the appended claims.

Claims (21)

1. A method for message processing, comprising:
acquiring a message;
if the node corresponding to the current segment identification SID is a failed intermediate node, executing the following steps:
analyzing the format of the next SID of the current SID according to the preset identification in the message, wherein the preset identification in the message contains the compressed information of all SIDs in the message, and the format of the next SID comprises a compressed format and a non-compressed format;
updating the target address DA field of the message header according to the format of the next SID;
and forwarding the message according to the updated DA field.
2. The method of claim 1, wherein after the obtaining the message, the method further comprises:
and if the node corresponding to the current segment identification SID is not the failed intermediate node, forwarding the message according to a set rule.
3. The method according to claim 1 or 2, wherein the parsing the format of the SID next to the current SID according to the preset identifier in the message comprises:
reading a continuous compression COC mark of the current SID from a DA field of the message header, wherein the format of the COC mark for the next SID is a compression format or a non-compression format;
and determining the format of the next SID according to the COC mark of the current SID.
4. The method according to claim 1 or 2, wherein the parsing the format of the SID next to the current SID according to the preset identifier in the message comprises:
reading a first identifier value from a source address SA field of the message header, wherein the first identifier value indicates that a DA field of the message header comprises a second identifier for a first preset value, the first identifier value indicates that the DA field of the message header does not comprise the second identifier for a second preset value, and the second identifier is used for indicating the number of lines of the residual compressed SID;
and if the first identification value is a second preset value, determining that the format of the next SID is a non-compressed format.
5. The method of claim 4, wherein after reading the first identification value from the SA field of the header, the method further comprises:
if the first identification value is a first preset value, reading the value of the second identification from a DA field of the message header;
and if the value of the second identifier is greater than 0, determining that the format of the next SID is a compressed format.
6. The method according to claim 5, wherein after reading the value of the second identifier from the DA field of the header, the method further comprises:
if the value of the second identifier is equal to 0, reading the value of a SID index parameter from a DA field of the message header, wherein the SID index parameter is used for indicating the position of a compressed SID;
and if the value of the SID index parameter is 0, determining that the position of the next SID is in the next row, and the format of the next SID is a non-compressed format.
7. The method of claim 6, wherein after reading the value of the SID index parameter from the DA field of the header, the method further comprises:
if the value of the SID index parameter is greater than 0, judging whether the position of the SID index parameter minus one has SID;
if the position of the SID index parameter minus one has SID, determining that the SID of the position of the SID index parameter minus one is the next SID, and the format of the next SID is a compressed format;
and if the position of the SID index parameter minus one has no SID, determining that the position of the next SID is in the next row, and the format of the next SID is an uncompressed format.
8. The method as claimed in claim 4, wherein the updating the destination address DA field of the header according to the format of the next SID comprises:
reading a value of a third identifier from an SA field of the message header, wherein the third identifier is used for indicating a segment residual SL parameter value corresponding to the SID of the next compression header;
if the SL value corresponding to the next SID is the same as the third identifier, determining that the next SID is a compressed header SID, updating the preset value of the second identifier in the compressed header SID to the DA field of the message header, updating the preset value of the third identifier in the compressed header SID to the SA field of the message header, and determining the value of the first identifier according to the updating condition of the second identifier in the DA field.
9. The method as claimed in claim 8, wherein the updating the destination address DA field of the header according to the format of the next SID further comprises:
when the value of the SL corresponding to the next SID is different from the third identifier and the SL is decreased by one, updating the second identifier according to the value of the second identifier when the SL is decreased by one, including:
if the second identifier does not take a value, the second identifier is not updated;
if the value of the second identifier is 0, deleting the second identifier to ensure that the second identifier has no value;
and if the second identifier is larger than 0, subtracting one from the second identifier.
10. The method according to claim 1 or 2, wherein the parsing the format of the SID next to the current SID according to the preset identifier in the message comprises:
acquiring a compression mark array preset in the message, wherein the compression mark array comprises at least one compression mark, the compression mark represents a behavior non-compression format corresponding to the SL by a third preset value, and the compression mark represents a behavior compression format corresponding to the SL by a fourth preset value;
and determining the format of the SID next to the current SID according to the compressed tag array.
11. An apparatus for message processing, comprising:
the acquisition module is used for acquiring the message;
a processing module, configured to, if a node corresponding to the current segment identifier SID is a failed intermediate node, execute the following steps:
analyzing the format of the next SID of the current SID according to the preset identification in the message, wherein the preset identification in the message contains the compressed information of all SIDs in the message, and the format of the next SID comprises a compressed format and a non-compressed format; updating the target address DA field of the message header according to the format of the next SID;
and the forwarding module is used for forwarding the message according to the updated DA field.
12. The apparatus of claim 11, wherein the forwarding module is configured to:
and if the node corresponding to the current segment identification SID is not the failed intermediate node, forwarding the message according to a set rule.
13. The apparatus of claim 11 or 12, wherein the processing module is configured to:
reading a continuous compression COC mark of the current SID from a DA field of the message header, wherein the format of the COC mark for the next SID is a compression format or a non-compression format;
and determining the format of the next SID according to the COC mark of the current SID.
14. The apparatus of claim 11 or 12, wherein the processing module is configured to:
reading a first identifier value from a source address SA field of the message header, wherein the first identifier value indicates that a DA field of the message header comprises a second identifier for a first preset value, the first identifier value indicates that the DA field of the message header does not comprise the second identifier for a second preset value, and the second identifier is used for indicating the number of lines of the residual compressed SID;
and if the first identification value is a second preset value, determining that the format of the next SID is a non-compressed format.
15. The apparatus of claim 14, wherein the processing module is configured to:
if the first identification value is a first preset value, reading the value of the second identification from a DA field of the message header;
and if the value of the second identifier is greater than 0, determining that the format of the next SID is a compressed format.
16. The apparatus of claim 15, wherein the processing module is configured to:
if the value of the second identifier is equal to 0, reading the value of a SID index parameter from a DA field of the message header, wherein the SID index parameter is used for indicating the position of a compressed SID;
and if the value of the SID index parameter is 0, determining that the position of the next SID is in the next row, and the format of the next SID is a non-compressed format.
17. The apparatus of claim 16, wherein the processing module is configured to:
if the value of the SID index parameter is greater than 0, judging whether the position of the SID index parameter minus one has SID;
if the position of the SID index parameter minus one has SID, determining that the SID of the position of the SID index parameter minus one is the next SID, and the format of the next SID is a compressed format;
and if the position of the SID index parameter minus one has no SID, determining that the position of the next SID is in the next row, and the format of the next SID is an uncompressed format.
18. The apparatus of claim 14, wherein the processing module is configured to:
reading a value of a third identifier from an SA field of the message header, wherein the third identifier is used for indicating a segment residual SL parameter value corresponding to the SID of the next compression header;
if the SL value corresponding to the next SID is the same as the third identifier, determining that the next SID is a compression header SID, updating the preset value of the second identifier in the compression header SID to the DA field of the packet header, updating the preset value of the third identifier in the compression header SID to the SA field of the packet header, and determining the value of the first identifier according to the updating condition of the second identifier in the DA field.
19. The apparatus of claim 18, wherein the processing module is configured to:
and updating the second identifier according to the value of the second identifier when the value of the SL corresponding to the next SID is different from the third identifier and the SL is decreased by one, including:
if the second identifier does not take a value, the second identifier is not updated;
if the value of the second identifier is 0, deleting the second identifier to ensure that the second identifier has no value;
and if the second identifier is larger than 0, subtracting one from the second identifier.
20. The apparatus of claim 11 or 12, wherein the processing module is configured to:
acquiring a compression mark array preset in the message, wherein the compression mark array comprises at least one compression mark, the compression mark represents that the corresponding SID is in a non-compression format according to a third preset value, and the compression mark represents that the corresponding SID is in a compression format according to a fourth preset value;
and determining the format of the SID next to the current SID according to the compressed tag array.
21. An apparatus for message processing, comprising: a network interface, a processor, and a memory;
the network interface is used for receiving messages;
the memory is to store program instructions;
the processor is configured to execute the program instructions to implement the method of any one of claims 1 to 10.
CN202011644072.1A 2020-12-31 2020-12-31 Message processing method and related device Pending CN114697254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011644072.1A CN114697254A (en) 2020-12-31 2020-12-31 Message processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011644072.1A CN114697254A (en) 2020-12-31 2020-12-31 Message processing method and related device

Publications (1)

Publication Number Publication Date
CN114697254A true CN114697254A (en) 2022-07-01

Family

ID=82136334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011644072.1A Pending CN114697254A (en) 2020-12-31 2020-12-31 Message processing method and related device

Country Status (1)

Country Link
CN (1) CN114697254A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499375A (en) * 2022-07-25 2022-12-20 北京中电飞华通信有限公司 Time-sensitive traffic scheduling method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140189152A1 (en) * 2012-12-27 2014-07-03 Deep River Ventures, Llc Methods, Systems, and Computer Program Products for Identifying a Protocol Address based on Path Information
WO2017016254A1 (en) * 2015-07-30 2017-02-02 中兴通讯股份有限公司 Ipv6 message encapsulation processing method and apparatus
CN110557330A (en) * 2018-05-30 2019-12-10 中兴通讯股份有限公司 Backup path calculation method and device and computer storage medium
CN110661706A (en) * 2018-06-30 2020-01-07 华为技术有限公司 Method, device and system for processing transmission path fault
CN111107004A (en) * 2018-10-27 2020-05-05 华为技术有限公司 Message processing method, related equipment and computer storage medium
CN111682996A (en) * 2019-03-11 2020-09-18 华为技术有限公司 Method, network node and network system for forwarding message in network
EP3739823A1 (en) * 2019-05-13 2020-11-18 Juniper Networks, Inc. Compressed routing header information for networks

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140189152A1 (en) * 2012-12-27 2014-07-03 Deep River Ventures, Llc Methods, Systems, and Computer Program Products for Identifying a Protocol Address based on Path Information
WO2017016254A1 (en) * 2015-07-30 2017-02-02 中兴通讯股份有限公司 Ipv6 message encapsulation processing method and apparatus
CN110557330A (en) * 2018-05-30 2019-12-10 中兴通讯股份有限公司 Backup path calculation method and device and computer storage medium
CN110661706A (en) * 2018-06-30 2020-01-07 华为技术有限公司 Method, device and system for processing transmission path fault
CN111107004A (en) * 2018-10-27 2020-05-05 华为技术有限公司 Message processing method, related equipment and computer storage medium
CN111682996A (en) * 2019-03-11 2020-09-18 华为技术有限公司 Method, network node and network system for forwarding message in network
EP3739823A1 (en) * 2019-05-13 2020-11-18 Juniper Networks, Inc. Compressed routing header information for networks

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499375A (en) * 2022-07-25 2022-12-20 北京中电飞华通信有限公司 Time-sensitive traffic scheduling method and electronic equipment
CN115499375B (en) * 2022-07-25 2024-03-19 北京中电飞华通信有限公司 Time-sensitive flow scheduling method and electronic equipment

Similar Documents

Publication Publication Date Title
US10693765B2 (en) Failure protection for traffic-engineered bit indexed explicit replication
CN110401599A (en) The processing method and processing device of data packet, storage medium, electronic device
US20220360525A1 (en) Packet Processing Method, Apparatus, and System
CN109729012B (en) Unicast message transmission method and device
CN113556284B (en) Data packet processing method and device
US10367734B2 (en) Forwarding of packets in a network based on multiple compact forwarding identifiers represented in a single internet protocol version 6 (IPv6) address
US20230121236A1 (en) Segment routing point to multipoint path
EP3955541B1 (en) Message processing method
CN110545229B (en) Message sending method and device in VXLAN axis networking mode
US20220109624A1 (en) Packet Processing Method and Apparatus, and Computer Storage Medium
US20220255857A1 (en) Packet Processing Method, Network Node, and System
CN112448888A (en) Method, equipment and system for forwarding message in SR network
KR20220047854A (en) Packet forwarding method, apparatus and system in SRS network
US20230179510A1 (en) Method for sending and forwarding packet, head node, forwarding node and storage medium
CN114697254A (en) Message processing method and related device
CN113497760B (en) Segmented route header compression method, service processing method and device
CN112787930B (en) Method, device and storage medium for monitoring running state of peer
WO2023005018A1 (en) Packet forwarding method and network device
CN114666259A (en) Message transmission method, device, equipment, storage medium and system
CN113973074A (en) Message processing method and device, electronic equipment and medium
CN111277504B (en) Method and system for inserting flow label in MPLS multilayer label stack
CN112737883B (en) Two-layer network data packet transmission method, device and network equipment
CN112787922B (en) Message processing method, network node and system
US20210218637A1 (en) System and Method for Backup Flooding Topology Split
CN116074395A (en) Message sending method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination