A method and node for transmitting messages in a network

By transmitting packets in the network and establishing a backup path using the second section of the identification, the forwarding loop problem caused by the local policy for configuring the backup path in IGP FRR technology is solved, and normal forwarding of packets and efficient utilization of resources are achieved.

CN113489641BActive Publication Date: 2025-01-17HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110650663.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-12-22
Publication Date
2025-01-17
Estimated Expiration
2037-12-22

AI Technical Summary

Technical Problem

When using the Internal Gateway Protocol (IGP) Fast Rerouting (FRR) technology, nodes on the alternate path are configured with local forwarding policies, resulting in a message forwarding loop, affecting the normal forwarding of messages.

Method used

By transmitting messages in the network, the first node receives the second segment identifier sent by the third node, and when determining the failure of the next hop node, the identifier is added to the message and establishes it according to the second segment identifier. Alternate paths to avoid the occurrence of loops.

Benefits of technology

Ensure that packets can be forwarded normally when the main path node fails, reduce resource waste, and avoid forwarding loops, which improves network reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113489641B_ABST
    Figure CN113489641B_ABST
Patent Text Reader

Abstract

The present application provides a method and node for transmitting a message in a network, in which a first path from a second node to a third node is established in the network, wherein the first path is established according to a first segment identifier of the third node, and the method comprises: the first node receives a second segment identifier sent by the third node; the first node receives a message sent by the second node through the first path; the first node determines that a next hop node of the first node on the first path fails; in response to the first node determining that a next hop node of the first node on the first path fails, the first node adds the second segment identifier to the message, and sends the message to the third node through a second path, wherein the second path is established by the first node according to the second segment identifier. Through the above method, a loop is avoided in the process of sending a message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method and node for transmitting messages in a network. Background Art

[0002] According to the Interior Gateway Protocol (IGP) fast reroute (FRR) technology, when a node on the primary path detects that the next hop node of the node fails, a backup path to the target node is calculated through the Topology Independent Loop-free-alternate algorithm (TI-LFA), and then the node continues to forward the message through the next hop of the backup path, thereby ensuring high reliability of message forwarding. The IGP FRR technology calculates the backup path based on the IGP shortest path first (SPF) principle to forward the message. In this way, if the node on the backup path is configured with a local forwarding policy, such as traffic engineering tunnel policy (TE) or policy routing, these local policies redefine the forwarding path of the traffic, so that the local policy and IGP FRR conflict when calculating the path, forming a message forwarding loop, thereby affecting the normal forwarding of the message, resulting in the inability to deploy the FRR technology. Summary of the invention

[0003] The embodiments of the present application provide a method and node for transmitting messages in a network, so that the messages carry segment identifiers for transmission, so as to avoid loop problems during message forwarding.

[0004] In a first aspect, the present application provides a method for transmitting a message in a network, the network comprising a first node, a second node and a third node. A first path from the second node to the third node is established in the network, the first path is established according to the first segment identifier of the third node, and the first node is a node on the first path. The method comprises: the first node receives the second segment identifier of the third node sent by the third node; the first node receives a message sent by the second node via the first path, the address of the message is the segment identifier of the next hop segment node of the first node; the first node determines that the next hop node of the first node on the first path fails; in response to the first node determining that the next hop node of the first node fails, the first node adds the second segment identifier to the message, and sends the message to the third node via the second path, wherein the second path is established by the first node according to the second segment identifier.

[0005] Through the above method, the first node in the network can establish a main path for sending messages based on the first segment identifier of the third node. When a node on the main path for sending messages fails, the previous hop node of the failed network, such as the first node, can establish a backup path based on the second segment identifier of the third node in the network to continue sending messages, thereby ensuring normal forwarding of messages and avoiding loops in the process of forwarding messages.

[0006] In a possible implementation, the second path is established by the first node when it is determined that the next hop node of the first node on the first path fails, or the second path is established by the first node before it is determined that the next hop node of the first node on the first path fails.

[0007] Through the above method, the first node establishes the second path only when it determines that its next-hop node fails. The first node does not need to establish the second path in advance, which can reduce the waste of resources of the first node.

