Message forwarding method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202380009551.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-06-28
AI Technical Summary
When an MPLS network fails on a link or node, the time required to resume service transmission is usually hundreds of milliseconds or even seconds, which cannot meet the sensitive requirements of interactive multimedia services such as VoIP to network packet loss, affecting network reliability.
By introducing composite dedicated tags in the MPLS network, if the node corresponding to the next tag is unreachable, bypass the unreachable node and forward the packet to the alternate path, reducing packet loss caused by node or link failure, and improving network reliability .
It realizes that in the case of node or link failure, switch to other paths without first losing packets, continue to transmit service flow, reduce packet loss rate, improve network reliability, and reduce transmission delay.
Smart Images

Figure CN119605148A_ABST
Abstract
Description
Message forwarding method, device, electronic device and storage medium Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message forwarding method, device, electronic device and storage medium. Background Art
[0002] SR-MPLS (Segment Routing with Multi-Protocol Label Switching) refers to the use of SR (Segment Routing) in an MPLS (Multi-Protocol Label Switching) network to forward packets using labels as SIDs (Segment Identifiers).
[0003] Interactive multimedia service applications, such as VoIP (Voice over Internet Protocol), are highly sensitive to network packet loss and can typically only tolerate a few tens of milliseconds of packet loss. When a link or node fails in an MPLS network, restoring service transmission typically takes hundreds of milliseconds or even seconds, failing to meet service requirements and impacting MPLS network reliability.
[0004] Summary of the Invention
[0005] The embodiment of the present application aims to provide a message forwarding method, apparatus, electronic device, and storage medium, which can reduce packet loss and improve the reliability of the MPLS network. The specific technical solutions are as follows:
[0006] In a first aspect, the present application provides a message forwarding method, which is applied to a first node and includes:
[0007] Acquire a first message, where the first message includes a first label stack, the first label stack includes a node label and a composite dedicated label, and the node label includes a first label indicating the first node and a second label indicating the second node;
[0008] If the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, forward a second message to the second node, where the second message includes a second label stack, and the top label of the second label stack is the second label.
[0009] In a possible implementation, the node corresponding to the next label of the first type of composite dedicated label is a third node. After obtaining the first message, the method further includes:
[0010] If the next label of the first label is the first type composite dedicated label and the third node is reachable, forward a third message to the third node, where the third message includes a third label stack, and the top label of the third label stack is a third label used to identify the third node.
[0011] In one possible implementation,
[0012] The node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is an tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is an tail node on a backup path for forwarding the first message; or
[0013] The node corresponding to the next label of the first type composite dedicated label is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
[0014] In a possible implementation, the first node is an active egress node, which is an egress node on a primary path for forwarding the first message; the second node is a backup egress node, which is an egress node on a backup path for forwarding the first message;
[0015] After obtaining the first message, the method further includes:
[0016] If the next label of the first label is a second-type composite dedicated label, the fourth packet is forwarded, where the fourth packet is a packet in an inner layer of the first label stack.
[0017] In a possible implementation, when the first node is a source node, obtaining the first message includes:
[0018] receiving the fifth message;
[0019] The first label stack is encapsulated on an outer layer of the fifth message to obtain the first message.
[0020] In a possible implementation, the first type of composite dedicated label includes a first extension label and a first indication label, wherein the first indication label includes a label value field, a type field, a stack bottom flag bit, and a quantity field;
[0021] The value of the type field is a first value, which is used to indicate that when the node corresponding to the node label following the first indicator label in the first label stack is unreachable, the number of labels indicated by the quantity field following the first indicator label is popped out;
[0022] The quantity field is used to indicate the number of labels to be ejected;
[0023] The value of the stack bottom flag bit is a second value, which is used to indicate that the first indicator label is not the bottom label of the first label stack.
[0024] In a possible implementation, the second composite dedicated tag includes a second extension tag and a second indication tag, and the second indication tag includes a tag value field, a type field, a stack bottom mark bit, and a quantity field;
[0025] The value of the type field is a second value, which is used to indicate that the number of tags indicated by the quantity field after the second indication tag is unconditionally popped out;
[0026] The quantity field is used to indicate the number of labels to be ejected;
[0027] The value of the stack bottom flag bit is a second value, which is used to indicate that the second indicator label is not the bottom label of the first label stack.
[0028] In a second aspect, an embodiment of the present application provides a message forwarding device, which is applied to a first node and includes:
[0029] An acquisition module, configured to acquire a first message, wherein the first message includes a first label stack, the first label stack includes a node label and a composite dedicated label, the node label includes a first label indicating the first node and a second label indicating a second node;
[0030] A forwarding module is configured to forward a second message to the second node if the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, where the second message includes a second label stack, and the top label of the second label stack is the second label.
[0031] In a possible implementation, the node corresponding to the next label of the first type of composite dedicated label is a third node, and the forwarding module is further configured to:
[0032] If the next label of the first label is the first type composite dedicated label and the third node is reachable, forward a third message to the third node, where the third message includes a third label stack, and the top label of the third label stack is a third label used to identify the third node.
[0033] In one possible implementation,
[0034] The node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is an tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is an tail node on a backup path for forwarding the first message; or
[0035] The node corresponding to the next label of the first type composite dedicated label is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
[0036] In a possible implementation, the first node is an active egress node, which is an egress node on a primary path for forwarding the first message; the second node is a backup egress node, which is an egress node on a backup path for forwarding the first message; and the forwarding module is further configured to:
[0037] If the next label of the first label is a second-type composite dedicated label, the fourth packet is forwarded, where the fourth packet is a packet in an inner layer of the first label stack.
[0038] In a possible implementation, when the first node is a source node, the acquiring module is specifically configured to:
[0039] receiving the fifth message;
[0040] The first label stack is encapsulated on an outer layer of the fifth message to obtain the first message.
[0041] In a possible implementation, the first type of composite dedicated label includes a first extension label and a first indication label, wherein the first indication label includes a label value field, a type field, a stack bottom flag bit, and a quantity field;
[0042] The value of the type field is a first value, which is used to indicate that when the node corresponding to the node label following the first indicator label in the first label stack is unreachable, the number of labels indicated by the quantity field following the first indicator label is popped out;
[0043] The quantity field is used to indicate the number of labels to be ejected;
[0044] The value of the stack bottom flag bit is a second value, which is used to indicate that the first indicator label is not the bottom label of the first label stack.
[0045] In a possible implementation, the second composite dedicated tag includes a second extension tag and a second indication tag, and the second indication tag includes a tag value field, a type field, a stack bottom mark bit, and a quantity field;
[0046] The value of the type field is a second value, which is used to indicate that the number of tags indicated by the quantity field after the second indication tag is unconditionally popped out;
[0047] The quantity field is used to indicate the number of labels to be ejected;
[0048] The value of the stack bottom flag bit is a second value, which is used to indicate that the second indicator label is not the bottom label of the first label stack.
[0049] In a third aspect, an embodiment of the present application provides an electronic device, comprising:
[0050] processor;
[0051] transceiver;
[0052] A machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; the machine-executable instructions prompting the processor to perform the following steps:
[0053] Acquire a first message, where the first message includes a first label stack, the first label stack includes a node label and a composite dedicated label, the node label includes a first label indicating a first node and a second label indicating a second node, and the first node is the electronic device;
[0054] If the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, forwarding a second message to the second node by the transceiver, where the second message includes a second label stack, and the top label of the second label stack is the second label.
[0055] In a possible implementation, the node corresponding to the next tag of the first type of composite dedicated tag is a third node, and the machine-executable instructions further cause the processor to execute the following steps:
[0056] If the next label of the first label is the first type composite dedicated label and the third node is reachable, a third message is forwarded to the third node through the transceiver, where the third message includes a third label stack, and the top label of the third label stack is a third label used to indicate the third node.
[0057] In one possible implementation,
[0058] The node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is an tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is an tail node on a backup path for forwarding the first message; or
[0059] The node corresponding to the next label of the first type composite dedicated label is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
[0060] In a possible implementation, the first node is an active egress node, which is an egress node on a primary path for forwarding the first message; the second node is a backup egress node, which is an egress node on a backup path for forwarding the first message;
[0061] The machine executable instructions further cause the processor to perform the following steps:
[0062] If the next label of the first label is a second-type composite dedicated label, the fourth message is forwarded by the transceiver, and the fourth message is a message in an inner layer of the first label stack.
[0063] In a possible implementation, when the first node is a source node, the machine-executable instructions further cause the processor to perform the following steps:
[0064] receiving a fifth message through the transceiver;
[0065] The first label stack is encapsulated on an outer layer of the fifth message to obtain the first message.
[0066] In a possible implementation, the first type of composite dedicated label includes a first extension label and a first indication label, wherein the first indication label includes a label value field, a type field, a stack bottom flag bit, and a quantity field;
[0067] The value of the type field is a first value, which is used to indicate that when the node corresponding to the node label following the first indicator label in the first label stack is unreachable, the number of labels indicated by the quantity field following the first indicator label is popped out;
[0068] The quantity field is used to indicate the number of labels to be ejected;
[0069] The value of the stack bottom flag bit is a second value, which is used to indicate that the first indicator label is not the bottom label of the first label stack.
[0070] In a possible implementation, the second composite dedicated tag includes a second extension tag and a second indication tag, and the second indication tag includes a tag value field, a type field, a stack bottom mark bit, and a quantity field;
[0071] The value of the type field is a second value, which is used to indicate that the number of tags indicated by the quantity field after the second indication tag is unconditionally popped out;
[0072] The quantity field is used to indicate the number of labels to be ejected;
[0073] The value of the stack bottom flag bit is a second value, which is used to indicate that the second indicator label is not the bottom label of the first label stack.
[0074] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium storing machine-executable instructions. When called and executed by a processor, the machine-executable instructions prompt the processor to implement the method described in the first aspect.
[0075] In a fifth aspect, an embodiment of the present application provides a computer program product, which prompts the processor to implement the method described in the first aspect.
[0076] Using this method, a first node can obtain a first message, which includes a first label stack encapsulated with a composite dedicated label. When the first node identifies that the next label is a first-class composite dedicated label and that the node corresponding to the next label of the first-class composite dedicated label is unreachable, the first node can forward the second message to the second node. This is equivalent to bypassing the unreachable node. That is, when a node in the forwarding path fails or a link between nodes fails, there is no need to first drop the packet and then switch to another path to continue transmitting the service flow. Instead, the unreachable node can be bypassed so that the message can continue to be forwarded, which can reduce packet loss caused by node or link failure and improve network reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0078] FIG1 is a schematic diagram of an MPLS label format provided in an embodiment of the present application;
[0079] FIG2 is an exemplary schematic diagram of an MPLS network architecture provided in an embodiment of the present application;
[0080] FIG3 is an exemplary schematic diagram of another MPLS network architecture provided in an embodiment of the present application;
[0081] FIG4 is a flow chart of a message forwarding method provided in an embodiment of the present application;
[0082] FIG5 is a schematic diagram of a composite dedicated label format provided in an embodiment of the present application;
[0083] FIG6 is a schematic diagram of a message format provided in an embodiment of the present application;
[0084] FIG7 is a schematic diagram of another message format provided in an embodiment of the present application;
[0085] FIG8 is a schematic structural diagram of a message forwarding device provided in an embodiment of the present application;
[0086] FIG9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0087] To make the objectives, technical solutions, and advantages of this application more clearly understood, the present application is further described below with reference to the accompanying drawings and examples. It is apparent that the described examples are only a portion of the embodiments of this application, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the examples in this application are intended to fall within the scope of protection of this application.
[0088] To facilitate understanding, the relevant terms involved in the embodiments of this application are first introduced.
[0089] 1.SR
[0090] SR uses a source node path selection mechanism. The source node pre-encapsulates the SID of the segment along the forwarding path. When a packet passes through an SR node, the SR node forwards the packet based on the SID. Nodes other than the source node do not need to maintain path state.
[0091] SR is a new protocol designed to meet the needs of next-generation WANs. The development of cloud computing has posed new challenges to WANs, requiring a transformation of traditional WANs. SD-WAN, as a core technology for reshaping WANs, accelerates network delivery, optimizes service quality, improves bandwidth utilization, and simplifies network operations and maintenance through automated deployment, centralized control, intelligent scheduling, and visualization, meeting the WAN requirements of cloud computing.
[0092] Intelligent scheduling is a key capability of next-generation WANs (WANs), crucial for ensuring application quality and optimizing bandwidth resources. Current traffic engineering technologies, such as MPLS and RSVP, can meet differentiated bandwidth requirements for services. However, they suffer from a wide variety of protocols, complex deployment, difficult management, and poor scalability. These technologies cannot meet the dynamic deployment, flexible scheduling, and scalability requirements of next-generation WANs. To address these requirements, the SR protocol emerged.
[0093] 2. SR-MPLS
[0094] SR-MPLS uses SR in an MPLS network and forwards packets using labels as SIDs.
[0095] SR-MPLS inherits the advantages of MPLS technology while adapting to future developments in technologies like SDN, providing a flexible and efficient control method for SD-WAN networks. SR-MPLS is simple to use and easily scalable, enabling better traffic scheduling and path optimization, ensuring the quality of critical services, balancing traffic distribution, improving dedicated line utilization, and reducing line costs.
[0096] SR-MPLS technology mainly involves the following concepts:
[0097] SR nodes are devices with SR-MPLS enabled. The ingress node, responsible for adding labels to packets entering the SR-MPLS network, is called a source node. The egress node, responsible for stripping labels from packets and forwarding them to the destination network, is called an egress node. Nodes between the source and egress nodes in an SR-MPLS network are called intermediate nodes.
[0098] SR domain: is a collection of SR nodes.
[0099] Segment: Specifies the operation performed by an SR node on a received packet. In SR-MPLS, this refers to operations on labels, such as pushing, swapping, or popping labels.
[0100] SID: In SR-MPLS technology, it is an MPLS label.
[0101] SRLSP (Segment Routing Label Switched Path): Segment routing forwarding of packets is performed using labels as SIDs. The path that the packets traverse is called an SRLSP.
[0102] An MPLS label is a fixed-length, locally significant identifier that uniquely identifies the Forwarding Equivalence Class (FEC) to which a packet belongs.
[0103] MPLS is a class-based forwarding technology that groups packets with the same forwarding processing method into a class called a forwarding equivalence class. Packets in the same forwarding equivalence class receive identical processing within the same MPLS network.
[0104] The messages with the same forwarding processing mode may be messages with the same destination address, messages using the same forwarding path, or messages with the same service level.
[0105] As shown in Figure 1, the MPLS label is 4 bytes long and consists of the following four fields:
[0106] Label: Label value, 20 bits long, used to identify an FEC.
[0107] TC (Traffic Class): 3 bits long, used to indicate QoS (Quality of Service). This field is also called the Exp field.
[0108] S: Label stack bottom identifier, 1 bit in length. MPLS supports multiple labels. This means that multiple labels can be encapsulated between the link layer frame header and the network layer packet header, forming a label stack. The outermost label near the link layer frame header is the top label, and the innermost label near the network layer packet header is the bottom label. When S is 1, the label is the bottom label; when S is 0, the label is not at the bottom of the stack.
[0109] TTL (Time To Live): 8 bits long, has the same meaning as the TTL in IP packets, and can be used to prevent loops.
[0110] SR-MPLS forwarding is implemented based on the MPLS network architecture. Figure 2 shows the MPLS network architecture, which includes network devices: Provider Edge devices (PE1) through PE5, and Provider devices (P1) through P4. In actual implementations, the number of network devices included in an MPLS network is not limited to this.
[0111] PE1, P1, P2, and PE2 form an SRLSP. PE1 is connected to IP Network 1 and can act as a source node to forward packets from IP Network 1 along the SRLSP. PE2 is connected to IP Network 2 and can act as an egress node to forward packets to IP Network 2. This enables communication between IP Network 1 and IP Network 2.
[0112] The forwarding mechanism of SR-MPLS is the same as that of MPLS networks. MPLS labels can be used as SIDs to forward packets.
[0113] Before using the SR-MPLS forwarding mechanism for packet forwarding, complete the following tasks:
[0114] (1) Perform SID allocation. Specifically, an MPLS label needs to be allocated to each SR node in the forwarding path, and the MPLS label is used as the SID.
[0115] (2) Establish label forwarding entries. SR nodes within the SR domain generate local label forwarding entries based on the assigned MPLS label information.
[0116] (3) Establish SRLSP. SRLSP can be configured manually, dynamically established through IGP / BGP protocol, or issued by the controller.
[0117] After completing the above configuration, the SRLSP can be used to forward packets. When a source node within the SR domain receives a packet from the IP network, it encapsulates the packet with the SRLSP label and forwards the packet to the egress node via the SRLSP. Upon receiving the packet from the SRLSP, the egress node removes the label to restore the original packet. It then searches the routing table for the original packet's destination address and forwards the original packet.
[0118] In some scenarios, two IP networks can have multiple backup forwarding paths. For example, as shown in Figure 3, Customer Edge (CE1) and CE2 belong to two different IP networks. PE1 to PE4 and P1 to P4 between CE1 and CE2 all belong to the SR-MPLS network.
[0119] CE1 is dual-homed to PE1 and PE2, which serve as backup for each other. PE1 is the source node on the primary path, P1 and P2 are intermediate nodes on the primary path, and PE3 is the primary tail node on the primary path.
[0120] PE2 is the source node on the backup path, P3 and P4 are intermediate nodes on the backup path, and PE4 is the backup tail node on the backup path.
[0121] After PE1 receives a traffic flow from CE1, it can forward it to CE2 using the primary path. However, if a node or link between nodes on the primary path fails, PE1 must wait until it detects the failure and switches to the backup path. This takes a long time to switch paths, resulting in packet loss and poor network reliability.
[0122] To solve the above problem, an embodiment of the present application provides a message forwarding method, which is applied to a first node, which is a node in an MPLS network. As shown in FIG4 , the method includes:
[0123] S401: Obtain a first message.
[0124] The first message includes a first label stack, the first label stack includes a node label and a composite dedicated label, and the node label includes a first label indicating the first node and a second label indicating the second node.
[0125] The node label specifically includes a label of each node on the primary path for forwarding the first message, and a composite dedicated label is included before the label of each node to be protected in the first label stack.
[0126] Taking Figure 3 as an example, if the first node is P1 and the node to be protected is P2, the first label stack includes, from top to bottom, P1's MPLS label, the composite dedicated label, P2's MPLS label, and PE3's MPLS label.
[0127] S402: If the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, forward the second message to the second node.
[0128] The second message includes a second label stack, and the top label of the second label stack is the second label.
[0129] The first type of composite dedicated label is used to indicate that when the node corresponding to the next label is unreachable, the first specified number of labels after the first type of composite dedicated label are popped out.
[0130] After receiving the first message, the first node recognizes that the top label in the first label stack is its own label, namely the first label, and then pops the first label. After popping the first label, if the top label in the stack is a first-class composite dedicated label and the node corresponding to the next label is unreachable, the first-class composite label and the first specified number of labels are popped off to obtain the second message.
[0131] Since the top label of the second message is the second label, the first node can forward the second message to the second node.
[0132] Using this method, a first node can obtain a first message, which includes a first label stack encapsulated with a composite dedicated label. When the first node identifies that the next label is a first-class composite dedicated label and that the node corresponding to the next label of the first-class composite dedicated label is unreachable, the first node can forward the second message to the second node. This is equivalent to bypassing the unreachable node. That is, when a node in the forwarding path fails or a link between nodes fails, there is no need to first drop the packet and then switch to another path to continue transmitting the service flow. Instead, the unreachable node can be bypassed so that the message can continue to be forwarded, which can reduce packet loss caused by node or link failure and improve network reliability.
[0133] In some embodiments of the present application, the node corresponding to the next label of the first type of composite dedicated label is a third node. After obtaining the first message, the method further includes:
[0134] If the next label of the first label is a first type composite dedicated label and the third node is reachable, the third message is forwarded to the third node, wherein the third message includes a third label stack, and the top label of the third label stack is a third label used to identify the third node.
[0135] It is understandable that in this case, the first label stack includes the first label, the first type of composite dedicated label, the third label, and the second label in sequence, wherein the third node is a node that needs to be protected.
[0136] When the first node recognizes that the next label of the first label is a first type composite dedicated label and the third node corresponding to the next label is unreachable, the first type composite dedicated label may be popped out to obtain a third message.
[0137] Since the top label of the third message is the third label, the first node can forward the third message to the third node.
[0138] Using this method, when the node label includes the first type of composite dedicated label, if the node corresponding to the next label of the first type of composite dedicated label is reachable, the first node can still forward the message to the node corresponding to the next label normally, which can improve network reliability.
[0139] In one possible scenario, the node corresponding to the next label of the first type of composite dedicated label in the above embodiment is the primary egress node, which is the egress node on the primary path for forwarding the first packet. Accordingly, the second node is the backup egress node, which is the egress node on the primary path for forwarding the first packet.
[0140] Taking Figure 3 as an example, if the first node is P2, the active tail node is PE3 and the backup tail node is PE4.
[0141] That is, if P2 identifies the next label in the first type of composite dedicated label as PE3's label and PE3 is unreachable, it can forward the second packet to PE4. This allows P2 to promptly forward the second packet to the backup egress node even if the active egress node fails, thus preventing packet loss caused by the active egress node failure.
[0142] In another possible scenario, the node corresponding to the next label of the first type of composite dedicated label in the above embodiment is an intermediate node on the main path, and the second node is an intermediate node or an end node on the main path.
[0143] Taking Figure 3 as an example, if the first node is P1, the next label of the first type of composite dedicated label corresponds to the node P2, and the second node is PE3. If P1 determines that P2 is unreachable, it can forward the second message to PE3. If P1 determines that P2 is reachable, it can forward the third message to P2.
[0144] Alternatively, if the first node is PE1, the node corresponding to the next label of the first type of composite dedicated label is P1, and the second node is P2. If PE1 identifies that P1 is unreachable, it can forward the second message to P2; if PE1 identifies that P1 is reachable, it can forward the third message to P1.
[0145] It should be noted that the first label stack may include multiple first-class composite dedicated labels. If multiple nodes on a path need to be protected, a first-class composite dedicated label may be added before the label of each node to be protected.
[0146] Furthermore, if the first node identifies that the next label of the first label is a first-class composite dedicated label, and the node corresponding to the next label of the first-class composite dedicated label is unreachable, and the next label of the label of the unreachable node is still a first-class composite dedicated label, then the first node can determine whether the node corresponding to the next label of the first-class composite dedicated label is reachable. If it is reachable, the second message is forwarded; if it is unreachable, and the next label is still a first-class composite dedicated label, the node corresponding to the next label of the first-class composite dedicated label is continued to be determined. If it is reached, the node corresponding to the next label of the first-class composite dedicated label is reached, and so on, until it is determined that the node corresponding to the next label of the first-class composite dedicated label is reachable, the third message is sent to the reachable node; or until it is determined that the node corresponding to the next label of the first-class composite dedicated label is unreachable, and the next label is a node label, the second message is forwarded to the node corresponding to the node label.
[0147] For example, if the primary path is P1-->P2-->P3-->PE3, if the first node is P1, and P2 and P3 are both nodes that need protection, the first label stack contains, from top to bottom, P1's label, first-class composite dedicated label 1, P2's label, first-class composite dedicated label 2, P3's label, and PE3's label.
[0148] After receiving the first packet, P1 removes its own label and identifies the top label as Class 1 composite dedicated label 1. If P2 is unreachable at this point, P1 continues to identify the labels after P2. It then identifies Class 1 composite dedicated label 2 and determines whether P3 is reachable. If so, P1 forwards the third packet to P3, with P3's label as the top label. If P3 is unreachable, P1 forwards the second packet to PE3, with PE3's label as the top label.
[0149] This method can protect the intermediate nodes and tail nodes on the main path. If the protected intermediate node or tail node is unreachable, the unreachable node can be skipped so that the message can continue to be forwarded on the subsequent node, which can reduce packet loss caused by node failure.
[0150] In some embodiments of the present application, the first node may be an active egress node. When the active egress node needs to be protected, the first label stack includes the second type of composite dedicated label.
[0151] Based on the embodiment corresponding to FIG. 4 , the first node is a primary tail node, and the primary tail node is an tail node on a primary path for forwarding the first message.
[0152] In this case, the second node is a backup tail node, and the backup tail node is an tail node on a backup path for forwarding the first message.
[0153] After the first node obtains the first message, if the next label of the first label is a second type composite dedicated label, the first node forwards the fourth message, which is a message in the inner layer of the first label stack.
[0154] The second type of composite dedicated tag is used to indicate that a second specified number of tags are unconditionally ejected after the second type of composite dedicated tag.
[0155] Using Figure 3 as an example, after receiving the first packet, PE3 pops the top label in the first label stack. Then, upon identifying the second type of composite dedicated label, it unconditionally pops the second type of composite dedicated label and the second specified number of labels that follow. After all labels in the first label stack are popped, the packet encapsulated within the first packet, namely the fourth packet, can be recovered and forwarded to the IP network.
[0156] It can be seen that in the scenario of protecting the primary tail node, if the primary tail node is reachable, after the first message is transmitted to the primary tail node, the primary tail node can unconditionally pop up the label of the subsequent backup tail node under the instruction of the second type of composite dedicated label, thereby restoring the fourth message encapsulated in the inner layer of the first message, so that the fourth message can continue to be forwarded to the subsequent IP network, thereby improving network reliability.
[0157] In some embodiments of the present application, when the first node is a source node, the step of obtaining the first message can be specifically implemented as follows: receiving a fifth message, encapsulating the first label stack on the outer layer of the fifth message, and obtaining the first message.
[0158] The source node is pre-configured with node information corresponding to the nodes to be protected. Upon receiving the fifth message, the source node may encapsulate the fifth message with a label stack to enable forwarding of the fifth message within the MPLS network. Furthermore, a first-class composite dedicated label is added before the label of each node to be protected.
[0159] If the active egress node is a node that needs to be protected, the second type of composite dedicated label and the backup egress node label are encapsulated after the label of the active egress node.
[0160] By adopting this method, the source node can encapsulate the first label stack in the fifth message, and the first label stack includes a composite dedicated label, thereby realizing reliability protection of nodes on the forwarding path of the first message and improving network reliability.
[0161] The following is an introduction to the composite dedicated label in the embodiment of the present application.
[0162] The first type of composite dedicated label includes a first extension label and a first indication label, and the first indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field;
[0163] The value of the type field is the first value, which is used to indicate that when the node corresponding to the node label following the first indicator label in the first label stack is unreachable, the number of labels indicated by the quantity field following the first indicator label is popped out;
[0164] The quantity field is used to indicate the number of labels to be ejected;
[0165] The value of the stack bottom flag bit is the second value, which is used to indicate that the first indicator label is not the bottom label of the first label stack.
[0166] The second composite dedicated tag includes a second extension tag and a second indication tag, wherein the second indication tag includes a tag value field, a type field, a stack bottom mark bit, and a quantity field;
[0167] The value of the type field is the second value, which is used to indicate that the number of labels indicated by the quantity field will be unconditionally popped up after the second indication label is unconditionally popped up;
[0168] The quantity field is used to indicate the number of labels to be ejected;
[0169] The value of the stack bottom flag bit is the second value, which is used to indicate that the second indicator label is not the bottom label of the first label stack.
[0170] The above-mentioned first type of composite special purpose labels and second type of composite special purpose labels are both cSPL (Composite Special Purpose Label, composite special purpose label).
[0171] The composite dedicated tag includes an extension tag and an indicator tag. The indicator tag may be called a PMLI (Pop Multiple Labels Indicator).
[0172] The format of the composite dedicated label is shown in FIG5 . The first line in FIG5 is an extension label. The label value of the extension label is 15. The extension label also includes TC, S, and TTL. Please refer to the relevant introduction to the MPLS label in the above embodiment.
[0173] The second line in FIG5 is PMLI, which includes a tag value field, a type (Type) field, a stack bottom mark bit (S), and a number (Number) field.
[0174] The length of the tag value field is 20 bits, the length of the Type field is 3 bits, the length of the S field is 1 bit, and the length of the Number field is 8 bits.
[0175] The PMLI label value needs to be uniformly allocated, and is represented by TBA (To be allocated) in the embodiment of the present application.
[0176] The Type field indicates the type of condition for popping up multiple tags simultaneously. The value range is 0 to 255.
[0177] When the Type field value is 0, it is used to indicate that the number of tags after PMLI will be unconditionally popped up;
[0178] When the Type field value is 1, it indicates that if the next label after the PMLI in the label stack is unreachable, the number of labels after the PMLI is popped.
[0179] The value of the Type field is 2 to 255 and is reserved.
[0180] Number indicates the number of tag entries that need to be popped up at the same time.
[0181] It can be understood that when the Type field in FIG5 takes a value of 1, the composite dedicated tag shown in FIG5 is the first type of composite dedicated tag introduced in the above embodiment;
[0182] When the value of the Type field in FIG5 is 0, the composite dedicated label shown in FIG5 is the second type of composite dedicated label introduced in the above embodiment.
[0183] The following describes the message forwarding method provided in the embodiment of the present application with reference to specific examples.
[0184] Taking the scenario of FIG3 as an example, the active egress node PE3 and the standby egress node PE4 can publish routes, thereby notifying their own MPLS labels to the upstream node.
[0185] After receiving the routing information from PE3 and PE4, the source node PE1 can learn the dual-homing route of CE2 and the MPLS labels of PE3 and PE4 connected to CE2.
[0186] After receiving the IP packet from CE2, PE1 selects the optimal forwarding path and the suboptimal forwarding path based on the route optimization policy. It uses the optimal forwarding path as the primary path and the suboptimal forwarding path as the backup path.
[0187] In Figure 3, the primary path is the MPLS TE path PE1-->P1-->P2-->PE3, and the backup path is PE2-->P3-->P4-->PE4.
[0188] PE1 then encapsulates a label stack and a link layer header on the outer layer of the IP packet so that the packet can be transmitted along the MPLS TE path.
[0189] In the prior art, the message structure corresponding to the message forwarded by PE1 to P1 is shown in FIG6 . The message includes a link layer header, a label stack, an IP layer header, and an IP layer payload in order from the outer layer to the inner layer.
[0190] The label stack includes label 4 to label 1 from the top to the bottom of the stack.
[0191] Among them, label 4 is the label of P1, and the stack bottom mark bit S of label 4 is 0.
[0192] Label 3 is the label of P2, and the stack bottom flag bit S of label 3 is 0.
[0193] Label 2 is the local label of PE3, and the bottom flag bit S of label 2 is 0.
[0194] Label 1 is the private network label of PE3, and the bottom-of-stack flag bit S of label 1 is 1, indicating that label 1 is the bottom-of-stack label.
[0195] While the message is being forwarded along the primary path, if one of the nodes fails, for example, if P2 fails, the message will be lost. After PE1 recognizes the primary path failure, it will use the backup path to forward the message, resulting in packet loss before switching to the backup path.
[0196] In the embodiment of the present application, if the active tail node needs to be protected, the message structure forwarded by PE1 to P1 is shown in Figure 7. The message includes the link layer header, label stack, IP layer header and IP layer payload from the outer layer to the inner layer.
[0197] The label stack includes label 10 to label 1 from the top to the bottom, and S of label 10 to label 2 are all 0.
[0198] Label 10 is P1's label, Label 9 is P2's label, and a first-type composite dedicated label, Label 8 and Label 7, is added before PE3's local label (Label 6). Label 8 is an extended label, Label 7 is a PMLI label, and the extended label value is 15. Furthermore, a second-type composite dedicated label, Label 4 and Label 3, is added after PE3's private network label (Label 5). Label 4 is an extended label, Label 3 is a PMLI label, and the extended label value is 15. The local label (Label 2) and private network label (Label 1) of backup egress node PE4 are also added.
[0199] It should be noted that for each egress node, the local node label and the private network label of the egress node need to be encapsulated so that the egress node can forward the message to the private network according to the private network label.
[0200] The message can be forwarded along the primary path. P1 can pop out its own local label (label 10) and then forward the message to P2.
[0201] P2 can pop its local label (label 9), and then recognize that label 8 is an extended label, and can further identify label 7. Because label 7 has Type = 1, P2 further determines whether PE3 corresponding to the next label (label 6) is reachable.
[0202] If PE3 is reachable, it pops labels 8 and 7 and forwards the packet to PE3. PE3 recognizes that the top label (label 6) and the next label (label 5) are local and VPN labels, respectively. Based on the VPN labels, PE3 obtains the VPN instance and pops labels 6 and 5. Because label 5's S=0 indicates that label 5 is not the bottom label, PE3 proceeds to identify labels 4 and 3. Since label 3's Type=0 and Number=2, PE3 unconditionally pops the two labels after label 3. Because label 1's S=1, PE3 determines that label 1 is the bottom label. After popping label 1, the inner IP packet is restored. PE3 then obtains the IP address in the IP header and searches the VPN forwarding table for the route corresponding to the IP address in the VPN instance, sending the IP packet into the VPN.
[0203] If PE3 is unreachable, because label number 7 is 4, P2 pops the four labels following label 7 (label 6, label 5, label 4, and label 3), making the top label on the stack 2. P2 then searches the routing table and forwards the packet to PE4 along the reachable path between P2 and PE4. PE4 can then forward the inner IP packet into the VPN private network.
[0204] Optionally, if simultaneous protection of the active / backup egress node and intermediate nodes is required, based on Figure 7, a first-class composite dedicated label can be added before the intermediate node to be protected. For example, an extended label and a PMLI label can be added between label 10 and label 9, with the PMLI label having Type = 0, Number = 3, and S = 0. After P1 pops label 10, it can identify the extended label and the PMLI label. If it determines that P2 is unreachable, it pops the three labels following the PMLI label—that is, label 9, label 8, and label 7. At this point, the top label in the stack is label 6, allowing the packet to be forwarded to PE3.
[0205] It should be noted that if all intermediate nodes on the primary path need to be protected, a Type=1 composite dedicated label can be added before each intermediate node. If multiple intermediate nodes on the primary path fail consecutively, the labels of the unreachable intermediate nodes can be popped out one by one according to each composite dedicated label until the label corresponding to a reachable node in the label stack is found or the label at the bottom of the stack is traversed.
[0206] The embodiment of the present application does not limit the number of nodes that need to be protected, and the nodes that need to be protected on each forwarding path can be pre-configured for the source node through the controller.
[0207] This method eliminates the need to extend the control plane protocol. It only requires improvements to the label stack and minor adjustments to the MPLS forwarding plane processing flow. This allows for rapid path switching when an intermediate node or primary tail node in the MPLS network fails. Compared to waiting for the source node to detect a primary path failure before switching to a backup path, this method reduces packet loss and transmission latency, thereby improving network reliability.
[0208] Based on the same concept, an embodiment of the present application provides a message forwarding device, which is applied to a first node. As shown in FIG8 , the device includes:
[0209] An acquisition module 801 is configured to acquire a first message, where the first message includes a first label stack, the first label stack includes a node label and a composite dedicated label, and the node label includes a first label indicating a first node and a second label indicating a second node;
[0210] Forwarding module 802 is configured to forward a second message to a second node if the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, where the second message includes a second label stack, and the top label of the second label stack is the second label.
[0211] Optionally, the node corresponding to the next label of the first type of composite dedicated label is a third node, and the forwarding module 802 is further configured to:
[0212] If the next label of the first label is a first-type composite dedicated label and the third node is reachable, the third message is forwarded to the third node. The third message includes a third label stack, and the top label of the third label stack is a third label used to identify the third node.
[0213] Optionally, the node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is the tail node on the primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is the tail node on the backup path for forwarding the first message; or,
[0214] The node corresponding to the next label of the first type of composite dedicated label is an intermediate node on the primary path, and the second node is an intermediate node or an end node on the primary path.
[0215] Optionally, the first node is a primary tail node, which is an tail node on a primary path for forwarding the first message; the second node is a backup tail node, which is an tail node on a backup path for forwarding the first message; and the forwarding module 802 is further configured to:
[0216] If the next label of the first label is a second type composite dedicated label, the fourth packet is forwarded, and the fourth packet is a packet in the inner layer of the first label stack.
[0217] Optionally, when the first node is a source node, the obtaining module 801 is specifically configured to:
[0218] receiving the fifth message;
[0219] The first label stack is encapsulated on the outer layer of the fifth message to obtain the first message.
[0220] Optionally, the first type of composite dedicated label includes a first extension label and a first indication label, and the first indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field;
[0221] The value of the type field is the first value, which indicates that when the node corresponding to the node label following the first indicator label in the first label stack is unreachable, the number of labels indicated by the quantity field following the first indicator label is popped out;
[0222] The quantity field is used to indicate the number of labels to be ejected;
[0223] The value of the stack bottom flag bit is the second value, which is used to indicate that the first indicator label is not the bottom label of the first label stack.
[0224] Optionally, the second composite dedicated tag includes a second extension tag and a second indication tag, and the second indication tag includes a tag value field, a type field, a stack bottom mark bit, and a quantity field;
[0225] The value of the type field is the second value, which is used to indicate that the number of tags indicated by the quantity field after the second indication tag is unconditionally popped up;
[0226] The quantity field is used to indicate the number of labels to be ejected;
[0227] The value of the stack bottom flag bit is the second value, which is used to indicate that the second indicator label is not the bottom label of the first label stack.
[0228] Based on the same concept, an embodiment of the present application further provides an electronic device, as shown in FIG9 , the electronic device includes:
[0229] Processor 901;
[0230] transceiver 904;
[0231] A machine-readable storage medium 902 stores machine-executable instructions that can be executed by a processor; the machine-executable instructions prompt the processor 901 to perform the following steps:
[0232] Obtain a first message, the first message including a first label stack, the first label stack including a node label and a composite dedicated label, the node label including a first label indicating a first node and a second label indicating a second node, the first node being the above-mentioned electronic device;
[0233] If the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, the second message is forwarded to the second node via transceiver 904. The second message includes a second label stack, and the top label of the second label stack is the second label.
[0234] Optionally, the node corresponding to the next tag of the first type of composite dedicated tag is the third node, and the machine executable instructions further cause the processor 901 to execute the following steps:
[0235] If the next label of the first label is a first-class composite dedicated label and the third node is reachable, the third message is forwarded to the third node via transceiver 904. The third message includes a third label stack, and the top label of the third label stack is a third label used to indicate the third node.
[0236] Optionally, the node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is the tail node on the primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is the tail node on the backup path for forwarding the first message; or,
[0237] The node corresponding to the next label of the first type of composite dedicated label is an intermediate node on the primary path, and the second node is an intermediate node or an end node on the primary path.
[0238] Optionally, the first node is an active egress node, which is an egress node on a primary path for forwarding the first message; the second node is a backup egress node, which is an egress node on a backup path for forwarding the first message;
[0239] The machine executable instructions further cause the processor 901 to perform the following steps:
[0240] If the next label of the first label is a second type composite dedicated label, the fourth message is forwarded by the transceiver 904 , and the fourth message is a message in the inner layer of the first label stack.
[0241] Optionally, when the first node is a source node, the machine executable instructions further cause the processor 901 to perform the following steps:
[0242] Receiving a fifth message through transceiver 904;
[0243] The first label stack is encapsulated on the outer layer of the fifth message to obtain the first message.
[0244] Optionally, the first type of composite dedicated label includes a first extension label and a first indication label, and the first indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field;
[0245] The value of the type field is the first value, which indicates that when the node corresponding to the node label following the first indicator label in the first label stack is unreachable, the number of labels indicated by the quantity field following the first indicator label is popped out;
[0246] The quantity field is used to indicate the number of labels to be ejected;
[0247] The value of the stack bottom flag bit is the second value, which is used to indicate that the first indicator label is not the bottom label of the first label stack.
[0248] Optionally, the second composite dedicated tag includes a second extension tag and a second indication tag, and the second indication tag includes a tag value field, a type field, a stack bottom mark bit, and a quantity field;
[0249] The value of the type field is the second value, which is used to indicate that the number of tags indicated by the quantity field after the second indication tag is unconditionally popped up;
[0250] The quantity field is used to indicate the number of labels to be ejected;
[0251] The value of the stack bottom flag bit is the second value, which is used to indicate that the second indicator label is not the bottom label of the first label stack.
[0252] In Figure 9 , a communication bus 903 may also be included. The processor 901, the machine-readable storage medium 902, and the transceiver 904 communicate with each other via the communication bus 903. The communication bus 903 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, and the like.
[0253] The transceiver 904 may be a wireless communication module. Under the control of the processor 901 , the transceiver 904 exchanges data with other devices.
[0254] The machine-readable storage medium 902 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the machine-readable storage medium may be at least one storage device located remote from the processor.
[0255] The processor 901 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0256] Based on the same inventive concept, according to the message forwarding method provided in the above embodiment of the present application, the embodiment of the present application further provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by a processor. The processor is prompted by the machine-executable instructions to implement the steps of the above message forwarding method.
[0257] In another embodiment provided by the present application, a computer program product including instructions is further provided, which, when executed on a computer, enables the computer to execute the steps of the message forwarding method in the above embodiment.
[0258] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0259] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A message forwarding method, characterized in that: The method is applied to a first node, and the method comprises: Acquire a first message, where the first message includes a first label stack, where the first label stack includes a node label and a composite dedicated label, where the node label includes a first label indicating the first node and a second label indicating a second node; If the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, forward a second message to the second node, where the second message includes a second label stack, and the top label of the second label stack is the second label.
2. The method according to claim 1, characterized in that: The node corresponding to the next label of the first type of composite dedicated label is a third node. After acquiring the first message, the method further includes: If the next label of the first label is the first type of composite dedicated label and the third node is reachable, forward a third message to the third node, the third message includes a third label stack, and the top label of the third label stack is a third label used to indicate the third node.
3. The method according to claim 1 or 2, characterized in that: The node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is a tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is a tail node on a backup path for forwarding the first message; or, The node corresponding to the next label of the first type of composite dedicated label is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
4. The method according to claim 1, characterized in that: The first node is an active tail node, the active tail node is an tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is an tail node on a backup path for forwarding the first message; After obtaining the first message, the method further includes: If the next label of the first label is a second-type composite dedicated label, the fourth message is forwarded, and the fourth message is a message in the inner layer of the first label stack.
5. The method according to claim 1, characterized in that When the first node is a source node, obtaining the first message includes: receiving a fifth message; The first label stack is encapsulated in an outer layer of the fifth message to obtain the first message.
6. The method according to claim 1 or 2, characterized in that: The first type of composite dedicated label includes a first extension label and a first indication label, and the first indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field; The value of the type field is a first value, which is used to indicate that when a node corresponding to a node label following the first indication label in the first label stack is unreachable, labels of the number indicated by the quantity field following the first indication label are popped out; The quantity field is used to indicate the quantity of labels to be ejected; The value of the stack bottom mark bit is a second value, which is used to indicate that the first indication label is not the bottom label of the first label stack.
7. The method according to claim 4, characterized in that The second composite dedicated label includes a second extension label and a second indication label, and the second indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field; The value of the type field is a second value, which is used to indicate that the number of labels indicated by the quantity field after the second indication label is unconditionally popped up; The quantity field is used to indicate the quantity of labels to be ejected; The value of the stack bottom mark bit is a second value, which is used to indicate that the second indication label is not the bottom label of the first label stack.
8. A message forwarding device, characterized in that: The device is applied to a first node, and includes: An acquisition module, configured to acquire a first message, wherein the first message includes a first label stack, the first label stack includes a node label and a composite dedicated label, and the node label includes a first label indicating the first node and a second label indicating a second node; A forwarding module is used to forward a second message to the second node if the next label of the first label is a first-type composite dedicated label and the node corresponding to the next label of the first-type composite dedicated label is unreachable, wherein the second message includes a second label stack, and the top label of the second label stack is the second label.
9. The device according to claim 8, characterized in that The node corresponding to the next label of the first type of composite dedicated label is a third node, and the forwarding module is further used for: If the next label of the first label is the first type of composite dedicated label and the third node is reachable, forward a third message to the third node, the third message includes a third label stack, and the top label of the third label stack is a third label used to indicate the third node.
10. The device according to claim 8 or 9, characterized in that The node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is a tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is a tail node on a backup path for forwarding the first message; or, The node corresponding to the next label of the first type of composite dedicated label is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
11. The device according to claim 8, characterized in that The first node is a primary tail node, the primary tail node is a tail node on a primary path for forwarding the first message, the second node is a backup tail node, the backup tail node is a tail node on a backup path for forwarding the first message; the forwarding module is further used to: If the next label of the first label is a second-type composite dedicated label, the fourth message is forwarded, and the fourth message is a message in the inner layer of the first label stack.
12. The device according to claim 8, characterized in that When the first node is a source node, the acquisition module is specifically configured to: receiving a fifth message; The first label stack is encapsulated in an outer layer of the fifth message to obtain the first message.
13. The device according to claim 8 or 9, characterized in that The first type of composite dedicated label includes a first extension label and a first indication label, and the first indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field; The value of the type field is a first value, which is used to indicate that when a node corresponding to a node label following the first indication label in the first label stack is unreachable, labels of the number indicated by the quantity field following the first indication label are popped out; The quantity field is used to indicate the quantity of labels to be ejected; The value of the stack bottom mark bit is a second value, which is used to indicate that the first indication label is not the bottom label of the first label stack.
14. The device according to claim 11, characterized in that The second composite dedicated label includes a second extension label and a second indication label, and the second indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field; The value of the type field is a second value, which is used to indicate that the number of labels indicated by the quantity field after the second indication label is unconditionally popped up; The quantity field is used to indicate the quantity of labels to be ejected; The value of the stack bottom mark bit is a second value, which is used to indicate that the second indication label is not the bottom label of the first label stack.
15. An electronic device, characterized in that: The electronic device comprises: processor; Transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions prompt the processor to perform the following steps: Acquire a first message, wherein the first message includes a first label stack, the first label stack includes a node label and a composite dedicated label, the node label includes a first label indicating a first node and a second label indicating a second node, and the first node is the electronic device; If the next label of the first label is a first-type composite dedicated label, and the node corresponding to the next label of the first-type composite dedicated label is unreachable, the second message is forwarded to the second node through the transceiver, and the second message includes a second label stack, and the top label of the second label stack is the second label.
16. The electronic device according to claim 15, characterized in that: The node corresponding to the next label of the first type of composite dedicated label is the third node, and the machine executable instructions further cause the processor to perform the following steps: If the next label of the first label is the first type of composite dedicated label and the third node is reachable, a third message is forwarded to the third node via the transceiver, the third message includes a third label stack, and the top label of the third label stack is a third label used to indicate the third node.
17. The electronic device according to claim 15 or 16, characterized in that: The node corresponding to the next label of the first type of composite dedicated label is a primary tail node, the primary tail node is a tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is a tail node on a backup path for forwarding the first message; or, The node corresponding to the next label of the first type of composite dedicated label is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
18. The electronic device according to claim 15, characterized in that: The first node is an active tail node, the active tail node is an tail node on a primary path for forwarding the first message, and the second node is a backup tail node, the backup tail node is an tail node on a backup path for forwarding the first message; The machine executable instructions further cause the processor to perform the following steps: If the next label of the first label is a second-type composite dedicated label, a fourth message is forwarded by the transceiver, and the fourth message is a message in an inner layer of the first label stack.
19. The electronic device according to claim 15, characterized in that: When the first node is a source node, the machine executable instructions further cause the processor to perform the following steps: receiving a fifth message through the transceiver; The first label stack is encapsulated in an outer layer of the fifth message to obtain the first message.
20. The electronic device according to claim 15 or 16, characterized in that: The first type of composite dedicated label includes a first extension label and a first indication label, and the first indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field; The value of the type field is a first value, which is used to indicate that when a node corresponding to a node label following the first indication label in the first label stack is unreachable, labels of the number indicated by the quantity field following the first indication label are popped out; The quantity field is used to indicate the quantity of labels to be ejected; The value of the stack bottom mark bit is a second value, which is used to indicate that the first indication label is not the bottom label of the first label stack.
21. The electronic device according to claim 20, characterized in that: The second composite dedicated label includes a second extension label and a second indication label, and the second indication label includes a label value field, a type field, a stack bottom mark bit, and a quantity field; The value of the type field is a second value, which is used to indicate that the number of labels indicated by the quantity field after the second indication label is unconditionally popped up; The quantity field is used to indicate the quantity of labels to be ejected; The value of the stack bottom mark bit is a second value, which is used to indicate that the second indication label is not the bottom label of the first label stack.
22. A machine-readable storage medium, characterized in that: Machine executable instructions are stored, and when called and executed by a processor, the machine executable instructions prompt the processor to implement any method described in claims 1-7.
23. A computer program product, characterized in that The computer program product causes the processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method of forwarding MPLS messages in ring network and network node
CN105991434A
Message forwarding method and device
CN107547371A
Data message forwarding method and device
CN110417655A
Service bearing method and device
CN110460507A
Transmission path fault processing method, device and system
CN110661700A