WO2023284774A1 - Message processing method and related apparatus - Google Patents

Message processing method and related apparatus Download PDF

Info

Publication number
WO2023284774A1
WO2023284774A1 PCT/CN2022/105410 CN2022105410W WO2023284774A1 WO 2023284774 A1 WO2023284774 A1 WO 2023284774A1 CN 2022105410 W CN2022105410 W CN 2022105410W WO 2023284774 A1 WO2023284774 A1 WO 2023284774A1
Authority
WO
WIPO (PCT)
Prior art keywords
sid
node
message
field
segment
Prior art date
Application number
PCT/CN2022/105410
Other languages
French (fr)
Chinese (zh)
Inventor
杜芳芳
平善明
薛奇
方晟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023284774A1 publication Critical patent/WO2023284774A1/en

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
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Definitions

  • the present application relates to the technical field of communications, and in particular to a message processing method and a related device.
  • the segment routing (segment routing, SR) node is based on the segment routing traffic engineering policy of Internet Protocol Version 6-Segment Routing (IPv6SR or SRv6).
  • IPv6SR or SRv6 Internet Protocol Version 6-Segment Routing
  • SR-TE Policy provides a flexible way to select forwarding paths, which can meet different forwarding requirements of users.
  • rational use of SR-TE Policy to select the forwarding path will not only facilitate the management and planning of the network by managers, but also effectively reduce the forwarding pressure on network devices.
  • SRv6TE FRR SRv6 intermediate node protection
  • intermediate nodes have important functions, for example, the intermediate node is responsible for security protection or responsible for billing. If the message bypasses the SID corresponding to the above-mentioned intermediate node with important functions, it will have a serious adverse impact on the business.
  • the embodiment of the present application proposes a message processing method, including:
  • the first node obtains the first message, the first message includes a plurality of segment identifiers (segment id, SID) arranged in sequence, and the plurality of segment identifiers are used to indicate the forwarding path of the first message, so
  • the plurality of SIDs includes a first SID and a second SID, and the first SID is arranged before the second SID.
  • the fact that the first SID is arranged before the second SID may mean that the forwarding path of the message needs to pass through the first SID first, and then pass through the second SID.
  • the remaining segment (segment left, SL) pointer first points to the first SID, and then points to the second SID.
  • the first packet first arrives at the node corresponding to the first SID, and then the first packet arrives at the node corresponding to the second SID;
  • the first node determines that the first SID is unreachable. For example, when the first node detects a failure of the first SID, the first node determines that the first SID is unreachable. Alternatively, when the first node fails to find a route according to the first SID, the first node determines that the first SID is unreachable.
  • the first node determines whether the first SID is allowed to be bypassed according to a first field corresponding to the first SID, and the first field is included in the first message;
  • the first node determines that the second SID is reachable
  • the first node forwards the first packet according to the second SID.
  • the first packet is discarded. To avoid the continuation of abnormal business.
  • the first field is located in a segment routing header (segment routing header, SRH) of the first packet.
  • segment routing header segment routing header
  • the first field is included in an optional tag length value Optional TLV field in the SRH, where the value part in the Optional TLV indicates whether one or more SIDs are allowed to be Bypass.
  • the value part in the optional TLV includes 8 bits, and when the SRH includes 5 SIDs, 5 bits in the 8 bits correspond to the 5 SIDs respectively.
  • the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed. It can be understood that when the value of a bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is empty, the SID corresponding to the bit is allowed to be bypassed.
  • the first field is located in the first SID. That is, each SID includes a field, which indicates whether the SID is allowed to be bypassed.
  • the first field is located in the parameter args field of the first SID.
  • the first field is located in any unused bit in the args field of the first SID.
  • the first field is the last bit in the parameter args field of the first SID.
  • the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed.
  • the first packet includes at least one segment list (segment list), where the segment list includes the first SID and the second SID.
  • the first packet includes multiple segment lists, where the multiple segment lists include a first segment list and a second segment list.
  • the first-segment list includes a first SID
  • the second-segment list includes a second SID.
  • the arrangement order of the first segment list is before the second segment list, and the first message first arrives at the node corresponding to the SID in the first segment list, and secondly arrives at the node corresponding to the SID in the second segment list.
  • the first packet includes an outer Internet Protocol version 6 IPv6 header and an inner IPv6 header
  • the first segment list is included in the outer IPv6 header
  • the first A two-segment list is included in the inner IPv6 header.
  • the first SID or the second SID includes service chain SFC path information.
  • a service classifier node Service classifier, SC
  • SC Service classifier node
  • the first SID or the second SID includes service chain path information, so that the first message is forwarded along the service chain path.
  • the embodiment of the present application proposes a message processing method, including:
  • the second node encapsulates the data message to obtain the first message, the first message includes a plurality of segment identifiers SID arranged in sequence, and the plurality of segment identifiers are used to indicate the Forwarding paths, the multiple SIDs include a first SID and a second SID, the first SID is arranged before the second SID,
  • the first message includes a first field corresponding to the first SID, and the first field is used to indicate whether the first SID is bypassed.
  • the second node may learn which SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed according to static configuration (for example, command line configuration).
  • the second node may also learn which SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed by receiving the control message from the controller.
  • special fields are used to mark which segment identification SIDs are allowed to be bypassed, and which SIDs are not allowed to be bypassed.
  • SID segment identification SIDs
  • SID is unreachable
  • the SID is bypassed and directly jumps to the subsequent SID to forward the message, thereby ensuring that the message must pass through the corresponding SID with important functions. middle node. To ensure the normal execution of business.
  • the second node receives a control packet from the controller, where the control packet carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed;
  • the second node determines the value of the first field according to the indication information in the control packet. For example, if the indication information in the control node indicates that the first node is not allowed to be bypassed, then the second node encapsulates the data message to obtain the first message. In the first message, the value of the first field is "1". A value of "1" for the first field indicates that the first SID is not allowed to be bypassed.
  • control message is a Path Computation Element Communication Protocol (Path Computation Element Communication Protocol, PCEP) message, or the control message is a Border Gateway Protocol (Border Gateway Protocol, BGP) message.
  • PCEP Path Computation Element Communication Protocol
  • BGP Border Gateway Protocol
  • the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
  • the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
  • the indication information is located in a reserved field of the Flags field of the Type-B segment-sub-flag length value.
  • the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
  • the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
  • the indication information is located in a reserved field of the SRv6-ERO Subobject field.
  • the embodiment of the present application proposes a message processing method, including:
  • the controller sends a control message to the second node, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed, so that the second node performs data processing according to the indication information.
  • the segment list of the first message includes the first SID, and the first message also includes a first field determined according to the indication information, and the first field is used to indicate the Whether the above-mentioned first SID is bypassed.
  • the controller may send a control message to the second node, where the control message is used to notify the second node which SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed.
  • special fields are used to mark which segment identification SIDs are allowed to be bypassed, and which SIDs are not allowed to be bypassed. Therefore, when the SID is normal, the forwarding path of the message carrying the SID must pass through the SID, thereby ensuring that the message must pass through the intermediate node with important functions corresponding to the SID. To ensure the normal execution of business.
  • control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol BGP message.
  • the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
  • the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
  • the indication information is located in a reserved field of the type B segment-submark length value.
  • the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
  • the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
  • the indication information is located in a reserved field of the SRv6-ERO Subobject field.
  • the embodiment of the present application proposes a network device, including:
  • a transceiver module configured to obtain a first message, the first message includes a plurality of segment identifiers SIDs arranged in sequence, the plurality of segment identifiers are used to indicate the forwarding path of the first message, and the plurality of segment identifiers are used to indicate the forwarding path of the first message.
  • the SID includes a first SID and a second SID, the first SID is arranged before the second SID;
  • a processing module configured to determine that the first SID is unreachable
  • the processing module is further configured to determine whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID, and the first field is included in the first message;
  • the processing module is further configured to determine that the second SID is reachable when the first SID is allowed to be bypassed;
  • the transceiver module is further configured to forward the first message according to the second SID.
  • the processing module is further configured to discard the first packet when the first SID is not allowed to be bypassed.
  • the first field is located in a segment routing header SRH of the first packet.
  • the first field is included in an optional tag length value Optional TLV field in the SRH, where the value part in the Optional TLV indicates whether one or more SIDs are allowed to be Bypass.
  • the first field is located in the first SID.
  • the first field is located in the parameter args field of the first SID.
  • the first field is the last bit in the parameter args field of the first SID.
  • the first packet includes at least one segment list, where the segment list includes the first SID and the second SID.
  • the first message includes multiple segment lists, where the multiple segment lists include a first segment list and a second segment list, and the first segment list includes the first segment list A SID, the second segment list includes the second SID.
  • the first packet includes an outer Internet Protocol version 6 IPv6 header and an inner IPv6 header
  • the first segment list is included in the outer IPv6 header
  • the first A two-segment list is included in the inner IPv6 header.
  • the first SID or the second SID includes service chain SFC path information.
  • the embodiment of the present application proposes a network device, including:
  • a processing module configured to perform encapsulation processing on the data message to obtain a first message, the first message includes a plurality of segment identifiers SIDs arranged in sequence, and the plurality of segment identifiers are used to indicate that the first message A forwarding path of the text, the multiple SIDs include a first SID and a second SID, and the first SID is arranged before the second SID,
  • the first message includes a first field corresponding to the first SID, and the first field is used to indicate whether the first SID is bypassed.
  • the transceiver module is configured to receive a control message from the controller, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed;
  • the processing module is further configured to determine the value of the first field according to the indication information in the control message.
  • control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol BGP message.
  • the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
  • the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
  • the indication information is located in a reserved field of the Flags field of the Type-B segment-sub-flag length value.
  • the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
  • the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
  • the indication information is located in a reserved field of the SRv6-ERO Subobject field.
  • the embodiment of the present application proposes a network device, including:
  • a transceiver module configured to send a control message to the second node, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed, so that the second node according to the indication
  • the information encapsulates the data message, the segment list of the first message includes the first SID, and the first message also includes a first field determined according to the indication information, and the first field uses to indicate whether the first SID is bypassed.
  • control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol BGP message.
  • the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
  • the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
  • the indication information is located in a reserved field of the type B segment-submark length value.
  • the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
  • the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
  • the indication information is located in a reserved field of the SRv6-ERO Subobject field.
  • a network device including a processor and a communication interface; the processor is configured to execute instructions, so that the network device executes the method according to any implementation manner of the first aspect.
  • a network device which includes a processor and a communication interface; the processor is configured to execute instructions, so that the network device executes the method in any implementation manner of the second aspect.
  • a ninth aspect provides a network device, which includes a processor and a communication interface; the processor is configured to execute instructions, so that the network device executes the method in any implementation manner of the third aspect.
  • a communication system includes the network device according to the fourth aspect, the network device according to the fifth aspect, and the network device according to the sixth aspect.
  • a communication system includes the network device of the seventh aspect, the network device of the eighth aspect, and the network device of the ninth aspect.
  • a twelfth aspect of the present application provides a computer storage medium, which may be non-volatile; computer-readable instructions are stored in the computer storage medium, and when the computer-readable instructions are executed by a processor, the first A method in any implementation manner of the aspect, the second aspect, or the third aspect.
  • the thirteenth aspect of the present application provides a computer program product containing instructions, which, when run on a computer, cause the computer to execute the method in any one of the implementation manners of the first aspect, the second aspect, or the third aspect.
  • a fourteenth aspect of the present application provides a chip system, which includes a processor, configured to support a network device to implement the functions involved in the above aspect, for example, send or process the data and/or information involved in the above method.
  • the chip system further includes a memory, and the memory is used for storing necessary program instructions and data of the network device.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • Figure 3b is a schematic diagram of a segment list field
  • FIG. 4 is a schematic diagram of a SID field
  • FIG. 5 is a schematic diagram of a scenario of the ISIS protocol
  • FIG. 6 is a schematic diagram of an embodiment of a message processing method proposed in an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a segment-sub-mark length value of type B.
  • Fig. 9 is a schematic diagram of the structure of the IP version 6 segment routing-explicit routing object sub-object
  • FIG. 10 is a schematic diagram of an application scenario proposed by the embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a message header in an embodiment of the present application.
  • FIG. 12 is a schematic diagram of another scenario proposed by the embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a network device 1500 provided in an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of a network device 1700 provided in an embodiment of the present application.
  • FIG. 18 is a schematic diagram of a network system 1800 proposed by an embodiment of the present application.
  • FIG. 19 is a schematic diagram of a network system 1900 proposed by an embodiment of the present application.
  • the naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time/logic sequence indicated by the naming or numbering.
  • the execution order of the technical purpose is changed, as long as the same or similar technical effect can be achieved.
  • the division of units presented in this application is a logical division. In actual application, there may be other division methods. For example, multiple units can be combined or integrated in another system, or some features can be ignored. , or not, in addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between units may be electrical or other similar forms, this Applications are not limited.
  • the units or subunits described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units, and some or all of them may be selected according to actual needs unit to realize the purpose of the application scheme.
  • Segment routing It is a protocol designed based on the concept of source routing to forward data packets in the network. SR divides the network path into segments, and assigns segment identifiers (segment id, SID) to these segments and network nodes. By arranging the SIDs in an orderly manner, a segment list (SID List, also known as SID in SR-MPLS) can be obtained. Called label stack), SID List can indicate a forwarding path.
  • SID List also known as SID in SR-MPLS
  • the data packet will first be forwarded to the node corresponding to SID1, then forwarded to the node corresponding to SID2, and then forwarded to the node corresponding to SID3.
  • the full name of SR-MPLS in Chinese and English is segment routing multi-protocol label switching (segment routing multi-protocol label switching).
  • Segment routing (SR v6) based on Internet Protocol Version 6 (IPv6): refers to the application of SR technology in IPv6 networks. Use IPv6 address (128bits) as the representation of SID.
  • IPv6 address (128bits) as the representation of SID.
  • the network device supporting SRv6 will query the local segment identification table (local sid table) according to the destination address (destination address, DA) in the data packet.
  • DA destination address
  • the policy corresponding to the SID in the local segment identifier table is used to execute the operation corresponding to the policy.
  • the data packet can be forwarded from the outgoing interface corresponding to the SID; if the destination address of the data packet If there is no longest match with each SID in the local segment identification table, then check the IPv6 forwarding table again, and perform longest matching forwarding according to the IPv6 forwarding table.
  • Segment routing header An IPv6 packet is composed of IPv6 standard header + extension header (0...n) + payload.
  • SRH extension header a new IPv6 extension header is added, called the SRH extension header.
  • This extension header specifies an IPv6 explicit path and stores IPv6 Segment List information. Its function is the same as that of the Segment in SR MPLS. List same.
  • the head node adds an SRH extension header to the IPv6 message, and the intermediate node can forward it according to the path information contained in the SRH extension header.
  • Segment List in the form of an IPv6 address, which is similar to label stack information in a multi-protocol label switching (MPLS) network, organized by The Segment List composed of multiple segment identifiers (segment id, SID) arranged to indicate the explicit path in SR; the other is the remaining segment (segment left, SL), SL is a pointer, used to indicate the current segment logo.
  • SID segment identifiers
  • the value of the DA field of the IPv6 message is constantly changing, and its value is determined by the SL and the Segment List.
  • the pointer SL points to a segment currently to be processed, such as pointing to the Segment List[2]
  • the IPv6 address of Segment List[2] needs to be copied to the DA field.
  • the node can decrement SL by 1 after receiving the message, and shift the pointer to A new segment, and copy the corresponding segment identifier (that is, the IPv6 address format) after SL minus one to the DA field, and then forward the message to the next node.
  • the node can pop out the SRH message header, and then process the message in the next step. If the node does not support SR, then there is no need to process the SRH information in the IPv6 message, and it only needs to search the IPv6 routing table according to the IPv6 destination address field, and perform ordinary IPv6 forwarding.
  • SR policy is a traffic engineering mechanism of SR.
  • an SR Policy includes a headend node (headend), a color identifier (color), a destination identifier (endpoint), and a segment identifier list indicating a forwarding path.
  • Headend is used to identify the head node that executes SR Policy
  • Color is used to associate SR with business attributes, such as low latency, high bandwidth and other business attributes, to summarize the service capabilities of the SR Policy
  • Endpoint is used to identify Destination address of SR Policy.
  • an SR Policy is determined by (headend, color, endpoint). For the same headend, it can also determine a Policy through (color, endpoint).
  • SR policy can include one or more segment identification lists to achieve load balancing, multi-path backup and other functions.
  • head node When the head node forwards a message, it can determine the segment identification list corresponding to the message according to the SR policy, so as to determine the forwarding path for forwarding the message, and encapsulate the segment identification list into the message to display or disperse the indication path .
  • Routing prefix composed of IP address and subnet mask.
  • the length of the subnet mask can be 128 bits, or less than 128 bits.
  • the routing prefix can be written as: A1::1/32 or A1::1/128, where A1::1 is an IP address, and 32 or 128 indicates the length of the subnet mask.
  • Segment routing traffic engineering intermediate node protection (segment routing IPv6 traffic engineering fast reroute, SRv6TE FRR): in the segment routing traffic engineering policy (segment routing traffic engineering policy, sR-TE) based on Internet Protocol Version 6 (IPv6) Policy), the upstream node of the intermediate node (midpoint) can replace the intermediate node to complete the processing of the forwarding message, and this upstream node can be called a proxy forwarding (proxy forwarding) node.
  • IPv6 Internet Protocol Version 6
  • FIG. 1 is a schematic diagram of a communication system in which an intermediate node fails.
  • a message is sent from node A, passes through node B, node D, and node E in sequence, and reaches node F, as shown by the dotted arrow in Figure 1 .
  • the intermediate node D fails.
  • the upstream node B (proxy forwarding node) of the intermediate node D can perceive the interface failure of the next hop (intermediate node D) of the message, then the node B modifies the parameters in the message so that the message bypasses the faulty node D , go through node C and node E, and reach node F, as shown by the solid arrow in Figure 1.
  • the specific process is as follows:
  • Node A forwards the message to the destination node F, and specifies to pass through the intermediate node D in the SR extended message header (segment routing header, SRH) of the message.
  • SR extended message header segment routing header
  • FIG. 2 is an example diagram of a message format in an embodiment of the present application.
  • the format of the message may include but not limited to three parts.
  • the first part is the IPv6 message header 201, and this part includes a version field, which is used to indicate the IPv6 protocol version corresponding to the message.
  • the next header (next header) field is used to indicate the type of the next header.
  • the value of the next-level packet header field is 43, which means that the next-level packet header of the IPv6 packet header 201 is SRH.
  • the source address (source address) field is used to indicate the source address of the packet.
  • the destination address (destination address) field is used to indicate the destination address of the packet.
  • the segment list (segment list) field is used to carry the information of the intermediate node or the information of the destination node that the message needs to pass through. It is understandable that Segment List[0] is generally the information of the destination node. It is understandable that the node can first read the value of SL, and then read the corresponding Segment List according to the value of SL. Exemplarily, if the node reads that the value of SL is 1, the node will read Segment List[1].
  • the cooperation of SL and Segment List in the message can make the next intermediate node that the current message needs to reach be updated through the change of SL during the forwarding process of the message.
  • the third part is the type length value (tag length value, TLV), and TLV is an optional (optional) variable (variable) in the SRH header.
  • the fourth part is IPv6 message payload (IPv6 payload) 204, which is used to carry the data of the message.
  • the message actually includes some existing fields, which are omitted in the embodiment of the present application for brief description, and will not be repeated here.
  • the message may also include other fields to implement other functions, which is not limited in this embodiment of the present application.
  • Figure 3a is one of the schematic diagrams of the segment list field.
  • the Segment List is generally 128 bits, and the embodiment of this application uses 128 bits as an example for description.
  • the field of the SID is also 128 bits, and the Segment List of this line is a SID.
  • Fig. 3b is the second schematic diagram of the segment list field.
  • the SID field only needs 32 bits, then the row Segment List can include 4 SIDs. It is understandable that when there are not up to 4 compressed SIDs in the actual situation (for example, only 3 SIDs are included in a row of Segment List), the corresponding position can be left blank. null.
  • the segment list includes a non-compressed segment identifier (segment id, SID) or includes multiple compressed SIDs.
  • SID segment id
  • the position of the SID can be determined through a SID index (sid index, SI) parameter and SL.
  • SI SID index
  • Fig. 4 is a schematic diagram of the SID field.
  • an uncompressed SID field may include three parts, a location identifier (locator) field, a function (function) field, and a variable (args) field.
  • the Locator field includes the common prefix part (common prefix) and the device identification part (nodeid)
  • the Function field is used to indicate the functions supported by the node
  • the Args field can be used to implement custom functions or carry some parameters.
  • the compressed SID Compared with the uncompressed SID, the compressed SID generally omits the common prefix part and the parameter part, so that the length of the SID is reduced to 32 bits.
  • the compressed format may use a generalized segment identifier (generalized segment identifier, G-SID), or other compressed formats, which are not limited in this embodiment of the present application.
  • Fig. 1 when node A sends a message (message state 1), the destination address of the IPv6 part in the message is 4::, indicating that the next intermediate node of the message is node D.
  • the device identifier of the first SID in the SRH part is 6::, indicating that the destination node of the message is node F, and the device identifier of the second SID is 4::, indicating that the message is designated to pass through the intermediate node D.
  • node B After node B processes the message into state 2, node B establishes a path from the message to node F according to the state 2 message.
  • the cost of the path B-D-E-F is 30 (except for special marks, the cost between each node is 10), and the cost of the path B-C-E-F is 1020. Therefore, for node B, the primary next hop of the destination address 6:: is still node D.
  • node A deletes the routing forwarding entry to node D, so when node A forwards according to 4:: table lookup, it cannot hit Routing, at this time, node A will act as a proxy forwarding node to perform proxy forwarding behavior, SL is reduced by 1, and the lower layer SID 6:: is updated to the outer IPv6 packet header, and then forwarded to node B according to the destination address 6:: table lookup .
  • node B If node B completes the convergence, it forwards the packet to node F according to the shortest path after convergence; if node B does not complete the convergence, it forwards the packet to node F through the backup path according to the TI-LFA process. In the above manner, the faulty node D is bypassed.
  • IPv6-based segment routing traffic engineering intermediate node protection segment routing IPv6 traffic engineering fast reroute, SRv6TE FRR.
  • segment routing IPv6 traffic engineering fast reroute SRv6TE FRR.
  • ISIS intermediate system to intermediate system
  • Figure 5 is a schematic diagram of the scenario of the ISIS protocol.
  • ISIS n domain includes node Acc1, node Acc2, node Acc3 and node Acc4;
  • ISIS m domain includes node P11, node P12, node P13 and node P14.
  • ISIS n domain and ISIS m domain include node Agg1 and node Agg2, wherein, node Acc2 is connected with node P11 through node Agg1, and node Acc2 is connected with node P12 through node Agg2.
  • This scenario also includes edge node PE1 and edge node PE2.
  • the node Acc1 is the head node, and the stack corresponding to the SRv6 policy (SRv6Policy) of the node Acc1 is ⁇ BSID2, PE1 ⁇ .
  • the IPv6 header is called the outer layer IPv6 header of the message, and the header indicates that the final destination of the message is the node PE1, and the next-hop node of the message is the node Agg1.
  • node Agg1 When the packet arrives at node Agg1, node Agg1 processes the packet as follows: Node Agg1 acts as the bonding node "BSID2" and attaches the new SRv6 policy to the packet.
  • the stack corresponding to the new SRv6 policy is ⁇ P11, P13 ⁇
  • the outer IPv6 header indicates that the nodes that the message needs to pass through are: nodes P11 and P13.
  • the inner layer IPv6 header indicates that the destination of the message is the node PE1.
  • the node P11 uses the segment identifier "P13" to search for a route, it finds that the outgoing interface of the route is down (down), and triggers TE-FRR. Since the segment identification in the outer IPv6 header has been processed at this time, it is necessary to jump to the inner IPv6 header and use the segment identification included in the inner IPv6 header to search for a route. For example, use "VPNSID1" in the inner IPv6 header to look up routes. Complete packet forwarding.
  • the above TE-FRR is called the TE-FRR technology across IPv6 headers.
  • the intermediate node is responsible for security protection or responsible for billing.
  • the SID corresponding to the above-mentioned nodes with important functions is allowed to be bypassed by default.
  • node D in FIG. 1 has important functions. If the node D fails, the forwarding path of the message does not include the SID corresponding to the node D.
  • the node P11 in FIG. 5 has an important function, and if the node P11 fails, the forwarding path of the message does not include the SID corresponding to the node P11. Therefore, if the message bypasses the SID corresponding to the above-mentioned intermediate node with important functions, it will have a serious adverse impact on the business.
  • an embodiment of the present application proposes a packet processing method.
  • the embodiments of the present application will be described in detail below.
  • FIG. 6 is a schematic diagram of an embodiment of a message processing method proposed in an embodiment of the present application.
  • a message processing method proposed in the embodiment of the present application includes:
  • the first node acquires the first packet.
  • the first node is an intermediate node.
  • the first node obtains the first message from the second node, and the second node is the head node.
  • the first packet is a packet obtained by encapsulating the data packet by the second node. It can be understood that the first packet may also be a packet obtained by encapsulating other packets by the second node, such as a bare IPv6 packet or a policy packet, etc., which is not limited here.
  • the first packet includes multiple segment identifiers SIDs, where the multiple SIDs are used to indicate a forwarding path of the first packet. For example, if the multiple SIDs include: SID1, SID2, and SID3, then the multiple SIDs indicate that the forwarding path of the first message is SID1 to SID2 to SID3.
  • the multiple SIDs include a first SID and a second SID, wherein the first SID is arranged before the second SID. That is, the forwarding path of the message needs to pass through the first SID first, and then pass through the second SID. Alternatively, the remaining segment (segment left, SL) pointer first points to the first SID, and then points to the second SID. Alternatively, the first packet first arrives at the node corresponding to the first SID, and the first packet next arrives at the node corresponding to the second SID.
  • the first packet includes at least one segment list (segment list), where the segment list includes the first SID and the second SID.
  • segment list includes the first SID and the second SID.
  • the segment list in addition to the first SID and the second SID, the segment list also includes multiple SIDs, such as the third SID, etc., as shown in Table 1-2:
  • the first packet includes multiple segment lists, where the multiple segment lists include a first segment list and a second segment list.
  • the first-segment list includes a first SID
  • the second-segment list includes a second SID.
  • the arrangement order of the first segment list is before the second segment list, and the first message first arrives at the node corresponding to the SID in the first segment list, and secondly arrives at the node corresponding to the SID in the second segment list.
  • the first segment list may include multiple SIDs
  • the second segment list may include multiple SIDs.
  • the first segment list includes: the first SID and the third SID, etc.
  • the second segment list includes: Second SID and fourth SID etc.
  • the first list is shown in Table 2-1
  • the second list is shown in Table 2-2:
  • the first message includes a first list and a second list, and the first list shown in Table 2-1 above and the second list shown in Table 2-2 are included in the first message
  • the order of arrangement is: the first segment list is before the second segment list, the first message first arrives at the node corresponding to the SID in the first segment list (such as the first SID), and then arrives at the node corresponding to the SID in the second segment list ( For example the second SID).
  • the first packet may also include more segment lists, which is not limited here.
  • the first packet includes an outer IPv6 header and an inner IPv6 header. Then, the first segment list is included in the outer layer IPv6 header, and the second segment list is included in the inner layer IPv6 header.
  • each SID is allowed to be bypassed can be determined in multiple ways. Exemplarily, the SID corresponding to the "End.as" node is not allowed to be bypassed.
  • the second node may configure whether each SID is allowed to be bypassed through command line configuration (or called static configuration).
  • command line configuration or called static configuration
  • it can be configured in the form of Table 3.
  • the first SID is "index 10 sid ipv6 2002:DB8:300::333", and the first SID is not allowed to be bypassed.
  • the second node may receive a control packet from the controller, where the control packet carries indication information.
  • the indication information indicates whether the first SID is allowed to be bypassed, so that the second node encapsulates the data packet according to the indication information, the segment list of the first packet includes the first SID, and the first packet also It includes a first field determined according to the indication information, where the first field is used to indicate whether the first SID is bypassed.
  • the second node determines the value of the first field according to the indication information in the control message. For example, if the indication information in the control node indicates that the first node is not allowed to be bypassed, then the second node encapsulates the data message to obtain the first message. In the first packet, the value of the first field is "1". A value of "1" for the first field indicates that the first SID is not allowed to be bypassed.
  • control message is a Path Computation Element Communication Protocol (PCEP) message
  • PCEP Path Computation Element Communication Protocol
  • BGP Border Gateway routing protocol
  • the indication information is located in the Type B segment-sub-label length value (Type B Segment Sub-TLV) in the control message. This indication indicates whether the SID in the Type B Segment Sub-TLV field is allowed to be bypassed.
  • the control message is a BGP SRv6Policy message, and the controller sends the SRv6Policy to the second node through the control message.
  • Type B Segment Sub-TLV is a schematic diagram of the structure of the segment-submark length value of type B.
  • Type B Segment Sub-TLV includes version (type) field, length (length) field, flags (flags) field, reserved (reserved) field, SRv6SID field, and, SRv6 node behavior and SID structure (SRv6endpoint behavior and SID structure) field .
  • the indication information may be located in the tag field.
  • FIG. 8 is a schematic structural diagram of the Flags field.
  • bits 0-3 in the flag field are V, A, S, and B fields respectively. Therefore, the indication information may be located in unused bits of the flag field, such as any one of the 4th to 7th bits.
  • the indication information is located in the last bit of the flag field, that is, the seventh bit.
  • the seventh bit When the value of the seventh bit is "1", it indicates that the SID of the Type B Segment Sub-TLV field (that is, the first SID) is not allowed to be bypassed; when the value of the seventh bit is "0", it indicates that the Type B Segment Sub-TLV field is not allowed to be bypassed; The SID (i.e. the first SID) of the B Segment Sub-TLV field is allowed to be bypassed.
  • the indication information may be located in a reserved field.
  • the indication information is located in any unused bit of the reserved field in the Type B Segment Sub-TLV field.
  • the indication information is located in the Internet Protocol Version 6 Segment Routing-Explicit Routing Object Subobject (SRv6-ERO Subobject) in the control message.
  • the indication information indicates whether the SID in the SRv6-ERO Subobject field is allowed to be bypassed.
  • the path computation element server path computation element server, PCE Server
  • PCE Server path computation element server
  • PCC path computation client
  • FIG. 9 is a schematic structural diagram of a sub-object of an IP version 6 segment routing-explicit routing object.
  • SRv6-ERO Subobject includes L field, version (type) field, length (length) field, NT field, flags (flags) field, V field, T field, F field, S field, reserved (reserved) field, SRv6 node behavior (SRv6endpoint behavior) field, SID structure (SID structure) field, SRv6SID field, NAI field and SID structure field.
  • the indication information may be located in the tag field.
  • the indication information may be located in unused bits of the flag field.
  • the indication information may be located in a reserved field.
  • the indication information is located in any unused bit of the reserved field in the SRv6-ERO Subobject field.
  • the first node determines that the first SID is unreachable.
  • the first node after the first node obtains the first packet, the first node detects whether the first SID is reachable.
  • the first node determines that the first SID is unreachable.
  • the first node fails to find a route according to the first SID, the first node determines that the first SID is unreachable.
  • the first node determines that the first SID is unreachable.
  • the first node when the first node detects that the link corresponding to the first SID is faulty through bidirectional forwarding detection (bidirectional forwarding detection, BFD), the first node determines that the first SID is unreachable.
  • bidirectional forwarding detection BFD
  • the first node determines whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID.
  • the first node determines whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID.
  • the first SID includes one SID as an example for description. It can be understood that when the first SID includes multiple SIDs, the multiple bits in the first field correspond to the multiple SIDs respectively.
  • a new field is defined in the first packet, and the newly defined field indicates whether each SID in the first packet is allowed to be bypassed.
  • the first message includes: the first SID, the second SID, the third SID and the fourth SID as an example, as shown in Table 4:
  • Each bit in the above newly defined field uniquely corresponds to a SID, wherein the value of each bit indicates whether the corresponding SID is allowed to be bypassed. For example: a value of "0" indicates that the corresponding SID is allowed to be bypassed, and a value of "1" indicates that the corresponding SID is not allowed to be bypassed. It can be understood that, in another manner, a value of "1” indicates that the corresponding SID is allowed to be bypassed, and a value of "0” indicates that the corresponding SID is not allowed to be bypassed.
  • the field corresponding to the first SID among the newly defined fields is called the first field.
  • the first node When the first SID is unreachable, the first node further reads the first field corresponding to the first SID, and judges whether the first SID is allowed to be bypassed.
  • the first node when the first node detects that the first SID is reachable, the first node may not read the first field. To shorten the processing time of the message.
  • a new field is defined in the first packet, and the newly defined field indicates which SIDs in the first packet are not allowed to be bypassed.
  • the first message includes: a first SID, a second SID, a third SID and a fourth SID as an example, as shown in Table 5:
  • the first node After the first node determines that a certain SID is unreachable, it further reads whether the newly defined field includes the SID, and if so, the SID is not allowed to be bypassed. If the newly defined field does not include the SID, the SID is allowed to be bypassed.
  • a new field is defined in the first packet, and the newly defined field indicates which SIDs in the first packet are allowed to be bypassed.
  • the first message includes: a first SID, a second SID, a third SID and a fourth SID as an example, as shown in Table 6:
  • the first node After the first node determines that a certain SID is unreachable, it further reads whether the newly defined field includes the SID, and if not, the SID is not allowed to be bypassed. If the newly defined field includes the SID, the SID is allowed to be bypassed.
  • the first field is located in a segment routing header (segment routing header, SRH) of the first packet.
  • segment routing header segment routing header
  • the first field is included in an optional tag length value (optional TLV) field in the SRH, wherein the value part (value) in the optional TLV indicates whether one or more SIDs are bypassed.
  • optional tag length value optional TLV
  • the value part in the optional TLV includes 8 bits, and when the SRH includes 5 SIDs, 5 bits in the 8 bits correspond to the 5 SIDs respectively.
  • the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed. It can be understood that when the value of a bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is empty, the SID corresponding to the bit is allowed to be bypassed.
  • the first field is located in the first SID. That is, each SID includes a field, which indicates whether the SID is allowed to be bypassed.
  • the first field is located in the parameters (args) field of the first SID.
  • the first field is located in any unused bit in the args field of the first SID.
  • the first field is located in the last bit of the args field of the first SID.
  • the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed.
  • the first SID is not allowed to be bypassed, and the first packet is discarded.
  • the first node discards the first packet.
  • step 604 is an optional step, and when the first SID is not allowed to be bypassed, the first node may also back up the first message, which is not limited here.
  • the first SID is allowed to be bypassed, and the first node forwards the first packet according to the second SID.
  • the first node forwards the first message according to the second SID. Specifically, the first node determines the forwarding path of the first message according to the second SID in the first message that is arranged after the first SID.
  • the first packet first arrives at the node corresponding to the first SID, and secondly arrives at the node corresponding to the second SID.
  • the SIDs included in the SL list in the first message are "SID1", “SID2", “SID3” and "SID4".
  • the first node determines that SID2 is unreachable and SID2 is allowed to be bypassed
  • the first node forwards the first message according to SID3 and SID4 that are arranged after SID2.
  • the first node deflects the SL pointer to SID3, and checks whether SID3 is reachable. If reachable, forward the first packet to SID3; if not reachable, further check whether SID3 is allowed to be bypassed, if allowed, deflect the SL pointer to SID4, and check whether SID4 is reachable, and so on.
  • the first segment list of the first message is included in the outer layer IPv6 header, and the first segment list includes the first SID;
  • the second segment list includes In the layer IPv6 header, the second segment list includes the second SID.
  • the first node Since the first SID is the last SID of the outer IPv6 header at this time, the first node needs to determine the first packet according to the inner IPv6 header. The forwarding path of the text. If it is not allowed, that is, the first field corresponding to the first SID indicates that the first SID is not allowed to be bypassed, the first node discards the first packet.
  • special fields are used to mark which segment identification SIDs are allowed to be bypassed, and which SIDs are not allowed to be bypassed. Therefore, when the SID is normal, the forwarding path of the message carrying the SID must pass through the SID, thereby ensuring that the message must pass through the intermediate node with important functions corresponding to the SID. To ensure the normal execution of business.
  • FIG. 10 is a schematic diagram of an application scenario proposed by the embodiment of the present application.
  • the application scenario includes a first node, a second node, an edge node, and a controller controlling the first node and the second node.
  • the second node is the head node
  • the first node is the intermediate node
  • the first node includes: the node corresponding to SID0, the node corresponding to SID1, the node corresponding to SID2, the node corresponding to SID3, the node corresponding to SID4, and the node corresponding to SID5 node.
  • the second node receives a control packet from the controller.
  • the control information included in the control message indicates that SID3 is not allowed to be bypassed, that is, the node corresponding to SID3 is not allowed to be bypassed.
  • the second node obtains the data packet, and encapsulates the data packet to obtain the first packet.
  • the packet header of the first packet is shown in FIG. 11 , and FIG. 11 is a schematic structural diagram of a packet header in an embodiment of the present application.
  • the first field corresponding to SID3 in the packet header indicates that the SID3 is not allowed to be bypassed (that is, the first SID is not allowed to be bypassed).
  • the second node forwards the first message to the next-hop node (the node corresponding to SID5), and so on.
  • the node corresponding to SID4 detects whether the next-hop node (SID3) indicated by the segment list in the first message is reachable. If SID3 is unreachable, the first node checks whether the SID3 is allowed to be bypassed (that is, checks the first field corresponding to SID3). If SID3 is not allowed to be bypassed, the node corresponding to SID4 discards the first packet.
  • SID3 is allowed to be bypassed (that is, the first SID is allowed to be bypassed). Then the node corresponding to SID4 continues to detect whether the next hop node (the node corresponding to SID2) in the segment list is reachable (the second SID is SID2). If SID2 is reachable, then the node corresponding to SID4 forwards the first message to the node corresponding to SID2 according to the SID2, that is, the node corresponding to SID3 forwards the first message according to the second SID (SID2) (forwarding the node corresponding to SID2) first message).
  • SID2 the node corresponding to SID2
  • SID2 forwards the first message according to the second SID (SID2) (forwarding the node corresponding to SID2) first message).
  • the first node checks whether the SID2 is allowed to be bypassed (that is, checks the first field corresponding to SID2). If SID2 is allowed to be bypassed, the node corresponding to SID4 continues to check whether the next hop node (node corresponding to SID1) in the segment list is reachable. If SID1 is reachable, the node corresponding to SID4 forwards the first packet to the node corresponding to SID1.
  • FIG. 12 is a schematic diagram of another scenario proposed by the embodiment of the present application.
  • the application scenario includes a first node, a second node, an edge node, and a controller controlling the first node and the second node.
  • the second node is the head node
  • the first node is the intermediate node
  • the first node includes: the node corresponding to SID1, the node corresponding to SID2, the node corresponding to SID3, the node corresponding to SID4, the node corresponding to SID5, the node corresponding to SID6 , and the node corresponding to SID7.
  • the node corresponding to SID5, the node corresponding to SID6, and the node corresponding to SID7 belong to the ISIS n domain
  • the node corresponding to SID1, the node corresponding to SID2, the node corresponding to SID3 and the node corresponding to SID4 belong to the ISIS m domain.
  • the first SID is SID5 as an example for description.
  • the second node receives the control message from the controller.
  • the control information included in the control message indicates that SID5 is not allowed to be bypassed, that is, the node corresponding to SID5 is not allowed to be bypassed.
  • the second node obtains the data packet, and encapsulates the data packet to obtain the first packet.
  • the packet header of the first packet is shown in FIG. 13 , and FIG. 13 is a schematic structural diagram of a packet header in an embodiment of the present application.
  • the SIDs included in the outer IPv6 header are: SID5, SID6, and SID7; the SIDs included in the inner IPv6 header are: SID1, SID2, SID3, and SID4.
  • the first packet is firstly forwarded along the path indicated by the outer IPv6 header, and secondly forwarded along the path indicated by the inner IPv6 header.
  • the first field corresponding to SID5 in the packet header indicates that the SID5 is not allowed to be bypassed.
  • the second node forwards the first message to the next-hop node (the node corresponding to SID7), and so on.
  • the node corresponding to SID6 detects whether the next-hop node (the node corresponding to SID5) indicated in the segment list in the first message is reachable. If SID5 is unreachable (the first SID is unreachable), the first node checks whether the SID5 is allowed to be bypassed (that is, checks the first field corresponding to SID5). If SID5 is not allowed to be bypassed, the node corresponding to SID6 discards the first packet.
  • the SID6 node detects whether the next-hop node (the node corresponding to SID4) in the segment list of the inner layer IPv6 header is reachable (the second SID is SID4). If SID4 is reachable, the node corresponding to SID6 forwards the first message to the node corresponding to SID4 (that is, forwards the first message according to the second SID).
  • the packet processing method proposed in the embodiment of the present application may also be applied to a service function chain (service function chain, SFC) scenario.
  • SFC service function chain
  • Business chain technology is a technology that provides orderly services to the application layer.
  • SFC is used to logically connect the services on the network device to form an orderly service combination. Specifically, by adding service chain path information to the original message, the message will pass through the specified path sequentially.
  • FIG. 14 is a schematic diagram of another scenario proposed by the embodiment of the present application. In Fig.
  • the service chain scenario includes: a second node, the second node is used as a service classifier node (Service classifier, SC); a first node, the first node is used as a service function forwarder node (service function forwarder, SFF), specifically,
  • the first node includes: service forwarding node 1, service forwarding node 2 and service forwarding node 3; tail node (tail end).
  • the service classification node After the second node receives the data message, that is, after the service classification node receives the data message, the service classification node encapsulates the service chain path information in the message to generate the first message.
  • the service chain path information can be encapsulated in the SRH header, which includes the SID of the service function node (service function, SF), such as the SID of the SFF1 node (service forwarding node 1), the SID of the SFF2 node, and the SID of the SFF3 node. SID.
  • the above SID includes service chain path information.
  • the SRH header also includes a first field, which indicates whether the corresponding SID is allowed to be bypassed. For some SFF nodes, which have important functions, for example, the SFF2 node is a firewall or a traffic accounting unit, then the SFF2 node is not allowed to be bypassed.
  • the following introduces the network device in the embodiment of the present application, and the network device introduced in the following has any function of the first node, the second node or the controller in the foregoing method embodiment.
  • FIG. 15 is a schematic structural diagram of a network device 1500 provided in the embodiment of the present application.
  • the network device 1500 includes: a transceiver module 1501 for performing step 601 or 605; a processing module 1502 for performing step 602 , 603 or 604.
  • the network device 1500 may correspond to the first node, the second node or the controller in the above method embodiments, and each unit in the network device 1500 and the above-mentioned other operations and/or functions are to realize the first node, the second node or the controller in the method embodiments respectively.
  • each unit in the network device 1500 and the above-mentioned other operations and/or functions are to realize the first node, the second node or the controller in the method embodiments respectively.
  • the various steps and methods implemented by the second node or the controller reference may be made to the foregoing method embodiments for specific details, and details are not repeated here for brevity.
  • the network device 1500 When the network device 1500 processes packets, it only uses the division of the above-mentioned functional modules as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to needs, that is, the internal structure of the network device 1500 is divided into different function modules to complete all or part of the functions described above.
  • the network device 1500 provided in the above embodiment is based on the same idea as the method in the above embodiment corresponding to FIG. 1 or FIG. 14 , and its specific implementation process is detailed in the above method embodiment, and will not be repeated here.
  • FIG. 16 is a schematic structural diagram of a network device 1600 provided in an embodiment of the present application.
  • the network device 1600 shown in FIG. 16 shows some specific features, those skilled in the art will realize from the embodiments of the present application that for the sake of brevity, various other features are not shown in FIG. Further relevant aspects of the embodiments disclosed in the application examples.
  • the network device 1600 includes one or more processing units (eg, CPU) 1601, a network interface 1602, a programming interface 1603, a memory 1604, and one or more communication buses 1605 for Interconnect the various components.
  • the network device 1600 may also omit or add some functional components or units based on the foregoing examples.
  • the network interface 1602 is used to connect with one or more other network devices/servers in the network system.
  • communication bus 1605 includes circuitry that interconnects and controls communication between system components.
  • Memory 1604 may include nonvolatile memory, for example, read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM) , Electrically Erasable Programmable Read-Only Memory (electrically EPROM, EEPROM) or flash memory.
  • Memory 1604 may also include volatile memory, which may be random access memory (RAM), which acts as an external cache.
  • the network device 1600 may have any function of the first node, the second node, or the controller in the method embodiments corresponding to FIGS. 1-14 above.
  • the network device 1600 corresponds to the first node, the second node or the controller in the above-mentioned method embodiments, and each module in the network device 1600 and the above-mentioned other operations and/or functions are respectively to realize the first node in the above-mentioned method embodiments
  • each module in the network device 1600 and the above-mentioned other operations and/or functions are respectively to realize the first node in the above-mentioned method embodiments
  • FIGS. 1-14 For specific details of various steps and methods implemented by a node, a second node, or a controller, refer to the method embodiments corresponding to the foregoing FIGS. 1-14 , and for brevity, details are not repeated here.
  • the network interface 1602 on the network device 1600 can complete the data sending and receiving operation, or the processor can call the program code in the memory, and cooperate with the network interface 1602 to realize the function of the sending and receiving unit when necessary .
  • the network device 1600 is configured to execute the packet processing method provided in the embodiment of the present application, for example, execute the packet processing method corresponding to the above embodiments shown in FIGS. 1-14 .
  • the specific structure of the network device described in FIG. 16 of this application may be as shown in FIG. 17 .
  • FIG. 17 is a schematic structural diagram of a network device 1700 provided in an embodiment of the present application.
  • the network device 1700 includes: a main control board 1710 and an interface board 1730 .
  • the main control board 1710 is also called a main processing unit (main processing unit, MPU) or a route processor (route processor). , equipment maintenance, protocol processing functions.
  • the main control board 1710 includes: a CPU 1711 and a memory 1712 .
  • the interface board 1730 is also called a line processing unit (line processing unit, LPU), a line card (line card), or a service board.
  • the interface board 1730 is used to provide various service interfaces and implement data packet forwarding. Service interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc.
  • the interface board 1730 includes: a central processing unit 1731 , a network processor 1732 , a forwarding entry storage 1734 and a physical interface card (physical interface card, PIC) 1733 .
  • the CPU 1731 on the interface board 1730 is used to control and manage the interface board 1730 and communicate with the CPU 1711 on the main control board 1710 .
  • the network processor 1732 is configured to implement message forwarding processing.
  • the form of the network processor 1732 may be a forwarding chip.
  • the physical interface card 1733 is used to implement the interconnection function of the physical layer. The original traffic enters the interface board 1730 through this, and the processed packets are sent out from the physical interface card 1733 .
  • the physical interface card 1733 includes at least one physical interface, which is also called a physical interface, and the physical interface may be a Flexible Ethernet (FlexE) physical interface.
  • the physical interface card 1733 is also called a daughter card, which can be installed on the interface board 1730, and is responsible for converting the photoelectric signal into a message, checking the validity of the message and forwarding it to the network processor 1732 for processing.
  • the central processing unit 1731 of the interface board 1730 can also execute the functions of the network processor 1732 , such as implementing software forwarding based on a general-purpose CPU, so that the interface board 1730 does not need the network processor 1732 .
  • the network device 1700 includes multiple interface boards.
  • the network device 1700 further includes an interface board 1740 , and the interface board 1740 includes: a central processing unit 1741 , a network processor 1742 , a forwarding entry storage 1744 and a physical interface card 1743 .
  • the network device 1700 further includes a switching fabric unit 1720 .
  • the SFU 1720 may also be called a SFU (switch fabric unit, SFU).
  • SFU switch fabric unit
  • the switching fabric board 1720 is used to complete the data exchange between the interface boards.
  • the interface board 1730 and the interface board 1740 may communicate through the switching fabric board 1720 .
  • the main control board 1710 is coupled to the interface board.
  • the main control board 1710, the interface board 1730, the interface board 1740, and the switching fabric board 1720 are connected through a system bus and/or a system backplane to implement intercommunication.
  • an inter-process communication protocol IPC
  • IPC inter-process communication
  • the network device 1700 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 1710 and a central processing unit 1731.
  • the forwarding plane includes various components for performing forwarding, such as a forwarding entry storage 1734, a physical interface card 1733, and a network processing Device 1732.
  • the control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol packets, configuring and maintaining device status, etc., and the control plane sends the generated forwarding tables to the forwarding plane.
  • the forwarding table issued by the following table looks up and forwards the packets received by the physical interface card 1733.
  • the forwarding table delivered by the control plane may be stored in the forwarding table item storage 1734 . In some embodiments, the control plane and the forwarding plane may be completely separated and not on the same device.
  • the transceiver unit in the network device 1600 may be equivalent to the physical interface card 1733 or the physical interface card 1743 in the network device 1700; the acquisition unit 16041 and the processing unit 16042 in the network device 1600 may be equivalent to the central processing unit
  • the processor 1711 or the central processing unit 1731 may also correspond to program codes or instructions stored in the memory 1712.
  • the operations on the interface board 1740 in the embodiment of the present application are consistent with the operations on the interface board 1730 , and are not repeated for brevity.
  • the network device 1700 in this embodiment may correspond to the first node, the second node or the controller in each of the foregoing method embodiments, and the main control board 1710, the interface board 1730 and/or the interface board in the network device 1700 1740 may implement the functions and/or various steps implemented by the first node, the second node, or the controller in each of the foregoing method embodiments, and details are not repeated here for brevity.
  • main control boards there may be one or more main control boards, and when there are multiple main control boards, it may include the main main control board and the standby main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards it provides. There may also be one or more physical interface cards on the interface board. There may be no SFU, or there may be one or more SFUs. When there are multiple SFUs, they can jointly implement load sharing and redundant backup. Under the centralized forwarding architecture, the network device does not need a switching network board, and the interface board undertakes the processing function of the service data of the entire system.
  • the network device can have at least one SFU, through which the data exchange between multiple interface boards can be realized, and large-capacity data exchange and processing capabilities can be provided.
  • the form of the network device can also be that there is only one board, that is, there is no switching fabric board, and the functions of the interface board and the main control board are integrated on this board.
  • the central processing unit and the main control board on the interface board can be combined into one central processing unit on the one board to perform the superimposed functions of the two. Which architecture to use depends on the specific networking deployment scenario, and there is no unique limitation here.
  • the foregoing first network device may be implemented as a virtualization device.
  • the virtualization device may be a virtual machine (virtual machine, VM) running a program for sending packets, a virtual router or a virtual switch.
  • Virtualization devices are deployed on hardware devices (eg, physical servers).
  • the first network device may be implemented based on a common physical server combined with a network functions virtualization (network functions virtualization, NFV) technology.
  • network functions virtualization network functions virtualization
  • the embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when run on a computer, enable the computer to control the network device to execute any one of the implementation manners shown in the foregoing method embodiments.
  • the embodiment of the present application also provides a computer program product, the computer program product includes computer program code, and when the computer program code is run on the computer, the computer is made to execute any one of the implementation manners shown in the foregoing method embodiments.
  • the embodiment of the present application also provides a computer program product, which, when the computer program product runs on the network device, causes the network device to execute the first node and the second node in the above method embodiments corresponding to Figures 1-14 or a method executed by the controller.
  • the embodiment of the present application also provides a chip system, including a processor and an interface circuit, and the interface circuit is configured to receive instructions and transmit them to the processor.
  • the processor is configured to implement the method in any one of the foregoing method embodiments.
  • the chip system further includes a memory, and there may be one or more processors in the chip system.
  • the processor can be realized by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor, and implements the method in any of the above method embodiments by reading the software code stored in the memory.
  • the memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application.
  • the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
  • the setting method of the processor is not specifically limited.
  • FIG. 18 is a schematic diagram of a network system 1800 proposed by an embodiment of the present application.
  • the network system 1800 includes: a first node 1801 , a second node 1802 and a controller 1803 .
  • the first node 1801 and the second node 1802 may be, for example, physical devices such as routers, switches, or gateways, or virtual devices that support route advertisement and packet forwarding. In this embodiment, specific types of the first node 1801 and the second node 1802 are not limited.
  • the controller 1803 may be a server that manages the first node 1801 and the second node 1802 described above.
  • the first node 1801 may be the network device 1500 , the network device 1600 or the network device 1700 .
  • the second node 1802 may be the network device 1500 , the network device 1600 or the network device 1700 .
  • the controller 1803 may be the network device 1500 , the network device 1600 or the network device 1700 .
  • FIG. 19 is a schematic diagram of a network system 1900 proposed by an embodiment of the present application.
  • the network system 1900 includes: a first network device 1901 , a first intermediate network device 1902 , a second intermediate network device 1903 and a controller 1904 .
  • the first network device 1901, the first intermediate network device 1902, and the second intermediate network device 1903 may be, for example, physical devices such as routers, switches, or gateways, or virtual devices that support route advertisement and packet forwarding. This embodiment does not limit specific types of the first network device 1901 , the first intermediate network device 1902 , and the second intermediate network device 1903 .
  • the controller 1904 may be a server that manages the above-mentioned first network device 1901 , first intermediate network device 1902 and second intermediate network device 1903 .
  • the second intermediate network device 1903 may be node B, node C, node D, node E, or other nodes in node F that are different from the first intermediate network device 1902 .
  • the controller 1904 is not shown in the scenario shown in FIG. 1 .
  • the first network device 1901, the first intermediate network device 1902, and the second intermediate network device 1903 belong to the same Interior Gateway Protocols (Interior Gateway Protocols, IGP) domain.
  • IGP Interior Gateway Protocols
  • the first network device 1901 and the first intermediate network device 1902 belong to the same Interior Gateway Protocols (Interior Gateway Protocols, IGP) domain.
  • the first intermediate network device 1902 and the second intermediate network device 1903 belong to different IGP domains.
  • the first network device 1901 may be the head node Acc1.
  • the first intermediate network device 1902 may be node Acc2, node Acc3 or node Acc4.
  • the second intermediate network device 1903 may be a node P11, a node P12, a node P13, or a node P14.
  • the first intermediate network device 1902 determines that the first SID is unreachable, and the first intermediate network device 1902 determines whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID , the first field is included in the first packet.
  • the first intermediate network device 1902 determines that the second SID is reachable. The first intermediate network device 1902 forwards the first packet to the second intermediate network device 1903 according to the second SID.
  • the first network device 1901 receives a control packet sent by the controller 1904, where the control packet includes indication information.
  • the indication information indicates that the second intermediate network device 1903 is not allowed to be bypassed.
  • the above-mentioned network devices in various product forms respectively have any functions of the first node, the second node or the controller in the above-mentioned method embodiments, which will not be repeated here.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B according to A does not mean determining B only according to A, and B may also be determined according to A and/or other information.
  • the disclosed system, device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