[0008] In a possible implementation manner, the first node adding the second segment identifier to the message includes: the first node replacing the destination address of the message with the second segment identifier.

[0009] Through the above method, the first node can send the message to the third node according to the address of the message.

[0010] In a possible implementation manner, the second segment identifier includes a path calculation identifier, and the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

[0011] By adopting the above method, the second segment identifier includes a path calculation identifier, so that the message can exclude the local policy and use the shortest path first algorithm to forward the message, thereby avoiding a loop in the forwarded message.

[0012] In a possible implementation, the first segment identifier and the second segment identifier are the sixth version of the Internet Protocol (English: Internet Protocol version 6, referred to as IPv6) address of the third node.

[0013] In a second aspect, the present application provides a first node for transmitting a message in a network, which executes the method in the first aspect or any possible implementation of the first aspect. Specifically, the node includes a unit for executing the method in the first aspect or any possible implementation of the first aspect.

[0014] In a third aspect, the present application provides a system for transmitting messages in a network, the system comprising a first node, a second node and a third node. A first path from the second node to the third node is established in the network, wherein the first path is established according to a first segment identifier of the third node, the first node is a node on the first path, and the system comprises:

[0015] The first node is used to receive the second segment identifier of the third node sent by the third node, and is also used to receive the message sent by the second node through the first path. The first node is also used to determine that the next hop node of the first node on the first path fails, in response to the first node determining that the next hop node of the first node on the first path fails, add the second segment identifier to the message, establish a second path according to the second segment identifier, and send the message to the third node through the second path, wherein the address of the message is the segment identifier of the next hop segment node of the first node.

[0016] The second node is used to receive the first segment identifier of the third node, establish a first path from the second node to the third node according to the first segment identifier, and send a message to the first node through the first path.

[0017] The third node is used to send the first segment identifier to the first node, send the second segment identifier to the second node, and receive a message sent by the first node through the second path.

[0018] In combination with the third aspect, in a first possible implementation manner, the second segment identifier includes a path calculation identifier, wherein the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect and various possible implementations.

[0020] In a fifth aspect, the present application provides a network device, comprising a network interface, a processor, a memory, and a bus connecting the network interface, the processor, and the memory. The memory is used to store programs, instructions, or codes, and the processor is used to execute the programs, instructions, or codes in the memory to complete the method described in the first aspect and various possible implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of an application scenario of a message transmission method provided by an embodiment of the present invention.

[0022] Figure 2 A schematic flow chart of a method for transmitting messages in a network provided by an embodiment of the present invention.

[0023] Figure 3 A schematic flow chart of another method for transmitting messages in a network provided by an embodiment of the present invention.

[0024] Figure 4 A schematic diagram of a message format provided for an embodiment of the present invention.

[0025] Figure 5 A schematic diagram of another message format provided for an embodiment of the present invention.

[0026] Figure 6 A schematic diagram of a node structure diagram for transmitting messages provided in an embodiment of the present invention.

[0027] Figure 7 A schematic diagram of a node structure for transmitting another message provided in an embodiment of the present invention.

[0028] Figure 8 A schematic diagram of the structure of a system for transmitting messages in a network provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0030] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] The "node" described in the embodiments of the present application may refer to a device that forwards business traffic, for example, a "node" may be a router, a switch, an optical transport network (OTN) device, a packet transport network (PTN) device, or a wavelength division multiplexing (WDM) device.

[0032] Figure 1 A system architecture diagram for transmitting messages in a network is provided, and the system is a possible application scenario implemented in the present application. The network system 100 includes nodes 101, 102, 103, 104, 105, and 106 in a segment routing (English: segment routing, SR) network, and nodes 107 and 108 outside the above network. Node 101 is the entry node of the network, and node 103 is the exit node of the network. There are two paths for the message to reach node 103 from node 101, namely: the main path and the backup path. The main path includes nodes 101, 104, 105, and 106 in sequence. When the message arrives at node 101 in the SR network, it will then pass through nodes 104 and 105 in sequence to reach node 106. The backup path includes nodes 101, 102, 103, and 106 in sequence. Under normal circumstances, the primary path is used for message forwarding. When node 105 on the primary path fails, according to the IGP FRR technology, the message can be sent from node 104 to the backup path, that is, the message will pass through node 101, node 102, node 103 in sequence to reach node 106.

