CN112787922A - Message processing method, network node and system - Google Patents

Message processing method, network node and system Download PDF

Info

Publication number
CN112787922A
CN112787922A CN201911115344.6A CN201911115344A CN112787922A CN 112787922 A CN112787922 A CN 112787922A CN 201911115344 A CN201911115344 A CN 201911115344A CN 112787922 A CN112787922 A CN 112787922A
Authority
CN
China
Prior art keywords
network node
tlv
field
message
tlvs
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
CN201911115344.6A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP20881940.9A priority Critical patent/EP4037266A4/en
Priority to PCT/CN2020/125352 priority patent/WO2021083341A1/en
Publication of CN112787922A publication Critical patent/CN112787922A/en
Priority to US17/731,749 priority patent/US20220255857A1/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/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1614Details of the supervisory signal using bitmaps

Abstract

The application discloses a message processing method, which comprises the following steps: the first network node receives a message sent by the second network node, wherein the message contains one or more TLVs required to be processed by the network node, and the message also comprises indication information indicating that the network node on the message forwarding path is required to process at least one TLV in the one or more TLVs; the first network node determines TLVs which need to be processed by the first network node according to the indication information, and determines TLVs which need to be processed by the first network node; the first network node then processes the TLVs that the first network node is required to process. By containing the indication information that the network node needs to process the TLV in the message, the network node can decide whether the TLV in the message needs to be processed or not according to the indication and determine which TLV needs to be processed, thereby improving the flexibility of message processing.

Description

