Message forwarding methods, devices, electronic equipment and storage media
By using composite dedicated labels to bypass unreachable nodes and switch to backup paths in MPLS networks, the packet loss problem caused by faults in MPLS networks is solved, and network reliability is improved.
Patent Information
- Application Number
- CN202380009551.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-06-28
AI Technical Summary
In MPLS networks, packet loss caused by link or node failures cannot meet the low latency requirements of interactive multimedia services, thus affecting network reliability.
In MPLS networks, composite dedicated labels are used for packet forwarding. When an unreachable node is identified, the packet loss is reduced by bypassing the node and switching to a backup path or restoring the original packet.
It improves the reliability of MPLS networks, reduces packet loss due to node or link failures, and ensures the continuity of service flows.
Smart Images

Figure CN119605148B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a message forwarding method, apparatus, electronic device and storage medium. Background Technology
[0002] SR-MPLS (Segment Routing with Multi-Protocol Label Switching) refers to using 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, typically tolerating only tens of milliseconds of packet loss. However, when a link or node in an MPLS network fails, the time required to restore service transmission is usually hundreds of milliseconds or even several seconds, failing to meet service requirements and impacting the reliability of the MPLS network. Summary of the Invention
[0004] The purpose of this application is to provide a packet forwarding method, apparatus, electronic device, and storage medium that can reduce packet loss and improve the reliability of MPLS networks. The specific technical solution is as follows:
[0005] In a first aspect, this application provides a message forwarding method, the method being applied to a first node, the method comprising:
[0006] Obtain a first message, the first message including a first tag stack, the first tag stack including node tags and composite special tags, the node tags including a first tag indicating the first node and a second tag indicating the second node;
[0007] If the next label of the first label is a first type of composite special label, and the node corresponding to the next label of the first type of composite special label is unreachable, then the second message is forwarded to the second node. The second message includes a second label stack, and the top label of the second label stack is the second label.
[0008] In one possible implementation, the node corresponding to the next tag of the first type of composite special tag is the third node, and after obtaining the first message, the method further includes:
[0009] If the next label of the first label is the first type of composite special label, and the third node is reachable, then a 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 indicate the third node.
[0010] In one possible implementation,
[0011] The node corresponding to the next tag of the first type of composite special-purpose tag is the primary tail node, which is the tail node on the main path used to forward the first message; the second node is the backup tail node, which is the tail node on the backup path used to forward the first message; or...
[0012] The node corresponding to the next tag of the first type of composite special tag is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
[0013] In one possible implementation, the first node is a primary tail node, which is a tail node on the primary path used to forward the first packet, and the second node is a backup tail node, which is a tail node on the backup path used to forward the first packet.
[0014] After obtaining the first message, the method further includes:
[0015] If the next label after the first label is a second type composite special label, then forward the fourth message, which is a message from the inner layer of the first label stack.
[0016] In one possible implementation, when the first node is the source node, obtaining the first message includes:
[0017] Received the fifth message;
[0018] The first tag stack is encapsulated in the outer layer of the fifth message to obtain the first message.
[0019] In one possible implementation, the first type of composite special label includes a first extended label and a first indicator label, wherein the first indicator label includes a label value field, a type field, a stack bottom flag bit, and a quantity field;
[0020] The type field takes the first value, which is used to indicate that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label is popped up.
[0021] The quantity field is used to indicate the number of tags that need to be displayed;
[0022] The value of the stack bottom marker is a second value, used to indicate that the first indicator label is not the stack bottom label of the first label stack.
[0023] In one possible implementation, the second composite special tag includes a second extended tag and a second indicator tag, wherein the second indicator tag includes a tag value field, a type field, a stack bottom flag bit, and a quantity field;
[0024] The type field takes a second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label is unconditionally displayed;
[0025] The quantity field is used to indicate the number of tags that need to be displayed;
[0026] The value of the stack bottom marker is a second value, used to indicate that the second indicator label is not the stack bottom label of the first label stack.
[0027] Secondly, embodiments of this application provide a message forwarding apparatus, which is applied to a first node, and the apparatus includes:
[0028] The acquisition module is used to acquire a first message, the first message including a first tag stack, the first tag stack including node tags and composite special tags, the node tags including a first tag indicating the first node and a second tag indicating the second node;
[0029] The 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 of composite special label and the node corresponding to the next label of the first type of composite special label is unreachable. The second message includes a second label stack, and the top label of the second label stack is the second label.
[0030] In one possible implementation, the node corresponding to the next tag of the first type of composite special tag is the third node, and the forwarding module is further configured to:
[0031] If the next label of the first label is the first type of composite special label, and the third node is reachable, then a 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 indicate the third node.
[0032] In one possible implementation,
[0033] The node corresponding to the next tag of the first type of composite special-purpose tag is the primary tail node, which is the tail node on the main path used to forward the first message; the second node is the backup tail node, which is the tail node on the backup path used to forward the first message; or...
[0034] The node corresponding to the next tag of the first type of composite special tag is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
[0035] In one possible implementation, the first node is a primary tail node, which is a tail node on the primary path used to forward the first packet; the second node is a backup tail node, which is a tail node on a backup path used to forward the first packet; the forwarding module is further configured to:
[0036] If the next label after the first label is a second type composite special label, then forward the fourth message, which is a message from the inner layer of the first label stack.
[0037] In one possible implementation, when the first node is the source node, the acquisition module is specifically used for:
[0038] Received the fifth message;
[0039] The first tag stack is encapsulated in the outer layer of the fifth message to obtain the first message.
[0040] In one possible implementation, the first type of composite special label includes a first extended label and a first indicator label, wherein the first indicator label includes a label value field, a type field, a stack bottom flag bit, and a quantity field;
[0041] The type field takes the first value, which is used to indicate that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label is popped up.
[0042] The quantity field is used to indicate the number of tags that need to be displayed;
[0043] The value of the stack bottom marker is a second value, used to indicate that the first indicator label is not the stack bottom label of the first label stack.
[0044] In one possible implementation, the second composite special tag includes a second extended tag and a second indicator tag, wherein the second indicator tag includes a tag value field, a type field, a stack bottom flag bit, and a quantity field;
[0045] The type field takes a second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label is unconditionally displayed;
[0046] The quantity field is used to indicate the number of tags that need to be displayed;
[0047] The value of the stack bottom marker is a second value, used to indicate that the second indicator label is not the stack bottom label of the first label stack.
[0048] Thirdly, embodiments of this application provide an electronic device, the electronic device comprising:
[0049] processor;
[0050] transceiver;
[0051] A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the following steps:
[0052] Obtain a first message, the first message including a first tag stack, the first tag stack including node tags and composite special tags, the node tags including a first tag indicating a first node and a second tag indicating a second node, the first node being the electronic device;
[0053] If the next label of the first label is a first type of composite special label, and the node corresponding to the next label of the first type of composite special label is unreachable, then the second message is forwarded to the second node through the transceiver. The second message includes a second label stack, and the top label of the second label stack is the second label.
[0054] In one possible implementation, the node corresponding to the next tag of the first type of composite special tag is a third node, and the machine-executable instructions further cause the processor to perform the following steps:
[0055] If the next label of the first label is the first type of composite special label, and the third node is reachable, then the transceiver forwards 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.
[0056] In one possible implementation,
[0057] The node corresponding to the next tag of the first type of composite special-purpose tag is the primary tail node, which is the tail node on the main path used to forward the first message; the second node is the backup tail node, which is the tail node on the backup path used to forward the first message; or...
[0058] The node corresponding to the next tag of the first type of composite special tag is an intermediate node on the main path, and the second node is an intermediate node or a tail node on the main path.
[0059] In one possible implementation, the first node is a primary tail node, which is a tail node on the primary path used to forward the first packet, and the second node is a backup tail node, which is a tail node on the backup path used to forward the first packet.
[0060] The machine-executable instructions also cause the processor to perform the following steps:
[0061] If the next label after the first label is a second type composite special label, then the fourth message is forwarded through the transceiver. The fourth message is a message in the inner layer of the first label stack.
[0062] In one possible implementation, when the first node is the source node, the machine-executable instructions further cause the processor to perform the following steps:
[0063] The fifth message is received via the transceiver.
[0064] The first tag stack is encapsulated in the outer layer of the fifth message to obtain the first message.
[0065] In one possible implementation, the first type of composite special label includes a first extended label and a first indicator label, wherein the first indicator label includes a label value field, a type field, a stack bottom flag bit, and a quantity field;
[0066] The type field takes the first value, which is used to indicate that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label is popped up.
[0067] The quantity field is used to indicate the number of tags that need to be displayed;
[0068] The value of the stack bottom marker is a second value, used to indicate that the first indicator label is not the stack bottom label of the first label stack.
[0069] In one possible implementation, the second composite special tag includes a second extended tag and a second indicator tag, wherein the second indicator tag includes a tag value field, a type field, a stack bottom flag bit, and a quantity field;
[0070] The type field takes a second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label is unconditionally displayed;
[0071] The quantity field is used to indicate the number of tags that need to be displayed;
[0072] The value of the stack bottom marker is a second value, used to indicate that the second indicator label is not the stack bottom label of the first label stack.
[0073] Fourthly, embodiments of this application provide a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method described in the first aspect.
[0074] Fifthly, embodiments of this application provide a computer program product that causes the processor to implement the method described in the first aspect.
[0075] Using this method, the first node can obtain the first packet, which includes a first label stack containing composite special-purpose labels. When the first node identifies the next label as a first-type composite special-purpose label, and the node corresponding to the next label of the first-type composite special-purpose label is unreachable, it can forward the second packet to the second node. This is equivalent to bypassing unreachable nodes. In other words, if a node in the forwarding path fails or the link between nodes fails, there is no need to first drop packets and then switch to another path to continue transmitting the service flow. Instead, the unreachable node can be bypassed, allowing the packet to continue forwarding. This reduces packet loss caused by node or link failures and improves network reliability. Attached Figure Description
[0076] The accompanying drawings, which are provided to further illustrate this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application.
[0077] Figure 1 A schematic diagram of an MPLS tag format provided for an embodiment of this application;
[0078] Figure 2 An exemplary schematic diagram of an MPLS network architecture provided for an embodiment of this application;
[0079] Figure 3 An exemplary schematic diagram of another MPLS network architecture provided in this application embodiment;
[0080] Figure 4 A flowchart of a message forwarding method provided in an embodiment of this application;
[0081] Figure 5 A schematic diagram illustrating a composite special label format provided in an embodiment of this application;
[0082] Figure 6 A schematic diagram illustrating a message format provided in an embodiment of this application;
[0083] Figure 7 A schematic diagram illustrating another message format provided in an embodiment of this application;
[0084] Figure 8 This is a schematic diagram of the structure of a message forwarding device provided in an embodiment of this application;
[0085] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0086] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments in this application are within the scope of protection of this application.
[0087] To facilitate understanding, the relevant terms involved in the embodiments of this application will be introduced first.
[0088] 1. SR
[0089] SR employs a source node path selection mechanism, pre-encapsulating the SID of the segment the forwarding path will traverse at the source node. When a packet passes through an SR node, the SR node forwards the packet based on its SID. Apart from the source node, other nodes do not need to maintain path state.
[0090] SR is a new protocol proposed to meet the needs of next-generation wide area networks (WANs). The development of cloud computing has presented new challenges to WANs, requiring a transformation of traditional WANs. SD-WAN, as a core technology for reconstructing WANs, can accelerate network delivery, optimize service quality, improve bandwidth utilization, and simplify network operation and maintenance processes through automatic deployment, centralized control, intelligent scheduling, and visualization, thus meeting the needs of cloud computing for WANs.
[0091] Intelligent scheduling is a key capability of next-generation wide area networks (WANs), crucial for ensuring application quality and optimizing bandwidth resources. While current traffic engineering technologies such as MPLS and RSVP can meet the differentiated bandwidth requirements of services, they suffer from issues such as numerous protocol types, complex deployment, difficult management, and poor scalability. These limitations prevent them from meeting the dynamic deployment, flexible scheduling, and scalability requirements of next-generation WANs. To address these requirements, the SR protocol was developed.
[0092] 2. SR-MPLS.
[0093] SR-MPLS refers to the use of SR in an MPLS network, where labels are used as SIDs to forward packets.
[0094] SR-MPLS not only inherits the advantages of MPLS technology but also adapts to the future development of technologies such as SDN, providing a flexible and efficient control method for SD-WAN networks. SR-MPLS is characterized by its ease of use and scalability, enabling better traffic scheduling and path optimization, ensuring the quality of critical services, balancing traffic distribution, improving leased line utilization, and reducing line costs.
[0095] The SR-MPLS technology mainly involves the following concepts:
[0096] SR node: refers to a device that has SR-MPLS enabled. The ingress node, responsible for adding labels to packets entering the SR-MPLS network, is called the source node. The egress node, responsible for removing labels from packets and forwarding them to the destination network, is called the tail node. Nodes between the source and tail nodes in an SR-MPLS network are called intermediate nodes.
[0097] SR domain: is a set of SR nodes.
[0098] Segment: Used to specify the operation performed by the SR node on the received message. In SR-MPLS technology, it refers to the operation on the label, that is, the operation of pushing labels, swapping labels, or popping labels on the message.
[0099] SID: In SR-MPLS technology, it is the MPLS label.
[0100] SRLSP (Segment Routing Label Switched Path): Packets are forwarded via segment routing using labels as SIDs. The path that the packet travels through is called an SRLSP.
[0101] MPLS label: A fixed-length identifier with local meaning, used to uniquely identify the FEC (Forwarding Equivalence Class) to which a packet belongs.
[0102] MPLS is a classification forwarding technique that groups packets with the same forwarding processing method into a single class, called a forwarding equivalence class. Packets belonging to the same forwarding equivalence class will receive exactly the same processing within the same MPLS network.
[0103] Among them, packets with the same forwarding processing method can be packets with the same destination address, packets using the same forwarding path, or packets with the same service level.
[0104] like Figure 1 As shown, an MPLS tag is 4 bytes long and includes the following 4 fields:
[0105] Label: Tag value, 20 bits in length, used to identify an FEC.
[0106] TC (Traffic Class): This 3-bit field represents QoS (Quality of Service). It can also be called the Exp field.
[0107] S: Label stack bottom identifier, 1 bit in length. MPLS supports multiple labels, meaning multiple labels can be encapsulated between the link layer frame header and the network layer packet header to form a label stack. The outermost label closest to the link layer frame header is the top label, and the innermost label closest to the network layer packet header is the bottom label. S = 1 indicates a bottom label, and S = 0 indicates a non-bottom label.
[0108] TTL (Time To Live): It has a length of 8 bits and the same meaning as TTL in IP packets. It can be used to prevent loops.
[0109] SR-MPLS forwarding is implemented based on the MPLS network architecture, which is as follows: Figure 2 As shown, Figure 2 The example shown illustrates network devices included in an MPLS network: Provider Edge devices (PE1) to PE5, and Provider devices (P1) to P4. The actual number of network devices included in an MPLS network in a real implementation is not limited to this.
[0110] In this setup, 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 a tail node to forward packets to IP Network 2. This enables communication between IP Network 1 and IP Network 2.
[0111] The forwarding mechanism of SR-MPLS is the same as that of MPLS networks, and MPLS labels can be used as SIDs to forward packets.
[0112] Before using the SR-MPLS forwarding mechanism for packet forwarding, the following steps must be completed:
[0113] (1) Perform SID allocation. Specifically, an MPLS label needs to be assigned to each SR node in the forwarding path, and the MPLS label is used as the SID.
[0114] (2) Establish label forwarding table entries. SR nodes in the SR domain generate local label forwarding table entries based on the assigned MPLS label information.
[0115] (3) Establish SRLSP. SRLSP can be configured manually, dynamically established through IGP / BGP protocol, or issued by the controller.
[0116] After completing the above configuration, the SRLSP can be used to forward packets. When the source node in the SR domain receives a packet from the IP network, it encapsulates the packet with the label information from the SRLSP and forwards the packet to the tail node through the SRLSP. After receiving the packet from the SRLSP, the tail node removes the label from the packet, recovers the original packet, and looks up the routing table according to the destination address of the original packet, thereby forwarding the original packet.
[0117] In some scenarios, there can be multiple forwarding paths that serve as backups for each other between two IP networks, such as... Figure 3 As shown, the Customer Edge (CE1) and CE2 belong to two different IP networks. PE1 to PE4 and P1 to P4 between CE1 and CE2 both belong to the SR-MPLS network.
[0118] In this configuration, CE1 is dual-homed to PE1 and PE2, which serve as backups for each other. PE1 is the source node on the main path, P1 and P2 are intermediate nodes on the main path, and PE3 is the primary tail node on the main path.
[0119] PE2 is the source node on the backup path, P3 and P4 are intermediate nodes on the backup path, and PE4 is the tail node on the backup path.
[0120] After PE1 receives the service flow from CE1, it can forward the service flow to CE2 using the main path. However, if a node in the main path fails or the link between nodes fails, PE1 must wait for the failure to be detected before switching to the backup path to forward the service flow. The path switching process takes a long time, can result in packet loss, and has poor network reliability.
[0121] To address the aforementioned problems, this application provides a message forwarding method, which is applied to a first node, which is a node in an MPLS network. Figure 4 As shown, the method includes:
[0122] S401, Obtain the first message.
[0123] The first message includes a first tag stack, which includes node tags and composite special tags. The node tags include a first tag indicating a first node and a second tag indicating a second node.
[0124] The node label specifically includes the label of each node on the main path used to forward the first message, and each node in the first label stack that needs to be protected includes a composite special label before its label.
[0125] by Figure 3 For example, if the first node is P1 and the node that needs to be protected is P2, then the first label stack from top to bottom includes the MPLS label of P1, the composite special label, the MPLS label of P2 and the MPLS label of PE3.
[0126] S402. If the next label of the first label is a first type composite special label, and the node corresponding to the next label of the first type composite special label is unreachable, then forward the second message to the second node.
[0127] The second message includes a second tag stack, with the top tag of the second tag stack being the second tag.
[0128] The first type of composite special 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 special label will pop up.
[0129] After the first node obtains the first message, it can identify that the top label of the first label stack is its own label, i.e., the first label, and then pop the first label. After popping the first label, if the top label of the stack is a first type of composite special label, and the node corresponding to the next label is unreachable, then the first type of composite label and a first specified number of labels can be popped to obtain the second message.
[0130] Since the top label of the second message is the second label, the first node can forward the second message to the second node.
[0131] Using this method, the first node can obtain the first packet, which includes a first label stack containing composite special-purpose labels. When the first node identifies the next label as a first-type composite special-purpose label, and the node corresponding to the next label of the first-type composite special-purpose label is unreachable, it can forward the second packet to the second node. This is equivalent to bypassing unreachable nodes. In other words, if a node in the forwarding path fails or the link between nodes fails, there is no need to first drop packets and then switch to another path to continue transmitting the service flow. Instead, the unreachable node can be bypassed, allowing the packet to continue forwarding. This reduces packet loss caused by node or link failures and improves network reliability.
[0132] In some embodiments of this application, the node corresponding to the next tag of the first type of composite special tag is the third node. After obtaining the first message, the method further includes:
[0133] If the next label after the first label is a first-class composite special label, and the third node is reachable, then the third message is forwarded to the third node. The third message includes a third label stack, where the top label of the stack is a third label used to indicate the third node.
[0134] Understandably, in this scenario, the first tag stack includes, in sequence, the first tag, the first type of composite special tag, the third tag, and the second tag. The third node is the node that needs protection.
[0135] If the first node recognizes that the next tag of the first tag is a first type of composite special tag, and the third node corresponding to the next tag is unreachable, then the first type of composite special tag can be popped out to obtain the third message.
[0136] Since the top label of the third message is the third label, the first node can forward the third message to the third node.
[0137] Using this method, when the node label includes a first type of composite special label, if the node corresponding to the next label of the first type of composite special label is reachable, the first node can still forward packets normally to the node corresponding to the next label, which can improve network reliability.
[0138] In one possible scenario, in the above embodiments, the node corresponding to the next tag of the first type of composite special tag is the primary tail node, which is used as the tail node on the main path for forwarding the first message. Correspondingly, the second node is the backup tail node, which is used as the tail node on the main path for forwarding the first message.
[0139] by Figure 3 For example, if the first node is P2, then the primary tail node is PE3, and the backup tail node is PE4.
[0140] If P2 identifies that the next label of the first type of composite special label is PE3, and PE3 is unreachable, then it can forward the second message to PE4. In this way, even if the primary tail node fails, the second message can be forwarded to the backup tail node in a timely manner, which can avoid packet loss due to the failure of the primary tail node.
[0141] In another possible scenario, in the above embodiments, the node corresponding to the next tag of the first type of composite special tag is an intermediate node on the main path, and the second node is an intermediate node or tail node on the main path.
[0142] by Figure 3 For example, if the first node is P1, then the node corresponding to the next label of the first type of composite special label is P2, and the second node is PE3. If P1 detects that P2 is unreachable, it can forward the second message to PE3; if P1 detects that P2 is reachable, it can forward the third message to P2.
[0143] Alternatively, if the first node is PE1, then the node corresponding to the next label of the first type of composite special label is P1, and the second node is P2. If PE1 detects that P1 is unreachable, it can forward the second message to P2; if PE1 detects that P1 is reachable, it can forward the third message to P1.
[0144] It should be noted that the first tag stack can include multiple first-class composite special tags. If multiple nodes on a path need to be protected, a first-class composite special tag can be added before the tag of each node that needs to be protected.
[0145] Furthermore, if the first node identifies that the next label of the first label is a first type of composite special label, and the node corresponding to the next label of the first type of composite special label is unreachable, and the next label of the unreachable node is still a first type of composite special label, then the first node can determine whether the node corresponding to the next label of the first type of composite special label is reachable. If reachable, the first node forwards the second message; if unreachable, and the next label is still a first type of composite special label, the first node continues to determine whether the node corresponding to the next label of the first type of composite special label is reachable, and so on, until it is determined that the node corresponding to the next label of the first type of composite special label is reachable, then the first node sends a third message to the reachable node; or until it is determined that the node corresponding to the next label of the first type of composite special label is unreachable, and the next label is a node label, then the first node forwards the second message to the node corresponding to that node label.
[0146] For example, if the main path is P1-->P2-->P3-->PE3, if the first node is P1, and P2 and P3 are both nodes that need to be protected, then the order from top to bottom of the first tag stack includes: the tag of P1, the first type of composite special tag 1, the tag of P2, the first type of composite special tag 2, the tag of P3, and the tag of PE3.
[0147] After P1 receives the first message, it pops its own tag and then identifies the top tag of the stack as Type I Composite Special Tag 1. If P2 is unreachable at this point, it continues to identify tags after P2. It can then identify Type I Composite Special Tag 2 and further determine whether P3 is reachable. If P3 is reachable, it forwards the third message to P3, with the top tag of the third message being P3's tag. If P3 is unreachable, it forwards the second message to PE3, with the top tag of the third message being PE3's tag.
[0148] This method can protect intermediate and tail nodes on the main path. If the protected intermediate or tail node is unreachable, the unreachable node can be skipped, allowing the packet to continue to be forwarded on subsequent nodes, which can reduce packet loss caused by node failure.
[0149] In some embodiments of this application, the first node can be a primary tail node. When it is necessary to protect the primary tail node, the first tag stack includes a second type of composite special tag.
[0150] exist Figure 4 Based on the corresponding implementation, the first node is the primary tail node, which is the tail node on the main path used to forward the first message.
[0151] In this case, the second node is the backup tail node, which is the tail node on the backup path used to forward the first message.
[0152] After the first node obtains the first message, if the next label of the first label is a second type composite special label, then the fourth message is forwarded. The fourth message is a message inside the first label stack.
[0153] The second type of composite special label is used to indicate the second specified number of labels after the second type of composite special label is unconditionally popped up.
[0154] Still with Figure 3For example, after PE3 receives the first message, it pops the first tag at the top of the first tag stack. Then, it identifies the second type of composite special tag and can unconditionally pop the second type of composite special tag, as well as the second specified number of subsequent tags. After the popping action is completed, all tags in the first tag stack are popped, and the message encapsulated inside the first message, i.e., the fourth message, can be recovered and forwarded to the IP network.
[0155] As can be seen, in scenarios where the primary tail node is protected, 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 the tag of the subsequent backup tail node under the instruction of the second type composite special tag, thereby restoring the fourth message encapsulated inside the first message, so that the fourth message can continue to be forwarded to the subsequent IP network, thus improving network reliability.
[0156] In some embodiments of this application, when the first node is the source node, the step of obtaining the first message can be specifically implemented as follows: receiving the fifth message, encapsulating the first tag stack on the outer layer of the fifth message, and obtaining the first message.
[0157] The source node is pre-configured with node information corresponding to the nodes that need protection. Upon receiving the fifth packet, in order to enable the fifth packet to be forwarded in the MPLS network, a label stack can be encapsulated in the fifth packet. Furthermore, a Type I composite special label is added before the label of each node that needs protection.
[0158] If the primary tail node is a node that needs to be protected, then a second type of composite special tag and the tag of the backup tail node are encapsulated after the tag of the primary tail node.
[0159] Using this method, the source node can encapsulate the first label stack in the fifth packet, and the first label stack includes composite special labels, thereby enabling reliability protection of nodes on the forwarding path of the first packet and improving network reliability.
[0160] The following describes the composite special label in the embodiments of this application.
[0161] The first type of composite special label includes a first extended label and a first indicator label. The first indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field.
[0162] The type field takes the first value, which indicates that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label will be popped.
[0163] The quantity field indicates the number of tags that need to be displayed;
[0164] The stack bottom marker takes the second value, which is used to indicate that the first indicator label is not the stack bottom label of the first label stack.
[0165] The second composite special label includes a second extended label and a second indicator label. The second indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field.
[0166] The type field takes the second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label is unconditionally displayed;
[0167] The quantity field indicates the number of tags that need to be displayed;
[0168] The value of the stack bottom marker is the second value, which is used to indicate that the second indicator label is not the stack bottom label of the first label stack.
[0169] Both the first and second types of composite special-purpose labels mentioned above are cSPL (Composite Special Purpose Label).
[0170] Composite special labels include extended labels and indicator labels. The indicator label may be called PMLI (Pop Multiple Labels Indicator).
[0171] The format of the composite special label is as follows: Figure 5 As shown, Figure 5 The first row is the extension label, which has a value of 15. The extension label also includes TC, S, and TTL. Please refer to the relevant description of MPLS labels in the above embodiments.
[0172] Figure 5 The second line in the table is PMLI, which includes a label value field, a type field, a stack bottom flag (S), and a number field.
[0173] The tag value field has a length of 20 bits, the Type field has a length of 3 bits, the S field has a length of 1 bit, and the Number field has a length of 8 bits.
[0174] The label values of PMLI need to be uniformly allocated, and in this embodiment of the application, TBA (To be allocated) is used to represent them.
[0175] The Type field indicates the condition type for displaying multiple tabs simultaneously. The value range is 0 to 255.
[0176] When the Type field is 0, it indicates that the Number tags will pop up unconditionally after PMLI.
[0177] When the Type field is set to 1, it indicates that when the next tag in the PMLI in the tag stack is unreachable, Number tags after PMLI will be popped.
[0178] The Type field has values from 2 to 255 for reserved types.
[0179] Number represents the number of tabs that need to pop up simultaneously.
[0180] Understandably, when Figure 5 When the Type field in the data is set to 1, Figure 5 The composite special label shown is the first type of composite special label described in the above embodiments;
[0181] when Figure 5 When the Type field in the data is 0, Figure 5 The composite special label shown is the second type of composite special label described in the above embodiments.
[0182] The following describes the message forwarding method provided in the embodiments of this application with specific examples.
[0183] by Figure 3 Taking the scenario as an example, the primary tail node PE3 and the backup tail node PE4 can advertise routes, thereby announcing their own MPLS labels to the upstream nodes.
[0184] After receiving the routing messages from PE3 and PE4, the source node PE1 can learn the dual-homed route of CE2 and the MPLS labels of PE3 and PE4 in the dual-homed connection of CE2.
[0185] After receiving the IP packet sent by CE2, PE1 can select the optimal forwarding path and the second-best forwarding path according to the routing optimization strategy, using the optimal forwarding path as the primary path and the second-best forwarding path as the backup path.
[0186] exist Figure 3 In the process, the primary path is the MPLS TE path PE1-->P1-->P2-->PE3, and the backup path is PE2-->P3-->P4-->PE4.
[0187] Furthermore, PE1 encapsulates the label stack and link layer header on the outer layer of the IP packet so that the packet can be transmitted along the MPLS TE path.
[0188] In existing technology, the message structure corresponding to the message forwarded by PE1 to P1 is as follows: Figure 6As shown, the message consists of the link layer header, tag stack, IP layer header, and IP layer payload, from the outermost layer to the innermost layer.
[0189] The label stack consists of labels 4 through 1 from top to bottom.
[0190] Here, label 4 is the label of P1, and the stack bottom marker S of label 4 is 0.
[0191] Label 3 is the label of P2, and the stack bottom marker S of label 3 is 0.
[0192] Tag 2 is a local tag of PE3, and the stack bottom flag S of tag 2 is 0.
[0193] Label 1 is the private network label of PE3, and the stack bottom flag S=1 of label 1, indicating that label 1 is the stack bottom label.
[0194] If one of the nodes fails during the forwarding of the message along the main path, for example, if P2 fails, the message will be lost. After PE1 detects the failure of the main path, it will forward the message using the backup path, resulting in packet loss before switching to the backup path.
[0195] In this embodiment of the application, if protection of the primary tail node is required, the message structure forwarded by PE1 to P1 is as follows: Figure 7 As shown, the message consists of the link layer header, tag stack, IP layer header, and IP layer payload, from the outermost layer to the innermost layer.
[0196] The label stack consists of labels 10 to 1 from top to bottom, and the S values for labels 10 to 2 are all 0.
[0197] Label 10 is the label for P1, and label 9 is the label for P2. A first type of composite special label, namely label 8 and label 7, is added before the local label (label 6) of PE3. Label 8 is an extended label, and label 7 is a PMLI label, with the extended label having a value of 15. Furthermore, a second type of composite special label, namely label 4 and label 3, is added after the private network label (label 5) of PE3. Label 4 is an extended label, and label 3 is a PMLI label, with the extended label having a value of 15. A local label (label 2) and a private network label (label 1) are also added for the backup tail node PE4.
[0198] It should be noted that for each tail node, its local node label and private network label must be encapsulated so that the tail node can forward packets to the private network based on the private network label.
[0199] The message can be forwarded along the main path. P1 can pop its own local label (label 10) and then forward the message to P2.
[0200] P2 can pop its own local tag (tag 9), and then recognize tag 8 as an extended tag, so it can further recognize tag 7. Because the type of tag 7 is 1, P2 can further identify whether the PE3 corresponding to the next tag (tag 6) is reachable.
[0201] If PE3 is reachable, labels 8 and 7 are popped, and the packet is forwarded to PE3. PE3 can identify the top label (label 6) and the next label (label 5) as the local label and VPN label, respectively. PE3 can obtain the VPN private network instance based on the VPN label and pop labels 6 and 5. Since label 5 has S=0, it means that label 5 is not the bottom label, so PE3 continues to identify labels 4 and 3. Since label 3 has Type=0 and Number=2, PE3 unconditionally pops the two labels after label 3. Since label 1 has S=1, PE3 can determine that label 1 is the bottom label, and popping label 1 allows the inner IP packet to be restored. Then, PE3 obtains the IP address in the IP header, looks up the route corresponding to that IP address in the VPN forwarding table corresponding to the VPN private network instance, and sends the IP packet into the VPN private network.
[0202] If PE3 is unreachable, because label 7 has a number of 4, P2 can pop the four labels following label 7 (labels 6, 5, 4, and 3), meaning the top label of the stack becomes label 2. P2 can then look up the routing table and forward the packet to PE4 along the reachable path between P2 and PE4. PE4 can then forward the inner IP packet to the VPN private network.
[0203] Optionally, if it is necessary to protect both the primary backup tail node and the intermediate node simultaneously, then... Figure 7 Based on this, a first-class composite special label is added before the intermediate node that needs protection. For example, an extended label and a PMLI label are added between label 10 and label 9. The PMLI label has Type=0, Number=3, and S=0. After P1 pops label 10, it can recognize the extended label and the PMLI label. If it is determined that P2 is unreachable, it can pop the three labels after the PMLI label, that is, pop labels 9, 8, and 7. At this time, the top label of the stack is label 6, so that the packet is forwarded to PE3.
[0204] It should be noted that if it is necessary to protect all intermediate nodes on the main path, a composite special label with Type=1 can be added before each intermediate node. If multiple intermediate nodes on the main path fail in succession, the labels of unreachable intermediate nodes can be popped one by one according to each composite special label until the label corresponding to the reachable node in the label stack is found or the label at the bottom of the stack is reached.
[0205] This application embodiment does not limit the number of nodes that need to be protected. The controller can pre-configure the nodes that need to be protected on each forwarding path for the source node.
[0206] This method eliminates the need to extend the control plane protocol. It only requires improvements to the label stack and minor adjustments to the processing flow of the MPLS forwarding plane. This enables rapid path switching when intermediate nodes or primary tail nodes in the MPLS network fail. Compared to waiting for the source node to detect the primary path failure before switching to the backup path, this method reduces packet loss rate, lowers packet transmission latency, and improves network reliability.
[0207] Based on the same concept, embodiments of this application provide a message forwarding device, which is applied to a first node, such as... Figure 8 As shown, the device includes:
[0208] The acquisition module 801 is used to acquire a first message. The first message includes a first tag stack, which includes node tags and composite special tags. The node tags include a first tag indicating a first node and a second tag indicating a second node.
[0209] The forwarding module 802 is used to forward a second message to a second node if the next label of the first label is a first type of composite special label and the node corresponding to the next label of the first type of composite special label is unreachable. The second message includes a second label stack, and the top label of the second label stack is the second label.
[0210] Optionally, the node corresponding to the next label of the first type of composite special label is the third node, and the forwarding module 802 is also used for:
[0211] If the next label of the first label is a first-class composite special label, and the third node is reachable, then 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 indicate the third node.
[0212] Optionally, the node corresponding to the next label of the first type of composite special label is the primary tail node, which is the tail node on the main path used to forward the first message; the second node is the backup tail node, which is the tail node on the backup path used to forward the first message; or,
[0213] The node corresponding to the next tag of the first type of composite special tag is an intermediate node on the main path, and the second node is an intermediate node or tail node on the main path.
[0214] Optionally, the first node is the primary tail node, which is the tail node on the primary path used to forward the first packet; the second node is the backup tail node, which is the tail node on the backup path used to forward the first packet; the forwarding module 802 is also used for:
[0215] If the next label after the first label is a second type composite special label, then forward the fourth message, which is a message inside the first label stack.
[0216] Optionally, when the first node is the source node, module 801 is used specifically for:
[0217] Received the fifth message;
[0218] The first tag stack is encapsulated in the outer layer of the fifth message to obtain the first message.
[0219] Optionally, the first type of composite special label includes a first extended label and a first indicator label. The first indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field.
[0220] The type field takes the first value, which indicates that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label will be popped.
[0221] The quantity field indicates the number of tags that need to be displayed;
[0222] The stack bottom marker takes the second value, which is used to indicate that the first indicator label is not the stack bottom label of the first label stack.
[0223] Optionally, the second composite special label includes a second extended label and a second indicator label. The second indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field.
[0224] The type field takes the second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label pops up unconditionally;
[0225] The quantity field indicates the number of tags that need to be displayed;
[0226] The value of the stack bottom marker is the second value, which is used to indicate that the second indicator label is not the stack bottom label of the first label stack.
[0227] Based on the same concept, embodiments of this application also provide an electronic device, such as... Figure 9 As shown, the electronic device includes:
[0228] Processor 901;
[0229] Transceiver 904;
[0230] Machine-readable storage medium 902 stores machine-executable instructions that can be executed by a processor; the machine-executable instructions cause processor 901 to perform the following steps:
[0231] Acquire a first message, the first message including a first tag stack, the first tag stack including node tags and composite special tags, the node tags including a first tag indicating a first node and a second tag indicating a second node, the first node being the aforementioned electronic device;
[0232] If the next label of the first label is a first type composite special label, and the node corresponding to the next label of the first type composite special label is unreachable, then the second message is forwarded to the second node through transceiver 904. The second message includes a second label stack, and the top label of the second label stack is the second label.
[0233] Optionally, the node corresponding to the next tag of the first type of composite special tag is the third node, and the machine-executable instructions also cause the processor 901 to perform the following steps:
[0234] If the next label of the first label is a first-class composite special label and the third node is reachable, then the third message is forwarded to the third node through 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.
[0235] Optionally, the node corresponding to the next label of the first type of composite special label is the primary tail node, which is the tail node on the main path used to forward the first message; the second node is the backup tail node, which is the tail node on the backup path used to forward the first message; or,
[0236] The node corresponding to the next tag of the first type of composite special tag is an intermediate node on the main path, and the second node is an intermediate node or tail node on the main path.
[0237] Optionally, the first node is the primary tail node, which is the tail node on the primary path used to forward the first message, and the second node is the backup tail node, which is the tail node on the backup path used to forward the first message.
[0238] The machine-executable instructions also cause the processor 901 to perform the following steps:
[0239] If the next label after the first label is a second type composite special label, then the fourth message is forwarded through transceiver 904. The fourth message is a message inside the first label stack.
[0240] Optionally, when the first node is the source node, the machine-executable instructions also cause the processor 901 to perform the following steps:
[0241] Receive the fifth message via transceiver 904;
[0242] The first tag stack is encapsulated in the outer layer of the fifth message to obtain the first message.
[0243] Optionally, the first type of composite special label includes a first extended label and a first indicator label. The first indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field.
[0244] The type field takes the first value, which indicates that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label will be popped.
[0245] The quantity field indicates the number of tags that need to be displayed;
[0246] The stack bottom marker takes the second value, which is used to indicate that the first indicator label is not the stack bottom label of the first label stack.
[0247] Optionally, the second composite special label includes a second extended label and a second indicator label. The second indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field.
[0248] The type field takes the second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label pops up unconditionally;
[0249] The quantity field indicates the number of tags that need to be displayed;
[0250] The value of the stack bottom marker is the second value, which is used to indicate that the second indicator label is not the stack bottom label of the first label stack.
[0251] exist Figure 9 The system may also include a communication bus 903. The processor 901, machine-readable storage medium 902, and transceiver 904 communicate with each other via the communication bus 903. The communication bus 903 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0252] Transceiver 904 can be a wireless communication module. Under the control of processor 901, transceiver 904 interacts with other devices for data exchange.
[0253] 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 also be at least one storage device located remotely from the aforementioned processor.
[0254] 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.
[0255] Based on the same inventive concept, and according to the message forwarding method provided in the above embodiments of this application, this application also provides a machine-readable storage medium storing 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.
[0256] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of the message forwarding method in the above embodiments.
[0257] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0258] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A message forwarding method, characterized in that, The method is applied to the first node, and the method includes: Obtain a first message, the first message including a first tag stack, the first tag stack including node tags and composite special tags, the node tags including a first tag indicating the first node and a second tag indicating the second node; If the next label of the first label is a first type of composite special label, and the node corresponding to the next label of the first type of composite special label is unreachable, then the second message is forwarded to the second node. The second message includes a second label stack, and the top label of the second label stack is the second label. The first type of composite special label is used to indicate that when the node corresponding to the next label is unreachable, a first specified number of labels will pop up after the first type of composite special label, and the first specified number is included in the first type of composite special label.
2. The method according to claim 1, characterized in that, The node corresponding to the next tag of the first type of composite special tag is the third node. After obtaining the first message, the method further includes: If the next label of the first label is the first type of composite special label, and the third node is reachable, then a 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 indicate the third node.
3. The method according to claim 1 or 2, characterized in that, The node corresponding to the next tag of the first type of composite special tag is the primary tail node, which is the tail node on the main path used to forward the first message. The second node is the backup tail node, which is the tail node on the backup path used to forward the first message. or, The node corresponding to the next tag of the first type of composite special tag 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 the primary tail node, which is the tail node on the primary path used to forward the first message; the second node is the backup tail node, which is the tail node on the backup path used to forward the first message. After obtaining the first message, the method further includes: If the next label after the first label is a second type composite special label, then forward the fourth message, which is a message from the inner layer of the first label stack.
5. The method according to claim 1, characterized in that, When the first node is the source node, obtaining the first message includes: Received the fifth message; The first tag stack is encapsulated in the 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 special label includes a first extended label and a first indicator label. The first indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field. The type field takes the first value, which is used to indicate that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label is popped up. The quantity field is used to indicate the number of tags that need to be displayed; The value of the stack bottom marker is a second value, used to indicate that the first indicator label is not the stack bottom label of the first label stack.
7. The method according to claim 4, characterized in that, The second type of composite special label includes a second extended label and a second indicator label. The second indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field. The type field takes a second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label is unconditionally displayed; The quantity field is used to indicate the number of tags that need to be displayed; The value of the stack bottom marker is a second value, used to indicate that the second indicator label is not the stack bottom label of the first label stack.
8. A message forwarding device, characterized in that, The device is applied to the first node, and the device includes: An acquisition module is used to acquire a first message, the first message including a first tag stack, the first tag stack including node tags and composite special tags, the node tags including a first tag indicating the first node and a second tag indicating the second node; The 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 of composite special label and the node corresponding to the next label of the first type of composite special label is unreachable. The second message includes a second label stack, and the top label of the second label stack is the second label. The first type of composite special label is used to indicate that when the node corresponding to the next label is unreachable, a first specified number of labels will pop up after the first type of composite special label, and the first specified number is included in the first type of composite special label.
9. The apparatus according to claim 8, characterized in that, The node corresponding to the next tag of the first type of composite special tag is the third node, and the forwarding module is further used for: If the next label of the first label is the first type of composite special label, and the third node is reachable, then a 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 indicate the third node.
10. The apparatus according to claim 8 or 9, characterized in that, The node corresponding to the next tag of the first type of composite special tag is the primary tail node, which is the tail node on the main path used to forward the first message. The second node is the backup tail node, which is the tail node on the backup path used to forward the first message. or, The node corresponding to the next tag of the first type of composite special tag 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 apparatus according to claim 8, characterized in that, The first node is a primary tail node, which is the tail node on the primary path used to forward the first packet; the second node is a backup tail node, which is the tail node on the backup path used to forward the first packet; the forwarding module is further configured to: If the next label after the first label is a second type composite special label, then forward the fourth message, which is a message from the inner layer of the first label stack.
12. The apparatus according to claim 8, characterized in that, When the first node is the source node, the acquisition module is specifically used for: Received the fifth message; The first tag stack is encapsulated in the outer layer of the fifth message to obtain the first message.
13. The apparatus according to claim 8 or 9, characterized in that, The first type of composite special label includes a first extended label and a first indicator label. The first indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field. The type field takes the first value, which is used to indicate that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label is popped up. The quantity field is used to indicate the number of tags that need to be displayed; The value of the stack bottom marker is a second value, used to indicate that the first indicator label is not the stack bottom label of the first label stack.
14. The apparatus according to claim 11, characterized in that, The second type of composite special label includes a second extended label and a second indicator label. The second indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field. The type field takes a second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label is unconditionally displayed; The quantity field is used to indicate the number of tags that need to be displayed; The value of the stack bottom marker is a second value, used to indicate that the second indicator label is not the stack bottom label of the first label stack.
15. An electronic device, characterized in that, The electronic device includes: processor; transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the following steps: Obtain a first message, the first message including a first tag stack, the first tag stack including node tags and composite special tags, the node tags including a first tag indicating a first node and a second tag indicating a second node, the first node being the electronic device; If the next label of the first label is a first type of composite special label, and the node corresponding to the next label of the first type of composite special label is unreachable, then the second message is forwarded to the second node through the transceiver. The second message includes a second label stack, and the top label of the second label stack is the second label. The first type of composite special label is used to indicate that when the node corresponding to the next label is unreachable, a first specified number of labels will pop up after the first type of composite special label, and the first specified number is included in the first type of composite special label.
16. The electronic device according to claim 15, characterized in that, The node corresponding to the next tag of the first type of composite special tag 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 special label, and the third node is reachable, then the transceiver forwards 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.
17. The electronic device according to claim 15 or 16, characterized in that, The node corresponding to the next tag of the first type of composite special tag is the primary tail node, which is the tail node on the main path used to forward the first message. The second node is the backup tail node, which is the tail node on the backup path used to forward the first message. or, The node corresponding to the next tag of the first type of composite special tag 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 the primary tail node, which is the tail node on the primary path used to forward the first message; the second node is the backup tail node, which is the tail node on the backup path used to forward the first message. The machine-executable instructions also cause the processor to perform the following steps: If the next label after the first label is a second type composite special label, then the fourth message is forwarded through the transceiver. The fourth message is a message in the inner layer of the first label stack.
19. The electronic device according to claim 15, characterized in that, When the first node is the source node, the machine-executable instructions also cause the processor to perform the following steps: The fifth message is received via the transceiver. The first tag stack is encapsulated in the 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 special label includes a first extended label and a first indicator label. The first indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field. The type field takes the first value, which is used to indicate that when the node corresponding to the node label after the first indicator label in the first label stack is unreachable, the label with the quantity indicated by the quantity field after the first indicator label is popped up. The quantity field is used to indicate the number of tags that need to be displayed; The value of the stack bottom marker is a second value, used to indicate that the first indicator label is not the stack bottom label of the first label stack.
21. The electronic device according to claim 18, characterized in that, The second type of composite special label includes a second extended label and a second indicator label. The second indicator label includes a label value field, a type field, a stack bottom marker bit, and a quantity field. The type field takes a second value, which is used to indicate the number of labels indicated by the quantity field after the second indicator label is unconditionally displayed; The quantity field is used to indicate the number of tags that need to be displayed; The value of the stack bottom marker is a second value, used to indicate that the second indicator label is not the stack bottom label of the first label stack.
22. A machine-readable storage medium, characterized in that, The device stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implement the method of any one of claims 1-7.
23. A computer program product, characterized in that, The computer program product causes the processor to implement the method of any one of claims 1-7.
Citation Information
Patent Citations
Message forwarding method and device
CN107547371A
Fault recovery method and device in SR-MPLS Anycast scene and storage medium
CN111224870A