[0033] However, some nodes may configure a local forwarding policy to guide the forwarding of messages. For example, the forwarding policy configured in node 101 is to forward the received message to node 104 through the TE tunnel. In this case, if node 105 fails, node 104 will send the message to node 101 through the IGP FRR technology so that the message can be forwarded through the backup path. However, after node 101 receives the message sent by node 104, it will send the message to node 104 again through the TE tunnel according to the local forwarding policy. Since node 105 fails and cannot send the message, node 104 will continue to forward the message to node 101 after receiving the message sent by node 101 until node 101 receives a notification that node 105 fails, and then forward the message through the backup path instead of sending the message to node 101 through the TE tunnel. In an actual link, the node 101 and the failed node 105 may be separated by a long distance, and the information of the failure of the node 105 may take a long time to be notified to the node 101 and other devices, and the node 101 may be configured with a local forwarding policy, such as configuring a local policy such as a TE tunnel or policy routing, so that the message will give priority to the local policy to forward the message, and the message cannot be forwarded normally on the backup path, thereby causing a loop.

[0034] In order to solve the above problems, the present application provides a system for transmitting messages in a network, and the network may be an SR network. The system is introduced below by taking the SR network as an example. The SR network includes an ingress node 101, an egress node 106, nodes 104 and 105 on a primary path, and nodes 102 and 103 on a backup path.

[0035] The egress node 106 in the SR network publishes two different segment identifiers, which can be a Multi-Protocol Label Switching (MPLS) label or an IPv6 address. The following is an introduction using the label as an IPv6 address. For example, the two different addresses published by the egress node 106 are A4::00 and C4::00, and the two addresses are flooded to other nodes in the SR network, where the address C4::00 carries a strict SPF mark, that is, if the address C4::00 in the message carries a strict SPF mark, the forwarding of the message will strictly follow the path of the forwarding message calculated by SPF, and the local policy will no longer be applied to forward the message. Node 104 will store the two different addresses received.

[0036] When the message is forwarded to node 104 and it is determined that node 105 on the primary path fails, node 104 changes the address in the message from the original A4::00 to C4::00. Since the address C4::00 is marked with a strict SPF, the message with the address changed to C4::00 will be forwarded according to the SPF algorithm, that is, the message will be sent to the egress node of the SR network through the backup path to prevent a loop in message forwarding.

[0037] Combination Figure 1 For the application scenario shown, see Figure 2 , below Figure 2 For example Figure 1 The method for transmitting a message by node 104 in the embodiment is described in detail. Figure 2 The present application provides a flow chart of a method for transmitting a message in a network, the method being applicable to an SR network, wherein Figure 2 Chinese Figure 1 The middle node 104 is the first node, Figure 1 Any node in the Figure 2The steps in the method flow. The network includes a first node, a second node and a third node. The network may also include nodes other than the first node, the second node and the third node. For example, the network may also include a fourth node. A first path from the second node to the third node is established in the network, wherein the first path is established according to the first segment identifier of the third node, and the first node is a node on the first path. The second node may be Figure 1 The entry node 101 in the third node can be Figure 1 The method specifically comprises:

[0038] S210, the first node receives a second segment identifier of the third node sent by the third node;

[0039] In a possible implementation, the method may be applicable to an SR network provided by an operator. The egress node of the SR network may obtain two labels through a label distribution protocol (English: Label Distribution Protocol, abbreviated as: LDP) or a segment routing protocol, and both labels may be used to identify a third node. For example, the two obtained labels are respectively referred to as a first segment identifier and a second segment identifier.

[0040] In a possible implementation, the third node floods the generated first segment identifier and second segment identifier to other nodes in the SR network through the open shortest-path first interior gateway protocol (OSPF) or the intermediate system to intermediate system intra-domain routing information exchange protocol (IS-IS). The first node and the second node in the network can both receive the first segment identifier and the second segment identifier for identifying the third node, and the second node in the network can establish a first path for sending a message to the egress node according to the first segment identifier.