Abstract

Disclosed in the embodiments of the present application are a message processing method and a related apparatus. In the embodiments of the present application, segment IDs (SIDs) that are allowed to be bypassed and the SIDs that are not allowed to be bypassed are labeled by means of special fields. Therefore, if an SID is unreachable, the SID is bypassed only when it is confirmed that the SID is allowed to be bypassed, and the SID directly skips to a following SID to forward a message. In this way, it is ensured that the message must pass an intermediate node, which corresponds to the SID and has an important function. Therefore, the normal execution of a service is guaranteed.

Description

一种报文处理方法以及相关装置A message processing method and related device
本申请要求于2021年07月15日提交中国国家知识产权局、申请号为202110800586.X、发明名称为“一种报文处理方法以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office of China on July 15, 2021, with the application number 202110800586.X and the title of the invention "A message processing method and related device", the entire content of which is passed References are incorporated in this application.
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种报文处理方法以及相关装置。The present application relates to the technical field of communications, and in particular to a message processing method and a related device.
背景技术Background technique
在业务报文转发过程中,段路由(segment routing,SR)节点基于互联网协议第6版-段路由(Internet Protocol Version6-Segment Routing,IPv6SR或SRv6)的段路由流量工程策略(segment routing traffic engineering policy,SR-TE Policy)提供的灵活选择转发路径的方式,可满足用户不同的转发需求。当源节点与目的节点之间存在多条转发路径时,合理利用SR-TE Policy选择转发路径,不仅方便管理人员对网络进行管理和规划,还可有效地减轻网络设备的转发压力。In the process of forwarding service packets, the segment routing (segment routing, SR) node is based on the segment routing traffic engineering policy of Internet Protocol Version 6-Segment Routing (IPv6SR or SRv6). , SR-TE Policy) provides a flexible way to select forwarding paths, which can meet different forwarding requirements of users. When there are multiple forwarding paths between the source node and the destination node, rational use of SR-TE Policy to select the forwarding path will not only facilitate the management and planning of the network by managers, but also effectively reduce the forwarding pressure on network devices.
为了解决与拓扑无关的无环路备份(topology independent-loop free alternate,TI-LFA)快速重路由(fast reroute,FRR)保护失效问题,需要由故障的中间节点(midpoint)的上游节点代替该故障的中间节点完成转发处理,从而绕过故障的中间节点,实现SRv6中间节点故障的保护。上述保护方式称为SRv6中间节点保护(SRv6TE FRR)技术。In order to solve the problem of failure of topology independent-loop free alternate (TI-LFA) fast reroute (FRR) protection, the fault needs to be replaced by the upstream node of the faulty intermediate node (midpoint) The intermediate node completes the forwarding process, thereby bypassing the faulty intermediate node and realizing the protection of SRv6 intermediate node failure. The above protection method is called SRv6 intermediate node protection (SRv6TE FRR) technology.
但是,某些中间节点具有重要功能,例如该中间节点负责安全保护或者负责计费。如果报文绕过上述具有重要功能的中间节点对应的SID,则对业务产生严重不良影响。However, some intermediate nodes have important functions, for example, the intermediate node is responsible for security protection or responsible for billing. If the message bypasses the SID corresponding to the above-mentioned intermediate node with important functions, it will have a serious adverse impact on the business.
发明内容Contents of the invention
第一方面,本申请实施例提出一种报文处理方法,包括:In the first aspect, the embodiment of the present application proposes a message processing method, including:
第一节点获取第一报文,所述第一报文包括依次排列的多个段标识(segment id,SID),所述多个段标识用于指示所述第一报文的转发路径,所述多个SID包括第一SID和第二SID,所述第一SID排列在所述第二SID之前。所述第一SID排列在所述第二SID之前,可以是指报文的转发路径需要先经过第一SID,再经过第二SID。或者,剩余段(segment left,SL)指针首先指向第一SID,其次再指向第二SID。或者,第一报文首先到达第一SID对应的节点,第一报文其次到达第二SID对应的节点;The first node obtains the first message, the first message includes a plurality of segment identifiers (segment id, SID) arranged in sequence, and the plurality of segment identifiers are used to indicate the forwarding path of the first message, so The plurality of SIDs includes a first SID and a second SID, and the first SID is arranged before the second SID. The fact that the first SID is arranged before the second SID may mean that the forwarding path of the message needs to pass through the first SID first, and then pass through the second SID. Alternatively, the remaining segment (segment left, SL) pointer first points to the first SID, and then points to the second SID. Or, the first packet first arrives at the node corresponding to the first SID, and then the first packet arrives at the node corresponding to the second SID;
所述第一节点确定所述第一SID不可达。例如,当第一节点检测第一SID故障时,第一节点确定第一SID不可达。或者,第一节点根据第一SID查找路由失败时,第一节点确定第一SID不可达。The first node determines that the first SID is unreachable. For example, when the first node detects a failure of the first SID, the first node determines that the first SID is unreachable. Alternatively, when the first node fails to find a route according to the first SID, the first node determines that the first SID is unreachable.
所述第一节点根据所述第一SID对应的第一字段,判断所述第一SID是否允许被绕过,所述第一字段包括在所述第一报文中;The first node determines whether the first SID is allowed to be bypassed according to a first field corresponding to the first SID, and the first field is included in the first message;
当所述第一SID允许被绕过时,所述第一节点确定所述第二SID可达;When the first SID is allowed to be bypassed, the first node determines that the second SID is reachable;
所述第一节点根据所述第二SID转发所述第一报文。The first node forwards the first packet according to the second SID.
本申请实施例中,通过特殊的字段标记哪些段标识SID允许被绕过,哪些SID不允许被绕过。使得在该SID不可达的情况下,在确认该SID允许被绕过时,才绕过该SID,直接跳转至后续SID转发报文,进而确保该报文必须经过该SID对应的具有重要功能的中间节点或中间链路。以保障业务的正常执行。In this embodiment of the application, special fields are used to mark which segment identification SIDs are allowed to be bypassed, and which SIDs are not allowed to be bypassed. In the case that the SID is unreachable, when it is confirmed that the SID is allowed to be bypassed, the SID is bypassed and directly jumps to the subsequent SID to forward the message, thereby ensuring that the message must pass through the corresponding SID with important functions. Intermediate nodes or intermediate links. To ensure the normal execution of business.
在一种可能的实现方式中,当所述第一SID不允许被绕过时,则丢弃所述第一报文。以避免不正常的业务继续进行。In a possible implementation manner, when the first SID is not allowed to be bypassed, the first packet is discarded. To avoid the continuation of abnormal business.
在一种可能的实现方式中,所述第一字段位于所述第一报文的分段路由头(segment routing header,SRH)中。In a possible implementation manner, the first field is located in a segment routing header (segment routing header, SRH) of the first packet.
在一种可能的实现方式中,所述第一字段包括在所述SRH中可选的标记长度值Optional TLV字段中,其中,所述Optional TLV中的值部分指示一个或多个SID是否允许被绕过。In a possible implementation manner, the first field is included in an optional tag length value Optional TLV field in the SRH, where the value part in the Optional TLV indicates whether one or more SIDs are allowed to be Bypass.
例如:该optional TLV中的值部分包括8个比特位,当该SRH包括5个SID时,该8个比特位中的5个比特位分别对应该5个SID。当比特位的值为“1”,则该比特位对应的SID不允许被绕过;当比特位的值为“0”,则该比特位对应的SID允许被绕过。可以理解的是,当比特位的值为“1”,则该比特位对应的SID不允许被绕过;当比特位的值为空,则该比特位对应的SID允许被绕过。For example: the value part in the optional TLV includes 8 bits, and when the SRH includes 5 SIDs, 5 bits in the 8 bits correspond to the 5 SIDs respectively. When the value of the bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed. It can be understood that when the value of a bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is empty, the SID corresponding to the bit is allowed to be bypassed.
在一种可能的实现方式中,所述第一字段位于所述第一SID中。即每个SID中包括一个字段,该字段指示该SID是否允许被绕过。In a possible implementation manner, the first field is located in the first SID. That is, each SID includes a field, which indicates whether the SID is allowed to be bypassed.
在一种可能的实现方式中,所述第一字段位于所述第一SID的参数args字段中。例如该第一字段位于第一SID的args字段中的任意一个未被使用的比特位。In a possible implementation manner, the first field is located in the parameter args field of the first SID. For example, the first field is located in any unused bit in the args field of the first SID.
在一种可能的实现方式中,所述第一字段为所述第一SID的参数args字段中的最后一个比特位。示例性的,当比特位的值为“1”,则该比特位对应的SID不允许被绕过;当比特位的值为“0”,则该比特位对应的SID允许被绕过。In a possible implementation manner, the first field is the last bit in the parameter args field of the first SID. Exemplarily, when the value of a bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed.
一种可能的实现方式中,第一报文包括至少一个段列表(segment list),该段列表包括第一SID和第二SID。In a possible implementation manner, the first packet includes at least one segment list (segment list), where the segment list includes the first SID and the second SID.
在一种可能的实现方式中,第一报文包括多个段列表,其中,该多个段列表包括第一段列表和第二段列表。第一段列表包括第一SID,第二段列表包括第二SID。其中,第一段列表排列顺序在第二段列表之前,第一报文首先到达第一段列表中SID对应的节点,其次到达第二段列表中SID对应的节点。In a possible implementation manner, the first packet includes multiple segment lists, where the multiple segment lists include a first segment list and a second segment list. The first-segment list includes a first SID, and the second-segment list includes a second SID. Wherein, the arrangement order of the first segment list is before the second segment list, and the first message first arrives at the node corresponding to the SID in the first segment list, and secondly arrives at the node corresponding to the SID in the second segment list.
在一种可能的实现方式中,所述第一报文包括外层互联网协议第6版IPv6头和内层IPv6头,所述第一段列表包括在所述外层IPv6头中,所述第二段列表包括在所述内层IPv6头中。In a possible implementation manner, the first packet includes an outer Internet Protocol version 6 IPv6 header and an inner IPv6 header, the first segment list is included in the outer IPv6 header, and the first A two-segment list is included in the inner IPv6 header.
在一种可能的实现方式中,针对业务链(service function chain,SFC)场景。所述第一SID或所述第二SID包括业务链SFC路径信息。示例性的,在业务分类节点(Service classifier,SC)中,SC获取数据报文后,对该数据报文进行封装处理,生成第一报文。第一报文中包括第一SID和第二SID。第一SID或第二SID包括业务链路径信息,使得第一报文沿着业务链路径进行转发。In a possible implementation manner, it is aimed at a service function chain (service function chain, SFC) scenario. The first SID or the second SID includes service chain SFC path information. Exemplarily, in a service classifier node (Service classifier, SC), after the SC obtains the data message, it encapsulates the data message to generate the first message. The first packet includes the first SID and the second SID. The first SID or the second SID includes service chain path information, so that the first message is forwarded along the service chain path.
第二方面,本申请实施例提出一种报文处理方法,包括:In the second aspect, the embodiment of the present application proposes a message processing method, including:
第二节点对数据报文进行封装处理,以得到第一报文,所述第一报文包括依次排列的多个段标识SID,所述多个段标识用于指示所述第一报文的转发路径,所述多个SID包括第一SID和第二SID,所述第一SID排列在所述第二SID之前,The second node encapsulates the data message to obtain the first message, the first message includes a plurality of segment identifiers SID arranged in sequence, and the plurality of segment identifiers are used to indicate the Forwarding paths, the multiple SIDs include a first SID and a second SID, the first SID is arranged before the second SID,
其中,所述第一报文包括所述第一SID对应的第一字段,所述第一字段用于指示所述第一SID是否被绕过。Wherein, the first message includes a first field corresponding to the first SID, and the first field is used to indicate whether the first SID is bypassed.
具体的,第二节点可以根据静态配置(例如命令行配置)获知哪些SID允许被绕过,哪些SID不允许被绕过。第二节点也可以通过接收来自控制器的控制报文获知哪些SID允许被绕过,哪些SID不允许被绕过。Specifically, the second node may learn which SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed according to static configuration (for example, command line configuration). The second node may also learn which SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed by receiving the control message from the controller.
本申请实施例中,通过特殊的字段标记哪些段标识SID允许被绕过,哪些SID不允许被绕过。使得在该SID不可达的情况下,在确认该SID允许被绕过时,才绕过该SID,直接跳转至后续SID转发报文,进而确保该报文必须经过该SID对应的具有重要功能的中间节点。以保障业务的正常执行。In this embodiment of the application, special fields are used to mark which segment identification SIDs are allowed to be bypassed, and which SIDs are not allowed to be bypassed. In the case that the SID is unreachable, when it is confirmed that the SID is allowed to be bypassed, the SID is bypassed and directly jumps to the subsequent SID to forward the message, thereby ensuring that the message must pass through the corresponding SID with important functions. middle node. To ensure the normal execution of business.
在一种可能的实现方式中,所述第二节点接收来自控制器的控制报文,所述控制报文携带指示信息,所述指示信息用于指示所述第一SID是否允许被绕过;所述第二节点根据所述控制报文中的所述指示信息,确定所述第一字段的值。例如:控制节点中的指示信息指示第一节点不允许被绕过,则第二节点对数据报文进行封装处理,以得到第一报文。该第一报文中,第一字段的值为“1”。第一字段的值为“1”指示第一SID不允许被绕过。In a possible implementation manner, the second node receives a control packet from the controller, where the control packet carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed; The second node determines the value of the first field according to the indication information in the control packet. For example, if the indication information in the control node indicates that the first node is not allowed to be bypassed, then the second node encapsulates the data message to obtain the first message. In the first message, the value of the first field is "1". A value of "1" for the first field indicates that the first SID is not allowed to be bypassed.
在一种可能的实现方式中,控制报文为路径计算单元通信协议(Path Computation Element Communication Protocol,PCEP)报文,或者,控制报文为边界网关路由协议(Border Gateway Protocol,BGP)报文。In a possible implementation manner, the control message is a Path Computation Element Communication Protocol (Path Computation Element Communication Protocol, PCEP) message, or the control message is a Border Gateway Protocol (Border Gateway Protocol, BGP) message.
在一种可能的实现方式中,当所述控制报文为边界网关路由协议BGP报文时,所述指示信息位于所述控制报文中类型B的段-子标记长度值Type B Segment Sub-TLV中。In a possible implementation, when the control message is a Border Gateway Routing Protocol BGP message, the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the Flags field of the Type-B segment-sub-flag length value.
在一种可能的实现方式中,当所述控制报文为路径计算单元通信协议PCEP报文时,所 述指示信息位于所述控制报文中互联网协议第6版段路由-显式路由对象子对象SRv6-ERO Subobject字段中。In a possible implementation manner, when the control message is a PCEP message of the Path Computation Element communication protocol, the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于所述SRv6-ERO Subobject字段的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于SRv6-ERO Subobject字段的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the SRv6-ERO Subobject field.
第三方面,本申请实施例提出一种报文处理方法,包括:In a third aspect, the embodiment of the present application proposes a message processing method, including:
控制器向第二节点发送控制报文,所述控制报文携带指示信息,所述指示信息用于指示第一SID是否允许被绕过,以使得所述第二节点根据所述指示信息对数据报文进行封装,所述第一报文的段列表中包括所述第一SID,所述第一报文还包括根据所述指示信息确定的第一字段,所述第一字段用于指示所述第一SID是否被绕过。The controller sends a control message to the second node, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed, so that the second node performs data processing according to the indication information. The segment list of the first message includes the first SID, and the first message also includes a first field determined according to the indication information, and the first field is used to indicate the Whether the above-mentioned first SID is bypassed.
控制器可以向第二节点发送控制报文,该控制报文用于通知第二节点获知哪些SID允许被绕过,哪些SID不允许被绕过。The controller may send a control message to the second node, where the control message is used to notify the second node which SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed.
本申请实施例中,通过特殊的字段标记哪些段标识SID允许被绕过,哪些SID不允许被绕过。使得在该SID正常的情况下,携带该SID的报文的转发路径必须经过该SID,进而确保该报文必须经过该SID对应的具有重要功能的中间节点。以保障业务的正常执行。In this embodiment of the application, special fields are used to mark which segment identification SIDs are allowed to be bypassed, and which SIDs are not allowed to be bypassed. Therefore, when the SID is normal, the forwarding path of the message carrying the SID must pass through the SID, thereby ensuring that the message must pass through the intermediate node with important functions corresponding to the SID. To ensure the normal execution of business.
在一种可能的实现方式中,所述控制报文为路径计算单元通信协议PCEP报文,或者,所述控制报文为边界网关路由协议BGP报文。In a possible implementation manner, the control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol BGP message.
在一种可能的实现方式中,当所述控制报文为边界网关路由协议BGP报文时,所述指示信息位于所述控制报文中类型B的段-子标记长度值Type B Segment Sub-TLV中。In a possible implementation, when the control message is a Border Gateway Routing Protocol BGP message, the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the type B segment-submark length value.
在一种可能的实现方式中,当所述控制报文为路径计算单元通信协议PCEP报文时,所述指示信息位于所述控制报文中互联网协议第6版段路由-显式路由对象子对象SRv6-ERO Subobject字段中。In a possible implementation manner, when the control message is a PCEP message of the Path Computation Element communication protocol, the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于所述SRv6-ERO Subobject字段的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于SRv6-ERO Subobject字段的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the SRv6-ERO Subobject field.
第四方面,本申请实施例提出一种网络设备,包括:In a fourth aspect, the embodiment of the present application proposes a network device, including:
收发模块,用于获取第一报文,所述第一报文包括依次排列的多个段标识SID,所述多个段标识用于指示所述第一报文的转发路径,所述多个SID包括第一SID和第二SID,所述第一SID排列在所述第二SID之前;A transceiver module, configured to obtain a first message, the first message includes a plurality of segment identifiers SIDs arranged in sequence, the plurality of segment identifiers are used to indicate the forwarding path of the first message, and the plurality of segment identifiers are used to indicate the forwarding path of the first message. The SID includes a first SID and a second SID, the first SID is arranged before the second SID;
处理模块,用于确定所述第一SID不可达;A processing module, configured to determine that the first SID is unreachable;
处理模块,还用于根据所述第一SID对应的第一字段,判断所述第一SID是否允许被 绕过,所述第一字段包括在所述第一报文中;The processing module is further configured to determine whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID, and the first field is included in the first message;
处理模块,还用于当所述第一SID允许被绕过时,确定所述第二SID可达;The processing module is further configured to determine that the second SID is reachable when the first SID is allowed to be bypassed;
收发模块,还用于根据所述第二SID转发所述第一报文。The transceiver module is further configured to forward the first message according to the second SID.
在一种可能的实现方式中,处理模块,还用于当所述第一SID不允许被绕过时,则丢弃所述第一报文。In a possible implementation manner, the processing module is further configured to discard the first packet when the first SID is not allowed to be bypassed.
在一种可能的实现方式中,所述第一字段位于所述第一报文的分段路由头SRH中。In a possible implementation manner, the first field is located in a segment routing header SRH of the first packet.
在一种可能的实现方式中,所述第一字段包括在所述SRH中可选的标记长度值Optional TLV字段中,其中,所述Optional TLV中的值部分指示一个或多个SID是否允许被绕过。In a possible implementation manner, the first field is included in an optional tag length value Optional TLV field in the SRH, where the value part in the Optional TLV indicates whether one or more SIDs are allowed to be Bypass.
在一种可能的实现方式中,所述第一字段位于所述第一SID中。In a possible implementation manner, the first field is located in the first SID.
在一种可能的实现方式中,所述第一字段位于所述第一SID的参数args字段中。In a possible implementation manner, the first field is located in the parameter args field of the first SID.
在一种可能的实现方式中,所述第一字段为所述第一SID的参数args字段中的最后一个比特位。In a possible implementation manner, the first field is the last bit in the parameter args field of the first SID.
在一种可能的实现方式中,所述第一报文至少包括一个段列表,其中,所述段列表包括所述第一SID和所述第二SID。In a possible implementation manner, the first packet includes at least one segment list, where the segment list includes the first SID and the second SID.
在一种可能的实现方式中,所述第一报文包括多个段列表,其中,所述多个段列表包括第一段列表和第二段列表,所述第一段列表包括所述第一SID,所述第二段列表包括所述第二SID。In a possible implementation manner, the first message includes multiple segment lists, where the multiple segment lists include a first segment list and a second segment list, and the first segment list includes the first segment list A SID, the second segment list includes the second SID.
在一种可能的实现方式中,所述第一报文包括外层互联网协议第6版IPv6头和内层IPv6头,所述第一段列表包括在所述外层IPv6头中,所述第二段列表包括在所述内层IPv6头中。In a possible implementation manner, the first packet includes an outer Internet Protocol version 6 IPv6 header and an inner IPv6 header, the first segment list is included in the outer IPv6 header, and the first A two-segment list is included in the inner IPv6 header.
在一种可能的实现方式中,所述第一SID或所述第二SID包括业务链SFC路径信息。In a possible implementation manner, the first SID or the second SID includes service chain SFC path information.
第五方面,本申请实施例提出一种网络设备,包括:In the fifth aspect, the embodiment of the present application proposes a network device, including:
处理模块,用于对数据报文进行封装处理,以得到第一报文,所述第一报文包括依次排列的多个段标识SID,所述多个段标识用于指示所述第一报文的转发路径,所述多个SID包括第一SID和第二SID,所述第一SID排列在所述第二SID之前,A processing module, configured to perform encapsulation processing on the data message to obtain a first message, the first message includes a plurality of segment identifiers SIDs arranged in sequence, and the plurality of segment identifiers are used to indicate that the first message A forwarding path of the text, the multiple SIDs include a first SID and a second SID, and the first SID is arranged before the second SID,
其中,所述第一报文包括所述第一SID对应的第一字段,所述第一字段用于指示所述第一SID是否被绕过。Wherein, the first message includes a first field corresponding to the first SID, and the first field is used to indicate whether the first SID is bypassed.
在一种可能的实现方式中,收发模块,用于接收来自控制器的控制报文,所述控制报文携带指示信息,所述指示信息用于指示所述第一SID是否允许被绕过;In a possible implementation manner, the transceiver module is configured to receive a control message from the controller, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed;
处理模块,还用于根据所述控制报文中的所述指示信息,确定所述第一字段的值。The processing module is further configured to determine the value of the first field according to the indication information in the control message.
在一种可能的实现方式中,所述控制报文为路径计算单元通信协议PCEP报文,或者,所述控制报文为边界网关路由协议BGP报文。In a possible implementation manner, the control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol BGP message.
在一种可能的实现方式中,当所述控制报文为边界网关路由协议BGP报文时,所述指示信息位于所述控制报文中类型B的段-子标记长度值Type B Segment Sub-TLV中。In a possible implementation, when the control message is a Border Gateway Routing Protocol BGP message, the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the Flags field of the Type-B segment-sub-flag length value.
在一种可能的实现方式中,当所述控制报文为路径计算单元通信协议PCEP报文时,所述指示信息位于所述控制报文中互联网协议第6版段路由-显式路由对象子对象SRv6-ERO Subobject字段中。In a possible implementation manner, when the control message is a PCEP message of the Path Computation Element communication protocol, the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于所述SRv6-ERO Subobject字段的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于SRv6-ERO Subobject字段的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the SRv6-ERO Subobject field.
第六方面,本申请实施例提出一种网络设备,包括:In a sixth aspect, the embodiment of the present application proposes a network device, including:
收发模块,用于向第二节点发送控制报文,所述控制报文携带指示信息,所述指示信息用于指示第一SID是否允许被绕过,以使得所述第二节点根据所述指示信息对数据报文进行封装,所述第一报文的段列表中包括所述第一SID,所述第一报文还包括根据所述指示信息确定的第一字段,所述第一字段用于指示所述第一SID是否被绕过。A transceiver module, configured to send a control message to the second node, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed, so that the second node according to the indication The information encapsulates the data message, the segment list of the first message includes the first SID, and the first message also includes a first field determined according to the indication information, and the first field uses to indicate whether the first SID is bypassed.
在一种可能的实现方式中,所述控制报文为路径计算单元通信协议PCEP报文,或者,所述控制报文为边界网关路由协议BGP报文。In a possible implementation manner, the control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol BGP message.
在一种可能的实现方式中,当所述控制报文为边界网关路由协议BGP报文时,所述指示信息位于所述控制报文中类型B的段-子标记长度值Type B Segment Sub-TLV中。In a possible implementation, when the control message is a Border Gateway Routing Protocol BGP message, the indication information is located in the segment of type B in the control message-sub-mark length value Type B Segment Sub- TLVs.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
在一种可能的实现方式中,所述指示信息位于所述类型B的段-子标记长度值的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the type B segment-submark length value.
在一种可能的实现方式中,当所述控制报文为路径计算单元通信协议PCEP报文时,所述指示信息位于所述控制报文中互联网协议第6版段路由-显式路由对象子对象SRv6-ERO Subobject字段中。In a possible implementation manner, when the control message is a PCEP message of the Path Computation Element communication protocol, the indication information is located in the Internet Protocol Version 6 section routing-explicit routing object subsection of the control message. Object SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于所述SRv6-ERO Subobject字段的标记Flags字段的未使用比特位中。In a possible implementation manner, the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
在一种可能的实现方式中,所述指示信息位于SRv6-ERO Subobject字段的保留字段中。In a possible implementation manner, the indication information is located in a reserved field of the SRv6-ERO Subobject field.
第七方面,提供一种网络设备,包括处理器和通信接口;处理器用于执行指令,使得网络设备执行如第一方面任一实现方式的方法。In a seventh aspect, a network device is provided, including a processor and a communication interface; the processor is configured to execute instructions, so that the network device executes the method according to any implementation manner of the first aspect.
第八方面,提供一种网络设备,其特征在于,包括处理器和通信接口;处理器用于执行指令,使得网络设备执行如第二方面任一实现方式的方法。In an eighth aspect, there is provided a network device, which includes a processor and a communication interface; the processor is configured to execute instructions, so that the network device executes the method in any implementation manner of the second aspect.
第九方面,提供一种网络设备,其特征在于,包括处理器和通信接口;处理器用于执行指令,使得网络设备执行如第三方面任一实现方式的方法。A ninth aspect provides a network device, which includes a processor and a communication interface; the processor is configured to execute instructions, so that the network device executes the method in any implementation manner of the third aspect.
第十方面,提供一种通信系统,网络系统包括如第四方面的网络设备、如第五方面的网络设备和如第六方面的网络设备。According to a tenth aspect, a communication system is provided, and the network system includes the network device according to the fourth aspect, the network device according to the fifth aspect, and the network device according to the sixth aspect.
第十一方面,提供一种通信系统,网络系统包括如第七方面的网络设备、如第八方面的网络设备和如第九方面的网络设备。In an eleventh aspect, a communication system is provided, and the network system includes the network device of the seventh aspect, the network device of the eighth aspect, and the network device of the ninth aspect.
本申请第十二方面提供一种计算机存储介质,该计算机存储介质可以是非易失性的;该计算机存储介质中存储有计算机可读指令,当该计算机可读指令被处理器执行时实现第一方面、第二方面、或第三方面中任意一种实现方式中的方法。A twelfth aspect of the present application provides a computer storage medium, which may be non-volatile; computer-readable instructions are stored in the computer storage medium, and when the computer-readable instructions are executed by a processor, the first A method in any implementation manner of the aspect, the second aspect, or the third aspect.
本申请第十三方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如第一方面、第二方面、或第三方面中任意一种实现方式中的方法。The thirteenth aspect of the present application provides a computer program product containing instructions, which, when run on a computer, cause the computer to execute the method in any one of the implementation manners of the first aspect, the second aspect, or the third aspect.
本申请第十四方面提供一种芯片系统,该芯片系统包括处理器,用于支持网络设备实现上述方面中所涉及的功能,例如,发送或处理上述方法中所涉及的数据和/或信息。在一种可能的设计中,芯片系统还包括存储器,存储器,用于保存网络设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。A fourteenth aspect of the present application provides a chip system, which includes a processor, configured to support a network device to implement the functions involved in the above aspect, for example, send or process the data and/or information involved in the above method. In a possible design, the chip system further includes a memory, and the memory is used for storing necessary program instructions and data of the network device. The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
附图说明Description of drawings
图1为中间节点发生故障的通信系统的示意图;FIG. 1 is a schematic diagram of a communication system in which an intermediate node fails;
图2为本申请实施例中报文格式的示例图;Fig. 2 is an example figure of the message format in the embodiment of the present application;
图3a为段列表字段的示意图;Figure 3a is a schematic diagram of a segment list field;
图3b为段列表字段的示意图;Figure 3b is a schematic diagram of a segment list field;
图4为SID字段的示意图;FIG. 4 is a schematic diagram of a SID field;
图5为ISIS协议的场景示意图;FIG. 5 is a schematic diagram of a scenario of the ISIS protocol;
图6为本申请实施例提出的一种报文处理方法的实施例示意图;FIG. 6 is a schematic diagram of an embodiment of a message processing method proposed in an embodiment of the present application;
图7为类型B的段-子标记长度值的结构示意图;FIG. 7 is a schematic structural diagram of a segment-sub-mark length value of type B;
图8为Flags字段的结构示意图;Figure 8 is a schematic structural diagram of the Flags field;
图9为互联网协议第6版段路由-显式路由对象子对象的结构示意图;Fig. 9 is a schematic diagram of the structure of the IP version 6 segment routing-explicit routing object sub-object;
图10为本申请实施例提出的一种应用场景示意图;FIG. 10 is a schematic diagram of an application scenario proposed by the embodiment of the present application;
图11为本申请实施例中一种报文头的结构示意图;FIG. 11 is a schematic structural diagram of a message header in an embodiment of the present application;
图12为本申请实施例提出的又一种场景示意图;FIG. 12 is a schematic diagram of another scenario proposed by the embodiment of the present application;
图13为本申请实施例中一种报文头的结构示意图;FIG. 13 is a schematic structural diagram of a message header in an embodiment of the present application;
图14为本申请实施例提出的又一种场景示意图;FIG. 14 is a schematic diagram of another scenario proposed in the embodiment of the present application;
图15为本申请实施例提供的一种网络设备1500的结构示意图;FIG. 15 is a schematic structural diagram of a network device 1500 provided in an embodiment of the present application;
图16为本申请实施例提供的一种网络设备1600的结构示意图;FIG. 16 is a schematic structural diagram of a network device 1600 provided in an embodiment of the present application;
图17为本申请实施例提供的一种网络设备1700的结构示意图;FIG. 17 is a schematic structural diagram of a network device 1700 provided in an embodiment of the present application;
图18为本申请实施例提出的一种网络系统1800示意图;FIG. 18 is a schematic diagram of a network system 1800 proposed by an embodiment of the present application;
图19为本申请实施例提出的一种网络系统1900示意图。FIG. 19 is a schematic diagram of a network system 1900 proposed by an embodiment of the present application.
具体实施方式detailed description
下面,对本申请实施例进行描述。显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。In the following, the embodiments of the present application are described. Apparently, the described embodiments are only some of the embodiments of the present application, not all of them. Those skilled in the art know that, with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的描述在适当情况 下可以互换,以便使实施例能够以除了在本申请图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行顺序,只要能达到相同或者相类似的技术效果即可。本申请中所出现的单元的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个单元可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请中均不作限定。并且,作为分离部件说明的单元或子单元可以是也可以不是物理上的分离,可以是也可以不是物理单元,或者可以分布到多个电路单元中,可以根据实际的需要选择其中的部分或全部单元来实现本申请方案的目的。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the descriptions so used are interchangeable under appropriate circumstances such that the embodiments can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or modules is not necessarily limited to the expressly listed Instead, other steps or modules not explicitly listed or inherent to the process, method, product or apparatus may be included. The naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time/logic sequence indicated by the naming or numbering. The execution order of the technical purpose is changed, as long as the same or similar technical effect can be achieved. The division of units presented in this application is a logical division. In actual application, there may be other division methods. For example, multiple units can be combined or integrated in another system, or some features can be ignored. , or not, in addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between units may be electrical or other similar forms, this Applications are not limited. Moreover, the units or subunits described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units, and some or all of them may be selected according to actual needs unit to realize the purpose of the application scheme.
首先,介绍本申请实施例涉及的一些技术概念。First, some technical concepts involved in the embodiments of the present application are introduced.
分段路由(segment routing,SR):是基于源路由的理念而设计的在网络中转发数据包的一种协议。SR将网络路径划分为一个个段,并且为这些段和网络节点分配分段标识(segment id,SID),通过对SID进行有序排列,可以得到段列表(SID List,在SR-MPLS中也称标签栈),SID List可以指示一条转发路径。通过SR技术,可以指定携带了SID List的数据包经过的节点以及路径,从而满足流量调优的要求。做一个类比,数据包可以比作行李,SR可以比作行李上贴的标签,如果要将行李从A地区发送到D地区,途径B地区和C地区,则可以在始发地A地区给行李贴上一个标签“先到B地区,再到C地区,最后到D地区”,这样一来,各个地区只需识别行李上的标签,依据行李的标签将行李从一个地区转发至另一个地区即可。在SR技术中,头节点会向数据包添加标签,中间节点可以根据标签转发至下一个节点,直至数据包到达目的节点。例如在数据包的包头中,插入<SID1,SID2,SID3>,则数据包packet会首先转发给SID1对应的节点,之后转发给SID2对应的节点,之后转发给SID3对应的节点。其中,SR-MPLS的中英文全称为分段路由多协议标签交换(segment routing multi-protocol label switching)。Segment routing (SR): It is a protocol designed based on the concept of source routing to forward data packets in the network. SR divides the network path into segments, and assigns segment identifiers (segment id, SID) to these segments and network nodes. By arranging the SIDs in an orderly manner, a segment list (SID List, also known as SID in SR-MPLS) can be obtained. Called label stack), SID List can indicate a forwarding path. Through SR technology, you can specify the node and path through which the data packet carrying the SID List passes, so as to meet the requirements of traffic optimization. To make an analogy, the data packet can be compared to the luggage, and the SR can be compared to the label on the luggage. If the luggage is to be sent from area A to area D, passing through area B and area C, the luggage can be sent to area A at the origin Affix a label "first to area B, then to area C, and finally to area D", so that each area only needs to identify the label on the luggage, and forward the luggage from one area to another area according to the label of the luggage. Can. In SR technology, the head node will add a label to the data packet, and the intermediate node can forward it to the next node according to the label until the data packet reaches the destination node. For example, if <SID1, SID2, SID3> is inserted in the header of the data packet, the data packet will first be forwarded to the node corresponding to SID1, then forwarded to the node corresponding to SID2, and then forwarded to the node corresponding to SID3. Among them, the full name of SR-MPLS in Chinese and English is segment routing multi-protocol label switching (segment routing multi-protocol label switching).
基于互联网协议第6版(Internet Protocol Version 6,IPv6)的分段路由(SR v6):是指将SR技术应用在IPv6网络中。使用IPv6地址(128bits)作为SID的表现形式。在转发数据包时,支持SRv6的网络设备会按照数据包中的目的地址((destination address,DA),查询本地段标识表(local sid table),当数据包的目的地址与本地段标识表中的任一SID最长匹配时,则按照本地段标识表中的SID相关的策略,执行该策略对应的操作,例如,可以将数据包从SID对应的出接口转发出去;如果数据包的目的地址与本地段标识表中的每个SID均不最长匹配,则再查IPv6的转发表,按照IPv6的转发表进行最长匹配转发。Segment routing (SR v6) based on Internet Protocol Version 6 (IPv6): refers to the application of SR technology in IPv6 networks. Use IPv6 address (128bits) as the representation of SID. When forwarding a data packet, the network device supporting SRv6 will query the local segment identification table (local sid table) according to the destination address (destination address, DA) in the data packet. When any of the SIDs matches the longest match, the policy corresponding to the SID in the local segment identifier table is used to execute the operation corresponding to the policy. For example, the data packet can be forwarded from the outgoing interface corresponding to the SID; if the destination address of the data packet If there is no longest match with each SID in the local segment identification table, then check the IPv6 forwarding table again, and perform longest matching forwarding according to the IPv6 forwarding table.
分段路由头(segment routing header,SRH):IPv6报文是由IPv6标准头+扩展头(0...n) +负载Payload组成。为了基于IPv6转发平面实现SRv6,新增加一种IPv6扩展头,称作SRH扩展头,该扩展头指定一个IPv6的显式路径,存储的是IPv6的Segment List信息,其作用与SR MPLS里的Segment List一样。头节点在IPv6报文增加一个SRH扩展头,中间节点就可以按照SRH扩展头里包含的路径信息转发。具体地,在SRH中有两个关键信息,一个是IPv6地址形式的段列表(Segment List),类似于多协议标签交换(multi-protocol label switching,MPLS)网络中的标签栈信息,由有序排列的多个段标识(segment id,SID)构成的Segment List用于指示SR里的显式路径;另外一个则是剩余段(segment left,SL),SL是一个指针,用于指示当前的段标识。Segment routing header (SRH): An IPv6 packet is composed of IPv6 standard header + extension header (0...n) + payload. In order to implement SRv6 based on the IPv6 forwarding plane, a new IPv6 extension header is added, called the SRH extension header. This extension header specifies an IPv6 explicit path and stores IPv6 Segment List information. Its function is the same as that of the Segment in SR MPLS. List same. The head node adds an SRH extension header to the IPv6 message, and the intermediate node can forward it according to the path information contained in the SRH extension header. Specifically, there are two key pieces of information in the SRH, one is a segment list (Segment List) in the form of an IPv6 address, which is similar to label stack information in a multi-protocol label switching (MPLS) network, organized by The Segment List composed of multiple segment identifiers (segment id, SID) arranged to indicate the explicit path in SR; the other is the remaining segment (segment left, SL), SL is a pointer, used to indicate the current segment logo.
在SRv6网络中,IPv6报文的DA字段的值是一个不断变换的,它的取值由SL和Segment List共同决定,当指针SL指向一个当前待处理的段,例如指向Segment List[2]时,需要将Segment List[2]的IPv6地址复制到DA字段。In the SRv6 network, the value of the DA field of the IPv6 message is constantly changing, and its value is determined by the SL and the Segment List. When the pointer SL points to a segment currently to be processed, such as pointing to the Segment List[2] , the IPv6 address of Segment List[2] needs to be copied to the DA field.
在转发层面,如果节点支持SR,且该节点的段标识出现在了IPv6报文中的目的地址中,那么该节点在收到报文后,可以将SL进行减1操作,将指针偏移向新的段,并且将SL减一后对应的段标识(即IPv6地址格式)复制到DA字段,再向下一个节点转发报文。通常,当SL字段减为0时,节点可以弹出SRH报文头,然后对报文进行下一步处理。如果节点不支持SR,那么就不需要处理IPv6报文里面的SRH信息,仅依据IPv6目的地址字段,查找IPv6路由表,进行普通的IPv6转发即可。At the forwarding level, if a node supports SR, and the segment identifier of the node appears in the destination address in the IPv6 message, then the node can decrement SL by 1 after receiving the message, and shift the pointer to A new segment, and copy the corresponding segment identifier (that is, the IPv6 address format) after SL minus one to the DA field, and then forward the message to the next node. Usually, when the SL field is reduced to 0, the node can pop out the SRH message header, and then process the message in the next step. If the node does not support SR, then there is no need to process the SRH information in the IPv6 message, and it only needs to search the IPv6 routing table according to the IPv6 destination address field, and perform ordinary IPv6 forwarding.
SR策略(sr policy)是一种SR的流量工程机制。通常,一个SR Policy包括头节点(headend)、颜色标识(color)以及目的标识(endpoint),以及指示转发路径的段标识列表。其中,Headend用于标识执行SR Policy的头节点,Color用于SR与业务属性相关联,例如与低时延、高带宽等业务属性相关联,以概括该SR Policy的服务能力,Endpoint用于标识SR Policy的目的地址。通常,通过(headend,color,endpoint)在确定一条SR Policy。对同一个headend来说,其也可以通过(color,endpoint)来确定一条Policy。SR policy可以包括一个或多个段标识列表,以实现负载均衡,多路径备份等工能。头节点在转发报文时,可以根据该SR policy确定报文对应的段标识列表,从而确定转发该报文的转发路径,并将该段标识列表封装到报文中以显示或分散的指示路径。SR policy (sr policy) is a traffic engineering mechanism of SR. Usually, an SR Policy includes a headend node (headend), a color identifier (color), a destination identifier (endpoint), and a segment identifier list indicating a forwarding path. Among them, Headend is used to identify the head node that executes SR Policy, Color is used to associate SR with business attributes, such as low latency, high bandwidth and other business attributes, to summarize the service capabilities of the SR Policy, and Endpoint is used to identify Destination address of SR Policy. Usually, an SR Policy is determined by (headend, color, endpoint). For the same headend, it can also determine a Policy through (color, endpoint). SR policy can include one or more segment identification lists to achieve load balancing, multi-path backup and other functions. When the head node forwards a message, it can determine the segment identification list corresponding to the message according to the SR policy, so as to determine the forwarding path for forwarding the message, and encapsulate the segment identification list into the message to display or disperse the indication path .
路由前缀:由IP地址和子网掩码构成。在IPv6网络中,该子网掩码的长度可以为128位,或小于128位。在一个示例中,该路由前缀的写法可以为:A1::1/32或A1::1/128,其中,A1::1为一个IP地址,32或128表明该子网掩码的长度。Routing prefix: composed of IP address and subnet mask. In an IPv6 network, the length of the subnet mask can be 128 bits, or less than 128 bits. In an example, the routing prefix can be written as: A1::1/32 or A1::1/128, where A1::1 is an IP address, and 32 or 128 indicates the length of the subnet mask.
子网前缀:由IP地址和子网掩码构成,表示一个子网,在IPv6网络中,该子网掩码的长度小于128位。在一个示例中,该子网前缀的写法可以为:A1::1/32或A1::1/64,其中,A1::1为一个IP地址,32或64表明该子网掩码的长度。Subnet prefix: It consists of an IP address and a subnet mask, indicating a subnet. In an IPv6 network, the length of the subnet mask is less than 128 bits. In an example, the subnet prefix can be written as: A1::1/32 or A1::1/64, where A1::1 is an IP address, and 32 or 64 indicate the length of the subnet mask .
段路由流量工程中间节点保护(segment routing IPv6traffic engineering fast reroute,SRv6TE FRR):在基于互联网协议第6版(Internet Protocol Version 6,IPv6)的段路由流量工程策略(segment routing traffic engineering policy,sR-TE Policy)中,中间节点(midpoint)的上游节点可以代替中间节点完成转发报文的处理,这种上游节点可以称为代理转发(proxy forwarding)节点。Segment routing traffic engineering intermediate node protection (segment routing IPv6 traffic engineering fast reroute, SRv6TE FRR): in the segment routing traffic engineering policy (segment routing traffic engineering policy, sR-TE) based on Internet Protocol Version 6 (IPv6) Policy), the upstream node of the intermediate node (midpoint) can replace the intermediate node to complete the processing of the forwarding message, and this upstream node can be called a proxy forwarding (proxy forwarding) node.
图1为中间节点发生故障的通信系统的示意图。在该通信系统中,正常情况下,报文从节点A发出,依次经过节点B、节点D和节点E,到达节点F,如图1中虚线箭头所示。然而,在某次事故或突发情况下,中间节点D发生了故障。此时中间节点D的上游节点B(代理转发节点)可以感知到报文的下一跳(中间节点D)接口故障,则该节点B修改报文中的参数,使得报文绕过故障节点D,经过节点C和节点E,到达节点F,如图1中实线箭头所示。具体的流程如下:FIG. 1 is a schematic diagram of a communication system in which an intermediate node fails. In this communication system, under normal circumstances, a message is sent from node A, passes through node B, node D, and node E in sequence, and reaches node F, as shown by the dotted arrow in Figure 1 . However, in an accident or unexpected situation, the intermediate node D fails. At this time, the upstream node B (proxy forwarding node) of the intermediate node D can perceive the interface failure of the next hop (intermediate node D) of the message, then the node B modifies the parameters in the message so that the message bypasses the faulty node D , go through node C and node E, and reach node F, as shown by the solid arrow in Figure 1. The specific process is as follows:
1、节点A向目的节点F转发报文,并在报文的SR扩展报文头(segment routing header,SRH)中指定经过中间节点D。以下对本申请实施例中报文的格式进行简要介绍:1. Node A forwards the message to the destination node F, and specifies to pass through the intermediate node D in the SR extended message header (segment routing header, SRH) of the message. The format of the message in the embodiment of the present application is briefly introduced as follows:
图2为本申请实施例中报文格式的示例图。该报文的格式可以包括但不限于三部分,第一部分为IPv6报文头201,该部分包括版本字段,用于表明该报文对应的IPv6协议版本。下一级报文头(next header)字段,用于表示下一级报文头的类型。示例性的,下一级报文头字段的值为43,则表示该IPv6报文头201的下一级报文头是SRH。源地址(source address)字段,用于表示该报文的源地址。目标地址(destination address)字段,用于表示该报文的目标地址。第二部分为SRH202,该部分包括段剩余(segment left,SL)字段,该字段相当于一种索引,用于指示设备读取当前报文应该访问的下一个中间节点(当SL=0时为目的节点)的信息。段列表(segment list)字段,用于搭载该报文需要经过的中间节点的信息或目的节点的信息。可以理解的是,Segment List[0]一般为目的节点的信息。可以理解的是,节点首先可以读取SL的值,然后根据SL的值读取相应的Segment List。示例性的,节点读取到SL的值为1,则节点将会读取Segment List[1]。报文中的SL和Segment List配合可以使得报文在转发过程中,通过SL的变更来更新当前报文需要到达的下一个中间节点。第三部分为类型长度值(tag length value,TLV),TLV为SRH头中的可选(optional)变量(variable)。第四部分为IPv6的报文负荷(IPv6payload)204,用于搭载报文的数据。FIG. 2 is an example diagram of a message format in an embodiment of the present application. The format of the message may include but not limited to three parts. The first part is the IPv6 message header 201, and this part includes a version field, which is used to indicate the IPv6 protocol version corresponding to the message. The next header (next header) field is used to indicate the type of the next header. Exemplarily, the value of the next-level packet header field is 43, which means that the next-level packet header of the IPv6 packet header 201 is SRH. The source address (source address) field is used to indicate the source address of the packet. The destination address (destination address) field is used to indicate the destination address of the packet. The second part is SRH202, which includes a segment left (segment left, SL) field, which is equivalent to an index, and is used to indicate the next intermediate node that the device should visit when reading the current message (when SL=0, it is destination node) information. The segment list (segment list) field is used to carry the information of the intermediate node or the information of the destination node that the message needs to pass through. It is understandable that Segment List[0] is generally the information of the destination node. It is understandable that the node can first read the value of SL, and then read the corresponding Segment List according to the value of SL. Exemplarily, if the node reads that the value of SL is 1, the node will read Segment List[1]. The cooperation of SL and Segment List in the message can make the next intermediate node that the current message needs to reach be updated through the change of SL during the forwarding process of the message. The third part is the type length value (tag length value, TLV), and TLV is an optional (optional) variable (variable) in the SRH header. The fourth part is IPv6 message payload (IPv6 payload) 204, which is used to carry the data of the message.
在实际应用中,该报文实际上还包括一些现有的字段,为简要描述,本申请实施例对此省略,不再赘述。该报文还可以包括其他字段,以实现其他功能,本申请实施例对此不做限定。In practical applications, the message actually includes some existing fields, which are omitted in the embodiment of the present application for brief description, and will not be repeated here. The message may also include other fields to implement other functions, which is not limited in this embodiment of the present application.
图3a为段列表字段的示意图之一。Segment List一般为128位,本申请实施例以128位为例子进行描述。当SID采用非压缩格式时,SID的字段也是128位,则该行Segment List即是一个SID。图3b为段列表字段的示意图之二。当SID采用压缩格式时,SID的字段仅需32位,则该行Segment List可以包括4个SID。可以理解的是,当实际情况中没有达到4个压缩SID时(例如一行Segment List中仅包括3个SID),则相应位置可以留空,具体可以用相应位置的值全部置零的方式表示留空。即,段列表(segment list)中包括一个非压缩段标识(segment id,SID)或包括多个压缩SID。当段列表中包括多个压缩SID时,可以通过SID索引(sid index,SI)参数和SL来确定SID的位置。示例性的,SI为0表示该段列表的最后一个SID,则SL=5、SI=0表示SL=5对应的段列表的最后一个SID。Figure 3a is one of the schematic diagrams of the segment list field. The Segment List is generally 128 bits, and the embodiment of this application uses 128 bits as an example for description. When the SID adopts the uncompressed format, the field of the SID is also 128 bits, and the Segment List of this line is a SID. Fig. 3b is the second schematic diagram of the segment list field. When the SID adopts the compressed format, the SID field only needs 32 bits, then the row Segment List can include 4 SIDs. It is understandable that when there are not up to 4 compressed SIDs in the actual situation (for example, only 3 SIDs are included in a row of Segment List), the corresponding position can be left blank. null. That is, the segment list (segment list) includes a non-compressed segment identifier (segment id, SID) or includes multiple compressed SIDs. When multiple compressed SIDs are included in the segment list, the position of the SID can be determined through a SID index (sid index, SI) parameter and SL. Exemplarily, SI being 0 indicates the last SID of the segment list, then SL=5 and SI=0 indicate the last SID of the segment list corresponding to SL=5.
图4为SID字段的示意图。一般地,非压缩的SID字段可以包括3部分,位置标识(locator)字段、功能(function)字段和变量(args)字段。其中,Locator字段包括 公共前缀部分(common prefix)和设备标识部分(nodeid),Function字段用于表示该节点所支持的功能,Args字段可以用于实现自定义的作用或用于携带一些参数。Fig. 4 is a schematic diagram of the SID field. Generally, an uncompressed SID field may include three parts, a location identifier (locator) field, a function (function) field, and a variable (args) field. Among them, the Locator field includes the common prefix part (common prefix) and the device identification part (nodeid), the Function field is used to indicate the functions supported by the node, and the Args field can be used to implement custom functions or carry some parameters.
相较于非压缩的SID,压缩的SID一般会省略公共前缀部分和参数部分,使得SID的长度减少到32位。在实际应用中,压缩的格式可以采用通用段标识(generalized segment identifier,G-SID),还可以采用其他压缩格式,本申请实施例对此不做限定。Compared with the uncompressed SID, the compressed SID generally omits the common prefix part and the parameter part, so that the length of the SID is reduced to 32 bits. In practical applications, the compressed format may use a generalized segment identifier (generalized segment identifier, G-SID), or other compressed formats, which are not limited in this embodiment of the present application.
图1中,节点A发出报文时(报文状态一),该报文中IPv6部分的目标地址为4::,说明该报文下一个中间节点为节点D。SRH部分的第一个SID的设备标识为6::,说明该报文的目的节点为节点F,第二个SID的设备标识为4::,说明该报文被指定为经过中间节点D。In Fig. 1, when node A sends a message (message state 1), the destination address of the IPv6 part in the message is 4::, indicating that the next intermediate node of the message is node D. The device identifier of the first SID in the SRH part is 6::, indicating that the destination node of the message is node F, and the device identifier of the second SID is 4::, indicating that the message is designated to pass through the intermediate node D.
2、报文到达节点B时,由于节点D故障,其上游节点B感知到报文下一跳接口故障,而下一跳正好是报文当前的目的地址4::,且此时SL>0,所以节点B执行代理转发行为。具体地,节点B将SL减1,并将下层SID 6::复制到外层IPv6报文头的目的地址字段(即将中间节点的下一跳的SID复制,需要先知道该中间节点的下一跳的SID类型是压缩还是非压缩,图1的示例中默认为非压缩SID)。此时由于SL=0,节点B可以去掉SRH扩展报文头,然后根据目的地址6::查表转发。此时报文被节点B处理后为状态二。2. When the message arrives at node B, because node D is faulty, its upstream node B perceives that the next hop interface of the message is faulty, and the next hop happens to be the current destination address of the message 4::, and SL>0 at this time , so Node B performs proxy forwarding behavior. Specifically, Node B subtracts 1 from SL, and copies the lower layer SID 6:: to the destination address field of the outer layer IPv6 packet header (that is, to copy the SID of the next hop of the intermediate node, it is necessary to know the next hop of the intermediate node first) Whether the SID type of the hop is compressed or uncompressed. In the example in Figure 1, the default is the uncompressed SID). At this time, because SL=0, Node B can remove the SRH extended message header, and then forward according to the destination address 6:: table lookup. At this time, the message is in state 2 after being processed by the node B.
3、节点B处理报文为状态二后,节点B根据状态二的报文情况,建立报文到节点F的路径。由于节点B到目的地址6::之间的路径中,路径B-D-E-F的Cost为30(除特殊标记外,每个节点之间的Cost为10),而路径B-C-E-F之间的Cost为1020。因此对于节点B来说,目的地址6::的主下一跳依然是节点D。由于目的地址6::的主下一跳依然是节点D,但是节点B不是该目的地址的倒数第二跳,且SL=0,所以节点B不再符合代理转发条件,而是按照正常TI-LFA转发流程切换到备份路径转发,备份路径的Repair Segment List为<3::5>,所以节点B使用“H.Insert”的方式封装Segment List 3::5,新增1个SRH扩展报文头(SL置一),则报文以状态三被节点B发送出去,经过备份路径转发到节点F。3. After node B processes the message into state 2, node B establishes a path from the message to node F according to the state 2 message. In the path between node B and the destination address 6::, the cost of the path B-D-E-F is 30 (except for special marks, the cost between each node is 10), and the cost of the path B-C-E-F is 1020. Therefore, for node B, the primary next hop of the destination address 6:: is still node D. Since the primary next hop of the destination address 6:: is still node D, but node B is not the penultimate hop of the destination address, and SL=0, node B no longer meets the proxy forwarding condition, but follows the normal TI- The LFA forwarding process is switched to the backup path forwarding, and the Repair Segment List of the backup path is <3::5>, so node B uses "H.Insert" to encapsulate Segment List 3::5, and adds an SRH extended message header (SL set to 1), the message is sent out by node B in state 3, and forwarded to node F through the backup path.
4、根据TI-LFA流程,在节点A感知到节点D故障,且IGP完成收敛以后,节点A删除到节点D的路由转发表项,所以节点A根据4::查表转发的时候,无法命中路由,此时节点A就要作为代理转发节点执行代理转发行为,SL减1,并将下层SID 6::更新到外层IPv6报文头,然后根据目的地址6::查表转发到节点B。节点B如果完成收敛,则按照收敛后的最短路径将报文转发到节点F;节点B如果未完成收敛,则按照TI-LFA流程经过备份路径转发到节点F。通过上述方式,就绕过了故障节点D。4. According to the TI-LFA process, after node A perceives the failure of node D and the IGP converges, node A deletes the routing forwarding entry to node D, so when node A forwards according to 4:: table lookup, it cannot hit Routing, at this time, node A will act as a proxy forwarding node to perform proxy forwarding behavior, SL is reduced by 1, and the lower layer SID 6:: is updated to the outer IPv6 packet header, and then forwarded to node B according to the destination address 6:: table lookup . If node B completes the convergence, it forwards the packet to node F according to the shortest path after convergence; if node B does not complete the convergence, it forwards the packet to node F through the backup path according to the TI-LFA process. In the above manner, the faulty node D is bypassed.
上述方案称为基于Ipv6的段路由流量工程中间节点保护(segment routing IPv6traffic engineering fast reroute,SRv6TE FRR)。其中,节点B修改报文中的参数时需要将报文中节点D的下一跳的段标识(segment identifier,SID)更新到头中。The above scheme is called IPv6-based segment routing traffic engineering intermediate node protection (segment routing IPv6 traffic engineering fast reroute, SRv6TE FRR). Wherein, when node B modifies the parameters in the message, it needs to update the segment identifier (segment identifier, SID) of the next hop of node D in the message to the header.
跨IPv6头的TE-FRR技术:以中间系统-中间系统(intermediate system to intermediate system,ISIS)协议的场景为例。为了便于理解,请参阅图5,图5为ISIS协议的场景示意图。该场景包括ISIS n域和ISIS m域,其中,ISIS n域包括节点Acc1、节点Acc2、节点Acc3和节点Acc4;ISIS m域包括节点P11、节点P12、节点P13和节点P14。ISIS n域与ISIS m域之间包括:节点Agg1和节点Agg2,其中,节点Acc2通过节点 Agg1与节点P11连接,节点Acc2通过节点Agg2与节点P12连接。该场景还包括边缘节点PE1和边缘节点PE2。TE-FRR technology across IPv6 headers: Take the intermediate system to intermediate system (ISIS) protocol scenario as an example. For ease of understanding, please refer to Figure 5, which is a schematic diagram of the scenario of the ISIS protocol. This scene includes ISIS n domain and ISIS m domain, wherein, ISIS n domain includes node Acc1, node Acc2, node Acc3 and node Acc4; ISIS m domain includes node P11, node P12, node P13 and node P14. Include between ISIS n domain and ISIS m domain: node Agg1 and node Agg2, wherein, node Acc2 is connected with node P11 through node Agg1, and node Acc2 is connected with node P12 through node Agg2. This scenario also includes edge node PE1 and edge node PE2.
以节点Acc1为例,节点Acc1为头节点,节点Acc1的SRv6策略(SRv6Policy)对应的栈为{BSID2,PE1}。节点Acc2发出的报文IPv6头包括:“DA=BSID2”、“VPNSID1”、“PE1”、“BSID2”和“payload”。该IPv6头称为该报文的外层IPv6头,该头指示该报文的最终目的地为节点PE1,该报文的下一跳节点为节点Agg1。Taking the node Acc1 as an example, the node Acc1 is the head node, and the stack corresponding to the SRv6 policy (SRv6Policy) of the node Acc1 is {BSID2, PE1}. The packet IPv6 header sent by node Acc2 includes: "DA=BSID2", "VPNSID1", "PE1", "BSID2" and "payload". The IPv6 header is called the outer layer IPv6 header of the message, and the header indicates that the final destination of the message is the node PE1, and the next-hop node of the message is the node Agg1.
当报文到达节点Agg1后,节点Agg1对该报文进行如下处理:节点Agg1作为粘接节点“BSID2”,对该报文粘连新的SRv6策略,该新的SRv6策略对应的栈为{P11,P13},节点Agg1发出的报文包括:“DA=P11”、“P13”、“P11”、“DA=BSID2”、“VPNSID1”、“PE1”、“BSID2”和“payload”。其中,该报文的外层IPv6头包括:“DA=P11”、“P13”和“P11”;该报文的内层IPv6头包括:“DA=BSID2”、“VPNSID1”、“PE1”和“BSID2”。该外层IPv6头指示该报文需要经过的节点为:节点P11和P13。该内层IPv6头指示该报文的目的地为节点PE1。When the packet arrives at node Agg1, node Agg1 processes the packet as follows: Node Agg1 acts as the bonding node "BSID2" and attaches the new SRv6 policy to the packet. The stack corresponding to the new SRv6 policy is {P11, P13}, the message sent by node Agg1 includes: "DA=P11", "P13", "P11", "DA=BSID2", "VPNSID1", "PE1", "BSID2" and "payload". Wherein, the outer IPv6 header of the message includes: "DA=P11", "P13" and "P11"; the inner IPv6 header of the message includes: "DA=BSID2", "VPNSID1", "PE1" and "BSID2". The outer IPv6 header indicates that the nodes that the message needs to pass through are: nodes P11 and P13. The inner layer IPv6 header indicates that the destination of the message is the node PE1.
当节点P11收到包括内层IPv6头和外层IPv6头的报文后,首先根据该外层IPv6头指示的目的地址“DA=P11”,确定需要对该报文进行处理。节点P11使用段标识“P11”查找本地段(localsid)列表,确定段标识“P11”为末尾段标识(end sid)。则查找指针偏向下一个段标识“P13”,并使用段标识“P13”查找路由。在一种故障场景中,节点P13故障。则节点P11使用段标识“P13”查找路由时,发现该路由的出接口关闭(down),触发TE-FRR。由于此时该外层IPv6头中的段标识处理完毕,需要跳转至内层IPv6头,并使用内层IPv6头包括的段标识查找路由。例如使用内层IPv6头的“VPNSID1”查找路由。完成报文的转发。When the node P11 receives the message including the inner IPv6 header and the outer IPv6 header, it first determines that the message needs to be processed according to the destination address "DA=P11" indicated by the outer IPv6 header. The node P11 uses the segment identifier "P11" to search the local segment (localsid) list, and determines that the segment identifier "P11" is the end segment identifier (end sid). Then the search pointer is biased towards the next segment identifier "P13", and the route is searched using the segment identifier "P13". In one failure scenario, node P13 fails. Then, when the node P11 uses the segment identifier "P13" to search for a route, it finds that the outgoing interface of the route is down (down), and triggers TE-FRR. Since the segment identification in the outer IPv6 header has been processed at this time, it is necessary to jump to the inner IPv6 header and use the segment identification included in the inner IPv6 header to search for a route. For example, use "VPNSID1" in the inner IPv6 header to look up routes. Complete packet forwarding.
上述TE-FRR称为跨IPv6头的TE-FRR技术。The above TE-FRR is called the TE-FRR technology across IPv6 headers.
然而,某些中间节点具有重要功能,例如该中间节点负责安全保护或者负责计费。SRv6中间节点故障保护技术中,上述具有重要功能的节点对应的SID默认是允许被绕过。例如:图1中的节点D具有重要功能,若该节点D发生故障,则报文的转发路径中不包括该节点D对应的SID。或者,图5中的节点P11具有重要功能,若该节点P11发生故障,则报文的转发路径中不包括该节点P11对应的SID。因此,如果报文绕过上述具有重要功能的中间节点对应的SID,则对业务产生严重不良影响。However, some intermediate nodes have important functions, for example, the intermediate node is responsible for security protection or responsible for billing. In the SRv6 intermediate node failure protection technology, the SID corresponding to the above-mentioned nodes with important functions is allowed to be bypassed by default. For example, node D in FIG. 1 has important functions. If the node D fails, the forwarding path of the message does not include the SID corresponding to the node D. Alternatively, the node P11 in FIG. 5 has an important function, and if the node P11 fails, the forwarding path of the message does not include the SID corresponding to the node P11. Therefore, if the message bypasses the SID corresponding to the above-mentioned intermediate node with important functions, it will have a serious adverse impact on the business.
基于此,本申请实施例提出一种报文处理方法。通过特殊的字段标记哪些SID允许被绕过,哪些SID不允许被绕过。使得在该SID正常的情况下,报文的转发路径必须经过该SID,进而该报文必须经过该SID对应的具有重要功能的中间节点。以确保业务的正常执行。下面对本申请实施例进行详细说明。Based on this, an embodiment of the present application proposes a packet processing method. Use a special field to mark which SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed. Therefore, when the SID is normal, the forwarding path of the message must pass through the SID, and then the message must pass through the intermediate node with important functions corresponding to the SID. To ensure the normal execution of business. The embodiments of the present application will be described in detail below.
请参阅图6,图6为本申请实施例提出的一种报文处理方法的实施例示意图。本申请实施例提出的一种报文处理方法包括:Please refer to FIG. 6 . FIG. 6 is a schematic diagram of an embodiment of a message processing method proposed in an embodiment of the present application. A message processing method proposed in the embodiment of the present application includes:
601、第一节点获取第一报文。601. The first node acquires the first packet.
本实施例中,第一节点为中间节点。第一节点获取来自第二节点的第一报文,该第二 节点为头结点。该第一报文为第二节点针对数据报文进行封装处理得到的报文。可以理解的是,该第一报文也可以是第二节点针对其它报文进行封装处理得到的报文,例如是裸的IPv6报文,或者策略(policy)报文等,此处不作限定。In this embodiment, the first node is an intermediate node. The first node obtains the first message from the second node, and the second node is the head node. The first packet is a packet obtained by encapsulating the data packet by the second node. It can be understood that the first packet may also be a packet obtained by encapsulating other packets by the second node, such as a bare IPv6 packet or a policy packet, etc., which is not limited here.
第一报文包括多个段标识SID,该多个SID用于指示第一报文的转发路径。例如:该多个SID包括:SID1、SID2和SID3,则该多个SID指示第一报文的转发路径为SID1至SID2至SID3。The first packet includes multiple segment identifiers SIDs, where the multiple SIDs are used to indicate a forwarding path of the first packet. For example, if the multiple SIDs include: SID1, SID2, and SID3, then the multiple SIDs indicate that the forwarding path of the first message is SID1 to SID2 to SID3.
该多个SID中包括第一SID和第二SID,其中,第一SID排列在第二SID之前。即报文的转发路径需要先经过第一SID,再经过第二SID。或者,剩余段(segment left,SL)指针首先指向第一SID,其次再指向第二SID。或者,第一报文首先到达第一SID对应的节点,第一报文其次到达第二SID对应的节点。The multiple SIDs include a first SID and a second SID, wherein the first SID is arranged before the second SID. That is, the forwarding path of the message needs to pass through the first SID first, and then pass through the second SID. Alternatively, the remaining segment (segment left, SL) pointer first points to the first SID, and then points to the second SID. Alternatively, the first packet first arrives at the node corresponding to the first SID, and the first packet next arrives at the node corresponding to the second SID.
一种可能的实现方式中,第一报文包括至少一个段列表(segment list),该段列表包括第一SID和第二SID。例如表1-1所示:In a possible implementation manner, the first packet includes at least one segment list (segment list), where the segment list includes the first SID and the second SID. For example, as shown in Table 1-1:
表1-1Table 1-1
第一SIDfirst SID
第二SIDSecond SID
在又一种示例中,该段列表中除了第一SID和第二SID外,还包括多个SID,例如第三SID等,表1-2所示:In yet another example, in addition to the first SID and the second SID, the segment list also includes multiple SIDs, such as the third SID, etc., as shown in Table 1-2:
表1-2Table 1-2
······
第一SIDfirst SID
······
第二SIDSecond SID
······
第三SIDThird SID
········
在另一种可能的实现方式中,第一报文包括多个段列表,其中,该多个段列表包括第一段列表和第二段列表。第一段列表包括第一SID,第二段列表包括第二SID。其中,第一段列表排列顺序在第二段列表之前,第一报文首先到达第一段列表中SID对应的节点,其次到达第二段列表中SID对应的节点。需要说明的是,第一段列表中可以包括多个SID,第二段列表中可以包括多个SID,例如第一段列表包括:第一SID和第三SID等;第二段列表包括:第二SID和第四SID等。示例性的,第一段列表如表2-1所示,第二段列表如表2-2所示:In another possible implementation manner, the first packet includes multiple segment lists, where the multiple segment lists include a first segment list and a second segment list. The first-segment list includes a first SID, and the second-segment list includes a second SID. Wherein, the arrangement order of the first segment list is before the second segment list, and the first message first arrives at the node corresponding to the SID in the first segment list, and secondly arrives at the node corresponding to the SID in the second segment list. It should be noted that the first segment list may include multiple SIDs, and the second segment list may include multiple SIDs. For example, the first segment list includes: the first SID and the third SID, etc.; the second segment list includes: Second SID and fourth SID etc. For example, the first list is shown in Table 2-1, and the second list is shown in Table 2-2:
表2-1table 2-1
······
第一SIDfirst SID
······
第三SIDThird SID
······
表2-2Table 2-2
······
第二SIDSecond SID
······
第四SIDFourth SID
······
进一步的,第一报文中包括第一段列表和第二段列表,上述表2-1所示的第一段列表和上述表2-2所示的第二段列表在第一报文中的排列顺序为:第一段列表在第二段列表之前,第一报文首先到达第一段列表中SID对应的节点(例如第一SID),其次到达第二段列表中SID对应的节点(例如第二SID)。Further, the first message includes a first list and a second list, and the first list shown in Table 2-1 above and the second list shown in Table 2-2 are included in the first message The order of arrangement is: the first segment list is before the second segment list, the first message first arrives at the node corresponding to the SID in the first segment list (such as the first SID), and then arrives at the node corresponding to the SID in the second segment list ( For example the second SID).
可以理解的是,第一报文中还可以包括更多的段列表,此处不作限制。It can be understood that, the first packet may also include more segment lists, which is not limited here.
在另一种可能的实现方式中,第一报文包括外层IPv6头和内层IPv6头。则,第一段列表包括在外层IPv6头中,第二段列表包括在内层IPv6头中。In another possible implementation manner, the first packet includes an outer IPv6 header and an inner IPv6 header. Then, the first segment list is included in the outer layer IPv6 header, and the second segment list is included in the inner layer IPv6 header.
对于第二节点,可以通过多种方式确定各个SID是否允许被绕过。示例性的,对于“End.as”节点对应的SID不允许被绕过。For the second node, whether each SID is allowed to be bypassed can be determined in multiple ways. Exemplarily, the SID corresponding to the "End.as" node is not allowed to be bypassed.
一种可能的实现方式中,第二节点可以通过命令行配置(或者称为静态配置)的方式配置各个SID是否允许被绕过。示例性的,可以通过表3的形式配置。In a possible implementation manner, the second node may configure whether each SID is allowed to be bypassed through command line configuration (or called static configuration). Exemplarily, it can be configured in the form of Table 3.
表3table 3
Figure PCTCN2022105410-appb-000001
Figure PCTCN2022105410-appb-000001
在表3的示例中,第一SID为“index 10 sid ipv6 2002:DB8:300::333”,第一SID不允许被绕过。In the example in Table 3, the first SID is "index 10 sid ipv6 2002:DB8:300::333", and the first SID is not allowed to be bypassed.
在另一种可能的实现方式中,第二节点可以接收控制器的控制报文,该控制报文携带指示信息。该指示信息指示第一SID是否允许被绕过,以使得第二节点根据指示信息对数据报文进行封装,第一报文的段列表中包括所述第一SID,所述第一报文还包括根据所述指示信息确定的第一字段,所述第一字段用于指示所述第一SID是否被绕过。第二节点根据该控制报文中的指示信息,确定第一字段的值。例如:控制节点中的指示信息指示第一节点不允许被绕过,则第二节点对数据报文进行封装处理,以得到第一报文。该第一报文 中,第一字段的值为“1”。第一字段的值为“1”指示第一SID不允许被绕过。In another possible implementation manner, the second node may receive a control packet from the controller, where the control packet carries indication information. The indication information indicates whether the first SID is allowed to be bypassed, so that the second node encapsulates the data packet according to the indication information, the segment list of the first packet includes the first SID, and the first packet also It includes a first field determined according to the indication information, where the first field is used to indicate whether the first SID is bypassed. The second node determines the value of the first field according to the indication information in the control message. For example, if the indication information in the control node indicates that the first node is not allowed to be bypassed, then the second node encapsulates the data message to obtain the first message. In the first packet, the value of the first field is "1". A value of "1" for the first field indicates that the first SID is not allowed to be bypassed.
控制报文存在多种可能的实现方式,包括但不限于:控制报文为路径计算单元通信协议(Path Computation Element Communication Protocol,PCEP)报文,或者,控制报文为边界网关路由协议(Border Gateway Protocol,BGP)报文。下面分别进行说明。There are many possible implementations of the control message, including but not limited to: the control message is a Path Computation Element Communication Protocol (PCEP) message, or the control message is a Border Gateway routing protocol (Border Gateway) message. Protocol, BGP) packets. Each will be described below.
当控制报文为BGP报文时,指示信息位于控制报文中类型B的段-子标记长度值(Type B Segment Sub-TLV)中。该指示信息指示该Type B Segment Sub-TLV字段中的SID是否允许被绕过。When the control message is a BGP message, the indication information is located in the Type B segment-sub-label length value (Type B Segment Sub-TLV) in the control message. This indication indicates whether the SID in the Type B Segment Sub-TLV field is allowed to be bypassed.
示例性的,该控制报文为BGP SRv6Policy报文,控制器通过该控制报文向第二节点下发SRv6Policy。关于Type B Segment Sub-TLV。请参阅图7,图7为类型B的段-子标记长度值的结构示意图。Type B Segment Sub-TLV包括版本(type)字段、长度(length)字段、标记(flags)字段、保留(reserved)字段、SRv6SID字段、和,SRv6节点行为和SID结构(SRv6endpoint behavior and SID structure)字段。Exemplarily, the control message is a BGP SRv6Policy message, and the controller sends the SRv6Policy to the second node through the control message. About Type B Segment Sub-TLV. Please refer to FIG. 7 . FIG. 7 is a schematic diagram of the structure of the segment-submark length value of type B. Type B Segment Sub-TLV includes version (type) field, length (length) field, flags (flags) field, reserved (reserved) field, SRv6SID field, and, SRv6 node behavior and SID structure (SRv6endpoint behavior and SID structure) field .
在一种可能的实现方式中,在Type B Segment Sub-TLV字段中,指示信息可以位于标记字段。请参阅图8,图8为Flags字段的结构示意图。目前,标记字段中第0-3比特位分别为V、A、S、B字段。因此,该指示信息可以位于该标记字段的未使用比特位中,例如第4-7比特位中的任意一个比特位。示例性的,该指示信息位于标记字段的最后一个比特位,即第7比特位。当第7比特位的值为“1”时,指示Type B Segment Sub-TLV字段的SID(即第一SID)不允许被绕过;当第7比特位的值为“0”时,指示Type B Segment Sub-TLV字段的SID(即第一SID)允许被绕过。In a possible implementation manner, in the Type B Segment Sub-TLV field, the indication information may be located in the tag field. Please refer to FIG. 8, which is a schematic structural diagram of the Flags field. Currently, bits 0-3 in the flag field are V, A, S, and B fields respectively. Therefore, the indication information may be located in unused bits of the flag field, such as any one of the 4th to 7th bits. Exemplarily, the indication information is located in the last bit of the flag field, that is, the seventh bit. When the value of the seventh bit is "1", it indicates that the SID of the Type B Segment Sub-TLV field (that is, the first SID) is not allowed to be bypassed; when the value of the seventh bit is "0", it indicates that the Type B Segment Sub-TLV field is not allowed to be bypassed; The SID (i.e. the first SID) of the B Segment Sub-TLV field is allowed to be bypassed.
在另一种可能的实现方式中,在Type B Segment Sub-TLV字段中,指示信息可以位于保留字段。示例性的,该指示信息位于Type B Segment Sub-TLV字段中保留字段的任意一个未使用的比特位。In another possible implementation manner, in the Type B Segment Sub-TLV field, the indication information may be located in a reserved field. Exemplarily, the indication information is located in any unused bit of the reserved field in the Type B Segment Sub-TLV field.
当控制报文为PCEP报文时,指示信息位于控制报文中互联网协议第6版段路由-显式路由对象子对象(SRv6-ERO Subobject)中。该指示信息指示该SRv6-ERO Subobject字段中的SID是否允许被绕过。首先,介绍PCEP报文:路径计算单元服务器(path computation element server,PCE Server)在网络中负责路径计算,PCE Server负责根据路径计算客户端(path computation client,PCC)的请求计算出一条满足约束条件的最佳路径。PCE Server与PCC,PCE Server与其它域的PCE Server之间的通信交互,通过该PCEP报文实现。当第二节点(即头节点)作为PCC,向控制器(PCE Server)发送路径计算请求后,第二节点接收来自控制器的控制报文(该控制报文携带计算结果)并基于该控制报文建立标签交换路径(label switch path,LSP)。关于SRv6-ERO Subobject。请参阅图9,图9为互联网协议第6版段路由-显式路由对象子对象的结构示意图。SRv6-ERO Subobject包括L字段、版本(type)字段、长度(length)字段、NT字段、标记(flags)字段、V字段、T字段、F字段、S字段、保留(reserved)字段、SRv6节点行为(SRv6endpoint behavior)字段、SID结构(SID structure)字段、SRv6SID字段、NAI字段和SID结构字段。When the control message is a PCEP message, the indication information is located in the Internet Protocol Version 6 Segment Routing-Explicit Routing Object Subobject (SRv6-ERO Subobject) in the control message. The indication information indicates whether the SID in the SRv6-ERO Subobject field is allowed to be bypassed. First, introduce the PCEP message: the path computation element server (path computation element server, PCE Server) is responsible for path computation in the network, and the PCE Server is responsible for calculating a path that satisfies the constraint conditions according to the request of the path computation client (path computation client, PCC). the best path. The communication and interaction between PCE Server and PCC, PCE Server and PCE Server in other domains is realized through this PCEP message. When the second node (that is, the head node) serves as the PCC and sends a path calculation request to the controller (PCE Server), the second node receives the control message from the controller (the control message carries the calculation result) and based on the control message The document establishes a label switching path (label switch path, LSP). About SRv6-ERO Subobject. Please refer to FIG. 9 . FIG. 9 is a schematic structural diagram of a sub-object of an IP version 6 segment routing-explicit routing object. SRv6-ERO Subobject includes L field, version (type) field, length (length) field, NT field, flags (flags) field, V field, T field, F field, S field, reserved (reserved) field, SRv6 node behavior (SRv6endpoint behavior) field, SID structure (SID structure) field, SRv6SID field, NAI field and SID structure field.
在一种可能的实现方式中,在SRv6-ERO Subobject字段中,指示信息可以位于标记字段。该指示信息可以位于该标记字段的未使用比特位中。In a possible implementation manner, in the SRv6-ERO Subobject field, the indication information may be located in the tag field. The indication information may be located in unused bits of the flag field.
在另一种可能的实现方式中,在SRv6-ERO Subobject字段中,指示信息可以位于保留字段。示例性的,该指示信息位于SRv6-ERO Subobject字段中保留字段的任意一个未使用的比特位。In another possible implementation manner, in the SRv6-ERO Subobject field, the indication information may be located in a reserved field. Exemplarily, the indication information is located in any unused bit of the reserved field in the SRv6-ERO Subobject field.
602、第一节点确定第一SID不可达。602. The first node determines that the first SID is unreachable.
本实施例中,当第一节点获取第一报文后,第一节点检测第一SID是否可达。In this embodiment, after the first node obtains the first packet, the first node detects whether the first SID is reachable.
具体的,当第一节点检测第一SID故障时,第一节点确定第一SID不可达。或者,第一节点根据第一SID查找路由失败时,第一节点确定第一SID不可达。Specifically, when the first node detects that the first SID is faulty, the first node determines that the first SID is unreachable. Alternatively, when the first node fails to find a route according to the first SID, the first node determines that the first SID is unreachable.
示例性的,第一节点根据第一SID查询路由时,发现出接口关闭(down),则第一节点确定第一SID不可达。Exemplarily, when the first node inquires about the route according to the first SID and finds that the outgoing interface is down (down), the first node determines that the first SID is unreachable.
又一种示例中,第一节点通过双向转发检测(bidirectional forwarding detection,BFD)感知第一SID对应的链路故障时,则第一节点确定第一SID不可达。In another example, when the first node detects that the link corresponding to the first SID is faulty through bidirectional forwarding detection (bidirectional forwarding detection, BFD), the first node determines that the first SID is unreachable.
603、第一节点根据第一SID对应的第一字段,判断第一SID是否允许被绕过。603. The first node determines whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID.
本实施例中,当第一节点确定第一SID不可达后,第一节点根据第一SID对应的第一字段,判断第一SID是否允许被绕过。本实施例中,以第一SID包括一个SID为例进行说明,可以理解的是,当第一SID包括多个SID,则第一字段中的多个比特位分别对应多个SID。当检测结果为:第一SID不允许被绕过,则进入步骤604;当第一SID允许被绕过,则进入步骤605。In this embodiment, after the first node determines that the first SID is unreachable, the first node determines whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID. In this embodiment, the first SID includes one SID as an example for description. It can be understood that when the first SID includes multiple SIDs, the multiple bits in the first field correspond to the multiple SIDs respectively. When the detection result is: the first SID is not allowed to be bypassed, go to step 604; when the first SID is allowed to be bypassed, go to step 605.
一种可能的实现方式中,在第一报文中新定义字段,通过该新定义字段指示第一报文中的各个SID是否允许被绕过。示例性的,以第一报文包括:第一SID、第二SID、第三SID和第四SID为例,如表4所示:In a possible implementation manner, a new field is defined in the first packet, and the newly defined field indicates whether each SID in the first packet is allowed to be bypassed. Exemplarily, the first message includes: the first SID, the second SID, the third SID and the fourth SID as an example, as shown in Table 4:
表4Table 4
Figure PCTCN2022105410-appb-000002
Figure PCTCN2022105410-appb-000002
上述新定义字段中每一个比特位唯一对应一个SID,其中,每一个比特位的值指示对应的SID是否允许被绕过。例如:值“0”指示对应的SID允许被绕过,值“1”指示对应的SID不允许被绕过。可以理解的是,另一种方式中,值“1”指示对应的SID允许被绕过,值“0”指示对应的SID不允许被绕过。Each bit in the above newly defined field uniquely corresponds to a SID, wherein the value of each bit indicates whether the corresponding SID is allowed to be bypassed. For example: a value of "0" indicates that the corresponding SID is allowed to be bypassed, and a value of "1" indicates that the corresponding SID is not allowed to be bypassed. It can be understood that, in another manner, a value of "1" indicates that the corresponding SID is allowed to be bypassed, and a value of "0" indicates that the corresponding SID is not allowed to be bypassed.
本申请实施例中,将该新定义字段中与第一SID对应的字段称为第一字段。当第一SID不可达,则第一节点进一步读取与该第一SID对应的该第一字段,并判断与该第一SID是否允许被绕过。In this embodiment of the present application, the field corresponding to the first SID among the newly defined fields is called the first field. When the first SID is unreachable, the first node further reads the first field corresponding to the first SID, and judges whether the first SID is allowed to be bypassed.
可选的,当第一节点检测第一SID可达,则第一节点可以不读取该第一字段。以缩短 报文的处理时间。Optionally, when the first node detects that the first SID is reachable, the first node may not read the first field. To shorten the processing time of the message.
在另一种可能的实现方式中,在第一报文中新定义字段,通过该新定义字段指示第一报文中哪些SID不允许被绕过。示例性的,以第一报文包括:第一SID、第二SID、第三SID和第四SID为例,如表5所示:In another possible implementation manner, a new field is defined in the first packet, and the newly defined field indicates which SIDs in the first packet are not allowed to be bypassed. Exemplarily, the first message includes: a first SID, a second SID, a third SID and a fourth SID as an example, as shown in Table 5:
表5table 5
Figure PCTCN2022105410-appb-000003
Figure PCTCN2022105410-appb-000003
第一节点确定某个SID不可达后,则进一步读取该新定义字段中是否包括该SID,若包括,则该SID不允许被绕过。若该新定义字段不包括该SID,则该SID允许被绕过。After the first node determines that a certain SID is unreachable, it further reads whether the newly defined field includes the SID, and if so, the SID is not allowed to be bypassed. If the newly defined field does not include the SID, the SID is allowed to be bypassed.
在另一种可能的实现方式中,在第一报文中新定义字段,通过该新定义字段指示第一报文中哪些SID允许被绕过。示例性的,以第一报文包括:第一SID、第二SID、第三SID和第四SID为例,如表6所示:In another possible implementation manner, a new field is defined in the first packet, and the newly defined field indicates which SIDs in the first packet are allowed to be bypassed. Exemplarily, the first message includes: a first SID, a second SID, a third SID and a fourth SID as an example, as shown in Table 6:
表6Table 6
Figure PCTCN2022105410-appb-000004
Figure PCTCN2022105410-appb-000004
第一节点确定某个SID不可达后,则进一步读取该新定义字段中是否包括该SID,若不包括,则该SID不允许被绕过。若该新定义字段包括该SID,则该SID允许被绕过。After the first node determines that a certain SID is unreachable, it further reads whether the newly defined field includes the SID, and if not, the SID is not allowed to be bypassed. If the newly defined field includes the SID, the SID is allowed to be bypassed.
一种可能的实现方式,该第一字段位于第一报文的分段路由头(segment routing header,SRH)中。A possible implementation manner, the first field is located in a segment routing header (segment routing header, SRH) of the first packet.
可选的,该第一字段包括在SRH中的可选的标记长度值(optional TLV)字段中,其中,该optional TLV中的值部分(value)指示一个或多个SID是否运行被绕过。Optionally, the first field is included in an optional tag length value (optional TLV) field in the SRH, wherein the value part (value) in the optional TLV indicates whether one or more SIDs are bypassed.
例如:该optional TLV中的值部分包括8个比特位,当该SRH包括5个SID时,该8个比特位中的5个比特位分别对应该5个SID。当比特位的值为“1”,则该比特位对应的SID不允许被绕过;当比特位的值为“0”,则该比特位对应的SID允许被绕过。可以理解的是,当比特位的值为“1”,则该比特位对应的SID不允许被绕过;当比特位的值为空,则该比特位对应的SID允许被绕过。For example: the value part in the optional TLV includes 8 bits, and when the SRH includes 5 SIDs, 5 bits in the 8 bits correspond to the 5 SIDs respectively. When the value of the bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed. It can be understood that when the value of a bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is empty, the SID corresponding to the bit is allowed to be bypassed.
在另一种可能的实现方式中,第一字段位于第一SID中。即每个SID中包括一个字段,该字段指示该SID是否允许被绕过。In another possible implementation manner, the first field is located in the first SID. That is, each SID includes a field, which indicates whether the SID is allowed to be bypassed.
可选的,该第一字段位于第一SID的参数(args)字段中。例如该第一字段位于第一SID的args字段中的任意一个未被使用的比特位。Optionally, the first field is located in the parameters (args) field of the first SID. For example, the first field is located in any unused bit in the args field of the first SID.
可选的,该第一字段位于第一SID的args字段中的最后一个比特位。示例性的,当比 特位的值为“1”,则该比特位对应的SID不允许被绕过;当比特位的值为“0”,则该比特位对应的SID允许被绕过。Optionally, the first field is located in the last bit of the args field of the first SID. Exemplarily, when the value of the bit is "1", the SID corresponding to the bit is not allowed to be bypassed; when the value of the bit is "0", the SID corresponding to the bit is allowed to be bypassed.
604、第一SID不允许被绕过,则丢弃第一报文。604. The first SID is not allowed to be bypassed, and the first packet is discarded.
本实施例中,当第一SID不允许被绕过,则第一节点丢弃该第一报文。In this embodiment, when the first SID is not allowed to be bypassed, the first node discards the first packet.
需要说明的是,步骤604为可选步骤,当第一SID不允许被绕过时,第一节点也可以备份该第一报文,此处不做限制。It should be noted that step 604 is an optional step, and when the first SID is not allowed to be bypassed, the first node may also back up the first message, which is not limited here.
605、第一SID允许被绕过,则第一节点根据第二SID转发第一报文。605. The first SID is allowed to be bypassed, and the first node forwards the first packet according to the second SID.
本实施例中,当第一SID允许被绕过,则第一节点根据第二SID转发第一报文。具体的,第一节点根据第一报文中排列顺序在第一SID之后的第二SID确定第一报文的转发路径。第一报文首先到达第一SID对应的节点,其次到达第二SID对应的节点。In this embodiment, when the first SID is allowed to be bypassed, the first node forwards the first message according to the second SID. Specifically, the first node determines the forwarding path of the first message according to the second SID in the first message that is arranged after the first SID. The first packet first arrives at the node corresponding to the first SID, and secondly arrives at the node corresponding to the second SID.
例如:第一报文中SL列表包括的SID为“SID1”、“SID2”、“SID3”和“SID4”。则当第一节点确定SID2不可达,且SID2允许被绕过时,第一节点根据排列顺序在SID2之后的SID3和SID4转发该第一报文。具体的,第一节点将SL指针偏转至SID3,并检查SID3是否可达。若可达,则将第一报文转发至SID3;若不可达,则进一步检查SID3是否允许被绕过,若允许则将SL指针偏转至SID4,并检查SID4是否可达,以此类推。For example: the SIDs included in the SL list in the first message are "SID1", "SID2", "SID3" and "SID4". Then, when the first node determines that SID2 is unreachable and SID2 is allowed to be bypassed, the first node forwards the first message according to SID3 and SID4 that are arranged after SID2. Specifically, the first node deflects the SL pointer to SID3, and checks whether SID3 is reachable. If reachable, forward the first packet to SID3; if not reachable, further check whether SID3 is allowed to be bypassed, if allowed, deflect the SL pointer to SID4, and check whether SID4 is reachable, and so on.
对于第一报文包括外层IPv6头和内层IPv6头的情况,第一报文的第一段列表包括在外层IPv6头中,第一段列表包括第一SID;第二段列表包括在内层IPv6头中,第二段列表包括第二SID。当第一SID为第一SID为第一段列表中的最后一个SID,第一节点检测第一SID不可达时,第一节点判断第一SID是否允许被绕过。若允许,即第一SID对应的第一字段指示第一SID允许被绕过,由于此时第一SID为外层IPv6头的最后一个SID,第一节点需要根据内层IPv6头确定第一报文的转发路径。若不允许,即第一SID对应的第一字段指示第一SID不允许被绕过,则第一节点丢弃该第一报文。For the case that the first message includes the outer layer IPv6 header and the inner layer IPv6 header, the first segment list of the first message is included in the outer layer IPv6 header, and the first segment list includes the first SID; the second segment list includes In the layer IPv6 header, the second segment list includes the second SID. When the first SID is the last SID in the first segment list and the first node detects that the first SID is unreachable, the first node determines whether the first SID is allowed to be bypassed. If allowed, the first field corresponding to the first SID indicates that the first SID is allowed to be bypassed. Since the first SID is the last SID of the outer IPv6 header at this time, the first node needs to determine the first packet according to the inner IPv6 header. The forwarding path of the text. If it is not allowed, that is, the first field corresponding to the first SID indicates that the first SID is not allowed to be bypassed, the first node discards the first packet.
本申请实施例中,通过特殊的字段标记哪些段标识SID允许被绕过,哪些SID不允许被绕过。使得在该SID正常的情况下,携带该SID的报文的转发路径必须经过该SID,进而确保该报文必须经过该SID对应的具有重要功能的中间节点。以保障业务的正常执行。In this embodiment of the application, special fields are used to mark which segment identification SIDs are allowed to be bypassed, and which SIDs are not allowed to be bypassed. Therefore, when the SID is normal, the forwarding path of the message carrying the SID must pass through the SID, thereby ensuring that the message must pass through the intermediate node with important functions corresponding to the SID. To ensure the normal execution of business.
下面,结合实际场景对本申请实施例进行进一步说明,请参阅图10,图10为本申请实施例提出的一种应用场景示意图。该应用场景包括第一节点、第二节点、边缘节点和控制第一节点和第二节点的控制器。其中,第二节点作为头节点,第一节点作为中间节点,第一节点包括:SID0对应的节点、SID1对应的节点、SID2对应的节点、SID3对应的节点、SID4对应的节点、和SID5对应的节点。Hereinafter, the embodiment of the present application will be further described in combination with actual scenarios. Please refer to FIG. 10 , which is a schematic diagram of an application scenario proposed by the embodiment of the present application. The application scenario includes a first node, a second node, an edge node, and a controller controlling the first node and the second node. Wherein, the second node is the head node, the first node is the intermediate node, and the first node includes: the node corresponding to SID0, the node corresponding to SID1, the node corresponding to SID2, the node corresponding to SID3, the node corresponding to SID4, and the node corresponding to SID5 node.
首先,以第一SID为SID3为例,第二节点接收来自控制器的控制报文。该控制报文中包括的控制信息指示SID3不允许被绕过,即SID3对应的节点不允许被绕过。其次,第二节点获取数据报文,并对该数据报文进行封装,得到第一报文。该第一报文的报文头,如图11所示,图11为本申请实施例中一种报文头的结构示意图。该报文头中SID3对应的第一字段指示该SID3不允许被绕过(即第一SID不允许被绕过)。再次,第二节点生成第一报文后,向下一跳节点(SID5对应的节点)转发该第一报文,以此类推。当第一报文到达 SID4对应的节点后,SID4对应的节点检测该第一报文中段列表指示的下一跳节点(SID3)是否可达。若SID3不可达,则第一节点检测该SID3是否允许被绕过(即检查SID3对应的第一字段)。若SID3不允许被绕过,则SID4对应的节点丢弃该第一报文。First, taking the first SID as SID3 as an example, the second node receives a control packet from the controller. The control information included in the control message indicates that SID3 is not allowed to be bypassed, that is, the node corresponding to SID3 is not allowed to be bypassed. Secondly, the second node obtains the data packet, and encapsulates the data packet to obtain the first packet. The packet header of the first packet is shown in FIG. 11 , and FIG. 11 is a schematic structural diagram of a packet header in an embodiment of the present application. The first field corresponding to SID3 in the packet header indicates that the SID3 is not allowed to be bypassed (that is, the first SID is not allowed to be bypassed). Again, after the second node generates the first message, it forwards the first message to the next-hop node (the node corresponding to SID5), and so on. After the first message arrives at the node corresponding to SID4, the node corresponding to SID4 detects whether the next-hop node (SID3) indicated by the segment list in the first message is reachable. If SID3 is unreachable, the first node checks whether the SID3 is allowed to be bypassed (that is, checks the first field corresponding to SID3). If SID3 is not allowed to be bypassed, the node corresponding to SID4 discards the first packet.
在另一种示例中,若SID3允许被绕过(即第一SID允许被绕过)。则SID4对应的节点继续检测段列表中的下一跳节点(SID2对应的节点)是否可达(第二SID为SID2)。若SID2可达,则SID4对应的节点根据该SID2向SID2对应的节点转发该第一报文,即SID3对应的节点根据第二SID(SID2)转发第一报文(向SID2对应的节点转发该第一报文)。In another example, if SID3 is allowed to be bypassed (that is, the first SID is allowed to be bypassed). Then the node corresponding to SID4 continues to detect whether the next hop node (the node corresponding to SID2) in the segment list is reachable (the second SID is SID2). If SID2 is reachable, then the node corresponding to SID4 forwards the first message to the node corresponding to SID2 according to the SID2, that is, the node corresponding to SID3 forwards the first message according to the second SID (SID2) (forwarding the node corresponding to SID2) first message).
若SID2不可达,则第一节点检测该SID2是否允许被绕过(即检查SID2对应的第一字段)。若SID2允许被绕过,则SID4对应的节点继续检测段列表中的下一跳节点(SID1对应的节点)是否可达。若SID1可达,则SID4对应的节点将该第一报文转发至SID1对应的节点。If SID2 is unreachable, the first node checks whether the SID2 is allowed to be bypassed (that is, checks the first field corresponding to SID2). If SID2 is allowed to be bypassed, the node corresponding to SID4 continues to check whether the next hop node (node corresponding to SID1) in the segment list is reachable. If SID1 is reachable, the node corresponding to SID4 forwards the first packet to the node corresponding to SID1.
对于跨IPv6头的报文转发场景,以中间系统-中间系统(intermediate system to intermediate system,ISIS)协议的场景为例进行说明。请参阅图12,图12为本申请实施例提出的又一种场景示意图。该应用场景包括第一节点、第二节点、边缘节点和控制第一节点和第二节点的控制器。其中,第二节点作为头节点,第一节点作为中间节点,第一节点包括:SID1对应的节点、SID2对应的节点、SID3对应的节点、SID4对应的节点、SID5对应的节点、SID6对应的节点、和SID7对应的节点。其中,SID5对应的节点、SID6对应的节点、和SID7对应的节点归属于ISIS n域;SID1对应的节点、SID2对应的节点、SID3对应的节点和SID4对应的节点归属于ISIS m域。For the scenario of message forwarding across IPv6 headers, the scenario of the intermediate system-to-intermediate system (intermediate system to intermediate system, ISIS) protocol is taken as an example for illustration. Please refer to FIG. 12 . FIG. 12 is a schematic diagram of another scenario proposed by the embodiment of the present application. The application scenario includes a first node, a second node, an edge node, and a controller controlling the first node and the second node. Among them, the second node is the head node, the first node is the intermediate node, and the first node includes: the node corresponding to SID1, the node corresponding to SID2, the node corresponding to SID3, the node corresponding to SID4, the node corresponding to SID5, the node corresponding to SID6 , and the node corresponding to SID7. Wherein, the node corresponding to SID5, the node corresponding to SID6, and the node corresponding to SID7 belong to the ISIS n domain; the node corresponding to SID1, the node corresponding to SID2, the node corresponding to SID3 and the node corresponding to SID4 belong to the ISIS m domain.
首先,以第一SID为SID5为例进行说明。第二节点接收来自控制器的控制报文。该控制报文中包括的控制信息指示SID5不允许被绕过,即SID5对应的节点不允许被绕过。其次,第二节点获取数据报文,并对该数据报文进行封装,得到第一报文。该第一报文的报文头,如图13所示,图13为本申请实施例中一种报文头的结构示意图。该报文头中,外层IPv6头包括的SID为:SID5、SID6、SID7;内层IPv6头包括的SID为:SID1、SID2、SID3和SID4。第一报文首先沿着外层IPv6头指示的路径转发,其次沿着内层IPv6头指示的路径转发。Firstly, the first SID is SID5 as an example for description. The second node receives the control message from the controller. The control information included in the control message indicates that SID5 is not allowed to be bypassed, that is, the node corresponding to SID5 is not allowed to be bypassed. Secondly, the second node obtains the data packet, and encapsulates the data packet to obtain the first packet. The packet header of the first packet is shown in FIG. 13 , and FIG. 13 is a schematic structural diagram of a packet header in an embodiment of the present application. In the message header, the SIDs included in the outer IPv6 header are: SID5, SID6, and SID7; the SIDs included in the inner IPv6 header are: SID1, SID2, SID3, and SID4. The first packet is firstly forwarded along the path indicated by the outer IPv6 header, and secondly forwarded along the path indicated by the inner IPv6 header.
该报文头中SID5对应的第一字段指示该SID5不允许被绕过。再次,第二节点生成第一报文后,向下一跳节点(SID7对应的节点)转发该第一报文,以此类推。当第一报文到达SID6对应的节点后,SID6对应的节点检测该第一报文中段列表指示的下一跳节点(SID5对应的节点)是否可达。若SID5不可达(第一SID不可达),则第一节点检测该SID5是否允许被绕过(即检查SID5对应的第一字段)。若SID5不允许被绕过,则SID6对应的节点丢弃该第一报文。The first field corresponding to SID5 in the packet header indicates that the SID5 is not allowed to be bypassed. Again, after the second node generates the first message, it forwards the first message to the next-hop node (the node corresponding to SID7), and so on. After the first message arrives at the node corresponding to SID6, the node corresponding to SID6 detects whether the next-hop node (the node corresponding to SID5) indicated in the segment list in the first message is reachable. If SID5 is unreachable (the first SID is unreachable), the first node checks whether the SID5 is allowed to be bypassed (that is, checks the first field corresponding to SID5). If SID5 is not allowed to be bypassed, the node corresponding to SID6 discards the first packet.
在另一种示例中,若SID5允许被绕过(即第一SID允许被绕过)。则SID6节点检测内层IPv6头的段列表中的下一跳节点(SID4对应的节点)是否可达(第二SID为SID4)。若SID4可达,则SID6对应的节点将该第一报文转发至SID4对应的节点(即根据第二SID转发第一报文)。In another example, if SID5 is allowed to be bypassed (that is, the first SID is allowed to be bypassed). Then the SID6 node detects whether the next-hop node (the node corresponding to SID4) in the segment list of the inner layer IPv6 header is reachable (the second SID is SID4). If SID4 is reachable, the node corresponding to SID6 forwards the first message to the node corresponding to SID4 (that is, forwards the first message according to the second SID).
在又一种示例中,本申请实施例提出的报文处理方法还可以应用于业务链(service function chain,SFC)场景。业务链技术是一种给应用层提供有序服务的技术。SFC是用于将网络设备上的服务在逻辑层面上联接起来,从而形成一个有序的服务组合,具体的,通过在原始报文中添加业务链路径信息来实现报文按照指定的路径依次经过业务节点。为了便于理解,请参阅图14,图14为本申请实施例提出的又一种场景示意图。图14中,业务链场景包括:第二节点,该第二节点作为业务分类节点(Service classifier,SC);第一节点,第一节点作为业务转发节点(service function forwarder,SFF),具体的,第一节点包括:业务转发节点1、业务转发节点2和业务转发节点3;尾节点(tail end)。In yet another example, the packet processing method proposed in the embodiment of the present application may also be applied to a service function chain (service function chain, SFC) scenario. Business chain technology is a technology that provides orderly services to the application layer. SFC is used to logically connect the services on the network device to form an orderly service combination. Specifically, by adding service chain path information to the original message, the message will pass through the specified path sequentially. business node. For ease of understanding, please refer to FIG. 14 , which is a schematic diagram of another scenario proposed by the embodiment of the present application. In Fig. 14, the service chain scenario includes: a second node, the second node is used as a service classifier node (Service classifier, SC); a first node, the first node is used as a service function forwarder node (service function forwarder, SFF), specifically, The first node includes: service forwarding node 1, service forwarding node 2 and service forwarding node 3; tail node (tail end).
当第二节点收到数据报文后,即业务分类节点收到数据报文后,业务分类节点对该报文封装业务链路径信息生成第一报文。该业务链路径信息可以封装在SRH头中,该SRH头中包括业务功能节点(service function,SF)的SID,例如是SFF1节点(业务转发节点1)的SID、SFF2节点的SID和SFF3节点的SID。上述SID包括业务链路径信息。该SRH头中还包括第一字段,该第一字段指示对应的SID是否允许被绕过。对于某些SFF节点,具有重要功能,例如SFF2节点为防火墙或者流量计费单元,那么该SFF2节点不允许被绕过。After the second node receives the data message, that is, after the service classification node receives the data message, the service classification node encapsulates the service chain path information in the message to generate the first message. The service chain path information can be encapsulated in the SRH header, which includes the SID of the service function node (service function, SF), such as the SID of the SFF1 node (service forwarding node 1), the SID of the SFF2 node, and the SID of the SFF3 node. SID. The above SID includes service chain path information. The SRH header also includes a first field, which indicates whether the corresponding SID is allowed to be bypassed. For some SFF nodes, which have important functions, for example, the SFF2 node is a firewall or a traffic accounting unit, then the SFF2 node is not allowed to be bypassed.
以下介绍本申请实施例的网络设备,以下介绍的网络设备具有上述方法实施例中的第一节点、第二节点或控制器的任意功能。The following introduces the network device in the embodiment of the present application, and the network device introduced in the following has any function of the first node, the second node or the controller in the foregoing method embodiment.
图15为本申请实施例提供的一种网络设备1500的结构示意图,如图15所示,网络设备1500包括:收发模块1501,用于执行步骤601或605;处理模块1502,用于执行步骤602、603或604。FIG. 15 is a schematic structural diagram of a network device 1500 provided in the embodiment of the present application. As shown in FIG. 15 , the network device 1500 includes: a transceiver module 1501 for performing step 601 or 605; a processing module 1502 for performing step 602 , 603 or 604.
网络设备1500可以对应于上述方法实施例中的第一节点、第二节点或控制器,网络设备1500中的各单元和上述其他操作和/或功能分别为了实现方法实施例中的第一节点、第二节点或控制器所实施的各种步骤和方法,具体细节可参见上述方法实施例,为了简洁,在此不再赘述。The network device 1500 may correspond to the first node, the second node or the controller in the above method embodiments, and each unit in the network device 1500 and the above-mentioned other operations and/or functions are to realize the first node, the second node or the controller in the method embodiments respectively. For the various steps and methods implemented by the second node or the controller, reference may be made to the foregoing method embodiments for specific details, and details are not repeated here for brevity.
网络设备1500在处理报文时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将网络设备1500的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的网络设备1500与上述图1或图14对应的实施例方法属于同一构思,其具体实现过程详见上述方法实施例,这里不再赘述。When the network device 1500 processes packets, it only uses the division of the above-mentioned functional modules as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to needs, that is, the internal structure of the network device 1500 is divided into different function modules to complete all or part of the functions described above. In addition, the network device 1500 provided in the above embodiment is based on the same idea as the method in the above embodiment corresponding to FIG. 1 or FIG. 14 , and its specific implementation process is detailed in the above method embodiment, and will not be repeated here.
为了实现上述实施例,本申请还提供了一种网络设备。可以参阅图16,图16为本申请实施例提供的一种网络设备1600的结构示意图。In order to implement the foregoing embodiments, the present application further provides a network device. Refer to FIG. 16 , which is a schematic structural diagram of a network device 1600 provided in an embodiment of the present application.
图16所示的网络设备1600尽管示出了某些特定特征,但是本领域的技术人员将从本申请实施例中意识到,为了简洁起见,图16未示出各种其他特征,以免混淆本申请实施例所公开的实施方式的更多相关方面。为此,作为示例,在一些实现方式中,网络设备1600包括一个或多个处理单元(如,CPU)1601、网络接口1602、编程接口1603、存储器1604 和一个或多个通信总线1605,用于将各种组件互连。在另一些实现方式中,网络设备1600也可以在上述示例基础上省略或增加部分功能部件或单元。Although the network device 1600 shown in FIG. 16 shows some specific features, those skilled in the art will realize from the embodiments of the present application that for the sake of brevity, various other features are not shown in FIG. Further relevant aspects of the embodiments disclosed in the application examples. To this end, as an example, in some implementations, the network device 1600 includes one or more processing units (eg, CPU) 1601, a network interface 1602, a programming interface 1603, a memory 1604, and one or more communication buses 1605 for Interconnect the various components. In other implementation manners, the network device 1600 may also omit or add some functional components or units based on the foregoing examples.
在一些实现方式中,网络接口1602用于在网络系统中和一个或多个其他的网络设备/服务器连接。在一些实现方式中,通信总线1605包括互连和控制系统组件之间的通信的电路。存储器1604可以包括非易失性存储器,例如,只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。存储器1604也可以包括易失性存储器,易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。In some implementations, the network interface 1602 is used to connect with one or more other network devices/servers in the network system. In some implementations, communication bus 1605 includes circuitry that interconnects and controls communication between system components. Memory 1604 may include nonvolatile memory, for example, read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM) , Electrically Erasable Programmable Read-Only Memory (electrically EPROM, EEPROM) or flash memory. Memory 1604 may also include volatile memory, which may be random access memory (RAM), which acts as an external cache.
在一些实现中,存储器1604或存储器1604的非暂时性计算机可读存储介质存储以下程序、模块和数据结构,或其子集,例如包括收发单元(图中未示出)、获取单元16041和处理单元16042。In some implementations, the memory 1604 or the non-transitory computer-readable storage medium of the memory 1604 stores the following programs, modules and data structures, or a subset thereof, for example including a transceiver unit (not shown in the figure), an acquisition unit 16041 and a processing Unit 16042.
在一个可能的实施例中,该网络设备1600可以具有上述图1-14对应的方法实施例中的第一节点、第二节点或控制器中的任意功能。In a possible embodiment, the network device 1600 may have any function of the first node, the second node, or the controller in the method embodiments corresponding to FIGS. 1-14 above.
应理解,网络设备1600对应于上述方法实施例中的第一节点、第二节点或控制器,网络设备1600中的各模块和上述其他操作和/或功能分别为了实现上述方法实施例中的第一节点、第二节点或控制器所实施的各种步骤和方法,具体细节可参见上述图1-14对应的方法实施例,为了简洁,在此不再赘述。It should be understood that the network device 1600 corresponds to the first node, the second node or the controller in the above-mentioned method embodiments, and each module in the network device 1600 and the above-mentioned other operations and/or functions are respectively to realize the first node in the above-mentioned method embodiments For specific details of various steps and methods implemented by a node, a second node, or a controller, refer to the method embodiments corresponding to the foregoing FIGS. 1-14 , and for brevity, details are not repeated here.
应理解,本申请可以是由网络设备1600上的网络接口1602来完成数据的收发操作,也可以是由处理器调用存储器中的程序代码,并在需要时配合网络接口1602来实现收发单元的功能。It should be understood that in this application, the network interface 1602 on the network device 1600 can complete the data sending and receiving operation, or the processor can call the program code in the memory, and cooperate with the network interface 1602 to realize the function of the sending and receiving unit when necessary .
在各种实现中,网络设备1600用于执行本申请实施例提供的报文处理方法,例如是执行上述图1-14所示的实施例所对应的报文处理方法。In various implementations, the network device 1600 is configured to execute the packet processing method provided in the embodiment of the present application, for example, execute the packet processing method corresponding to the above embodiments shown in FIGS. 1-14 .
本申请图16所述的网络设备具体结构可以为图17所示。The specific structure of the network device described in FIG. 16 of this application may be as shown in FIG. 17 .
图17为本申请实施例提供的一种网络设备1700的结构示意图,FIG. 17 is a schematic structural diagram of a network device 1700 provided in an embodiment of the present application.
网络设备1700包括:主控板1710和接口板1730。The network device 1700 includes: a main control board 1710 and an interface board 1730 .
主控板1710也称为主处理单元(main processing unit,MPU)或路由处理器(route processor),主控板1710用于对网络设备1700中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1710包括:中央处理器1711和存储器1712。The main control board 1710 is also called a main processing unit (main processing unit, MPU) or a route processor (route processor). , equipment maintenance, protocol processing functions. The main control board 1710 includes: a CPU 1711 and a memory 1712 .
接口板1730也称为线路处理单元(line processing unit,LPU)、线卡(line card)或业务板。接口板1730用于提供各种业务接口并实现数据包的转发。业务接口包括但不限于以太网接口、POS(Packet over SONET/SDH)接口等。接口板1730包括:中央处理器1731、网络处理器1732、转发表项存储器1734和物理接口卡(physical interface card,PIC)1733。The interface board 1730 is also called a line processing unit (line processing unit, LPU), a line card (line card), or a service board. The interface board 1730 is used to provide various service interfaces and implement data packet forwarding. Service interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc. The interface board 1730 includes: a central processing unit 1731 , a network processor 1732 , a forwarding entry storage 1734 and a physical interface card (physical interface card, PIC) 1733 .
接口板1730上的中央处理器1731用于对接口板1730进行控制管理并与主控板1710上的中央处理器1711通信。The CPU 1731 on the interface board 1730 is used to control and manage the interface board 1730 and communicate with the CPU 1711 on the main control board 1710 .
网络处理器1732用于实现报文的转发处理。网络处理器1732的形态可以是转发芯片。The network processor 1732 is configured to implement message forwarding processing. The form of the network processor 1732 may be a forwarding chip.
物理接口卡1733用于实现物理层的对接功能,原始的流量由此进入接口板1730,以及处理后的报文从该物理接口卡1733发出。物理接口卡1733包括至少一个物理接口,物理接口也称物理口,物理接口可以为灵活以太(Flexible Ethernet,FlexE)物理接口。物理接口卡1733也称为子卡,可安装在接口板1730上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器1732处理。在一些实施例中,接口板1730的中央处理器1731也可执行网络处理器1732的功能,比如基于通用CPU实现软件转发,从而接口板1730中不需要网络处理器1732。The physical interface card 1733 is used to implement the interconnection function of the physical layer. The original traffic enters the interface board 1730 through this, and the processed packets are sent out from the physical interface card 1733 . The physical interface card 1733 includes at least one physical interface, which is also called a physical interface, and the physical interface may be a Flexible Ethernet (FlexE) physical interface. The physical interface card 1733 is also called a daughter card, which can be installed on the interface board 1730, and is responsible for converting the photoelectric signal into a message, checking the validity of the message and forwarding it to the network processor 1732 for processing. In some embodiments, the central processing unit 1731 of the interface board 1730 can also execute the functions of the network processor 1732 , such as implementing software forwarding based on a general-purpose CPU, so that the interface board 1730 does not need the network processor 1732 .
可选的,网络设备1700包括多个接口板,例如网络设备1700还包括接口板1740,接口板1740包括:中央处理器1741、网络处理器1742、转发表项存储器1744和物理接口卡1743。Optionally, the network device 1700 includes multiple interface boards. For example, the network device 1700 further includes an interface board 1740 , and the interface board 1740 includes: a central processing unit 1741 , a network processor 1742 , a forwarding entry storage 1744 and a physical interface card 1743 .
可选的,网络设备1700还包括交换网板1720。交换网板1720也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板1730的情况下,交换网板1720用于完成各接口板之间的数据交换。例如,接口板1730和接口板1740之间可以通过交换网板1720通信。Optionally, the network device 1700 further includes a switching fabric unit 1720 . The SFU 1720 may also be called a SFU (switch fabric unit, SFU). When the network device has multiple interface boards 1730, the switching fabric board 1720 is used to complete the data exchange between the interface boards. For example, the interface board 1730 and the interface board 1740 may communicate through the switching fabric board 1720 .
主控板1710和接口板耦合。例如,主控板1710、接口板1730和接口板1740,以及交换网板1720之间通过系统总线和/或系统背板相连实现互通。在一种可能的实现方式中,主控板1710和接口板1730之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1710和接口板1730之间通过IPC通道进行通信。The main control board 1710 is coupled to the interface board. For example, the main control board 1710, the interface board 1730, the interface board 1740, and the switching fabric board 1720 are connected through a system bus and/or a system backplane to implement intercommunication. In a possible implementation manner, an inter-process communication protocol (inter-process communication, IPC) channel is established between the main control board 1710 and the interface board 1730, and the main control board 1710 and the interface board 1730 communicate through the IPC channel.
在逻辑上,网络设备1700包括控制面和转发面,控制面包括主控板1710和中央处理器1731,转发面包括执行转发的各个组件,比如转发表项存储器1734、物理接口卡1733和网络处理器1732。控制面执行发布路由、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器1732基于控制面下发的转发表对物理接口卡1733收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器1734中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。Logically, the network device 1700 includes a control plane and a forwarding plane. The control plane includes a main control board 1710 and a central processing unit 1731. The forwarding plane includes various components for performing forwarding, such as a forwarding entry storage 1734, a physical interface card 1733, and a network processing Device 1732. The control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol packets, configuring and maintaining device status, etc., and the control plane sends the generated forwarding tables to the forwarding plane. The forwarding table issued by the following table looks up and forwards the packets received by the physical interface card 1733. The forwarding table delivered by the control plane may be stored in the forwarding table item storage 1734 . In some embodiments, the control plane and the forwarding plane may be completely separated and not on the same device.
应理解,网络设备1600中的收发单元可以相当于网络设备1700中的物理接口卡1733或物理接口卡1743;网络设备1600中的获取单元16041和处理单元16042可以相当于网络设备1700中的中央处理器1711或中央处理器1731,也可以相当于存储器1712中存储的程序代码或指令。It should be understood that the transceiver unit in the network device 1600 may be equivalent to the physical interface card 1733 or the physical interface card 1743 in the network device 1700; the acquisition unit 16041 and the processing unit 16042 in the network device 1600 may be equivalent to the central processing unit The processor 1711 or the central processing unit 1731 may also correspond to program codes or instructions stored in the memory 1712.
应理解,本申请实施例中接口板1740上的操作与接口板1730的操作一致,为了简洁,不再赘述。应理解,本实施例的网络设备1700可对应于上述各个方法实施例中的第一节点、第二节点或控制器,该网络设备1700中的主控板1710、接口板1730和/或接口板1740可以实现上述各个方法实施例中的第一节点、第二节点或控制器所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。It should be understood that the operations on the interface board 1740 in the embodiment of the present application are consistent with the operations on the interface board 1730 , and are not repeated for brevity. It should be understood that the network device 1700 in this embodiment may correspond to the first node, the second node or the controller in each of the foregoing method embodiments, and the main control board 1710, the interface board 1730 and/or the interface board in the network device 1700 1740 may implement the functions and/or various steps implemented by the first node, the second node, or the controller in each of the foregoing method embodiments, and details are not repeated here for brevity.
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。 接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。可选的,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能。具体采用哪种架构,取决于具体的组网部署场景,此处不做唯一限定。It is worth noting that there may be one or more main control boards, and when there are multiple main control boards, it may include the main main control board and the standby main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards it provides. There may also be one or more physical interface cards on the interface board. There may be no SFU, or there may be one or more SFUs. When there are multiple SFUs, they can jointly implement load sharing and redundant backup. Under the centralized forwarding architecture, the network device does not need a switching network board, and the interface board undertakes the processing function of the service data of the entire system. Under the distributed forwarding architecture, the network device can have at least one SFU, through which the data exchange between multiple interface boards can be realized, and large-capacity data exchange and processing capabilities can be provided. Optionally, the form of the network device can also be that there is only one board, that is, there is no switching fabric board, and the functions of the interface board and the main control board are integrated on this board. At this time, the central processing unit and the main control board on the interface board The central processing units on the board can be combined into one central processing unit on the one board to perform the superimposed functions of the two. Which architecture to use depends on the specific networking deployment scenario, and there is no unique limitation here.
在一些可能的实施例中,上述第一网络设备可以实现为虚拟化设备。虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(virtual machine,VM),虚拟路由器或虚拟交换机。虚拟化设备部署在硬件设备上(例如,物理服务器)。例如,可以基于通用的物理服务器结合网络功能虚拟化(network functions virtualization,NFV)技术来实现第一网络设备。In some possible embodiments, the foregoing first network device may be implemented as a virtualization device. The virtualization device may be a virtual machine (virtual machine, VM) running a program for sending packets, a virtual router or a virtual switch. Virtualization devices are deployed on hardware devices (eg, physical servers). For example, the first network device may be implemented based on a common physical server combined with a network functions virtualization (network functions virtualization, NFV) technology.
应理解,上述各种产品形态的网络设备,分别具有上述方法实施例中第一节点、第二节点或控制器的任意功能,此处不再赘述。It should be understood that the above-mentioned network devices in various product forms respectively have any function of the first node, the second node, or the controller in the above-mentioned method embodiments, which will not be repeated here.
本申请实施例还提供的一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机控制网络装置执行如前述方法实施例所示任一项实现方式。The embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when run on a computer, enable the computer to control the network device to execute any one of the implementation manners shown in the foregoing method embodiments.
本申请实施例还提供的一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现方式。The embodiment of the present application also provides a computer program product, the computer program product includes computer program code, and when the computer program code is run on the computer, the computer is made to execute any one of the implementation manners shown in the foregoing method embodiments.
进一步地,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行上述图1-14对应的方法实施例中第一节点、第二节点或控制器执行的方法。Furthermore, the embodiment of the present application also provides a computer program product, which, when the computer program product runs on the network device, causes the network device to execute the first node and the second node in the above method embodiments corresponding to Figures 1-14 or a method executed by the controller.
本申请实施例还提供了一种芯片系统,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器。其中,所述处理器用于实现上述任一方法实施例中的方法。The embodiment of the present application also provides a chip system, including a processor and an interface circuit, and the interface circuit is configured to receive instructions and transmit them to the processor. Wherein, the processor is configured to implement the method in any one of the foregoing method embodiments.
可选的,该芯片系统还包括存储器,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现上述任一方法实施例中的方法。Optionally, the chip system further includes a memory, and there may be one or more processors in the chip system. The processor can be realized by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented by software, the processor may be a general-purpose processor, and implements the method in any of the above method embodiments by reading the software code stored in the memory.
可选的,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, there may be one or more memories in the chip system. The memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application. Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips. The setting method of the processor is not specifically limited.
请参阅图18,图18为本申请实施例提出的一种网络系统1800示意图。该网络系统1800包括:第一节点1801、第二节点1802和控制器1803。第一节点1801和第二节点1802例如可以为路由器、交换机或网关等物理设备,也可以是支持路由发布和报文转发的虚拟设 备等。本实施例对第一节点1801和第二节点1802的具体类型不做限定。控制器1803可以是管理上述第一节点1801和第二节点1802的服务器。可选的,第一节点1801可以是网络设备1500、网络设备1600或者网络设备1700。可选的,第二节点1802可以是网络设备1500、网络设备1600或者网络设备1700。可选的,控制器1803可以是网络设备1500、网络设备1600或者网络设备1700。Please refer to FIG. 18 , which is a schematic diagram of a network system 1800 proposed by an embodiment of the present application. The network system 1800 includes: a first node 1801 , a second node 1802 and a controller 1803 . The first node 1801 and the second node 1802 may be, for example, physical devices such as routers, switches, or gateways, or virtual devices that support route advertisement and packet forwarding. In this embodiment, specific types of the first node 1801 and the second node 1802 are not limited. The controller 1803 may be a server that manages the first node 1801 and the second node 1802 described above. Optionally, the first node 1801 may be the network device 1500 , the network device 1600 or the network device 1700 . Optionally, the second node 1802 may be the network device 1500 , the network device 1600 or the network device 1700 . Optionally, the controller 1803 may be the network device 1500 , the network device 1600 or the network device 1700 .
请参阅图19,图19为本申请实施例提出的一种网络系统1900示意图。该网络系统1900包括:第一网络设备1901、第一中间网络设备1902、第二中间网络设备1903和控制器1904。第一网络设备1901、第一中间网络设备1902和第二中间网络设备1903例如可以为路由器、交换机或网关等物理设备,也可以是支持路由发布和报文转发的虚拟设备等。本实施例对第一网络设备1901、第一中间网络设备1902和第二中间网络设备1903的具体类型不做限定。控制器1904可以是管理上述第一网络设备1901、第一中间网络设备1902和第二中间网络设备1903的服务器。Please refer to FIG. 19 , which is a schematic diagram of a network system 1900 proposed by an embodiment of the present application. The network system 1900 includes: a first network device 1901 , a first intermediate network device 1902 , a second intermediate network device 1903 and a controller 1904 . The first network device 1901, the first intermediate network device 1902, and the second intermediate network device 1903 may be, for example, physical devices such as routers, switches, or gateways, or virtual devices that support route advertisement and packet forwarding. This embodiment does not limit specific types of the first network device 1901 , the first intermediate network device 1902 , and the second intermediate network device 1903 . The controller 1904 may be a server that manages the above-mentioned first network device 1901 , first intermediate network device 1902 and second intermediate network device 1903 .
示例性的,网络系统1900应用于图1所示的场景时,该第一网络设备1901可以为头节点A,该第一中间网络设备1902可以是节点B、节点C、节点D、节点E或者节点F,该第二中间网络设备1903可以是节点B、节点C、节点D、节点E或者节点F中与第一中间网络设备1902不同的其它节点。控制器1904在图1所示的场景中未示出。Exemplarily, when the network system 1900 is applied to the scenario shown in FIG. For node F, the second intermediate network device 1903 may be node B, node C, node D, node E, or other nodes in node F that are different from the first intermediate network device 1902 . The controller 1904 is not shown in the scenario shown in FIG. 1 .
可选的,第一网络设备1901、第一中间网络设备1902和第二中间网络设备1903属于同一个内部网关协议(Interior Gateway Protocols,IGP)域。Optionally, the first network device 1901, the first intermediate network device 1902, and the second intermediate network device 1903 belong to the same Interior Gateway Protocols (Interior Gateway Protocols, IGP) domain.
可选的,第一网络设备1901、第一中间网络设备1902属于同一个内部网关协议(Interior Gateway Protocols,IGP)域。第一中间网络设备1902与第二中间网络设备1903属于不同的IGP域。Optionally, the first network device 1901 and the first intermediate network device 1902 belong to the same Interior Gateway Protocols (Interior Gateway Protocols, IGP) domain. The first intermediate network device 1902 and the second intermediate network device 1903 belong to different IGP domains.
示例性的,网络系统1900应用于图5所示的场景时,该第一网络设备1901可以为头节点Acc1。该第一中间网络设备1902可以是节点Acc2、节点Acc3或者节点Acc4。该第二中间网络设备1903可以是节点P11、节点P12、节点P13、或者节点P14。Exemplarily, when the network system 1900 is applied to the scenario shown in FIG. 5 , the first network device 1901 may be the head node Acc1. The first intermediate network device 1902 may be node Acc2, node Acc3 or node Acc4. The second intermediate network device 1903 may be a node P11, a node P12, a node P13, or a node P14.
第一网络设备1901获取数据报文后,对该数据报文进行封装处理,得到第一报文。该第一报文包括一次排列的多个SID,该多个SID用于指示第一报文的转发路径。该多个SID包括第一SID和第二SID,第一SID排列在第二SID之前。第二SID对应第二中间网络设备1903。After obtaining the data packet, the first network device 1901 performs encapsulation processing on the data packet to obtain the first packet. The first message includes multiple SIDs arranged once, and the multiple SIDs are used to indicate a forwarding path of the first message. The plurality of SIDs includes a first SID and a second SID, and the first SID is arranged before the second SID. The second SID corresponds to the second intermediate network device 1903 .
第一网络设备1901向第一中间网络设备1902发送该第一报文。The first network device 1901 sends the first packet to the first intermediate network device 1902 .
第一中间网络设备1902获取该第一报文后,确定第一SID不可达,第一中间网络设备1902根据所述第一SID对应的第一字段,判断所述第一SID是否允许被绕过,所述第一字段包括在所述第一报文中。After obtaining the first message, the first intermediate network device 1902 determines that the first SID is unreachable, and the first intermediate network device 1902 determines whether the first SID is allowed to be bypassed according to the first field corresponding to the first SID , the first field is included in the first packet.
当所述第一SID允许被绕过时,第一中间网络设备1902确定所述第二SID可达。第一中间网络设备1902根据所述第二SID向第二中间网络设备1903转发所述第一报文。When the first SID is allowed to be bypassed, the first intermediate network device 1902 determines that the second SID is reachable. The first intermediate network device 1902 forwards the first packet to the second intermediate network device 1903 according to the second SID.
在一种示例中,第一网络设备1901接收控制器1904发送的控制报文,该控制报文中包括指示信息。该指示信息指示第二中间网络设备1903不允许被绕过。In an example, the first network device 1901 receives a control packet sent by the controller 1904, where the control packet includes indication information. The indication information indicates that the second intermediate network device 1903 is not allowed to be bypassed.
本申请实施例中,第一中间网络设备1902获取的第一报文中通过特殊的字段标记哪些段标识SID允许被绕过,哪些SID不允许被绕过。使得在该SID正常的情况下,携带该SID的报文的转发路径必须经过该SID,进而确保该报文必须经过该SID对应的具有重要功能的中间节点。以保障业务的正常执行。In the embodiment of the present application, the first packet obtained by the first intermediate network device 1902 marks which segment identification SIDs are allowed to be bypassed and which SIDs are not allowed to be bypassed through a special field. Therefore, when the SID is normal, the forwarding path of the message carrying the SID must pass through the SID, thereby ensuring that the message must pass through the intermediate node with important functions corresponding to the SID. To ensure the normal execution of business.
上述各种产品形态的网络设备,分别具有上述方法实施例中第一节点、第二节点或控制器的任意功能,此处不再赘述。The above-mentioned network devices in various product forms respectively have any functions of the first node, the second node or the controller in the above-mentioned method embodiments, which will not be repeated here.
以上对本申请实施例进行了详细介绍,本申请实施例方法中的步骤可以根据实际需要进行顺序调度、合并或删减;本申请实施例装置中的模块可以根据实际需要进行划分、合并或删减。The above is a detailed introduction to the embodiment of the present application. The steps in the method of the embodiment of the present application can be sequentially scheduled, merged or deleted according to actual needs; the modules in the device of the embodiment of the present application can be divided, merged or deleted according to actual needs .
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, and should not be used in the embodiments of the present application. The implementation process constitutes any limitation.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。It should be understood that in this embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B may also be determined according to A and/or other information.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