Message processing method, network node and system
Technical Field
The present application relates to the field of communications, and in particular, to a method, a network node, and a system for processing a packet.
Background
Segment Routing (SR) is a protocol designed based on the concept of source routing and used for forwarding packets on a network, and supports explicit specification of packet forwarding paths at source nodes. When the SR is deployed on the Internet Protocol Version 6 (IPv 6) data plane of the sixth Version, it is referred to as IPv6 segment routing (SRv 6). SRv6 Segment Routing Header (SRH) is extended on the basis of IPv 6. The SRH includes a Segment List (SID List), where the SID List includes a plurality of Segment Identifiers (SIDs) arranged in sequence, and each Segment represents a plurality of segments, each Segment is an instruction or an instruction set for processing a packet, and the SID List may also be referred to as a Segment List. The SRH is encapsulated in the message, and the message is forwarded and processed through the Segment List SRv6 network. SRHs may carry one or more type-length-value (TLV) to implement more network functions, for example, OAM functions are implemented by carrying in-site Operations, Administration, and Maintenance (IOAM) TLVs in SRHs.
SRv6 nodes with SR function at the network ingress are called head nodes (ingress nodes) or ingress nodes, and other nodes with SR function are called segment end nodes (segment end). For any segment end node in SRv6 network, when the segment end node acquires the message including SRH sent by head node or other segment end node, it parses the message and determines one or more TLVs included in SRH. For each TLV, the segmented end node determines whether the TLV needs to be processed according to locally configured TLV processing policies. If necessary, the subsequent operation is carried out according to the indication of the TLV, and if not, the subsequent operation is not required to be carried out according to the indication of the TLV.
In the method, the segmented end node judges whether the TLV included in the SRH needs to be processed or not according to the locally configured TLV processing strategy, and the network management equipment needs to configure the TLV processing strategy for the segmented end node respectively, so that the flexibility of message processing is low.
Disclosure of Invention
The application provides a message processing method, a network node and a system, which are used for solving the technical problem of low flexibility in processing TLV in messages in the prior art.
In a first aspect, an embodiment of the present application provides a method for processing a packet, in which a first network node receives a packet sent by a second network node, where the packet includes one or more TLVs that need to be processed by the network node, and the packet further includes indication information indicating that at least one network node needs to process at least one TLV of the one or more TLVs. The first network node determines from the indication information that the first network node is required to process at least one of the one or more TLVs. And the first network node determines the TLV which needs to be processed by the first network node according to the indication information, and the first network node processes the TLV which needs to be processed by the first network node. Through the technical scheme, the network node can determine whether the network node needs to process the TLVs in the message according to the indication information contained in the received message, and if the TLVs in the message need to be processed, the network node further determines which TLV or TLVs in the message need to be processed according to the indication information and then processes the TLVs which need to be processed. Therefore, according to the actual situation of the network topology, the TLVs of the messages required to be processed by the network nodes and the TLVs of the messages required to be processed by the network nodes can be flexibly controlled through the indication information of the messages, so that the flexibility of message processing is improved.
In one possible design, the indication information includes one or more indication entries, each indication entry including a first field to identify a network node that needs to process at least one of the one or more TLVs and a second field to identify a TLV that the network node identified by the first field needs to process. Each indication entry corresponds to a network node which needs to process the TLV in the message, and the TLV in the message can be flexibly processed by the network node through the way that the indication entry is contained in the indication information. For example, when a network node needs to process TLV in a message newly added to the network, an indication entry corresponding to the network node may be added to the indication information.
In one possible design, the second field is a Bitmap (Bitmap) field, and the number of bits of a Bitmap bit with 1 corresponds to the sequence number of the TLV that needs to be processed by the network node identified by the first field according to an order from lower bits to higher bits of the Bitmap or from higher bits to lower bits of the Bitmap. For example, the bit number of the bit with the Bitmap bit of 1 refers to the sequence from the low bit to the high bit of the Bitmap in the message, and the value of the second bit is 1. For example, from the low order to the high order of the Bitmap in the packet, when the 1 st bit position of the Bitmap field is 1, the network node needs to process the 1 st TLV in one or more TLVs; when the 1 st bit and the 3 rd bit of the Bitmap field are both set to 1, the network node needs to process the 1 st TLV and the 3 rd TLV of the TLVs.
In one possible design, when a first network node determines that a particular indication entry is included in the one or more indication entries, and a value of a first field of the particular indication entry corresponds to a value of a remaining Segment (SL) of an SRH of the packet, the first network node determines that the first network node is required to process at least one TLV of the one or more TLVs.
In one possible design, the value of the first field in the specific indication entry and the value of the SL of the message SRH correspond to specifically: the value of the first field is equal to the value of SL in SRH, or the value of the first field is equal to the value of SL in SRH plus n, i.e., the value of the first field is SL + n, where n is an integer greater than or equal to 1.
In one possible design, the first field includes a first subfield and a second subfield, and the determining, by the first network node from the indication information, that the first network node is required to process at least one TLV of the one or more TLVs includes:
when the first network node determines that a particular indication entry is included in the one or more indication entries, and that a value of a first subfield of the particular indication entry corresponds to a value of a SL in an SRH of the packet, and that a value of a second subfield corresponds to a value of a remaining compressed segment identification in the SRH of the packet, the first network node determines that the first network node is required to process at least one TLV of the one or more TLVs. The message containing the compressed SID can be processed by including the residual compressed segment identifier in the indication entry, so that the method has wider application scenes. In one example, the remaining compressed segment identifier may be a compressed SID left (CL).
In one possible design, the value of the first subfield in the specific indication entry and the value of the SL of the message SRH correspond to specifically: the value of the first sub-field is equal to the value of SL in SRH, or the value of the first sub-field is equal to the value of SL in SRH plus n, i.e., the value of the first sub-field is SL + n, where n is an integer greater than or equal to 1. The value of the second subfield and the value of the remaining compressed segment identifier in the SRH of the packet specifically are: the value of the second sub-field is equal to the value of the remaining compressed segment identifier in the SRH, or the value of the second sub-field is equal to the value of the remaining compressed segment identifier in the SRH plus n, that is, the value of the second sub-field is the remaining compressed segment identifier + n, where n is an integer greater than or equal to 1.
In one possible design, when the first network node determines that the particular indication entry is included in the one or more indication entries and that a value of a first field of the particular indication entry is the same as an identification of the first network node, the first network node determines that the first network node is required to process at least one TLV of the one or more TLVs. For example, when the first network node's identification is 1::1, and the value of the first field of the particular indication entry is also 1::1, the first network node determines that the first network node is required to process at least one of the one or more TLVs.
In one possible design, the determining, by the first network node, the TLV that needs to be processed by the first network node according to the indication information includes: the first network node determines the TLV identified by the second field of the particular indication entry to be the TLV that needs processing by the first network node.
In one possible design, the indication information further includes a third field, and the third field is used to identify the number of network nodes that need to process the TLV, for example, when there are 4 network nodes that need to process the TLV, the value of the third field is also 4. Optionally, the third field may also be used to identify the number of indication entries contained in the indication information. For example, when 3 indication entries are included in the indication information, the value of the third field is 3.
In one possible design, the first network node determines a location of the particular indication entry in the message from the first field, the second field, and the third field.
In one possible design, the first network node determines the location of the particular indication entry in the message according to the following formula:
the special indication entry starts at position + the end of the third field in the message (value-1 of the third field) (length of the first field + length of the second field).
In one possible design, the first network node subtracts 1 from a value of a third field in the message to obtain an updated message; and the first network node sends the updated message. By reducing the value of the third field by 1, the network node receiving the updated message can correctly identify whether the network node needs to process the TLV in the message.
In one possible design, the indication information is included in the SRH of the message in TLV.
In a second aspect, an embodiment of the present application provides a method for message processing, where the method includes: the second network node obtains a first message; the second network node adds indication information and one or more TLVs which need to be processed by the network nodes on the forwarding path of the first message in the first message to generate a second message, wherein the indication information indicates that at least one network node needs to process at least one TLV in the one or more TLVs, and the indication information is also used for indicating the TLVs which need to be processed by the at least one network node. Through the technical scheme, the second network node controls which network nodes need to process the TLV of the message by including the indication information in the message. After receiving the message, the first network node determines whether the node needs to process the TLV contained in the message according to the indication information, and if the node determines that the TLV contained in the message needs to be processed, the first network node further determines which TLV or TLVs in the message need to be processed according to the indication information, so that the flexibility of message processing is improved, and a controller is not needed to configure TLV processing strategies for each network node independently
In one possible design, the indication information includes one or more indication entries, each indication entry including a first field to identify a network node that needs to process at least one of the one or more TLVs and a second field to identify a TLV that the network node identified by the first field needs to process.
In one possible design, the indication information further includes a third field to identify a number of network nodes that need to process the TLV. Optionally, the third field may also be used to identify the number of indication entries contained in the indication information.
In one possible design, the second field is a Bitmap field. The indication information further comprises a fourth field for identifying the length of the second field. The length of the Bitmap can be adjusted according to the number of TLVs that the network node needs to process, for example, when the number of the one or more TLVs is 1 to 8, the length of the Bitmap may be 1 byte (8 bits), and when the number of the one or more TLVs is 9 to 16, the length of the Bitmap may be 2 bytes.
In one possible design, the indication information is contained in a Processing Rule (PR) TLV, and the adding, by the second network node, the indication information in the first packet includes:
and the second network node adds SRH in the first message, wherein the SRH contains the PR TLV.
In a possible design, the first packet further includes an application identity (APP ID) or other application-related information, the second network node determines a forwarding path of the first packet according to the APP ID or other application-related information, determines a Segment List corresponding to the forwarding path, and then adds one or more TLVs that need to be processed by network nodes on the forwarding path to the first packet to generate the second packet.
In a possible design, the second network node determines the APP ID or other application-related information of the first packet according to the attribute information of the first packet, determines the forwarding path of the first packet according to the APP ID or other application-related information, determines the Segment List corresponding to the forwarding path, and then adds one or more TLVs to be processed by the network node on the forwarding path in the first packet to generate the second packet.
In a third aspect, an embodiment of the present application provides a network node, configured to perform the method in the first aspect or any one of the possible designs of the first aspect. In particular, the first network node comprises means for performing the first aspect or the method in any one of the possible designs of the first aspect.
In a fourth aspect, embodiments of the present application provide a network node, configured to perform the method of the second aspect or any one of the possible designs of the second aspect. In particular, the second network node comprises means for performing the method of the second aspect or any one of the possible designs of the second aspect.
In a fifth aspect, an embodiment of the present application provides a network node, which is applied to a network system including a plurality of network nodes, where the plurality of network nodes include a first network node and a second network node, the network node is the first network node, and the first network node includes: a processor and a network interface. The network interface is used for receiving and sending messages. The processor is configured to perform the method of the first aspect or any one of the possible designs of the first aspect.
In one possible design, the first network node further includes a memory, which may be configured to store instructions or program code, and the processor is configured to call the instructions or program code in the memory to perform the method of the first aspect or any one of the possible designs of the first aspect.
In a sixth aspect, an embodiment of the present application provides a network node, which is applied to a network system including a plurality of network nodes, where the plurality of network nodes include a first network node and a second network node, the network node is the second network node, and the second network node includes: a processor and a network interface. The network interface is used for receiving and sending messages. The processor is configured to perform the method of the second aspect or any one of the possible designs of the second aspect.
In one possible design, the second network node further includes a memory, which may be configured to store instructions or program code, and the processor is configured to call the instructions or program code in the memory to perform the method of the second aspect or any one of the possible designs of the second aspect.
In a seventh aspect, an embodiment of the present application provides a system for message processing, where the system includes the first network node and the second network node provided in the foregoing aspects.
In an eighth aspect, the present application provides a computer-readable storage medium including instructions or program code, which when executed on a computer, causes the computer to perform the method of the previous aspect.
In a ninth aspect, embodiments of the present application provide a computer program product comprising computer instructions, which when run on a network node, cause the network node to perform the method provided in the first aspect, the second aspect, any one of the possible implementations of the first aspect, or any one of the possible implementations of the second aspect.
In a tenth aspect, an embodiment of the present application provides a chip, which includes a memory and a processor, where the memory is used to store instructions or program codes, and the processor is used to call and execute the instructions or program codes from the memory to perform the method in the first aspect or any one of the possible designs of the first aspect, or the processor performs the method in the second aspect or any one of the possible designs of the second aspect.
In one possible design, the chip only includes a processor, and the processor is configured to read and execute instructions or program code stored in the memory, and when the instructions or program code are executed, the processor performs the method in the first aspect or any one of the possible designs of the first aspect, or the processor performs the method in the second aspect or any one of the possible designs of the second aspect.
Drawings
Fig. 1 is a schematic view of an application scenario of a message processing method according to an embodiment of the present application;
fig. 2A is a schematic diagram of an SRH format according to an embodiment of the present application;
fig. 2B is a schematic diagram of another SRH format provided in this embodiment of the present application;
fig. 3 is a schematic format diagram of a SID provided in the embodiment of the present application;
fig. 4A is a schematic structural diagram of an apparatus according to an embodiment of the present disclosure;
fig. 4B is a schematic structural diagram of an apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 6A is a schematic format diagram of a PR TLV provided in an embodiment of the present application;
fig. 6B is a schematic format diagram of another PR TLV provided in an embodiment of the present application;
fig. 7 is a schematic diagram of another SRH format provided in this embodiment of the present application;
fig. 8 is a schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 9A is a schematic view of an application scenario of a message processing method according to an embodiment of the present application;
fig. 9B is a schematic view of an application scenario of a message processing method according to an embodiment of the present application;
fig. 10A is a schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 10B is a schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 11A is a schematic format diagram of a PR TLV provided in an embodiment of the present application;
fig. 11B is a schematic format diagram of another PR TLV provided in an embodiment of the present application;
fig. 12 is a schematic structural diagram of a network node according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a network node according to an embodiment of the present application;
fig. 14 is a schematic diagram of a message processing system according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario of a message processing method according to an embodiment of the present application. As shown in fig. 1, the scenario includes network node A, B, C, D, E, F, G, H, I, K and R. The network nodes in the embodiments of the present application may be simply referred to as nodes.
The node with SR function needs to issue the SID of the node to other nodes in the network in advance, and can forward or process the packet according to the SRH. In the SRv6 technique, the SID issued by a node may be the IPv6 address of the node. The network node in the embodiment of the present application may be a router, a switch, or other network devices, where node a and node K may also be hosts or user access devices. The network configured by the scenario shown in fig. 1 may also be referred to as an SRv6 network.
In one example, the roles of the various nodes may be preconfigured. For example, node B may be configured by a controller in the network as a head node of the segment routing network, and node R, node E, node F, node H, and node I are segment end nodes in the segment routing network. After the role of each node is configured, each node can correspondingly process the message according to the configured role when receiving the message.
Taking the scenario shown in fig. 1 as an example, a node B receives a packet sent by a node a, where the packet is a packet based on an IPv6 protocol, and the packet includes an IPv6 packet header (header, Hdr) and a payload (payload), a simplified format of the IPv6 packet header is shown as IPv6 Hdr 1 in fig. 1, and the IPv6 packet header may be referred to as a first IPv6 packet header in this embodiment of the present application. A Source Address (SA) in the IPv6 header is an address of the node a, and a Destination Address (DA) is an address of the node K. Since the node B is a head node of the Segment routing network, the node B needs to add a Segment List corresponding to a packet forwarding path in a packet header. The Segment List contains the SID on the forwarding path, such as the node SID or the SID of a link. The node B may determine the forwarding path of the packet in the Segment routing network, and then generate the Segment List corresponding to the forwarding path. Optionally, the controller calculates a forwarding path according to the service requirement, generates a Segment List corresponding to the forwarding path, and then sends the Segment List to the node B. Assume that the forwarding path passes through nodes B, C, E, G, H and I. Among them, the nodes E, H and I are nodes with SR function, and three links formed between these three nodes constitute a segment routing link of a packet in the segment routing network, and therefore these three nodes may also be referred to as segment end nodes of the packet on a forwarding path of the segment routing network. The node B may add an SRH and a new IPv6 header to the packet, the simplified format of the SRH being shown as SRH in fig. 1, and the simplified format of the new IPv6 header being shown as IPv6 Hdr 2 in fig. 1. This new IPv6 header may be referred to as a second IPv6 header in embodiments of the present application. After the second IPv6 header is added to the packet, the first IPv6 header may also be part of the packet payload. Wherein, the SRH includes Segment List, and the Segment List includes: node E, H and the address of I. Optionally, SRH may also include the address of node K. The destination address of the header of the second IPv6 is the address of node E, and the source address is the address of node B. The node B sends the message with the SRH and second IPv6 headers added to it to node C. The node C determines that the destination address of the second IPv6 message header of the message is not the address of the node C, so the node C directly searches the forwarding table according to the destination address in the second IPv6 message header of the message and sends the message to the node E. After receiving the message, the node E determines that the destination address in the header of the second IPv6 message is the address of the node E, the node E analyzes the SRH of the message, and updates the destination address in the header of the second IPv6 message with the next SID after the SID of the node E in the Segment List in the SRH, that is: and updating the destination address in the header of the second IPv6 message by using the address of the node H, and forwarding the updated message to the node H through the node G. The mode of processing the message by the node G is similar to the mode of processing the message by the node C, and the forwarding table is directly searched according to the destination address in the header of the second IPv6 message of the message to forward the message. After the node H receives the message, because the destination address in the header of the second IPv6 message is the address of the node H, the node H parses the SRH of the message, and updates the destination address in the header of the second IPv6 message with the next SID after the SID of the node H in the Segment List in the SRH, that is: and updating the destination address in the header of the second IPv6 message by using the address of the node I, and forwarding the updated message to the node I. After the node I receives the message, the SID of the node I is determined to be the last SID in the Segment List according to the forwarding path, the SRH and the second IPv6 message header in the message can be deleted, and the first IPv6 message header is used for message forwarding. Since the destination address of the header of the first IPv6 message is the address of the node K, the node I sends the message to the node K. By the above method, the node a can send the message to the node K through the SRv6 network.
Fig. 2A is a schematic diagram of an SRH format according to an embodiment of the present application. As shown in fig. 2A, the SRH includes a field for indicating a Next Header Type (Next Header), a field for indicating a length of the SRH Header (Hdr Ext Len), and a field for indicating a Routing Type (Routing Type). The SRH also includes a field, which may also be referred to as a remaining nodes field, for indicating the number of segmented end nodes (SL) that the message should also pass through. The SRH further includes a field for indicating an index (Last Entry) of the Last element in the Segment List, a field for indicating an identification (Flags) of the packet, and a field for indicating a same group packet (Tag). The SRH also includes Segment List Segment List, Segment List includes Segment List [0], Segment List [1], … …, Segment List [ n ]. Wherein each element in the Segment List corresponds to a SID, each SID may be a part of an IPv6 address or an IPv6 address, and each SID is used to identify a network node or a link.
In addition, as shown in fig. 2A, the SRH further includes optional TLVs (optional type length values), and the SRH can implement more functions, such as fault diagnosis and detection, IOAM, and the like, through the optional TLVs.
Fig. 2B is a schematic diagram of another SRH format provided in this embodiment of the present application. The SRH shown in fig. 2B differs from the SRH shown in fig. 2A in that one or more elements in the Segment List in fig. 2A may contain SIDs of multiple nodes in fig. 2B, such as: the location of Segment List [1] in FIG. 2B includes CSID 1, CSID 2, CSID 3, and CSID 4. CSID 1, CSID 2, CSID 3, and CSID4 are each SIDs of a node. The element of a Segment List of 128 bits in FIG. 2A can store SIDs of multiple nodes in FIG. 2B, in which case the SIDs can be compressed SIDs, each of which occupies less than 128 bits, for example, as in FIG. 2B, each of which occupies 32 bits. In addition, in fig. 2B, the SRH further includes a compressed SID-remaining (CL) field for identifying the position of the compressed SID in the Segment List containing the compressed SID. For example, referring to fig. 9B, after the node E receives the packet, it determines that the destination address of the IPv6 header of the packet is the address of the node E, and further determines that SL in the SRH is equal to 1, and then obtains the SID of the next node in the packet forwarding process from the Segment List [1 ]. Since the node E knows that its SID is compressed, it determines the SID of the next node on the packet forwarding path according to the value of CL, specifically, it may determine the SID of the next-hop node through the value of CL, for example, when the value of CL is 1, obtain the 1 st CSID in Segment List [1], that is, determine the SID of the next-hop node is CISD 1. The SRH containing the compressed SID may be referred to as a Compressed Routing Header (CRH) or a compressed segment routing header (C-SRH).
In some embodiments, as shown in FIG. 3, each SID is a 128-bit IPv6 address. Each SID may include two portions, a Locator (Locator) field and a Function (Function) field. The positioning field occupies the upper bits of the 128 bits. For example, the Function field occupies bits 64-127 of the 128 bits, and the Locator field occupies bits 0-63 of the 128 bits. The Locator field is used for routing and forwarding the message, and the Function field is used for indicating the node corresponding to the SID to execute a specific Function.
Fig. 4A is a schematic structural diagram of an apparatus 400 according to an embodiment of the present disclosure. The nodes in fig. 1 may be implemented by the apparatus shown in fig. 4A. Referring to fig. 4A, the device 400 includes at least one processor 401, a communication bus 402 and at least one network interface 404, and optionally the device 400 may also include a memory 403.
The processor 401 may be a general processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more Integrated Circuits (ICs) for controlling the execution of programs according to the present disclosure. The processor may be configured to process the received packet, so as to implement the packet processing method provided in this embodiment.
For example, when the head node in fig. 1 is implemented by the apparatus shown in fig. 4A, the processor may be configured to add, in the received packet, an SRH including a TLV that needs to be processed by the network node, so that a subsequent segmented end node may process the TLV, where a specific function is implemented as a processing portion of a corresponding node in the referential method embodiment. For another example, when the segmentation end node in fig. 1 is implemented by the device shown in fig. 4A, the processor may be configured to acquire a TLV from a received message carrying an SRH, and process the TLV, where a specific function is implemented by the processing portion of the segmentation end node in the reference method embodiment.
The communication bus 402 is used to transfer information between the processor 401, the network interface 404, and the memory 403.
Memory 403 may be, but is not limited to, a read-only Memory (ROM) or other type of static storage device that may store static information and instructions, Memory 403 may also be a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, a compact disk read-only Memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 403 may be separate and coupled to the processor 401 through a communication bus 402. The memory 403 may also be integrated with the processor 401.
Optionally, the memory 403 is used for storing program codes or instructions for executing the scheme of the present application, and is controlled by the processor 401 to execute. Processor 401 is operative to execute program code or instructions stored in memory 403. One or more software modules may be included in the program code. Alternatively, the processor 401 may also store program code or instructions for performing aspects of the present application, in which case the processor 401 need not read the program code or instructions into the memory 403.
The network interface 404 may be a transceiver or the like for communicating with other devices or a communication network, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), or the like. In this embodiment, the network interface 404 may be configured to receive a packet sent by another node in the segment routing network, and may also send a packet to another node in the segment routing network. The network interface 404 may be an ethernet (ethernet) interface, a Fast Ethernet (FE) interface, or a Gigabit Ethernet (GE) interface.
In particular implementations, device 400 may include multiple processors, such as processor 401 and processor 405 shown in FIG. 4A, for example, as an embodiment. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
Fig. 4B is a schematic structural diagram of an apparatus 500 according to an embodiment of the present disclosure. The node in fig. 1 may be implemented by the apparatus shown in fig. 4B. Referring to the schematic device structure shown in fig. 4B, the device 500 includes a main control board and one or more interface boards. The main control board is in communication connection with the interface board. The main control board, also called Main Processing Unit (MPU) or route processor card (route processor card), includes a CPU and a memory, and is responsible for controlling and managing various components in the device 500, including routing computation, device management, and maintenance functions. An interface board is also called a Line Processing Unit (LPU) or a line card (line card) and is used for receiving and transmitting messages. In some embodiments, the master control board communicates with the interface board or the interface board communicates with the interface board through a bus. In some embodiments, the interface boards communicate with each other through a switch board, in which case the device 500 also includes a switch board, the switch board is communicatively connected to the main control board and the interface boards, the switch board is used to forward data between the interface boards, and the switch board may also be referred to as a Switch Fabric Unit (SFU). The interface board includes a CPU, memory, a forwarding engine, and Interface Cards (ICs), which may include one or more network interfaces. The network interface can be an Ethernet interface, an FE interface or a GE interface. The CPU is in communication connection with the memory, the forwarding engine and the interface card respectively. The memory is used for storing a forwarding table. The forwarding engine is configured to forward the received message based on a forwarding table stored in the memory, and if a destination address of the received message is an Internet Protocol (IP) address of the device 500, send the message to a CPU of the main control board or the interface board for processing; if the destination address of the received message is not the IP address of the device 500, the forwarding table is searched according to the destination, and if the next hop and the outbound interface corresponding to the destination address are found from the forwarding table, the message is forwarded to the outbound interface corresponding to the destination address. The forwarding engine may be a Network Processor (NP). The interface card is also called a daughter card and can be installed on an interface board and is responsible for converting photoelectric signals into data frames, and forwarding the data frames to a forwarding engine for processing or an interface board CPU after validity check is carried out on the data frames. In some embodiments, the CPU may also perform the functions of a forwarding engine, such as implementing soft forwarding based on a general purpose CPU, so that no forwarding engine is needed in the interface board. In some embodiments, the forwarding engine may be implemented by an application-specific integrated circuit (ASIC) or a Field Programmable Gate Array (FPGA). In some embodiments, the memory storing the forwarding table may also be integrated into the forwarding engine as part of the forwarding engine.
As shown in fig. 1, a head node in the segment routing network adds an SRH to a received packet, where the SRH includes one or more TLVs that need to be processed by a network node on a packet forwarding path, and when each node in the segment routing network receives a packet including an SRH, it first determines whether the TLVs included in the SRH need to be processed according to indication information in the packet, and if it is determined that one or more of the TLVs included in the SRH need to be processed, it is further determined which TLV needs to be processed. And after the specific TLVs needing to be processed are determined, processing the TLVs needing to be processed. Processing the TLV in the embodiments of the present application refers to adding information in the TLV or performing corresponding operations according to the content of the TLV. The above process will be described below by way of examples.
Referring to fig. 5 in conjunction with the application scenario shown in fig. 1, an embodiment of the present application provides a method for processing a message. As shown in fig. 5, the method includes the steps of:
s501, the second network node obtains the first message. The second network node may be a node B in the scenario shown in fig. 1. The second network node may obtain the first packet in two ways:
in the first mode, the second network node receives the first packet sent by node a in fig. 1.
In the second mode, the second network node itself generates the first packet.
S502, the second network node adds the indication information and one or more TLVs to be processed by the network node on the forwarding path of the first packet in the first packet to generate a second packet. The indication information indicates that at least one network node needs to process at least one of the one or more TLVs. The indication information is also used to indicate which one or more TLVs the at least one network node needs to process. Optionally, the second network node determines a forwarding path of the first packet according to the related information of the first packet, and then determines one or more TLVs that need to be processed by the network node according to a location or a function of the network node on the forwarding path or an attribute of the packet. The relevant information of the first packet may be a combination of one or more elements in the five-tuple of the first packet, for example, the second network node determines a forwarding path according to the destination address of the first packet.
In one example, the indication information includes one or more indication entries, each of the indication entries including a first field for identifying a network node that needs to process at least one of the one or more TLVs and a second field for identifying a TLV that needs to be processed by the network node identified by the first field.
In one example, the second network node stores a TLV Policy (Policy) that includes a correspondence between the message attributes and TLVs that need to be added to the message. For example, the second network node receives the first packet from the user-side device (e.g., node a in fig. 1), matches the TLV policy according to the packet attribute of the first packet, and adds the TLV in the TLV policy to the first packet to generate the second packet. The five-tuple of the message includes: destination address, source address, destination port number, source port number, and protocol number. The message attribute may be any one element in a five-tuple of the message or a combination of multiple elements, for example: the message attribute is the destination address of the message, or the attribute of the message is the combination of the destination address and the source address of the message.
In one example, the indication information is contained in the SRH of the packet in a TLV, which may be referred to as a PR TLV. Referring to fig. 6A, fig. 6A is a schematic diagram of a message format of indication information provided in the embodiment of the present application, where a PR TLV includes:
a Type (Type) field for indicating that the Type of the TLV is a PR TLV;
a Length (Length) field to indicate a Length of a data portion of the PR TLV;
a Bitmap length (Bitmap length) field for identifying the length of a Bitmap in the PR TLV, such as the byte length occupied by Bitmap n or Bitmap m;
an Index number (Index No) field for identifying the number of nodes that need to process the TLV of the packet, or identifying the number of indication entries contained in the PR TLV;
a segment identifier index n (sid index n) field for identifying a node that needs to process TLV in the message, and the value of the segment identifier index n (sid index n) field corresponds to the SL corresponding to the node;
bitmap n (bitmap n) field for identifying TLV that needs to be processed by the node corresponding to SID index n;
a segment identifier index m (sid index m) field, configured to identify another network node that needs to process the TLV in the message, where a value of the segment identifier index m corresponds to a SL corresponding to the node;
a bitmap m (bitmap m) field, configured to identify a TLV that needs to be processed by the network node corresponding to the SID index m.
In the PR TLV format shown in fig. 6A, a combination of SID index and Bitmap may be used as one indication entry in the indication information. For example: the combination of SID index n and Bitmap n may be used as an indication entry of the indication information. The combination of SID index m and Bitmap m may be another indication entry of the indication information. The indication Entry may also be referred to as a Processing Rule Entry (Processing Rule Entry). The SID index is a first field in the indication entry, and is used for identifying a node that needs to process the TLV in the message. Bitmap is a second field in the indication entry for identifying TLVs that the node identified by the first field needs to process. The Index No may be used as a third field of the indication information for identifying the number of network nodes that need to process the TLV of the packet. A Bitmap length may be used as a fourth field of the indication information for identifying the length of the second field in the indication entry.
Referring to fig. 6B, fig. 6B is another schematic diagram of a packet format of indication information provided in this embodiment, where meanings of a type field, a length field, a Bitmap length field, an Index No, an SID Index, and a Bitmap field are the same as those of corresponding fields in fig. 6A. The compressed segment identification Index (CSID Index) field in fig. 6B is used along with the SID Index to determine a node that needs to process the TLV in the message. In this case, a combination of the SID index, CSID, and Bitmap may be one indication entry in the indication information. For example, a combination of SID index n, CSID index n, and Bitmap n may be used as one indication entry of the indication information, and a combination of SID index m, CSID index m, and Bitmap m may be used as another indication entry of the indication information.
Referring to fig. 7, fig. 7 is a schematic diagram of an SRH format containing a PR TLV according to an embodiment of the present application, where the PR TLV is located between a Segment List and an optional TLV that needs to be processed by a node in the SRH.
S503, the second network node sends the second packet to the first network node on the forwarding path.
S504, the first network node receives a second message sent by the second network node.
S505, the first network node determines that the first network node is required to process at least one TLV in the one or more TLVs according to the indication information. And determining TLVs required to be processed by the first network node according to the indication information, wherein the TLVs required to be processed by the first network node can comprise one or more TLVs.
In one example, when a first network node determines that a particular indication entry is included in the one or more indication entries, and a value of a first field of the particular indication entry corresponds to a value of a SL in an SRH of the packet, the first network node determines that the first network node is required to process at least one of the one or more TLVs. The specific correspondence between the value of the first field in the specific indication entry and the value of the SL of the message SRH is as follows: the value of the first field is equal to the value of SL in SRH, or the value of the first field is equal to the value of SL in SRH plus n, i.e., the value of the first field is SL + n, where n is an integer greater than or equal to 1.
In one example, the first field includes a first subfield and a second subfield, and the determining, by the first network node from the indication information, that the first network node is required to process at least one TLV of the one or more TLVs includes: when the first network node determines that a particular indication entry is included in the one or more indication entries, and a value of a first subfield of the particular indication entry corresponds to a value of a SL in an SRH of the packet, and a value of a second subfield corresponds to a value of a CL in the SRH of the packet, the first network node determines that the first network node is required to process at least one TLV of the one or more TLVs. In conjunction with fig. 6B, the first field in the indication entry is the combination of < SID index, CSID index > in fig. 6B. Wherein, the first subfield of the first field is a SID index, and the second subfield of the first field is a CSID index.
In one example, the value of the first subfield in the specific indication entry and the value of the SL of the message SRH correspond to specifically: the value of the first sub-field is equal to the value of SL in SRH, or the value of the first sub-field is equal to the value of SL in SRH plus n, i.e., the value of the first sub-field is SL + n, where n is an integer greater than or equal to 1. The value of the second subfield and the value of the remaining compressed segment identifier in the SRH of the packet specifically are: the value of the second sub-field is equal to the value of the remaining compressed segment identifier in the SRH, or the value of the second sub-field is equal to the value of the remaining compressed segment identifier in the SRH plus n, that is, the value of the second sub-field is the remaining compressed segment identifier + n, where n is an integer greater than or equal to 1.
In one example, when a first network node determines that a particular indication entry is included in the one or more indication entries and a value of a first field of the particular indication entry is the same as an identification of the first network node, the first network node determines that the first network node is required to process at least one of the one or more TLVs.
S506, the first network node processes the TLV which needs to be processed by the first network node.
In one example, the first network node determines the TLV identified by the second field of the particular indication entry to be a TLV that requires processing by the first network node. For example, when the second field is a Bitmap, and the first network node determines that the 1 st bit and the 3 rd bit of the Bitmap field are both set to 1, the first network node determines that the first network node needs to process the 1 st TLV and the 3 rd TLV of the multiple TLVs, respectively. Optionally, when the second field is a specific value, if the second field takes a value of 4, the first network node determines that the first network node is required to process a 4 th TLV of the multiple TLVs, or, when the second field takes a value of 34, the first network node determines that the first network node is required to process a 3 rd TLV and a 4 th TLV of the multiple TLVs.
In one example, the first network node determines the location of the particular indication entry in the message according to the following formula:
the start position of the specific indication entry in the message is ═ the end position of the third field in the message + (value-1 of the third field) (length of the first field + length of the second field). In this formula "+" represents the meaning of multiplication.
The meaning of this formula is: the position of the third field after the end position in the message is shifted by a specific length, which is the product of (the value of the third field-1) and (the length of the first field + the length of the second field), is the starting position of the specific indication entry in the message. The end position of the third field in the message may also be referred to as the tail of the third field in the message.
Through the technical scheme, the second network node controls which network nodes need to process the TLV of the message by including the indication information in the message. After receiving the message, the first network node determines whether the node needs to process the TLV contained in the message according to the indication information, and if the node determines that the TLV contained in the message needs to be processed, the first network node further determines which TLV or TLVs in the message need to be processed according to the indication information, so that the flexibility of message processing is improved, and a controller is not needed to configure TLV processing strategies for each network node independently.
Referring to fig. 8 in conjunction with the application scenario shown in fig. 1, an embodiment of the present application provides a flow chart of a method for processing a message. As shown in fig. 8, the method includes the steps of:
s801, a first network node issues a capability advertisement message to other nodes in the network, where the capability advertisement message indicates a capability of the first network node to identify a PR TLV in a message, that is, the first network node supports a capability of processing a specified TLV in the message.
S802, the second network node obtains the first message and inserts SRH into the first message to generate a second message. The SRH includes a Segment List, PR TLV in the previous embodiments, and TLV that needs to be processed by the network node. Wherein the TLVs that need to be processed by the network node are arranged in order, such as TLV1, TLV2, and TLV 3. After the second network node receives the capability advertisement message sent by the first network node, if the first network node is determined to be on the forwarding path of the first packet and the first network node is required to process the specific TLV according to the network topology or the service requirement, an indication entry corresponding to the first network node is added in the PR TLV to indicate the first network node to process the specific TLV in the packet.
S803, the second network node sends the second packet to the first network node.
S804, after receiving the second message, the first network node analyzes the PR TLV and judges whether the first network node needs to process the TLV contained in the second message.
In an example, the first network node obtains an indication entry that the first network node may identify according to an Index No in the PR TLV and according to the formula in the embodiment shown in fig. 5, and the first network node determines whether the first network node needs to process the TLV in the second packet according to the SL in the SRH of the received second packet, for example: and when the SL is the same as the SID index in the obtained indication entry, determining that the first network node is required to process the TLV corresponding to the Bitmap in the obtained indication entry.
S805, when the first network node determines that the first network node is required to process the TLVs included in the second packet, it further determines which TLV or TLVs included in the second packet are required to be processed by the first network node.
In one example, the second network node determines the TLVs that need to be processed by the first network node from the bitmaps in the obtained indication entry. For example, from the lower order to the upper order of the Bitmap, the bit number of the bit with the Bitmap setting of 1 corresponds to the serial number of the TLV that needs to be processed by the first network node, for example, when the 2 nd bit of the Bitmap takes the value of 1, the first network node determines that the 2 nd TLV in the TLVs that needs to be processed by the second packet is included.
S806, the first network node processes the TLV which is determined to need to be processed by the first network node. For example, when the first network node confirms that the TLV to be processed is the IOAM TLV, the first network node adds the time for receiving the second packet or the outbound interface for sending the second packet to the IOAM TLV according to the indication of the IOAM TLV.
And when the first network node determines that the first network node is not required to process the TLV contained in the second message, avoiding processing the TLV contained in the second message.
The hardware structures of the first network node and the second network node in the embodiment of the present application may be as shown in fig. 4A or fig. 4B.
Through the technical scheme, after receiving the message, the first network node determines whether the node needs to process the TLV contained in the message according to the indication information, if the TLV in the message needs to be processed, the first network node further determines which TLV or TLVs in the message need to be processed according to the indication information, and if the TLV in the message does not need to be processed, the TLV in the message is avoided being processed, so that the flexibility of message processing can be improved.
With reference to fig. 9A, a method for processing a message provided in the embodiment of the present application is exemplified, and referring to fig. 10A, the method specifically includes the following steps:
s1001, the node B receives a first message from the node A, the first message is an IPv6 message, the destination address of a first IPv6 message header of the first message is the IPv6 address of the node K, and the source address of a first IPv6 message header is the IPv6 address of the node A. The node B obtains a forwarding policy, which may be obtained by the node B from a controller in the network or may be configured in advance on the node B. The forwarding policy is shown in table 1, where the matching condition may be any one element in the five-tuple of the packet or a combination of multiple elements in the five-tuple of the packet, for example: the matching condition is the destination address of the message, or the matching condition is the combination of the destination address and the source address of the message. When the matching condition is the combination of the destination address and the source address of the message, the matching is successful only if the source address of the message is matched with the source address of the matching condition and the destination address of the message is matched with the destination address of the matching condition. Optionally, the matching condition may further include an APP ID or other application-related information, for example, the matching condition includes a combination of the APP ID of the first packet and one or more elements in the five-tuple of the packet, such as an entry with sequence number 2 in table 1, where the matching condition is: and combining the APP ID and the destination address of the message. The forwarding policy includes a correspondence between the matching condition and the Segment List. The matching condition may be a destination address of the packet, such as an IPv6 address of the node K, E in the Segment List represents an IPv6 address of the node E or an SID of the node E, H represents an IPv6 address of the node H or an SID of the node H, and I represents an IPv6 address of the node I or an SID of the node I.
Table 1 forwarding policy
Figure BDA0002273882130000141
The node B also obtains the TLV policy as in step S501, which is shown in table 2. The message attribute may be any one or combination of five tuples of the message, or other information in the message such as: differentiated Services Code Point (DSCP) or APP ID, etc. The combination of the forwarding policy and the TLV policy may also become an SR policy. The TLV options are TLVs that need to be added to the packet, where TLV1, TLV2, and TLV3 are arranged in order after the PR TLV in fig. 7, such as the order: PR TLV, TLV1, TLV2, and TLV 3.
TABLE 2 TLV policy
Figure BDA0002273882130000142
In one example, TLV1 may be a Firewall (FW) TLV, TLV2 may be an IOAM TLV, and TLV3 may be a deterministic network (DetNet) TLV. The DetNet TLV needs to be handled at nodes with multiple elections, such as: and (4) an I node. The FW TLV may be handled by node E and the OAM TLV may be handled by node E, H. Wherein, the DetNet TLV carries the message serial number. And the node which needs to process the DetNet TLV selects and stores the 1 st received message with the sequence number according to the message sequence number carried by the DetNet TLV, and discards the message with the sequence number after subsequent receiving. The IOAM TLV carries an indication of parameters related to network performance that need to be collected, for example, the node that needs to process the IOAM TLV is instructed to add the time of receiving the packet, the ingress interface of the received packet, or the egress interface information of the sent packet to the IOAM TLV, which is convenient for the network management device or other nodes to perform network performance detection. The FW TLV contains indication information for indicating that a network node which needs to process the FW TLV sends a message to the firewall for processing.
S1002, the node B matches a forwarding strategy according to the relevant information of the first message. For example, the forwarding policy is matched according to the destination address of the header of the first IPv 6. For example, when the destination address of the header of the first IPv6 is matched to the entry corresponding to sequence number 1 in the forwarding policy, the Segment List of entry 1 is obtained. And then adding an SRH and a second IPv6 message header in the message of the first message to generate a second message, wherein the SRH comprises a Segment List of a table entry with the sequence number of 1. Then, according to the attribute of the first packet, the TLV policy shown in table 2 is matched, for example, the table entry with sequence number 1 in table 2 is matched, and then the TLV option in the TLV policy in the table entry with sequence number 1 is added to the SRH. And the SL field in the SRH is set to 2, and the SL setting to 2 indicates that the packet sent by the node a will pass through 3 nodes capable of processing the SRH in the SRv6 network, where the 3 nodes are respectively a node E, a node H, and a node I. In the process of forwarding the message sent by the node a through the SRv6 network, 3 Segment List elements in the SRH are used, which are: segment List [0], Segment List [1] and Segment List [2 ]. The source address of the header of the second IPv6 is the address of node B, and the destination address is the address of node E.
And the node B determines the TLV which needs to be processed by each node according to the position or the capability of each node in the Segment List in the network. For example, node I is a multi-selective receiving node, i.e. node I may receive packets from a G node or an H node, but needs to selectively discard some packets. Therefore, node I needs to process TLV3 in the message. Node E is a firewall-connected node and needs to be instructed to send a packet to the firewall connected to node E, and therefore, node E needs to process TLV 1. Nodes E and H may need to collect information relevant for measuring network performance and therefore need to process TLV 2.
Node B then generates PR TLVs according to the TLVs that each node needs to process and adds the PR TLVs to SRH. And the node B sends a second message to the node E. Specific definition of PR TLV reference is made to the embodiment shown in fig. 5. The value of the field in the PR TLV can be seen in fig. 11A, where the value of Index No in the PR TLV is 3, which indicates that 3 network nodes are required to process the TLV included in the packet, and the 3 nodes are E, H and I, respectively. Since node E needs to process TLV1 and TLV2, node H needs to process TLV2, and node I needs to process TLV3, 3 indication entries are included in PR TLV. Optionally, the Bitmap length of each indication entry occupies 1 byte, that is: 8 bits (bit). Each SID index occupies 1 byte in the PR TLV. The SID index corresponding to the 1 st indication entry takes the value of 2, the Bitmap of the 1 st indication entry is at the 1 st bit and the 2 nd bit position 1 according to the sequence from the lower bit to the upper bit, or the Bitmap of the 1 st indication entry is at the 1 st bit and the 2 nd bit position 1 according to the sequence from the upper bit to the lower bit, and the network node corresponding to the SID index identifying the 1 st indication entry needs to process the 1 st TLV and the 2 nd TLV, that is, TLV1 and TLV 2. Alternatively, referring to fig. 11A, the order of bitmaps from low to high may also be understood as the order from the right to the left in fig. 11A, and the order of bitmaps from high to low may also be understood as the order from the left to the right in fig. 11A. The value of the SID index corresponding to the 2 nd indication entry is 1, the Bitmap of the 2 nd indication entry is at the 2 nd bit position 1 in the sequence from the lower bit to the upper bit, or the Bitmap of the 2 nd indication entry is at the 2 nd bit position 1 in the sequence from the upper bit to the lower bit, and the network node corresponding to the SID index identifying the 2 nd indication entry needs to process the 2 nd TLV, that is, TLV 2. The value of the SID index corresponding to the 3 rd indication entry is 0, the Bitmap of the 3 rd indication entry is at the 3 rd bit position 1 in the sequence from the lower bit to the upper bit, or the Bitmap of the 3 rd indication entry is at the 3 rd bit position 1 in the sequence from the upper bit to the lower bit, and the network node corresponding to the SID index identifying the 3 rd indication entry needs to process the 3 rd TLV, that is, TLV 3.
S1003, the node E receives the second message. After determining that the destination address of the header of the second IPv6 packet of the second packet is the address of the node E, analyzing the PR TLV in the SRH to obtain the value of the Index No in the PR, and then determining an indication entry that the node E may recognize according to the Index No as follows:
the offset is (Index No-1) × (length of Bitmap + length of SID Index) bytes from the end of Index No at the position of PR TLV, i.e. 4 bytes from Index No at the end of PR TLV ((3-1) × (1+1) ═ 4). The shifted position is the starting position of the indication item to be identified.
In the above manner, the obtained indication entry is the 1 st indication entry, that is, the indication entry corresponding to SID index of 2, that is, the first indication entry in S1002. The node E determines that the SID index of the first indication entry corresponds to the SL in the SRH of the packet received by the node E, that is: SID index equals SL (SID index takes 2, SL also takes 2). And the node E determines that the TLVs contained in the second message need to be processed, and particularly determines which TLV needs to be processed according to the Bitmap in the first indication entry. The node E further analyzes the Bitmap of the first indication entry to determine that the value of the 1 st bit and the 2 nd bit of the Bitmap of the first indication entry are 1, and then the node E determines the 1 st TLV and the 2 nd TLV, that is, TLV1 and TLV2, in the TLV which needs to be processed by the network node and is included in the second packet, that is: FW TLVs and IOAM TLVs. And the node E adds the time for receiving the second message or the input interface for receiving the second message into the IOAM TLV according to the indication of the IOAM TLV, and further sends the second message to the firewall for processing according to the indication of the FW TLV.
And after the node E processes the FW TLV and the IOAM TLV, replacing the destination address of the header of the second IPv6 message of the second message with the address of the node H, subtracting 1 from SL to obtain 1, subtracting 1 from Index No and converting 2 from Index No in PR TLV to obtain a third message. And sending the third message to the node H.
S1004, the node H receives the third packet. After determining that the destination address of the header of the second IPv6 packet of the third packet is the address of the node H, analyzing the PR TLV in the SRH to obtain the value of the Index No in the PR, and then determining an indication entry that the node E may recognize according to the Index No as follows:
the offset is (Index No-1) × (length of Bitmap + length of SID Index) bytes from the end of Index No at the position of PR TLV, i.e., 2 bytes from Index No at the end of PR TLV ((2-1) × (1+1) ═ 2).
In the above manner, the obtained indication entry is the 2 nd indication entry, that is, the indication entry corresponding to the SID index being 1, that is, the second indication entry in S1002. The node H determines that the SID index of the second indication entry corresponds to the SL in the SRH of the packet received by the node H, that is: SID index equals SL (SID index takes on value of 1, and SL also takes on value of 1). And the node H determines that the TLVs contained in the third message need to be processed, and particularly determines which TLV needs to be processed according to the Bitmap in the second indication entry. The node H further analyzes to obtain a Bitmap of the second indication entry, and determines that a 2 nd bit of the Bitmap of the second indication entry takes a value of 1, then the node E determines that a 2 nd TLV, that is, TLV2, in TLVs which need to be processed by the network node and are included in the third packet needs to be processed, that is: IOAM TLV. And the node H adds the time for receiving the third message or the incoming interface for receiving the third message into the IOAM TLV according to the indication of the IOAM TLV.
And after the node H processes the IOAM TLV, replacing the destination address of the header of the second IPv6 message of the third message with the address of the node I, subtracting 1 from SL, changing SL into 0, subtracting 1 from Index No in PR TLV, and changing Index No into 1 to obtain a fourth message. And sending the fourth message to the node I.
S1005, the node I receives the fourth packet. After determining that the destination address of the header of the second IPv6 packet of the fourth packet is the address of the node I, parsing PR TLV in SRH to obtain the value of Index No in PR, and then determining an indication entry that the node I may recognize according to the Index No as follows:
the position of the PR TLV at the end of the Index No is shifted by (Index No-1) × (length of Bitmap + length of SID Index) bytes, that is, by 0 bytes ((1-1) × (1+1) ═ 0) at the end of the PR TLV, that is, the end of the Index No is the head of the indication entry to be obtained.
In the above manner, the obtained indication entry is the 3 rd indication entry, that is, the indication entry corresponding to the SID index being 0, that is, the third indication entry in S1002. The node I determines that the SID index of the third indication entry corresponds to the SL in the SRH of the packet received by the node I, that is: SID index equals SL (SID index takes the value of 0, and SL also takes the value of 0). And the node I determines that the TLVs contained in the fourth message need to be processed, and particularly determines which TLV needs to be processed according to the Bitmap in the third indication entry. The node H further analyzes to obtain a Bitmap of the third indication entry, and determines that the 3 rd bit of the Bitmap of the third indication entry takes a value of 1, then the node I determines that the 3 rd TLV, that is, TLV3, in the TLVs included in the fourth packet needs to be processed, that is: DetNet TLV.
And after the node I processes the DetNet TLV, judging that the value of the SL is 0, deleting the SRH and the second IPv6 message header of the fourth message to obtain a fifth message, wherein the message header of the fifth message is the first IPv6 message header, and the fifth message is also the first message in the S1001. And sending the fifth message to the node K according to the destination address of the first IPv6 message.
Through the technical scheme, the network node can determine whether the network node needs to process the TLVs in the message according to the indication information contained in the received message, and if the TLVs in the message need to be processed, the network node further determines which TLVs in the message need to be processed according to the indication information and then processes the TLVs which need to be processed. Therefore, according to the actual situation of the network topology, the TLV of the message required to be processed by the network nodes can be flexibly controlled through the indication information of the message, and the TLV of the message can be processed by the network nodes, so that the flexibility of message processing is improved.
With reference to fig. 9B, a method for processing a message provided in the embodiment of the present application is exemplified, and referring to fig. 10B, the method specifically includes the following steps:
s1101, the node B receives a first message from the node A, wherein the first message is an IPv6 message, the destination address of the first IPv6 message header of the first message is the IPv6 address of the node K, and the source address of the first IPv6 message header is the IPv6 address of the node A. Node B also obtains a forwarding policy as shown in table 1 and a TLV policy as shown in table 2. E in the Segment List in the forwarding policy represents the IPv6 address of the node E or the SID of the node E, H represents the IPv6 address of the node H or the SID of the node H, and I represents the IPv6 address of the node I or the SID of the node I. Here, the addresses of E and H are compressed addresses, and may also be understood as compressed SIDs. For example, each compressed SID occupies 32 bits, and the position of one element in the Segment List can store 4 compressed SIDs, as shown in fig. 2B, CSID 1 can be the compressed SID of node E, and CSID 2 is the compressed SID of node H. The values of CSID 3 and CSID4 are 0, and do not correspond to the compressed SID of any node.
S1102, the node B matches a forwarding strategy according to the destination address of the first IPv6 message header of the received first message. And obtaining the Segment List in the table 1, and then adding an SRH and a second IPv6 message header in the first message to generate a second message, wherein the SRH comprises the Segment List. Then, the TLV strategy is matched according to the attribute of the message, and then TLV options in the TLV strategy are added into the SRH.
And the node B determines the TLV which needs to be processed by each node according to the position or the capability of each node in the Segment List in the network. For example, node I is a multi-selective receiving node, i.e. node I may receive packets from a G node or an H node, but needs to selectively discard some packets. Therefore, node I needs to process TLV3 in the packet. Node E is a firewall-connected node and needs to be instructed to send a packet to the firewall connected to node E, and therefore, node E needs to process TLV 1. Nodes E and H may need to collect information relevant for measuring network performance and therefore need to process TLV 2.
Node B then generates PR TLVs according to the TLVs that each node needs to process and adds the PR TLVs to SRH. And the node B sends a second message to the node E. Specific definition of PR TLV reference is made to the embodiment shown in fig. 5. The value of the field in the PR TLV can be seen in fig. 11B, where the value of Index No in the PR TLV is 3, which indicates that 3 network nodes are required to process the TLV included in the packet, and the 3 nodes are E, H and I, respectively. Since node E needs to process TLV1 and TLV2, node H needs to process TLV2, and node I needs to process TLV3, 3 indication entries are included in PR TLV. The Bitmap length of each indication entry may be adjusted according to the number of TLVs that need to be processed, e.g. in fig. 11B the Bitmap takes 2 bytes, i.e.: 16 bits (bit). In the PR TLV, each SID index occupies 1 byte, and the CSID index occupies 1 byte. The SID index of the 1 st indication entry takes a value of 1, the CSID index of the 1 st indication entry takes a value of 1, the Bitmap of the 1 st indication entry takes the 1 st bit and the 2 nd bit position 1 in sequence from the lower bit to the upper bit, or the Bitmap of the 1 st indication entry takes the 1 st bit and the 2 nd bit position 1 in sequence from the upper bit to the lower bit, and the network node corresponding to the < SID index, CSID index > identifying the 1 st indication entry needs to process the 1 st TLV and the 2 nd TLV, that is, TLV1 and TLV 2. The SID index corresponding to the 2 nd indication entry takes the value of 1, the CSID index of the 2 nd indication entry takes the value of 2, the Bitmap of the 2 nd indication entry takes the 2 nd bit position 1 according to the sequence from the lower bit to the upper bit, or the Bitmap of the 2 nd indication entry takes the 2 nd bit position 1 according to the sequence from the upper bit to the lower bit, and the network node corresponding to the < SID index, CSID index > identifying the 2 nd indication entry needs to process the 2 nd TLV, that is, TLV 2. The SID index corresponding to the 3 rd indication entry takes the value of 0, the CSID index takes the value of 0, the Bitmap of the 3 rd indication entry takes the 3 rd bit position 1 according to the sequence from the lower bit to the upper bit, or the Bitmap of the 3 rd indication entry takes the 3 rd bit position 1 according to the sequence from the upper bit to the lower bit, and the network node corresponding to the SID index identifying the 3 rd indication entry needs to process the 3 rd TLV, that is, TLV 3.
S1103, the node E receives the second packet. After determining that the destination address of the header of the second IPv6 packet of the second packet is the address of the node E, analyzing the PR TLV in the SRH to obtain the value of the Index No in the PR, and then determining an indication entry that the node E may recognize according to the Index No as follows:
the position of the PR TLV is shifted from the end of the Index No at (Index No-1) × (length of Bitmap + length of SID Index + length of CSID Index) by 8 bytes, i.e., from the end of the PR TLV by (3-1) × (2+ 1) ═ 8 bytes.
In the above manner, the obtained indication entry is the 1 st indication entry, that is, the indication entry having SID index of 1 and CSID index of 1, that is, the first indication entry in S1102. The node E determines that the SID index of the first indication entry corresponds to the SL in the SRH of the packet received by the node E, that is: SID index equals SL (SID index takes on value of 1, and SL also takes on value of 1). Node E knows that its SID is a compressed SID, and therefore needs to further determine whether node E needs to process the TLV included in the second packet according to the CSID index. The node E acquires the CSID index of the first indication entry, and determines that the value of the CSID index corresponds to the CL value in the SRH, that is: CSID index ═ CL (CSID index takes a value of 1, CL also takes a value of 1). Therefore, the node E determines that TLVs contained in the second message need to be processed, and specifically which TLV or TLVs need to be processed is determined according to the Bitmap in the first indication entry. The node E further analyzes the Bitmap of the first indication entry to determine that the value of the 1 st bit and the 2 nd bit of the Bitmap of the first indication entry are 1, and then the node E determines that the 1 st TLV and the 2 nd TLV, that is, TLV1 and TLV2, in the TLVs included in the second packet need to be processed, that is: FW TLVs and IOAM TLVs. And the node E adds the time for receiving the second message or the input interface for receiving the second message into the IOAM TLV according to the indication of the IOAM TLV, and further sends the second message to the firewall for processing according to the indication of the FW TLV.
And after the node E processes the FW TLV and the IOAM TLV, replacing the destination address of the second IPv6 message header of the second message with the address of the node H, keeping the SL value unchanged, increasing the CL value by 1, changing the CL value into 2, subtracting 1 from the Index No in the PR TLV, and changing the Index No into 2 to obtain a third message. And sending the third message to the node H.
S1104, the node H receives the third packet. After determining that the destination address of the header of the second IPv6 packet of the third packet is the address of the node H, analyzing the PR TLV in the SRH to obtain the value of the Index No in the PR, and then determining an indication entry that the node E may recognize according to the Index No as follows:
the position of the PR TLV is shifted from the end of the Index No at (Index No-1) × (length of Bitmap + length of SID Index + length of CSID Index) bytes, i.e., 4 bytes from the end of the PR TLV from the Index No ((2-1) × (2+1+1) ═ 4).
In the above manner, the obtained indication entry is the 2 nd indication entry, that is, the indication entry having SID index of 1 and CSID index of 2, that is, the second indication entry in S1102. The node H determines that the SID index of the second indication entry corresponds to the SL in the SRH of the packet received by the node H, that is: SID index equals SL (SID index takes on value of 1, and SL also takes on value of 1). The node H knows that its SID is a compressed SID, and therefore needs to further determine whether the H node needs to process the TLV included in the second packet according to the CSID index. The node H acquires the CSID index of the 2 nd indication entry, and determines that the value of the CSID index corresponds to the CL value in the SRH, that is: CSID index ═ CL (CSID index takes 2, CL also takes 2). Therefore, the node H determines that TLVs contained in the third message need to be processed, and specifically, which TLV or TLVs need to be processed is determined according to the Bitmap in the second indication entry. The node H further analyzes to obtain a Bitmap of the second indication entry, and determines that a 2 nd bit of the Bitmap of the second indication entry takes a value of 1, then the node E determines that a 2 nd TLV, that is, TLV2, in TLVs included in the third packet needs to be processed, that is: IOAM TLV. And the node H adds the time for receiving the third message or the incoming interface for receiving the third message into the IOAM TLV according to the indication of the IOAM TLV.
After the node H processes the IOAM TLV, the destination address of the header of the second IPv6 message of the third message is replaced by the address of the node I, the SL is subtracted by 1, the SL is changed into 0, and the value of the CL is changed into 0. And subtracting 1 from the Index No in the PR TLV, and changing the Index No into 1 to obtain a fourth message. And sending the fourth message to the node I.
S1105, the node I receives the fourth message. After determining that the destination address of the header of the second IPv6 packet of the fourth packet is the address of the node I, parsing PR TLV in SRH to obtain the value of Index No in PR, and then determining an indication entry that the node I may recognize according to the Index No as follows:
the offset from the end of the Index No at the position of PR TLV is (Index No-1) × (length of Bitmap + length of SID Index) bytes, i.e. the offset from the end of Index No at PR TLV is 0 bytes ((1-1) × (2+ 1) ═ 0), that is, the end of the Index No field in the packet is the header of the indication entry to be obtained in the packet.
In the above manner, the obtained indication entry is the 3 rd indication entry, that is, the indication entry whose SID index is 0, that is, the third indication entry in S1102. Since node I knows that its SID is not a compressed SID, node I does not need to determine whether it needs to process the TLV included in the fourth message according to the CSID. The node I determines that the SID index of the third indication entry corresponds to the SL in the SRH of the packet received by the node I, that is: SID index equals SL (SID index takes the value of 0, and SL also takes the value of 0). And the node I determines that the TLVs contained in the fourth message need to be processed, and particularly determines which TLV or TLVs need to be processed according to the Bitmap in the third indication entry. The node H further analyzes to obtain a Bitmap of the third indication entry, and determines that the 3 rd bit of the Bitmap of the third indication entry takes a value of 1, then the node I determines that the 3 rd TLV, that is, TLV3, in the TLVs included in the fourth packet needs to be processed, that is: DetNet TLV.
After the node I processes the OAM TLV, it determines that the value of the SL is 0, and deletes the SRH and the second IPv6 headers of the fourth packet to obtain a fifth packet, which is the first packet in S1101. The header of the fifth message is a first IPv6 header. And sending the fifth message to the node K according to the destination address of the first IPv6 message.
Through the technical scheme, the network node can determine whether the network node needs to process the TLVs in the message according to the indication information contained in the received message, if the TLVs in the message need to be processed, the network node further determines which TLV or TLVs in the message need to be processed according to the indication information, and then processes the TLVs which need to be processed. Therefore, according to the actual situation of the network topology, the TLV of the message required to be processed by the network nodes can be flexibly controlled through the indication information of the message, and the TLV of the message can be processed by the network nodes, so that the flexibility of message processing is improved.
Fig. 12 shows a schematic diagram of a possible structure of the network node involved in the above embodiments, and the network node 1200 may implement the function of the first network node in the example shown in fig. 5 or fig. 8, or the network node 1200 may implement the function of the node E or the node H or the node I in the embodiment shown in fig. 10A or fig. 10B. Referring to fig. 12, the network node 1200 includes: a receiving unit 1201, a determining unit 1202 and a processing unit 1203. These units may perform the respective functions of the first network node in the above-described method example. A receiving unit 1201, configured to support the network node 1200 to perform the process S504 in fig. 5; a determining unit 1202, configured to support the network node 1200 to perform the process S505 in fig. 5, or to perform the processes S804 and S805 in fig. 8; the processing unit 1203 is configured to enable the network node 1200 to perform the procedure S506 in fig. 5, or to perform the procedure S806 in fig. 8, and/or other procedures performed by the first network node in the techniques described herein. For example, the receiving unit 1201 is configured to perform receiving of various information performed by the first network node in the above method embodiment; a determining unit 1202, configured to perform various determining actions performed by the first network node in the above method embodiments; a processing unit 1203, configured to perform other processing of the first network node in the foregoing method embodiment except for the message receiving and determining actions. For example, the receiving unit 1201 is configured to receive a packet sent by a second network node, where the packet includes one or more TLVs that need to be processed by the network node, and the packet further includes indication information indicating that at least one network node needs to process at least one TLV of the one or more TLVs; a determining unit 1202, configured to determine, according to the indication information, that at least one TLV of the one or more TLVs needs to be processed by the network node 1200, and determine, according to the indication information, a TLV that needs to be processed by the network node 1200; a processing unit 1203 is configured to process the TLVs that need to be processed by network node 1200. For a specific execution process, please refer to the detailed description of the corresponding steps in the embodiments shown in fig. 5 or fig. 8 or fig. 10A or fig. 10B, which is not repeated here.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. Each functional unit 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. For example, in the above embodiment, the receiving unit and the sending unit may be the same unit or different units. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Fig. 13 shows a schematic diagram of a possible structure of the network node involved in the above embodiments, and the network node 1300 may implement the function of the second network node in the example shown in fig. 5 or fig. 8, or the network node 1300 may implement the function of the node B in the embodiment shown in fig. 10A or fig. 10B. Referring to fig. 13, the network node 1300 includes: an acquisition unit 1301, a processing unit 1302 and a sending unit 1303. These units may perform the respective functions of the second network node in the above-described method example. An obtaining unit 1301, configured to support the network node 1300 to execute the process S501 in fig. 5, or execute the process S802 in fig. 8, and a processing unit 1302, configured to support the network node 1300 to execute the process S502 in fig. 5, or execute the process S802 in fig. 8; a sending unit 1303, configured to enable the network node 1300 to execute the process S503 in fig. 5 or execute the process S803 in fig. 8. For example, the obtaining unit 1301 is configured to perform obtaining of various information performed by the second network node in the foregoing method embodiment, and the sending unit 1303 is configured to perform sending of various information performed by the second network node in the foregoing method embodiment; a processing unit 1302, configured to perform other processing of the second network node in the above method embodiments except for the information acquiring and sending actions. For example, the obtaining unit 1301 is configured to obtain a first packet; a processing unit 1302, configured to add, in the first packet, indication information and one or more TLVs that need to be processed by a network node on a forwarding path of the first packet, to generate a second packet, where the indication information indicates that at least one network node needs to process at least one TLV of the one or more TLVs, and the indication information is further used to indicate the TLV that the at least one network node needs to process; a sending unit 1303, configured to send the second packet to the first network node on the forwarding path. For a specific execution process, please refer to the detailed description of the corresponding steps in the embodiments shown in fig. 5 or fig. 8 or fig. 10A or fig. 10B, which is not repeated here.
Referring to fig. 14, an embodiment of the present invention provides a message processing system 1400, where the system 1400 is configured to implement the message processing method in the foregoing method embodiment. The system 1400 includes a network node 1401 and a network node 1402. The network node 1401 may implement the first network node in the embodiment shown in fig. 5 or fig. 8, and the network node 1402 may implement the functionality of the second network node in the embodiment shown in fig. 5 or fig. 8. The network node 1401 may also implement the functionality of node E or node H or node I in the embodiments shown in fig. 10A or 10B, and the network node 1401 may also implement the functionality of node B in the embodiments shown in fig. 10A or 10B. For a specific execution process, please refer to the detailed description of the corresponding steps in the embodiments shown in fig. 5 or fig. 8 or fig. 10A or fig. 10B, which is not repeated here
Embodiments of the present application also provide a computer-readable storage medium for storing program codes or instructions used in the foregoing embodiments, which when executed on a computer or device, cause the computer or device to perform the method in the foregoing method embodiments.
The first mentioned in the embodiments of the present application in the first network node is only used for name identification and does not represent the first in sequence. The rule applies equally to "second", "third", "fourth" and "fifth".
It should be noted that any of the above described embodiments of the network node are merely schematic, where the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the network node embodiments provided by the embodiments of the present application, a connection relationship between modules indicates that there is a communication connection therebetween, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
The steps of a method or algorithm described in the disclosure of the embodiments of the present application may be implemented in hardware, or may be implemented by a processor executing software instructions. The software instructions may be comprised of corresponding software modules that may be stored in Random Access Memory (RAM), flash memory, Read Only Memory (ROM), Erasable Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), a hard disk, a removable hard disk, an optical disk, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in a core network interface device. Of course, the processor and the storage medium may reside as discrete components in a core network interface device.
Those skilled in the art will recognize that in one or more of the examples described above, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments, objects, technical solutions and advantages of the present application are further described in detail, it should be understood that the above-mentioned embodiments are only examples of the present application, and are not intended to limit the scope of the present application, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present application should be included in the scope of the present application.

Claims (28)

1. A method for message processing, comprising:
a first network node receives a message sent by a second network node, wherein the message contains one or more type-length-value TLVs which need to be processed by at least one network node, and the message also comprises indication information which indicates that the at least one network node needs to process at least one TLV in the one or more TLVs;
the first network node determining, according to the indication information, that the first network node is required to process at least one TLV of the one or more TLVs;
in response to the first network node determining that the first network node is required to process at least one of the one or more TLVs, the first network node determining, from the indication information, the TLV that the first network node is required to process;
the first network node processes TLVs that the first network node is required to process.
2. The method of claim 1, wherein the indication information comprises one or more indication entries, each of the indication entries comprising a first field for identifying a network node that needs to process at least one of the one or more TLVs, and a second field for identifying a TLV that needs to be processed by the network node identified by the first field.
3. The method of claim 2, wherein the first network node determining from the indication information that the first network node is required to process at least one of the one or more TLVs comprises:
when the first network node determines that a particular indication entry is included in the one or more indication entries, and a value of a first field of the particular indication entry corresponds to a value of a remaining segment SL in a Segment Routing Header (SRH) of the packet, the first network node determines that the first network node is required to process at least one of the one or more TLVs.
4. The method of claim 2, wherein the first field comprises a first subfield and a second subfield, and wherein the first network node determining from the indication information that the first network node is required to process at least one of the one or more TLVs comprises:
when the first network node determines that a particular indication entry is included in the one or more indication entries, and a value of a first subfield of the particular indication entry corresponds to a value of a remaining segment SL in a Segment Routing Header (SRH) of the packet, and a value of a second subfield corresponds to a value of a remaining compressed segment identification in an SRH of the packet, the first network node determines that the first network node is required to process at least one TLV of the one or more TLVs.
5. The method according to claim 3 or 4, wherein the first network node determining the TLVs that need to be processed by the first network node according to the indication information comprises:
the first network node determines the TLV identified by the second field of the specific indication entry to be the TLV that needs to be processed by the first network node.
6. The method according to any of claims 2 to 5, wherein the second field of the indication entry is a Bitmap field, and the number of bits of the Bitmap bit with 1 corresponds to the sequence number of TLVs that the network node identified by the first field needs to process, in an order from lower bits to higher bits of the Bitmap or in an order from higher bits to lower bits of the Bitmap.
7. The method according to any of claims 3 to 5, wherein the indication information further comprises a third field for identifying the number of network nodes that need to process TLVs.
8. The method of claim 7, further comprising:
the first network node determines a location of the particular indication entry in the message from the first field, the second field, and the third field.
9. The method of claim 8, wherein the first network node determining the location of the particular indication entry in the message from the first field, the second field, and the third field comprises:
the first network node determines the location of the particular indication entry in the message according to the following formula:
the start position of the special indication entry in the message is ═ the end position of the third field in the message + (value-1 of the third field) × (length of the first field + length of the second field).
10. The method of any of claims 7 to 9, further comprising:
the first network node subtracts 1 from the value of the third field in the message to obtain an updated message;
and the first network node sends the updated message.
11. A method for message processing, comprising:
the second network node obtains a first message;
the second network node adds indication information and one or more type-length-value TLVs (type-length-value TLVs) which need to be processed by at least one network node on a forwarding path of the first packet in the first packet to generate a second packet, wherein the indication information indicates that the at least one network node needs to process at least one TLV in the one or more TLVs, and the indication information is also used for indicating the TLVs which need to be processed by the at least one network node;
and the second network node sends the second message to the first network node on the forwarding path.
12. The method of claim 11, wherein the indication information comprises one or more indication entries, each indication entry comprising a first field for identifying a network node that needs to process at least one of the one or more TLVs, and a second field for identifying a TLV that needs to be processed by the network node identified by the first field.
13. The method according to claim 12, wherein the second field is a Bitmap field, and the Bitmap bit is ordered from lower bit to upper bit or from upper bit to lower bit, and the number of bits of the Bitmap bit with 1 corresponds to the sequence number of the TLV that needs to be processed by the network node identified by the first field.
14. The method according to any of claims 12 to 13, wherein the indication information further comprises a third field for identifying the number of network nodes that need to process TLVs.
15. The method according to any of claims 12 to 14, wherein the indication information further comprises a fourth field, and wherein the fourth field is used for identifying the length of the second field.
16. The method according to any of claims 11 to 15, wherein the indication information is contained in a processing rule PR TLV, and wherein the second network node adding the indication information in the first packet comprises:
and the second network node adds a Segment Routing Header (SRH) in the first message, wherein the SRH contains the PR TLV.
17. A network node, for use in a network system comprising a plurality of network nodes, the plurality of network nodes including a first network node and a second network node, the network node being the first network node, the network node comprising:
a receiving unit, configured to receive a packet sent by a second network node, where the packet includes one or more type-length-value TLVs that need to be processed by at least one network node, and the packet further includes indication information indicating that the at least one network node needs to process at least one TLV of the one or more TLVs;
a determining unit, configured to determine that the first network node is required to process at least one TLV of the one or more TLVs according to the indication information;
the determining unit is further configured to determine, in response to the determining unit determining that the first network node is required to process at least one TLV of the one or more TLVs, the TLV that is required to be processed by the first network node according to the indication information;
a processing unit, configured to process the TLV that needs to be processed by the first network node.
18. The network node of claim 17, wherein the indication information comprises one or more indication entries, each of the indication entries comprising a first field for identifying the network node that needs to process at least one of the one or more TLVs, and a second field for identifying the TLV that needs to be processed by the network node identified by the first field.
19. The network node of claim 18, wherein the second field is a Bitmap field, and wherein the Bitmap bit is set to 1 in an order from a lower bit to an upper bit or from an upper bit to a lower bit of the Bitmap field, and wherein the number of bits of the Bitmap bit corresponds to the sequence number of the TLV that needs to be processed by the network node identified by the first field.
20. The network node according to claim 18 or 19, wherein the determining unit determines that the first network node is required to process at least one of the one or more TLVs according to the indication information comprises:
when the determining unit determines that a specific indication entry is included in the one or more indication entries, and a value of a first field of the specific indication entry corresponds to a value of a remaining segment SL of a segment routing header SRH of the packet, it is determined that the processing unit is required to process at least one of the one or more TLVs.
21. The network node of claim 18 or 19, wherein the first field comprises a first sub-field and a second sub-field, and wherein the determining, by the determining unit, that the processing unit is required to process at least one of the one or more TLVs according to the indication information comprises:
when the determining unit determines that a particular indication entry is included in the one or more indication entries, and a value of a first subfield of the particular indication entry corresponds to a value of a remaining segment SL in a header SRH of the packet, and a value of a second subfield corresponds to a value of a remaining compressed segment identification in an SRH of the packet, the first network node determines that the processing unit is required to process at least one TLV of the one or more TLVs.
22. The network node according to claim 20 or 21, wherein the determining unit determines the TLV that needs to be processed by the first network node according to the indication information comprises:
the determining unit determines the TLV identified by the second field of the specific indication entry as the TLV which needs to be processed by the processing unit.
23. The network node according to any of claims 20 to 22, wherein the indication information further comprises a third field for identifying the number of network nodes that need to process TLVs.
24. The network node of claim 23,
the determining unit is further configured to determine a position of the specific indication entry in the message according to the following formula:
the start position of the special indication entry in the message is ═ the end position of the third field in the message + (value-1 of the third field) × (length of the first field + length of the second field).
25. A network node, for use in a network system comprising a plurality of network nodes, the plurality of network nodes including a first network node and a second network node, the network node being the second network node, the network node comprising:
an obtaining unit, configured to obtain a first packet;
a processing unit, configured to add, in the first packet, indication information and one or more type-length-value TLVs that need to be processed by at least one network node on a forwarding path of the first packet, to generate a second packet, where the indication information indicates that the at least one network node needs to process at least one TLV of the one or more TLVs, and the indication information is further used to indicate that the at least one network node needs to process the TLVs;
a sending unit, configured to send the second packet to the first network node on the forwarding path.
26. The network node of claim 25, wherein the indication information comprises one or more indication entries, each indication entry comprising a first field for identifying a network node that needs to process at least one of the one or more TLVs, and a second field for identifying a TLV that needs to be processed by the network node identified by the first field.
27. The network node according to claim 25 or 26, wherein the indication information is contained in a processing rule PR TLV, and wherein the processing unit adding the indication information in the first packet comprises:
a Segment Routing Header (SRH) added to the first packet by the processing unit, wherein the SRH contains the PR TLV.
28. A computer-readable medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 16.
CN201911115344.6A 2019-11-01 2019-11-14 Message processing method, network node and system Pending CN112787922A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP20881940.9A EP4037266A4 (en) 2019-11-01 2020-10-30 Method for processing message, and network node and system
PCT/CN2020/125352 WO2021083341A1 (en) 2019-11-01 2020-10-30 Method for processing message, and network node and system
US17/731,749 US20220255857A1 (en) 2019-11-01 2022-04-28 Packet Processing Method, Network Node, and System

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911061769 2019-11-01
CN2019110617693 2019-11-01

Publications (1)

Publication Number Publication Date
CN112787922A true CN112787922A (en) 2021-05-11

Family

ID=75749903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911115344.6A Pending CN112787922A (en) 2019-11-01 2019-11-14 Message processing method, network node and system

Country Status (1)

Country Link
CN (1) CN112787922A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113242180A (en) * 2021-07-12 2021-08-10 广东省新一代通信与网络创新研究院 Message forwarding method, device, equipment, readable storage medium and program product
CN114828140A (en) * 2022-05-09 2022-07-29 中国电信股份有限公司 Service flow message forwarding method and device, storage medium and electronic equipment
WO2023109672A1 (en) * 2021-12-14 2023-06-22 华为技术有限公司 Service processing method, apparatus, and system
CN117596206A (en) * 2024-01-19 2024-02-23 明阳产业技术研究院(沈阳)有限公司 SRv6SID dynamic compression arrangement method, system, exchange device, medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150326473A1 (en) * 2014-05-09 2015-11-12 Futurewei Technologies, Inc. Service Chain Path Route Reservations
US20190036818A1 (en) * 2017-07-27 2019-01-31 Cisco Technology, Inc. Full-path validation in segment routing
CN109981457A (en) * 2017-12-27 2019-07-05 华为技术有限公司 A kind of method of Message processing, network node and system
CN112104552A (en) * 2019-06-17 2020-12-18 华为技术有限公司 Method and device for processing message and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150326473A1 (en) * 2014-05-09 2015-11-12 Futurewei Technologies, Inc. Service Chain Path Route Reservations
US20190036818A1 (en) * 2017-07-27 2019-01-31 Cisco Technology, Inc. Full-path validation in segment routing
CN109981457A (en) * 2017-12-27 2019-07-05 华为技术有限公司 A kind of method of Message processing, network node and system
CN112104552A (en) * 2019-06-17 2020-12-18 华为技术有限公司 Method and device for processing message and computer storage medium
CN114448860A (en) * 2019-06-17 2022-05-06 华为技术有限公司 Method and device for processing message and computer storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
F. CLAD, ED.; CISCO SYSTEMS, INC.;X. XU, ED.;ALIBABA; C. FILSFILS; CISCO SYSTEMS, INC.;D. BERNIER; BELL CANADA; C. LI;HUAWEI;ORANG: "Service Programming with Segment Routing\ndraft-ietf-spring-sr-service-programming-00", IETF *
J. YI; ECOLE POLYTECHNIQUE;B. PARREIN; UNIVERSITY OF NANTES;: "Multipath Extension for the\nOptimized Link State Routing Protocol Version 2 (OLSRv2)", IETF RFC8218 *
P. PSENAK, ED.; C. FILSFILS; CISCO SYSTEMS;A. BASHANDY;ARRCUS;ORANGE; Z. HU; HUAWEI TECHNOLOGIES;: "IS-IS Extensions to Support Routing over IPv6 Dataplane\n draft-ietf-lsr-isis-srv6-extensions-00.txt", IETF *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113242180A (en) * 2021-07-12 2021-08-10 广东省新一代通信与网络创新研究院 Message forwarding method, device, equipment, readable storage medium and program product
CN113242180B (en) * 2021-07-12 2021-12-14 广东省新一代通信与网络创新研究院 Message forwarding method, device, equipment, readable storage medium and program product
WO2023109672A1 (en) * 2021-12-14 2023-06-22 华为技术有限公司 Service processing method, apparatus, and system
CN114828140A (en) * 2022-05-09 2022-07-29 中国电信股份有限公司 Service flow message forwarding method and device, storage medium and electronic equipment
CN114828140B (en) * 2022-05-09 2023-12-12 中国电信股份有限公司 Service flow message forwarding method and device, storage medium and electronic equipment
CN117596206A (en) * 2024-01-19 2024-02-23 明阳产业技术研究院(沈阳)有限公司 SRv6SID dynamic compression arrangement method, system, exchange device, medium and equipment
CN117596206B (en) * 2024-01-19 2024-03-26 明阳产业技术研究院(沈阳)有限公司 SRv6SID dynamic compression arrangement method, system, exchange device, medium and equipment

Similar Documents

Publication Publication Date Title
KR102555671B1 (en) Packet processing methods, related devices and computer storage media
US11792100B2 (en) Network performance parameter sending method, network performance calculation method, and network node
WO2021083341A1 (en) Method for processing message, and network node and system
CN112787922A (en) Message processing method, network node and system
EP3863240A1 (en) Method for forwarding packet in hybrid network, device, and system
CN111988266B (en) Method for processing message
US20220255862A1 (en) Packet forwarding method, device, storage medium, and system
EP4009596A1 (en) Message forwarding method, device, and system in sr network
CN112583745A (en) Method, equipment and system for forwarding message in SR network
CN112468396B (en) Method, device and system for programming host network performance requirements
JP6222505B2 (en) Method and apparatus for generating input parameters
US11909650B2 (en) Internet protocol operations and management option
CN114422415A (en) Egress node processing flows in segmented routing
US20240106748A1 (en) Packet processing method, apparatus, and system
US20240098020A1 (en) Transport of vpn traffic with reduced header information
US11683265B2 (en) Mechanisms for packet path tracing and per-hop delay measurement in segment routing with multiprotocol label switching (SR-MPLS) networks
CN117221201A (en) Message sending method, network equipment and system

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