[0041] Optionally, the first segment identifier and the second segment identifier are the sixth version of the Internet Protocol IPv6 address of the third node.

[0042] In a possible implementation, if the first message is an IPv6 message, the first segment identifier and the second segment identifier may be two different addresses published by the egress node, for example, the two addresses are A4::00 and C4::00 respectively.

[0043] S220: The first node receives a message sent by the second node through the first path, where the address of the message is a segment identifier of a next-hop node of the first node.

[0044] In a possible implementation, the second node calculates a first path for forwarding the message to reach the third node according to the first segment identifier. The second node forwards the message to the first node through the first path, and the first node receives the message and forwards the message according to the destination address of the next hop node carried in the message.

[0045] In one possible implementation, the second node may be an ingress node of the SR network. The second node may add a segment identifier of a node on the first path to the message header. The second node may establish a label stack based on the segment identifier of the node on the first path and add it to the message header, so that the message is forwarded to a third node based on the label stack, wherein the outer destination address of the message is the segment identifier of the next-hop network device.

[0046] For example, the second node forwards the message to the third node through the first node on the first path and the next hop node of the first node in sequence. For example, the segment identifier of the second node is A1::00, the segment identifier of the first node is A2::00, the segment identifier of the next hop of the first node is A3::00, and the segment identifier of the third node is A4::00. The second node will establish a label stack with the segment identifiers of the nodes on the first path and add it to the message header. The specific adding method can be to add the label stack by extending the segment routing header in the message header. The label stack added by the second node in the message header includes A2::00, A3::00 and A4::00, and the destination address of the message is A2::00, and the message is sent to the first node. The first node receives the message according to the destination address A2::00 of the message, and replaces the destination address A2::00 of the message with A3::00 in the label stack. The first node sends the message to the next hop of the first node according to the destination address A3::00 of the message. Similarly, the next hop of the first node receives the message carrying A3::00 as the destination address and replaces the destination address with A4::00 in the label stack to send the message to the third node, thereby sending the message to the third node through the first path. The above method of forwarding the message through the first path is only an exemplary description, and the second node can also forward the message to the third node through the first path in other ways.

[0047] S230: The first node determines that a next-hop node of the first node on the first path fails.

[0048] In one possible implementation, if the next-hop node fails, other nodes in the network including the first node will obtain the message of the failure of the next-hop node through the IS-IS or OSPF protocol. Since the first node is adjacent to the next-hop node, the first node will quickly determine the message of the failure of the next-hop node.

[0049] S240, in response to the first node determining that the next hop node of the first node fails, the first node adds the second segment identifier to the message and sends the message to the third node through a second path, where the second path is established by the first node based on the second segment identifier.

[0050] In a possible implementation, when a next-hop node of the first node fails, the first node may establish a second path according to the second segment identifier and send a message to a third node.

[0051] For example, when the next-hop node of the first node fails and cannot forward the message, the first node can add the second segment identifier to the destination address of the message, that is, the first node replaces the destination address of the message with the second segment identifier, so that the message is sent to the third node along the second path established by the second segment identifier.

[0052] Optionally, the second segment identifier includes a path calculation identifier, and the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

[0053] In a possible implementation, the second segment identifier carries a path calculation identifier, such as a strict SPF tag. The strict SPF (English: Strict Shortest Path First) algorithm is based on the SPF algorithm to decide the path for forwarding messages, but the strict SPF requires that all nodes in the SR network must strictly follow the SPF algorithm to determine the path for sending messages, excluding the applicability of local policies, that is, the use priority of local policies such as SR TE tunnels or configured routing policies is lower than the requirement of strictly following the SPF path calculation, and the SPF algorithm is used to calculate the second path. The local policy refers to a local routing forwarding policy that needs to be processed first, including SR TE tunnels or local routing policies. For example, before the second node of the SR network forwards the message, the second node configures the SR TE tunnel so that the second node preferentially forwards the message to the first node through the configured SR TE tunnel, rather than sending the message to the next hop node according to the path calculated by the second node. Although the second segment identifier and the first segment identifier are both used to identify the exit node of the SR network, the second segment identifier is different from the first segment identifier, and the first segment identifier does not carry a strict SPF tag. The first node will preferentially use SPF to calculate the backup path according to the second segment identifier, so that the first node can preferentially use the SPF algorithm to calculate and establish the second path, and send the message to the egress node through the second path to avoid the occurrence of loops.