Claims (25)

  1. 一种报文处理方法,其特征在于,包括:A message processing method, characterized in that, comprising:
    第一节点获取第一报文,所述第一报文包括依次排列的多个段标识SID,所述多个段标识用于指示所述第一报文的转发路径,所述多个SID包括第一SID和第二SID,所述第一SID排列在所述第二SID之前;The first node obtains the first message, the first message includes a plurality of segment identifiers SIDs arranged in sequence, and the plurality of segment identifiers are used to indicate the forwarding path of the first message, and the plurality of SIDs include a first SID and a second SID, the first SID is arranged before the second SID;
    所述第一节点确定所述第一SID不可达;The first node determines that the first SID is unreachable;
    所述第一节点根据所述第一SID对应的第一字段,判断所述第一SID是否允许被绕过,所述第一字段包括在所述第一报文中;The first node determines whether the first SID is allowed to be bypassed according to a first field corresponding to the first SID, and the first field is included in the first message;
    当所述第一SID允许被绕过时,所述第一节点确定所述第二SID可达;When the first SID is allowed to be bypassed, the first node determines that the second SID is reachable;
    所述第一节点根据所述第二SID转发所述第一报文。The first node forwards the first packet according to the second SID.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    当所述第一SID不允许被绕过时,则丢弃所述第一报文。When the first SID is not allowed to be bypassed, the first packet is discarded.
  3. 根据权利要求1-2中任一项所述的方法,其特征在于,The method according to any one of claims 1-2, characterized in that,
    所述第一字段位于所述第一报文的分段路由头SRH中。The first field is located in the segment routing header SRH of the first packet.
  4. 根据权利要求3所述的方法,其特征在于,所述第一字段包括在所述SRH中可选的标记长度值Optional TLV字段中,其中,所述Optional TLV中的值部分指示一个或多个SID是否允许被绕过。The method according to claim 3, wherein the first field is included in the optional tag length value Optional TLV field in the SRH, wherein the value part in the Optional TLV indicates one or more Whether the SID is allowed to be bypassed.
  5. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一字段位于所述第一SID中。The method according to any one of claims 1-3, wherein the first field is located in the first SID.
  6. 根据权利要求5所述的方法,其特征在于,所述第一字段位于所述第一SID的参数args字段中。The method according to claim 5, wherein the first field is located in the parameter args field of the first SID.
  7. 根据权利要求6所述的方法,其特征在于,所述第一字段为所述第一SID的参数args字段中的最后一个比特位。The method according to claim 6, wherein the first field is the last bit in the parameter args field of the first SID.
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述第一报文至少包括一个段列表,其中,所述段列表包括所述第一SID和所述第二SID。The method according to any one of claims 1-7, wherein the first packet includes at least one segment list, wherein the segment list includes the first SID and the second SID.
  9. 根据权利要求1-7中任一项所述的方法,其特征在于,所述第一报文包括多个段列表,其中,所述多个段列表包括第一段列表和第二段列表,所述第一段列表包括所述第一SID,所述第二段列表包括所述第二SID。The method according to any one of claims 1-7, wherein the first message includes a plurality of segment lists, wherein the plurality of segment lists include a first segment list and a second segment list, The first segment list includes the first SID, and the second segment list includes the second SID.
  10. 根据权利要求9所述的方法,其特征在于,The method according to claim 9, characterized in that,
    所述第一报文包括外层互联网协议第6版IPv6头和内层IPv6头,所述第一段列表包 括在所述外层IPv6头中,所述第二段列表包括在所述内层IPv6头中。The first packet includes an outer Internet Protocol Version 6 IPv6 header and an inner IPv6 header, the first segment list is included in the outer IPv6 header, and the second segment list is included in the inner layer in the IPv6 header.
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,所述第一SID或所述第二SID包括业务链SFC路径信息。The method according to any one of claims 1-10, wherein the first SID or the second SID includes service chain SFC path information.
  12. 一种报文处理方法,其特征在于,包括:A message processing method, characterized in that, comprising:
    第二节点对数据报文进行封装处理,以得到第一报文,所述第一报文包括依次排列的多个段标识SID,所述多个段标识用于指示所述第一报文的转发路径,所述多个SID包括第一SID和第二SID,所述第一SID排列在所述第二SID之前,The second node encapsulates the data message to obtain the first message, the first message includes a plurality of segment identifiers SID arranged in sequence, and the plurality of segment identifiers are used to indicate the Forwarding paths, the multiple SIDs include a first SID and a second SID, the first SID is arranged before the second SID,
    其中,所述第一报文包括所述第一SID对应的第一字段,所述第一字段用于指示所述第一SID是否被绕过。Wherein, the first message includes a first field corresponding to the first SID, and the first field is used to indicate whether the first SID is bypassed.
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, characterized in that the method further comprises:
    所述第二节点接收来自控制器的控制报文,所述控制报文携带指示信息,所述指示信息用于指示所述第一SID是否允许被绕过;The second node receives a control message from the controller, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed;
    所述第二节点根据所述控制报文中的所述指示信息,确定所述第一字段的值。The second node determines the value of the first field according to the indication information in the control packet.
  14. 根据权利要求13所述的方法,其特征在于,所述控制报文为路径计算单元通信协议PCEP报文,或者,所述控制报文为边界网关路由协议BGP报文。The method according to claim 13, wherein the control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol (BGP) message.
  15. 根据权利要求14所述的方法,其特征在于,当所述控制报文为边界网关路由协议BGP报文时,所述指示信息位于所述控制报文中类型B的段-子标记长度值Type B SegmentSub-TLV中。The method according to claim 14, wherein when the control message is a Border Gateway Routing Protocol (BGP) message, the indication information is located in the segment-submark length value Type of Type B in the control message. B SegmentSub-TLV.
  16. 根据权利要求15所述的方法,其特征在于,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的未使用比特位中。The method according to claim 15, wherein the indication information is located in the unused bits of the Flags field of the Type-B segment-sub-flag length value.
  17. 根据权利要求15所述的方法,其特征在于,所述指示信息位于所述类型B的段-子标记长度值的标记Flags字段的保留字段中。The method according to claim 15, wherein the indication information is located in a reserved field of the Flags field of the type B segment-sub-flag length value.
  18. 根据权利要求14所述的方法,其特征在于,当所述控制报文为路径计算单元通信协议PCEP报文时,所述指示信息位于所述控制报文中互联网协议第6版段路由-显式路由对象子对象SRv6-ERO Subobject字段中。The method according to claim 14, wherein when the control message is a path computation element communication protocol PCEP message, the indication information is located in the Internet Protocol Version 6 segment routing-display in the control message In the SRv6-ERO Subobject field of the routing object subobject.
  19. 根据权利要求18所述的方法,其特征在于,所述指示信息位于所述SRv6-ERO Subobject字段的标记Flags字段的未使用比特位中。The method according to claim 18, wherein the indication information is located in unused bits of the Flags field of the SRv6-ERO Subobject field.
  20. 根据权利要求18所述的方法,其特征在于,所述指示信息位于所述SRv6-ERO Subobject字段的保留字段中。The method according to claim 18, wherein the indication information is located in a reserved field of the SRv6-ERO Subobject field.
  21. 一种报文处理方法,其特征在于,包括:A message processing method, characterized in that, comprising:
    控制器向第二节点发送控制报文,所述控制报文携带指示信息,所述指示信息用于指示第一SID是否允许被绕过,以使得所述第二节点根据所述指示信息对数据报文进行封装,所述第一报文的段列表中包括所述第一SID,所述第一报文还包括根据所述指示信息确定 的第一字段,所述第一字段用于指示所述第一SID是否被绕过。The controller sends a control message to the second node, where the control message carries indication information, and the indication information is used to indicate whether the first SID is allowed to be bypassed, so that the second node performs data processing according to the indication information. The segment list of the first message includes the first SID, and the first message also includes a first field determined according to the indication information, and the first field is used to indicate the Whether the above-mentioned first SID is bypassed.
  22. 根据权利要求21所述的方法,其特征在于,所述控制报文为路径计算单元通信协议PCEP报文,或者,所述控制报文为边界网关路由协议BGP报文。The method according to claim 21, wherein the control message is a PCEP message of the Path Computation Element Communication Protocol, or the control message is a Border Gateway Routing Protocol (BGP) message.
  23. 一种通信装置,其特征在于,包括:处理器以及存储器;A communication device, characterized by comprising: a processor and a memory;
    所述存储器用于存储程序代码,The memory is used to store program code,
    所述处理器用于执行所述程序代码,以使得所述通信装置执行如权利要求1-11所述的方法,或者,执行如权利要求12-20所述的方法,或者,执行如权利要求21-22所述的方法。The processor is configured to execute the program code, so that the communication device executes the method according to claims 1-11, or executes the method according to claims 12-20, or executes the method according to claim 21 -22 described method.
  24. 一种计算机程序存储介质,其特征在于,所述计算机程序存储介质具有程序指令,当所述程序指令被直接或者间接执行时,使得如权利要求1-11所述的方法被执行,或者,执行如权利要求12-20所述的方法被执行,或者,执行如权利要求21-22所述的方法被执行。A computer program storage medium, characterized in that the computer program storage medium has program instructions, and when the program instructions are executed directly or indirectly, the method according to claims 1-11 is executed, or the A method as claimed in claims 12-20 is performed, or a method as claimed in claims 21-22 is performed.
  25. 一种通信系统,其特征在于,所述通信系统包括:如权利要求1-11所述的第一节点,如权利要求12-20所述的第二节点,和如权利要求21-22所述的控制器。A communication system, characterized in that the communication system comprises: the first node according to claims 1-11, the second node according to claims 12-20, and the node according to claims 21-22 controller.