[0054] For example, when the first node determines that the next hop of the first node fails, the first node adds the second segment identifier C4::00 of the third node to the destination address of the message, wherein the second segment identifier C4::00 carries a strict SPF mark. The first node establishes a second path according to the destination address C4::00 in the message through the shortest path first algorithm, and sends the message to the third node through the second path.

[0055] Optionally, the second path is established by the first node when it is determined that a next-hop node of the first node on the first path fails.

[0056] Optionally, the first node adding the second segment identifier to the message includes: the first node replacing the address of the message with the second segment identifier.

[0057] In a possible implementation, when the first node determines that the next-hop network device fails, the first node replaces the address of the message with the second segment identifier and forwards the message according to the replaced address.

[0058] The following example uses an SR network that forwards IPv6 packets in a loop-free alternate (LFA) scenario with a local forwarding policy. Figure 1 The network system shown in the figure is a flowchart of a method for transmitting a message in a network provided by the present application. Figure 3 The method executed by node 104 in the example may be applicable to Figure 2 The first node in Figure 3 The method executed by node 105 in the embodiment may be applicable to Figure 2 The next hop node of the first node in Figure 3 The method run by node 101 in can be applied to Figure 2 Middle entry node, Figure 3 The method executed by node 105 in the embodiment may be applicable to Figure 2 The exit node in . Figure 3 Node 101 and node 104 are adjacent, and node 104 and node 105 are adjacent. The method specifically includes:

[0059] S310, the egress node 101 publishes a first address and a second address, wherein the first address carries a strict SPF tag.

[0060] For example, the egress node of the SR network publishes two different addresses of the egress node through the IS-IS protocol or the OSPF protocol, namely C4::00 and A4::00, where C4::00 carries the strict SPF tag, as shown in the following example: Figure 4 and Figure 5 As shown, Figure 4 and Figure 5 This is just an exemplary implementation and does not constitute a limitation to this application. Figure 4 In Figure 5 The reserved bit (English: Reserved) field in the flags field is set to 1 to indicate that the address needs to strictly calculate the path according to SPF, and is set to 0 to indicate that the path does not need to be calculated according to strict SPF. When the Reserved field is set to 1, the message excludes the local forwarding policy and the message forwarding path is calculated according to SPF.

[0061] S320, the network node 104 receives the first address and the second address.

[0062] For example, the node may receive two different addresses C4::00 and A4::00 issued by the egress node 106 according to the IS-IS protocol or the OSPF protocol, wherein the C4::00 address carries a strict SPF tag. After receiving the two addresses, the network node 104 stores the two addresses.

[0063] S330, the entry node 101 receives the first address and the second address.

[0064] S340, the ingress node 101 calculates a primary path for the message to reach the egress node according to the second address.

[0065] For example, when a message enters the SR network, the ingress node 101 can use the node label method or the link label method to calculate the forwarding path of the message and assign a label to the message according to the second address of the egress node 106, such as A4::00, and send the message to the egress node 106. Taking the node label method as an example, when the ingress node 101 receives the message, it will calculate the main path for the message to reach the egress node 103 according to the second address A4::00, and add the label for reaching the egress node 106 to the message. The characteristic of the node label is that as long as it can reach the egress node 106, the path for forwarding the message can be calculated by the SPF algorithm or other algorithms.

[0066] S350, the ingress node 101 sends the message to the network node 104 according to the local routing forwarding strategy.

[0067] For example, although the ingress node 101 can calculate the forwarding path of the message according to the second address of the egress node 106 and send the message to the egress node 106, if one or more nodes on the main path are configured with a local forwarding policy, such as an SR TE tunnel is configured between the ingress node 101 and the network node 104, then when the ingress node 101 receives the message, it will preferentially forward the message to the network node 104 through the SR TE tunnel. At this time, the ingress node 101 configured with the local forwarding policy will preferentially use the SR TE tunnel to forward the message to the network node 104.

[0068] S360 , the network node 104 receives the message sent by the ingress node 101 through the primary path, where the destination address of the message is the segment identifier of the node 105 .

[0069] For example, the next hop node of the network node 104 is 105 , and the destination address of the message sent by the network node 104 to the next hop sending node 105 is the segment identifier of 105 .

[0070] S370, if the node 105 fails, the network node 104 replaces the destination address of the message with the first address, and sends the message to the egress node 106 through the backup path.

[0071] For example, the node 105 can notify other nodes in the SR network through the IS-IS protocol or the OSPF protocol that the node 105 fails. The network node 104 obtains the message of the node 105 failure, and replaces A4::00 with C4::00 for the destination address of the received message, and the C4::00 carries the strict SPF tag, so the network node 104 should use the backup path established strictly according to the SPF algorithm to send the message to the egress node 106, and the above method avoids the occurrence of loops in forwarding messages.

[0072] like Figure 6 As shown, the present application provides a first node 600 for transmission in a network, the network comprising the first node 600, a second node and a third node. A first path from the second node to the third node is established in the network, wherein the first path is established according to the first segment identifier of the third node, and the first node 600 is a node on the first path. The first node may be Figure 1 Any node on the primary path or backup path in Figure 2 and Figure 3 The node includes: a receiving unit 601, a determining unit 602, an adding unit 603, a establishing unit 604 and a sending unit 605.

[0073] The receiving unit 601 is used to receive the second segment identifier of the third node sent by the third node, and is also used to receive a message sent by the second node through the first path, wherein the address of the message is the segment identifier of the next hop node of the first node.

[0074] The determining unit 602 is configured to determine that a next hop node of the first node on the first path fails.

[0075] The adding unit 603 is configured to add the second segment identifier to the message in response to a failure of the next hop node of the first node determined by the determining unit 602.

[0076] The establishing unit 604 establishes a second path according to the second segment identifier received by the receiving unit 601 .

[0077] The sending unit 605 sends the message to the third node through the second path established by the establishing unit 604.

[0078] In a possible implementation, the receiving unit 601 of the first node and the entry node receive a first segment identifier and a second segment identifier for identifying an exit node, wherein the entry node uses the first segment identifier to establish a first path for sending a message to the exit node. The entry node forwards the message to the first node via the first path, and the receiving unit 601 of the first node receives the message and forwards the message according to the segment identifier of the next hop node carried by the message. When the determination unit 602 of the first node determines that the network device of the next hop of the first node fails, the adding unit 603 of the first node adds the second identifier to the destination address of the message. The establishment unit 604 of the first node establishes a second path, and the sending unit 605 of the first node sends the message to the exit node according to the second path established by the establishment unit 604.

[0079] Optionally, the second segment identifier includes a path calculation identifier, wherein the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

[0080] In one possible implementation, the second segment identifier carries a path calculation identifier, such as a strict SPF tag. The strict SPF (English: Strict Shortest Path First) algorithm is also based on the SPF algorithm to decide the path for forwarding messages. However, the strict SPF requires that all nodes in the SR network must strictly follow the SPF algorithm to determine the path for sending messages, excluding the applicability of local policies. That is, the use priority of local policies such as SR TE tunnels or configured routing policies is lower than the requirement of strictly following the SPF path calculation, and the SPF algorithm is used to establish the second path.

[0081] Optionally, the establishing unit 604 is configured to establish the second path when the determining unit 602 determines that the next hop node of the first node on the first path fails, or to establish the second path before determining that the next hop node of the first node on the first path fails.

[0082] Optionally, the adding unit 603 adds the second segment identifier to the message, including: the adding unit 603 replaces the destination address of the message with the second segment identifier.

[0083] Optionally, the second segment identifier includes a path calculation identifier, and the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

[0084] Optionally, the first segment identifier and the second segment identifier are the sixth version of the Internet Protocol IPv6 address of the third node.

[0085] In this specific implementation, the specific implementation of the receiving unit 601, the determining unit 602, the adding unit 603, the establishing unit 604 and the sending unit 605 can refer to Figure 2 and Figure 3 The functions and implementation steps of the first node described in the foregoing will not be repeated for the sake of brevity.