PCT/CN2022/105410 2021-07-15 2022-07-13 Message processing method and related apparatus WO2023284774A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110800586.X 2021-07-15
CN202110800586.XA CN115622930A (en) 2021-07-15 2021-07-15 Message processing method and related device

Publications (1)

Publication Number Publication Date
WO2023284774A1 true WO2023284774A1 (en) 2023-01-19

Family

ID=84856149

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105410 WO2023284774A1 (en) 2021-07-15 2022-07-13 Message processing method and related apparatus

Country Status (2)

Country Link
CN (1) CN115622930A (en)
WO (1) WO2023284774A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116915685B (en) * 2023-09-06 2023-12-12 新华三技术有限公司 Message transmission method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981458A (en) * 2019-03-08 2019-07-05 华为技术有限公司 A kind of method, network node and the system of determining message forwarding path
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6
CN111682996A (en) * 2019-03-11 2020-09-18 华为技术有限公司 Method, network node and network system for forwarding message in network
WO2021089004A1 (en) * 2019-11-06 2021-05-14 华为技术有限公司 Message transmission method, proxy node, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981458A (en) * 2019-03-08 2019-07-05 华为技术有限公司 A kind of method, network node and the system of determining message forwarding path
CN111682996A (en) * 2019-03-11 2020-09-18 华为技术有限公司 Method, network node and network system for forwarding message in network
WO2021089004A1 (en) * 2019-11-06 2021-05-14 华为技术有限公司 Message transmission method, proxy node, and storage medium
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
S. MATSUSHIMA, ED. SOFTBANK C. FILSFILS M. KOHNO P. CAMARILLO, ED. CISCO SYSTEMS, INC. D. VOYER BELL CANADA C. PERKINS FUTUREWEI: "Segment Routing IPv6 for Mobile User Plane; draft-ietf-dmm-srv6-mobile-uplane-09.txt", SEGMENT ROUTING IPV6 FOR MOBILE USER PLANE; DRAFT-IETF-DMM-SRV6-MOBILE-UPLANE-09.TXT; INTERNET-DRAFT: DMM WORKING GROUP, INTERNET ENGINEERING TASK FORCE, IETF; STANDARDWORKINGDRAFT, INTERNET SOCIETY (ISOC) 4, RUE DES FALAISES CH- 1205 GENEVA, SWITZER, no. 09, 13 July 2020 (2020-07-13), Internet Society (ISOC) 4, rue des Falaises CH- 1205 Geneva, Switzerland , pages 1 - 30, XP015140705 *