[0086] by Figure 7 As an example, another hardware structure diagram of a first node 700 is provided for this application. The first node includes a network interface 701 and a processor 702, and may also include a memory 703.

[0087] The network interface 701 may be a wired interface, such as a fiber distributed data interface (English: Fiber Distributed Data Interface, abbreviated: FDDI) or an Ethernet (English: Ethernet) interface.

[0088] The processor 702 includes, but is not limited to, one or more of a central processing unit (CPU), a network processor (NP), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 702 is responsible for managing the bus 704 and general processing, and may also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 703 may be used to store data used by the processor 702 when performing operations.

[0089] The memory 703 may include but is not limited to a content-addressable memory (CAM), such as a ternary content-addressable memory (TCAM), or a random-access memory (RAM).

[0090] The memory 703 may also be integrated into the processor 702. If the memory 703 and the processor 702 are independent devices, the memory 573 and the processor 702 are connected, for example, the memory 703 and the processor 702 may communicate via a bus. The network interface 701 and the processor 702 may communicate via a bus, and the network interface 701 may also be directly connected to the processor 702.

[0091] The bus 704 may include any number of interconnected buses and bridges that link together various circuits including one or more processors 702 represented by the processor 702 and memory represented by the memory 703. The bus 704 may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and, therefore, will not be described further herein.

[0092] In a possible implementation, the network includes a first node, a second node, and a third node. A first path from the second node to the third node is established in the network, wherein the first path is established according to a first segment identifier of the third node, and the first node is a node on the first path. The first node includes: a network interface 701 and a processor 702.

[0093] The network interface 701 is used to receive the second segment identifier of the third node sent by the third node.

[0094] The network interface 701 is used to receive a message sent by the second node through the first path, wherein the address of the message is a segment identifier of a next hop node of the first node.

[0095] The processor 702 is configured to determine that a next hop node of the first node on the first path fails.

[0096] Processor 702 is used to add the second segment identifier to the message and send the message to the third node via a second path in response to the first node determining that the next hop node of the first node fails, wherein the second path is established by the first node based on the second segment identifier.

[0097] Optionally, the processor 702 establishes a second path when the first node determines that the next hop node of the first node on the first path fails, or the second path is established by the first node before the first node determines that the next hop node of the first node on the first path fails.

[0098] Optionally, when the processor 702 determines that a next-hop node of the first node on the first path fails, the destination address of the message is replaced with the second segment identifier.

[0099] Optionally, the second segment identifier includes a path calculation identifier, and the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

[0100] Optionally, the first segment identifier and the second segment identifier are the sixth version of the Internet Protocol IPv6 address of the third node.

[0101] In this specific implementation, the specific implementation of the processor 702 and the network interface 701 can refer to Figure 2 and Figure 3 For the sake of brevity, the functions and implementation methods of the first node are not described in detail.

[0102] like Figure 8 As shown, the present application provides a system for transmitting messages in a network, and the system includes a first node 801, a second node 802 and a third node 803.

[0103] The first node 801 may be Figure 1 The network node 104 in the method flow Figure 2 and Figure 3 The first node in can be realized Figure 2 and Figure 3 The function of the first node may also be Figure 6 or Figure 7 The first node in .

[0104] The first node 801 is used to receive the second segment identifier of the third node sent by the third node, and is also used to receive the message sent by the second node through the first path. The first node is also used to determine that the next hop node of the first node on the first path fails, in response to the first node determining that the next hop node of the first path

[0105] If the next hop node of the first node fails, the second segment identifier is added to the message, a second path is established according to the second segment identifier, and the message is sent to the third node through the second path, wherein the address of the message is the segment identifier of the next hop node of the first node.

[0106] The second node 802 is used to receive the first segment identifier of the third node, establish a first path from the second node to the third node according to the first segment identifier, and send a message to the first node through the first path.

[0107] The third node 803 is used to send the first segment identifier to the first node, send the second segment identifier to the second node, and receive a message sent by the first node through the second path.

[0108] Optionally, the second path is established by the first node when it is determined that the next hop node of the first node on the first path fails, or the second path is established by the first node before it is determined that the next hop node of the first node on the first path fails.

[0109] Optionally, the first node adding the second segment identifier to the message includes: the first node replacing the destination address of the message with the second segment identifier.

[0110] Optionally, the second segment identifier includes a path calculation identifier, and the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

[0111] Optionally, the first segment identifier and the second segment identifier are the sixth version of the Internet Protocol IPv6 address of the third node.

[0112] In this specific implementation, the specific implementation of the first node 801 can refer to Figure 2 and Figure 3 The functions and implementation steps of the first node described in are not repeated for the sake of brevity.

[0113] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned methods does not mean the order of execution. The execution order of each method should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0114] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0115] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0117] If the integrated unit is implemented in the form of hardware combined with software and sold or used as an independent product, the software can be stored in a computer-readable storage medium. Based on this understanding, some of the technical features that contribute to the prior art by the technical solution of the present invention can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, server, or node, etc.) to perform some or all of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium can be a USB flash drive, a mobile hard disk, a read-only memory (abbreviated as: ROM, English: Read-Only Memory), a random access memory (abbreviated as: RAM, English: Random Access Memory), a disk or an optical disk.

Claims

1. A method for transmitting a message in a network, wherein the network comprises a first node, a second node and a third node, characterized in that: A first path from the second node to the third node is established in the network, the first path is established according to a first segment identifier of the third node, the first node is a node on the first path, and the method includes: The first node receives the second segment identifier of the third node sent by the third node; The first node receives a message sent by the second node; The first node determines that a path from the first node to the third node on the first path fails; In response to the first node determining that a path from the first node to the third node on the first path fails, the first node adds the second segment identifier to the message and sends the message to the third node via a second path, wherein the second path is established by the first node based on the second segment identifier, and the second segment identifier includes a path calculation identifier, and the path calculation identifier is used to instruct the first node to establish the second path based on a shortest path first algorithm.

2. The method according to claim 1, characterized in that The sending the message to the third node through the second path includes: The message is sent to the third node through a second path according to the second segment identifier, where the second path is established by the first node before determining that a path from the first node to the third node on the first path fails.

3. The method according to claim 1 or 2, characterized in that: The first node adding the second segment identifier to the message includes: The first node replaces the destination address of the message with the second segment identifier.

4. The method according to claim 1 or 2, characterized in that: The first segment identifier and the second segment identifier are the sixth version of the Internet Protocol IPv6 address.

5. A first node for transmitting a message in a network, the network comprising a first node, a second node and a third node, characterized in that: A first path from the second node to the third node is established in the network, the first path is established according to the first segment identifier of the third node, the first node is a node on the first path, and the first node includes: a receiving unit, configured to receive the second segment identifier of the third node sent by the third node, and receive the message sent by the second node; a determining unit, configured to determine that a path from the first node to the third node on the first path fails; an adding unit, configured to add the second segment identifier to the message in response to a failure of a path from the first node to the third node on the first path determined by the determining unit; A sending unit, used to send the message to the third node via a second path, where the second path is established by the first node according to the second segment identifier, and the second segment identifier includes a path calculation identifier, and the path calculation identifier is used to instruct the first node to establish the second path according to a shortest path first algorithm.

6. The first node according to claim 5, characterized in that: The first node further includes an establishing unit, configured to establish a second path before determining that a path from the first node to the third node on the first path fails; The sending unit is configured to send the message to the third node through the second path according to the second segment identifier.

7. The first node according to claim 5 or 6, characterized in that: The adding unit adding the second segment identifier to the message includes: The adding unit replaces the destination address of the message with the second segment identifier.

8. The first node according to claim 5 or 6, characterized in that: The first segment identifier and the second segment identifier are the sixth version of the Internet Protocol IPv6 address.

9. A node for transmitting messages in a network, characterized in that: The node comprises: a processor and a memory coupled to the processor, wherein: The memory is used to store program instructions; The processor is used to call the program instructions in the memory to execute the method according to any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Constructing and implementing backup paths in autonomous systems

    CN101326762A

  • A system and method to implement joint server selection and path selection

    CN102972009A