Also Published As

Publication number Publication date
CN115622930A (en) 2023-01-17

Similar Documents

Publication Publication Date Title
CN111713079B (en) Packet network interworking including segment routing
CN108702331B (en) Integration of SR application segments with Service Function Chaining (SFC) header metadata
EP4102785A1 (en) Message processing method and apparatus, and network device and storage medium
EP1609279B1 (en) Method for recursive bgp route updates in mpls networks
CA3080526C (en) Ip mpls pop virtualization and fault tolerant virtual router
US7839767B2 (en) Path reroute in a computer network
CN113347091B (en) Flexible algorithm aware border gateway protocol prefix segment route identifier
WO2021169258A1 (en) Message forwarding method, routing information publishing method, apparatus and system
CN113381933B (en) SRv6 bidirectional forwarding detection method and system in network
US20230095244A1 (en) Packet sending method, device, and system
CN112202669A (en) Resilient multiprotocol label switching (MPLS) ring using segmented routing
US11929923B2 (en) Packet transmission method and apparatus
CN113079089A (en) Service chain fault protection method, device, equipment, system and storage medium
WO2023011149A1 (en) Communication method based on segment routing over internet protocol version 6 (srv6)
EP3874722A1 (en) Coordinated offloaded oam recording within packets
WO2023284774A1 (en) Message processing method and related apparatus
US11082540B2 (en) Network operations including protocol processing of a packet updating an operations data field of a different protocol
WO2024067084A1 (en) Path fault detection method and related apparatus
WO2023236880A1 (en) Message control method and related device
WO2023274083A1 (en) Route publishing method and apparatus, packet forwarding method and apparatus, device, and storage medium
CN116074395A (en) Message sending method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22841407

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE