WO2022266905A1 - 一种转发路径生成方法、装置、网络设备及存储介质 - Google Patents

一种转发路径生成方法、装置、网络设备及存储介质 Download PDF

Info

Publication number
WO2022266905A1
WO2022266905A1 PCT/CN2021/101914 CN2021101914W WO2022266905A1 WO 2022266905 A1 WO2022266905 A1 WO 2022266905A1 CN 2021101914 W CN2021101914 W CN 2021101914W WO 2022266905 A1 WO2022266905 A1 WO 2022266905A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
path
forwarding
network node
network
Prior art date
Application number
PCT/CN2021/101914
Other languages
English (en)
French (fr)
Inventor
常向青
陈梦骁
雷昭燕
林涛
李�昊
Original Assignee
新华三技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 新华三技术有限公司 filed Critical 新华三技术有限公司
Priority to JP2022577542A priority Critical patent/JP2023534126A/ja
Priority to EP21945362.8A priority patent/EP4156635A4/en
Priority to CN202180001610.1A priority patent/CN113748643A/zh
Priority to PCT/CN2021/101914 priority patent/WO2022266905A1/zh
Publication of WO2022266905A1 publication Critical patent/WO2022266905A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing

Definitions

  • the present application relates to the technical field of network communication, and in particular to a forwarding path generation method, device, network equipment and storage medium.
  • SR Segment Routing, segment routing
  • Flex-Algo is a source routing technology.
  • Flex-Algo is a SR IGP (Interior Gateway Protocol, Interior Gateway Protocol) flexible algorithm.
  • the forwarding path of the packet is generated based on network nodes with physical links in the same logical topology.
  • the path calculation algorithms supported by network nodes may change with the network environment, which may cause changes in the logical topology to which network nodes belong. For example, if the path calculation algorithm supported by two network nodes in a logical topology is changed and no longer belongs to the logical topology, the physical link between other network nodes in the logical topology will be interrupted, so it is difficult for the network nodes in the logical topology to Generate connected forwarding paths.
  • the purpose of the embodiments of the present application is to provide a forwarding path generation method, device, network device, and storage medium, so that a connected forwarding path can still be generated when the logical topology changes.
  • the specific technical scheme is as follows:
  • an embodiment of the present application provides a method for generating a forwarding path, the method including:
  • the first forwarding path is: from the specified source node in the first network node to the specified tail The forwarding path of the node;
  • the second forwarding path is: the topology information of all the first network nodes and the second network node The forwarding path determined by the topology information, the second network node does not support the target path calculation algorithm;
  • the second node is located after the first node along the direction of the second forwarding path.
  • the obtaining the second forwarding path from the source node to the tail node includes:
  • the fourth network node Based on the topology information of the fourth network node and the topology information of the second network node, generate a second forwarding subpath from the third network node to the tail node, where the fourth network node is: not located in the first network node a first network node forwarding the sub-path;
  • the determining the first network node connected to the second network node from the second forwarding path to obtain a node pair includes:
  • the second node in each node pair on the second forwarding path is updated to be the next-hop device of the first node in the node pair, and the connection from the source node to the tail node is obtained.
  • Forwarding paths including:
  • the generating the second forwarding sub-path from the third network node to the tail node based on the topology information of the fourth network node and the topology information of the second network node includes:
  • the method further includes:
  • a binding segment identification BSID is added between the first segment identification SID and the second SID, so that the first node in the first node pair calls the BSID corresponding
  • the SRv6 forwarding policy selects a forwarding path to the second node in the first node pair
  • the path calculation algorithm used by the forwarding policy corresponding to the BSID is: the target path calculation algorithm
  • the first node pair is: the The node pair in the connected forwarding path
  • the first SID is: the SID corresponding to the first node in the first node pair
  • the second SID is: the SID corresponding to the second node in the first node pair the SID.
  • the forwarding path generation method further includes:
  • the generating the second forwarding sub-path from the third network node to the tail node based on the topology information of the fourth network node and the topology information of the second network node includes:
  • the shortest path first algorithm is used to perform path calculation based on the topology information of the fourth network node and the topology information of the second network node, and generate a second forwarding sub-path from the third network node to the tail node.
  • the obtaining the second forwarding path from the source node to the tail node includes:
  • an embodiment of the present application provides an apparatus for generating a forwarding path, the apparatus including:
  • a topology acquisition module configured to acquire the topology information of the first network node supporting the target path calculation algorithm
  • a path generation module configured to use the target path calculation algorithm to perform path calculation on the topology information of the first network node, and generate a first forwarding path, where the first forwarding path is: specified from the first network node The forwarding path from the source node to the specified tail node;
  • a path obtaining module configured to obtain a second forwarding path from the source node to the tail node if there is a path interruption in the first forwarding path, the second forwarding path is: the topology of all first network nodes information and a forwarding path determined by topology information of a second network node, where the second network node does not support the target path calculation algorithm;
  • a node determination module configured to determine the first network node connected to the second network node from the second forwarding path to obtain a node pair
  • a next-hop updating module configured to update the second node in each node pair on the second forwarding path as the next-hop device of the first node in the node pair, and obtain the For the forwarding paths connected by the tail nodes, in each node pair, the second node along the direction of the second forwarding path is located behind the first node.
  • the path obtaining module includes:
  • a sub-path determination unit configured to determine a third network node where a path interruption occurs in the first forwarding path and a third network node from the source node to the third network node if there is a path interruption in the first forwarding path.
  • a subpath generating unit configured to generate a second forwarding subpath from the third network node to the tail node based on the topology information of the fourth network node and the topology information of the second network node, the fourth network node being: a first network node not located on the first forwarding sub-path;
  • the node determination module is specifically configured to determine the first network node connected to the second network node from the second forwarding sub-path to obtain a node pair;
  • the next-hop updating module is specifically configured to update the second node in each node pair on the second forwarding sub-path as the next-hop device of the first node in the node pair; connect the The first forwarding subpath and the updated second forwarding subpath obtain a forwarding path connected from the source node to the tail node.
  • the sub-path generation unit is specifically configured to use the target path calculation algorithm to perform path calculation based on the topology information of the fourth network node and the topology information of the second network node, and generate a second forwarding subpath from the third network node to the tail node;
  • the device also includes:
  • the BSID adding module is used to, after the next hop update module obtains the connected forwarding path from the source node to the tail node, when generating the segment list of the connected forwarding path, the first segment identifies
  • a binding segment identifier BSID is added between the SID and the second SID, so that the first node in the first node pair invokes the SRv6 forwarding strategy corresponding to the BSID to select a forwarding path to the second node in the first node pair
  • the path calculation algorithm used by the forwarding strategy corresponding to the BSID is: the target path calculation algorithm
  • the first node pair is: a node pair in the connected forwarding path
  • the first SID is: the The SID corresponding to the first node in the first node pair
  • the second SID is: the SID corresponding to the second node in the first node pair.
  • the forwarding path generating device further includes:
  • An information adding module configured to add a security authentication instruction and an instruction parameter of the security authentication instruction in the function field of the SID corresponding to each node in the first node pair when generating the segment list of the connected forwarding path .
  • the sub-path generating unit is specifically configured to use the shortest path first algorithm to perform path calculation based on the topology information of the fourth network node and the topology information of the second network node, and generate the sub-path from the first The second forwarding sub-path from the three network nodes to the tail node.
  • the path obtaining module is specifically configured to send a path request to the control node if the first forwarding path is interrupted; receive the second forwarding path fed back by the control node, and the first forwarding path
  • the second forwarding path is: the forwarding path from the source node to the tail node determined by the control node based on the topology information of all the first network nodes and the topology information of the second network node.
  • an embodiment of the present application provides a network device, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processing The device is prompted by the machine-executable instructions to: realize the steps of the forwarding path generation method described in any one of the above-mentioned first aspects.
  • the embodiment of the present application provides a machine-readable storage medium, which stores machine-executable instructions.
  • the machine-executable instructions When called and executed by a processor, the machine-executable instructions prompt the processor to: implement the above-mentioned first Steps of the method for generating a forwarding path according to any one of the aspects.
  • the target path calculation algorithm when applying the solution provided by the embodiment of the present application to generate a forwarding path, if the target path calculation algorithm is used to perform path calculation on the topology information of the first network node, the generated first forwarding path has a path interruption, and it does not mean that connectivity cannot be generated. Forwarding path, but with the help of the second network node that does not support the target path calculation algorithm, a connected forwarding path is generated. Based on this, even if a physical link between network nodes in the logical topology is interrupted due to a change in the logical topology, a connected forwarding path can be guaranteed to be generated.
  • Figure 1a is a schematic diagram of the first network topology provided by the embodiment of the present application.
  • Figure 1b is a schematic diagram of a second network topology provided by the embodiment of the present application.
  • FIG. 1c is a schematic diagram of a third network topology provided in the embodiment of the present application.
  • Figure 1d is a schematic diagram of a fourth network topology provided by the embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a first method for generating a forwarding path provided in an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a second forwarding path generation method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a first forwarding path generating device provided in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a second forwarding path generating device provided in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • each network node can publish its own supported path calculation algorithm.
  • the topology among network nodes supporting the same path calculation algorithm is regarded as a logical topology, so that the corresponding physical topology of the entire network is divided into multiple logical topologies.
  • Each logical topology can be called a network slice, and is used to provide users with services of different types or levels.
  • SR technology supports the source node in the forwarding path to insert segment information of the forwarding path in the message.
  • IPv6 Internet Protocol Version 6, Internet Protocol Version 6
  • the source node in the What is specifically inserted in is the fragment list, and for the convenience of description, the packet inserted into the fragment list is called an SRv6 packet.
  • the segment list of the forwarding path indicates the packet forwarding sequence of each network node in the forwarding path. In this way, after receiving the SRv6 message, the network node can forward the message according to the segment list carried in the SRv6 message.
  • the forwarding path is generated based on the network nodes in the logical topology, that is, the network nodes included in the generated forwarding path are all networks included in the same logical topology
  • the nodes, that is, the network nodes included in the generated forwarding path all support the same path calculation algorithm.
  • when generating a forwarding path it depends on the physical link between the network nodes in the logical topology. Once the physical link between the network nodes in the logical topology cannot connect the specified source node to the specified tail node, the forwarding path cannot be successfully generated. path.
  • Fig. 1a shows a schematic diagram of a physical topology of a network.
  • the black solid lines in the figure represent physical links between network nodes, and R0-R7 represent eight network nodes.
  • network nodes R0, R1, R2, R6, and R7 support path computation algorithm 1
  • network nodes R0, R4, R2, R3, and R7 support path computation algorithm 2.
  • R0, R1, R2, R6, and R7 belong to a logical topology. Based on the physical topology shown in FIG. 1a, the logical topology shown in FIG. 1b can be obtained. Because R3 and R5 do not support path calculation algorithm 1, the physical link between R2 and R6 is interrupted. Therefore, based on the physical links between R0, R1, R2, R6, and R7, a connected forwarding path from R0 to R7 cannot be generated.
  • R0, R4, R2, R3, and R7 belong to a logical topology. Based on the physical topology shown in Figure 1a, the logical topology shown in Figure 1c can be obtained. The logical topology is connected, and a connected forwarding path from R0 to R7 can be generated according to R0, R4, R2, R3, and R7.
  • the forwarding path generation method, device, network device, and storage medium provided in the embodiments of the present application are described in detail below through specific embodiments.
  • the execution subject of the embodiment of the present application is: a network node in which an FCE (Path Computation Element, Path Computation Element) resides, which is called an execution node for the convenience of expression.
  • the execution node may be a routing device, or a control node in the network, wherein the control node is a device with a control function in the network.
  • the execution node may be a specified source node in the forwarding path to be generated.
  • FIG. 2 is a schematic flowchart of a first method for generating a forwarding path provided by an embodiment of the present application, and the method includes the following steps S201-S205. Steps S201-S205 are executed by the above execution nodes.
  • Step S201 Obtain the topology information of the first network node supporting the target path calculation algorithm.
  • the network nodes can announce the path calculation algorithms they support in the SR technology-based network, so that the execution node can learn the path calculation algorithms supported by each network node. In view of this, in this step, the execution node can learn the first network node that supports the target path calculation algorithm through the announcement issued by each network node.
  • a network node can support one path calculation algorithm, or multiple path calculation algorithms.
  • the above-mentioned path calculation algorithm refers to an algorithm for calculating a forwarding path.
  • the above path calculation algorithm may be an algorithm such as Flex-Algo.
  • Each Flex-Algo algorithm can be represented by a value in the interval 128-255.
  • Step S202 Using a target path calculation algorithm, perform path calculation on the topology information of the first network node to generate a first forwarding path.
  • the above-mentioned first forwarding path is: a forwarding path from a specified source node in the first network node to a specified tail node.
  • the execution node may perform path calculation on the topology information of the first network node based on the constraints imposed by the target path calculation algorithm on path calculation.
  • Flex-Algo can contain a set of constraints.
  • the above-mentioned constraints may be constraints for link indicators, such as, the above-mentioned link indicators may be delay indicators; the above-mentioned constraints may be constraints for path calculation algorithms, such as, the above-mentioned path calculation algorithms may be SPF( Shortest Path First (Shortest Path First) algorithm; the above constraints can be constraints for topology information, such as specifying links that need to be included in the forwarding path or links that need to be removed.
  • the path calculation may be performed on the topology information of the first network node based on the constraints included in the Flex-Algo.
  • Step S203 If there is a path interruption in the first forwarding path, obtain a second forwarding path from the source node to the tail node.
  • the second forwarding path is: a forwarding path determined by topology information of all first network nodes and topology information of the second network node.
  • the second network node does not support the target path computation algorithm.
  • the second forwarding path may be a complete forwarding path from the source node to the tail node.
  • the second forwarding path may also be a set of multiple forwarding sub-paths. In this case, the multiple forwarding sub-paths can be connected to form a complete forwarding path from the source node to the tail node.
  • the generated first forwarding path is only a part of the forwarding path from the source node to the tail node.
  • the first forwarding path The last hop of is a first network node that is not connected to other first network nodes, rather than the aforementioned tail node.
  • the execution node may consider that there is a path interruption in the first forwarding path.
  • a physical link may exist between the first network nodes, and a physical link may also exist between the first network node and the second network node.
  • the execution node determines that there is a path interruption in the first forwarding path, it is no longer limited to the first network node, but also includes the second network node in the path calculation process, in order to pass the path between the first network node and the second network node.
  • the physical link between the second network node and the physical link between the second network node connects the two first network nodes.
  • the execution node may perform path calculation based on topology information of all first network nodes and topology information of all second network nodes, and then obtain the second forwarding path from the source node to the tail node.
  • the path calculation algorithm used for path calculation may be the shortest path first algorithm, or the above-mentioned target path calculation algorithm.
  • Step S204 From the second forwarding path, determine the first network node connected to the second network node to obtain a node pair.
  • the execution node can check each network node hop by hop along the direction from the source node to the tail node, and determine the first network node directly connected to the second network node as a segment The first node of the path, and determine the next first network node directly connected to the second network node as the second node of the sub-path.
  • the above-mentioned first node and the second node form a node pair, and the second node is located behind the first node along the direction of the second forwarding path.
  • Step S205 Update the second node in each node pair on the second forwarding path as the next-hop device of the first node in the node pair, and obtain a forwarding path connected from the source node to the tail node.
  • the second node of each node pair is located after the first node in the direction of the second forwarding path.
  • the second node in each node pair is updated as the next-hop device of the first node in the node pair, realizing the update of the second forwarding path, and the second network node can be changed from the first Excluded from the second forwarding path, only the first network node exists in the second forwarding path, which not only ensures that the network nodes in the forwarding path all come from the same logical topology, but also ensures that when the physical links between the first network nodes are not connected, success A forwarding path is generated.
  • FIG. 1d it shows a forwarding path generated by applying the solution provided by the embodiment of the present application when the forwarding path shown in FIG. 1b is interrupted.
  • R2 and R6 are connected by a dotted line, indicating that R2 is connected to R6 through the second network node.
  • the next-hop device can be known based on the segment list of the forwarding path carried in the packet header of the SRv6 packet. At this time Even if there is no physical link between the first network node and the next-hop device, the first network node can perform path calculation based on the shortest path first algorithm or target path calculation algorithm to obtain the forwarding path between itself and the next-hop device, thereby The SRv6 packet is forwarded to the next-hop device along the obtained forwarding path.
  • the target path calculation algorithm when applying the solution provided by the embodiment of the present application to generate a forwarding path, if the target path calculation algorithm is used to perform path calculation on the topology information of the first network node, the generated first forwarding path has a path interruption, and it does not mean that connectivity cannot be generated. Forwarding path, but with the help of the second network node that does not support the target path calculation algorithm, a connected forwarding path is generated. Based on this, even if a physical link between network nodes in the logical topology is interrupted due to a change in the logical topology, a connected forwarding path can be guaranteed to be generated.
  • the above-mentioned second forwarding path may not only be generated by the execution node, but also may be generated by a control node having a control function in the network.
  • the control node can not only obtain the path calculation algorithm announced by each network node in the network, but also collect the topology information of the network nodes in the network through BGP-LS (BGP Link-State).
  • the execution node obtains the second forwarding path, which may be implemented by the control node.
  • the execution node sends a path request to the control node, where the path request is used to request the control node to generate a second forwarding path.
  • the control node determines the second forwarding path from the source node to the tail node based on the topology information of all the first network nodes and the topology information of the second network node, and feeds back the second forwarding path to the execution node, so that the execution node obtains Second forwarding path.
  • control node may use the shortest path first algorithm to determine the second forwarding path, or may use the target path calculation algorithm to determine the second forwarding path, and of course may also use other algorithms to determine the second forwarding path, which is not limited in this application.
  • control node can grasp the path calculation algorithm supported by the network nodes in the network and the topology information of the network nodes, a more accurate forwarding path can be generated.
  • control node undertakes the work of generating the second forwarding path, thereby reducing the work pressure of the network node as the execution subject.
  • a schematic flowchart of a second forwarding path generation method is provided.
  • step S203 if there is a path interruption in the first forwarding path, Obtaining the second forwarding path from the source node to the tail node includes the following steps S203A and S203B.
  • Step S203A If there is a path interruption in the first forwarding path, determine the third network node where the path interruption occurs in the first forwarding path, and the first forwarding subpath from the source node to the third network node.
  • the execution node uses the target path calculation algorithm to generate the first forwarding path, it can detect the last hop in the first forwarding path to check whether the last hop is the above-mentioned tail node. If it is not the above-mentioned tail node, it means that the first There is a path interruption in the forwarding path, and the above last hop is called the third network node.
  • the above-mentioned first forwarding path is also the forwarding path from the source node to the third network node, therefore, the first forwarding path may be used as the first forwarding sub-path in this step.
  • Step S203B Based on the topology information of the fourth network node and the topology information of the second network node, generate a second forwarding sub-path from the third network node to the tail node.
  • the fourth network node is: the first network node not located in the first forwarding sub-path.
  • the first forwarding sub-path is only a forwarding path from the source node to the third network node, this forwarding path cannot forward the message to the tail node. Furthermore, since the third network node cannot communicate with the fourth network node, and the third network node may be able to communicate with the fourth network node by means of the second network node, in this step, based on the fourth The topology information of the network node and the topology information of the second network node generate a second forwarding sub-path from the third network node to the tail node.
  • the execution node determines the first network node connected to the second network node from the second forwarding path, and obtains a node pair, including the following step S204A.
  • Step S204A From the second forwarding sub-path, determine the first network node connected to the second network node to obtain a node pair.
  • the first forwarding subpath is a forwarding path generated for the first network node using the target path calculation algorithm, there must be no first network node connected to the second network node in the first forwarding subpath.
  • this step only the first network node connected to the second network node may be determined in the second forwarding sub-path, so as to obtain the node pair.
  • the execution node may check each network node hop by hop along the direction from the third network node to the tail node, determine the first network node directly connected to the second network node as the first node, and determine the next The first network node directly connected to the second network node serves as the second node.
  • the first node and the second node above form a node pair.
  • the execution node updates the second node in each node pair on the second forwarding path as the next-hop device of the first node in the node pair, and obtains the forwarding link connected from the source node to the tail node.
  • the path includes the following steps S205A and S205B.
  • Step S205A Update the second node in each node pair on the second forwarding subpath as the next-hop device of the first node in the node pair.
  • the execution node uses the second node in each node pair as the next-hop device of the first node in the node pair to update the second forwarding subpath, and the second network node can be removed from the second forwarding subpath Elimination, so that only the first network node exists in the second forwarding sub-path.
  • Step S205B Connect the first forwarding subpath and the updated second forwarding subpath to obtain a forwarding path connected from the source node to the tail node.
  • the first forwarding subpath is the forwarding path from the source node to the third network node
  • the second forwarding subpath is the forwarding path from the third network node to the tail node
  • the paths are all part of the forwarding path from the source node to the tail node, and there is a third network node in both the first forwarding subpath and the second forwarding subpath, therefore, the first forwarding subpath and the second forwarding subpath can be connected through the third network node
  • the second forwarding sub-path obtains a complete forwarding path from the source node to the tail node.
  • the first forwarding path obtained by using the target path calculation algorithm is used as the first forwarding sub-path, which ensures that the network nodes in the first forwarding sub-path are all the first network nodes, and then The node pair is only determined for the second forwarding sub-path, and the efficiency of generating the forwarding path is improved under the premise of ensuring that the determined node pair is accurate.
  • step S203B when the execution node generates the second forwarding subpath from the third network node to the tail node based on the topology information of the fourth network node and the topology information of the second network node, it may A target path calculation algorithm is used to perform path calculation on the topology information of the fourth network node and the topology information of the second network node to generate a second forwarding sub-path from the third network node to the tail node.
  • the second forwarding sub-path is generated using the target path calculation algorithm, in order to ensure that the first node in each node pair forwards the SRv6 message, it can accurately forward the SRv6 message to the second node in the node pair, It is necessary to enable the first node to know the path calculation algorithm adopted when generating the second forwarding sub-path.
  • the path calculation algorithm used by the forwarding strategy corresponding to the above BSID is: the target path calculation algorithm
  • the first node pair is: the node pair in the connected forwarding path
  • the first SID is: the SID corresponding to the first node in the first node pair
  • the second SID is: the SID corresponding to the second node in the first node pair.
  • the above segment list stores multiple SIDs, and each SID corresponds to a network node in the forwarding path.
  • the SID corresponding to each network node may store: the identifier of the network node, the operation instruction that the network node needs to execute on the SRv6 message, and the instruction parameters of the above operation instruction.
  • the first node in the node pair can perform path selection according to the second forwarding sub-path before the update, and then forward the SRv6 message to The second node in the node pair can effectively ensure accurate forwarding of SRv6 packets.
  • the execution node since the SRv6 message needs to pass through the second network node when forwarding the SRv6 message from the first node in each node pair to the second node, in order to ensure the security of the forwarded SRv6 message, the execution node generates a connected
  • the safety authentication instruction and the instruction parameters of the safety authentication instruction may also be added to the function field of the SID corresponding to each node in the first node pair.
  • the first node and the second node in each node pair after the first node and the second node in each node pair receive the SRv6 message to be forwarded, they can execute the security authentication command carried in the SID according to the instruction parameters carried in the SID, so as to ensure that the SRv6 message to be forwarded text security.
  • This can also ensure that when the source node adds the SID to the message, the security authentication instruction and the instruction parameters of the security authentication instruction are successfully added to the message.
  • the above security authentication instruction may be a security authentication instruction for IPSec, or may be a security authentication instruction for SRv6HMAC.
  • the shortest path first algorithm may be used as the default path calculation algorithm.
  • the execution node based on the topology information of the fourth network node and the topology information of the second network node
  • the shortest path first algorithm may be used to perform path calculation on the topology information of the fourth network node and the topology information of the second network node, and generate a path from the third network node A second forwarding subpath from the node to the tail node. Since the shortest path first algorithm is a default path calculation algorithm, the node may not be notified separately that the path calculation algorithm adopted by the first node in the pair to generate the second forwarding sub-path is the shortest path first algorithm.
  • the first node in the node pair can directly select a path according to the shortest path first algorithm, and then forward the SRv6 message to the second node in the node pair. In this way, not only can the SRv6 packet be forwarded accurately, but also the amount of information carried in the SRv6 packet can be reduced.
  • Network nodes R0, R1, R2, R6, and R7 all support path algorithm 1, that is, the first network nodes include: R0, R1, R2, R6, and R7, and thus the second network nodes include: R3, R4, and R5.
  • the specified source node is R0, and the specified tail node is: R7.
  • path calculation algorithm 1 is used to perform path calculation on the topology information of R0, R1, R2, R6, and R7, and the generated first forwarding path is R0->R1->R2, excluding the path R6->R7.
  • the last hop of the first forwarding path is R2, not R7, indicating that there is a path interruption in the first forwarding path.
  • the third network node is R2, and the first forwarding subpath is: R0->R1->R2.
  • the fourth network node includes: R6 and R7.
  • the shortest path first algorithm is used to perform path calculation on the topology information of R6, R7, R3, R4, and R5 to generate the second forwarding sub-path. If the generated second forwarding subpath is: R2->R3->R6->R7, then a node pair includes R2 and R6, the first node in the node pair is R2, and the second node is R6. If R6 in the second forwarding subpath is updated to be the next-hop device of R2, then the updated second forwarding subpath is: R2->R6->R7.
  • the connected forwarding path obtained by connecting the first forwarding subpath and the second forwarding subpath is: R0->R1->R2->R6->R7.
  • the segment list sequentially includes: SIDs corresponding to R0, R1, R2, R6, and R7.
  • R2 receives the SRv6 message, it can be known from the segment list that the next-hop device is: R6. Since R2 can know that there is no physical link with R6, when R2 forwards SRv6 packets to R6, it uses the shortest path first algorithm to calculate the path for forwarding SRv6 packets to R6. SRv6 packets, so that R2 forwards SRv6 packets to R3, and then R3 forwards SRv6 packets to R6.
  • the path calculation algorithm 1 is used to perform path calculation on the topology information of R6, R7, R3, R4, and R5 to generate the second forwarding sub-path. If the generated second forwarding subpath is: R2->R5->R6->R7, then a node pair includes R2 and R6, the first node in the node pair is R2, and the second node is R6. If R6 in the second forwarding subpath is updated to be the next-hop device of R2, then the updated second forwarding subpath is: R2->R6->R7.
  • the connected forwarding path obtained by connecting the first forwarding subpath and the second forwarding subpath is: R0->R1->R2->R6->R7.
  • the segment list when generating the segment list of the connected forwarding path, the segment list includes: the SIDs corresponding to R0, R1, R2, R6, and R7 in sequence, and the SID corresponding to R2 and the SID corresponding to R6 are added.
  • BSID When R2 receives the SRv6 message, it can be known from the segment list that the next-hop device is: R6. Since R2 can know that there is no physical link with R6, when R2 forwards the SRv6 packet to R6, it invokes the SRv6 forwarding policy corresponding to the BSID to select a forwarding path to R6.
  • path calculation algorithm 1 Since the path calculation algorithm used by the SRv6 forwarding policy corresponding to the BSID is: path calculation algorithm 1, it can be calculated that R2 forwards the SRv6 message to R6 through R5, so that R2 forwards the SRv6 message to R5, and then R5 forwards it to R6 SRv6 packets.
  • an embodiment of the present application further provides a device for generating a forwarding path.
  • FIG. 4 is a schematic structural diagram of a device for generating a forwarding path provided in an embodiment of the present application.
  • the device includes:
  • a topology acquisition module 401 configured to acquire topology information of the first network node supporting the target path calculation algorithm
  • the path generation module 402 is configured to use the target path calculation algorithm to perform path calculation on the topology information of the first network node to generate a first forwarding path, and the first forwarding path is: specified from the first network node The forwarding path from the source node to the specified tail node;
  • a path obtaining module 403, configured to obtain a second forwarding path from the source node to the tail node if there is a path interruption in the first forwarding path, and the second forwarding path is: by all first network nodes a forwarding path determined by topology information and topology information of a second network node, where the second network node does not support the target path calculation algorithm;
  • a node determination module 404 configured to determine the first network node connected to the second network node from the second forwarding path, and obtain a node pair;
  • a next-hop updating module 405, configured to update the second node in each node pair on the second forwarding path as the next-hop device of the first node in the node pair, and obtain the For the forwarding path connected to the tail node, the second node in each node pair along the direction of the second forwarding path is located behind the first node.
  • the target path calculation algorithm when applying the solution provided by the embodiment of the present application to generate a forwarding path, if the target path calculation algorithm is used to perform path calculation on the topology information of the first network node, the generated first forwarding path has a path interruption, and it does not mean that connectivity cannot be generated. Forwarding path, but with the help of the second network node that does not support the target path calculation algorithm, a connected forwarding path is generated. Based on this, even if a physical link between network nodes in the logical topology is interrupted due to a change in the logical topology, a connected forwarding path can be guaranteed to be generated.
  • the path obtaining module 403 includes:
  • a sub-path determination unit 403A configured to determine a third network node where a path interruption occurs in the first forwarding path and a route from the source node to the third network node if there is a path interruption in the first forwarding path. the first forwarding sub-path;
  • the subpath generating unit 403B is configured to generate a second forwarding subpath from the third network node to the tail node based on the topology information of the fourth network node and the topology information of the second network node, the fourth network
  • the node is: a first network node not located in the first forwarding sub-path;
  • the node determining module 404 is specifically configured to determine the first network node connected to the second network node from the second forwarding sub-path to obtain a node pair;
  • the next hop update module 405 is specifically configured to update the second node in each node pair on the second forwarding subpath as the next hop device of the first node in the node pair;
  • the first forwarding subpath and the updated second forwarding subpath are obtained to obtain a forwarding path connected from the source node to the tail node.
  • the first forwarding path obtained by using the target path calculation algorithm is used as the first forwarding sub-path, which ensures that the network nodes in the first forwarding sub-path are all the first network nodes, and then The node pair is only determined for the second forwarding sub-path, and the efficiency of generating the forwarding path is improved under the premise of ensuring that the determined node pair is accurate.
  • the sub-path generation unit 403B is specifically configured to use the target path calculation algorithm to perform path calculation based on the topology information of the fourth network node and the topology information of the second network node, and generate the path from a second forwarding subpath from the third network node to the tail node;
  • the device also includes:
  • the BSID adding module is used to, after the next hop update module obtains the connected forwarding path from the source node to the tail node, when generating the segment list of the connected forwarding path, the first segment identifies
  • a binding segment identifier BSID is added between the SID and the second SID, so that the first node in the first node pair invokes the SRv6 forwarding strategy corresponding to the BSID to select a forwarding path to the second node in the first node pair
  • the path calculation algorithm used by the forwarding strategy corresponding to the BSID is: the target path calculation algorithm
  • the first node pair is: a node pair in the connected forwarding path
  • the first SID is: the The SID corresponding to the first node in the first node pair
  • the second SID is: the SID corresponding to the second node in the first node pair.
  • the first node in the node pair can perform path selection according to the second forwarding sub-path before the update, and then forward the SRv6 message to The second node in the node pair can effectively ensure accurate forwarding of SRv6 packets.
  • the device also includes:
  • An information adding module configured to add a security authentication instruction and an instruction parameter of the security authentication instruction in the function field of the SID corresponding to each node in the first node pair when generating the segment list of the connected forwarding path .
  • the first node and the second node in each node pair receive the SRv6 message to be forwarded, they can execute the security authentication command carried in the SID according to the instruction parameters carried in the SID, so as to ensure that the SRv6 message to be forwarded text security.
  • the sub-path generation unit 403B is specifically configured to use the shortest path first algorithm to perform path calculation based on the topology information of the fourth network node and the topology information of the second network node, and generate the path from the A second forwarding subpath from the third network node to the tail node.
  • the first node in the node pair can directly select a path according to the shortest path first algorithm, and then forward the SRv6 message to the second node in the node pair. In this way, not only can the SRv6 packet be forwarded accurately, but also the amount of information carried in the SRv6 packet can be reduced.
  • the path obtaining module 403 is specifically configured to send a path request to the control node if there is a path interruption in the first forwarding path; receive the second forwarding path fed back by the control node, and the The second forwarding path is: a forwarding path from the source node to the tail node determined by the control node based on the topology information of all first network nodes and the topology information of the second network node.
  • control node can grasp the path calculation algorithm supported by the network nodes in the network and the topology information of the network nodes, a more accurate forwarding path can be generated.
  • control node undertakes the work of generating the second forwarding path, thereby reducing the work pressure of the network node as the execution subject.
  • an embodiment of the present application further provides a network device.
  • FIG. 6 provides a schematic structural diagram of a network device
  • the network device includes: a processor 601 and a machine-readable storage medium 602, and the machine-readable storage medium 602 stores information that can be executed by the processor 601. machine-executable instructions, the processor 601 is prompted by the machine-executable instructions to implement the steps of the method for generating a forwarding path described in the foregoing method embodiments.
  • an embodiment of the present application further provides a machine-readable storage medium storing machine-executable instructions, and when called and executed by a processor, the machine-executable instructions prompt the processing Device: implementing the steps of the method for generating the forwarding path described in the foregoing method embodiments.
  • an embodiment of the present application further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the steps of the method for generating a forwarding path described in the foregoing method embodiments.
  • the above-mentioned machine-readable storage medium may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one magnetic disk memory.
  • NVM non-Volatile Memory
  • the above-mentioned machine-readable storage medium may also be at least one storage device located away from the above-mentioned processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种转发路径生成方法、装置、网络设备及存储介质,涉及网络通信技术领域,上述方法包括:获取支持目标路径计算算法的第一网络节点的拓扑信息;采用目标路径计算算法,对第一网络节点的拓扑信息进行路径计算,生成第一转发路径;若第一转发路径存在路径中断,获得从源节点到尾节点的第二转发路径;从第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对;将第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从源节点到尾节点连通的转发路径,各节点对中沿第二转发路径的方向第二个节点位于第一个节点之后。应用本申请实施例提供的方案,在逻辑拓扑发生变化的情况下,依然能够生成连通的转发路径。

Description

一种转发路径生成方法、装置、网络设备及存储介质 技术领域
本申请涉及网络通信技术领域,特别是涉及一种转发路径生成方法、装置、网络设备及存储介质。
背景技术
SR(Segment Routing,分段路由)技术是一种源路由技术。基于SR中Flex-Algo技术,网络中各网络节点可以支持不同的路径计算算法,支持同一路径计算算法的网络节点间的拓扑视为一个逻辑拓扑。其中,Flex-Algo是一种SR IGP(Interior Gateway Protocol,内部网关协议)灵活算法。
在基于SR技术的网络中转发报文时,报文的转发路径基于同一逻辑拓扑内存在物理链路的网络节点生成。
然而,实际应用中网络节点支持的路径计算算法可能会随网络环境而变化,使得网络节点所属的逻辑拓扑发生变化。例如,一个逻辑拓扑中两个网络节点所支持的路径计算算法改变,不再属于该逻辑拓扑,导致该逻辑拓扑中其他网络节点间的物理链路中断,这样根据该逻辑拓扑中的网络节点难以生成连通的转发路径。
因此,需要提供一种在逻辑拓扑发生变化的情况下,依然能够生成连通的转发路径的方案。
发明内容
本申请实施例的目的在于提供一种转发路径生成方法、装置、网络设备及存储介质,以在逻辑拓扑发生变化的情况下,依然能够生成连通的转发路径。具体技术方案如下:
第一方面,本申请实施例提供了一种转发路径生成方法,所述方法包括:
获取支持目标路径计算算法的第一网络节点的拓扑信息;
采用所述目标路径计算算法,对所述第一网络节点的拓扑信息进行路径计算,生成第一转发路径,所述第一转发路径为:从第一网络节点中指定的源节点到指定的尾节点的转发路径;
若所述第一转发路径存在路径中断,获得从所述源节点到所述尾节点的第二转发路径,所述第二转发路径为:由所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的转发路径,所述第二网络节点不支持所述目标路径计算算法;
从所述第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
将所述第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从所述源节点到所述尾节点连通的转发路径,各节点对中沿所述第二转发路径的方向第二个节点位于第一个节点之后。
本申请的一个实施例中,所述获得从所述源节点到所述尾节点的第二转发路径,包括:
确定所述第一转发路径中发生路径中断的第三网络节点、以及从所述源节点到所述第三网络节点的第一转发子路径;
基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点 的第二转发子路径,所述第四网络节点为:未位于所述第一转发子路径的第一网络节点;
所述从所述第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对,包括:
从所述第二转发子路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
所述将所述第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从所述源节点到所述尾节点连通的转发路径,包括:
将所述第二转发子路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备;
连接所述第一转发子路径和更新后的第二转发子路径,得到从所述源节点到所述尾节点连通的转发路径。
本申请的一个实施例中,所述基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,包括:
采用所述目标路径计算算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径;
在所述连接所述第一转发子路径和更新后的第二转发子路径,得到从所述源节点到所述尾节点连通的转发路径的步骤之后,还包括:
在生成所述连通的转发路径的分段列表时,在第一段标识SID与第二SID之间增加绑定段标识BSID,以使得第一节点对中第一个节点调用所述BSID对应的SRv6转发策略选择到所述第一节点对中第二个节点的转发路径,所述BSID对应的转发策略使用的路径计算算法为:所述目标路径计算算法,所述第一节点对为:所述连通的转发路径中的节点对,所述第一SID为:所述第一节点对中第一个节点对应的SID,第二个SID为:所述第一节点对中第二个节点对应的SID。
本申请的一个实施例中,所述转发路径生成方法还包括:
在生成所述连通的转发路径的分段列表时,在所述第一节点对中各节点对应的SID的功能字段中增加安全认证指令和所述安全认证指令的指令参数。
本申请的一个实施例中,所述基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,包括:
采用最短路径优先算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径。
本申请的一个实施例中,所述获得从所述源节点到所述尾节点的第二转发路径,包括:
向控制节点发送路径请求;
接收所述控制节点反馈的第二转发路径,所述第二转发路径为:所述控制节点基于所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的、从所述源节点到所述尾节点的转发路径。
第二方面,本申请实施例提供了一种转发路径生成装置,所述装置包括:
拓扑获取模块,用于获取支持目标路径计算算法的第一网络节点的拓扑信息;
路径生成模块,用于采用所述目标路径计算算法,对所述第一网络节点的拓扑信息进行路径计算, 生成第一转发路径,所述第一转发路径为:从第一网络节点中指定的源节点到指定的尾节点的转发路径;
路径获得模块,用于若所述第一转发路径存在路径中断,获得从所述源节点到所述尾节点的第二转发路径,所述第二转发路径为:由所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的转发路径,所述第二网络节点不支持所述目标路径计算算法;
节点确定模块,用于从所述第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
下一跳更新模块,用于将所述第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从所述源节点到所述尾节点连通的转发路径,各节点对中沿所述第二转发路径的方向第二个节点位于第一个节点之后。
本申请的一个实施例中,所述路径获得模块,包括:
子路径确定单元,用于若所述第一转发路径存在路径中断,确定所述第一转发路径中发生路径中断的第三网络节点、以及从所述源节点到所述第三网络节点的第一转发子路径;
子路径生成单元,用于基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,所述第四网络节点为:未位于所述第一转发子路径的第一网络节点;
所述节点确定模块,具体用于从所述第二转发子路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
所述下一跳更新模块,具体用于将所述第二转发子路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备;连接所述第一转发子路径和更新后的第二转发子路径,得到从所述源节点到所述尾节点连通的转发路径。
本申请的一个实施例中,所述子路径生成单元,具体用于采用所述目标路径计算算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径;
所述装置还包括:
BSID增加模块,用于在所述下一跳更新模块得到从所述源节点到所述尾节点连通的转发路径之后,在生成所述连通的转发路径的分段列表时,在第一段标识SID与第二SID之间增加绑定段标识BSID,以使得第一节点对中第一个节点调用所述BSID对应的SRv6转发策略选择到所述第一节点对中第二个节点的转发路径,所述BSID对应的转发策略使用的路径计算算法为:所述目标路径计算算法,所述第一节点对为:所述连通的转发路径中的节点对,所述第一SID为:所述第一节点对中第一个节点对应的SID,第二个SID为:所述第一节点对中第二个节点对应的SID。
本申请的一个实施例中,所述转发路径生成装置还包括:
信息增加模块,用于在生成所述连通的转发路径的分段列表时,在所述第一节点对中各节点对应的SID的功能字段中增加安全认证指令和所述安全认证指令的指令参数。
本申请的一个实施例中,所述子路径生成单元,具体用于采用最短路径优先算法,基于第四网络节 点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径。
本申请的一个实施例中,所述路径获得模块,具体用于若所述第一转发路径存在路径中断,向控制节点发送路径请求;接收所述控制节点反馈的第二转发路径,所述第二转发路径为:所述控制节点基于所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的、从所述源节点到所述尾节点的转发路径。
第三方面,本申请实施例提供了一种网络设备,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令促使:实现上述第一方面任一所述的转发路径生成方法步骤。
第四方面,本申请实施例提供了一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:实现上述第一方面任一所述的转发路径生成方法步骤。
由以上可见,应用本申请实施例提供的方案生成转发路径时,若采用目标路径计算算法对第一网络节点的拓扑信息进行路径计算,生成的第一转发路径存在路径中断,并非认为不能生成连通的转发路径,而是借助于不支持目标路径计算算法的第二网络节点,生成连通的转发路径。基于此,即便由于逻辑拓扑发生变化而引起该逻辑拓扑内网络节点间的物理链路中断,也能够保证生成连通的转发路径。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,本领域普通技术人员来讲还可以根据这些附图获得其他的附图。
图1a为本申请实施例提供的第一种网络拓扑示意图;
图1b为本申请实施例提供的第二种网络拓扑示意图;
图1c为本申请实施例提供的第三种网络拓扑示意图;
图1d为本申请实施例提供的第四种网络拓扑示意图;
图2为本申请实施例提供的第一种转发路径生成方法的流程示意图;
图3为本申请实施例提供的第二种转发路径生成方法的流程示意图;
图4为本申请实施例提供的第一种转发路径生成装置的结构示意图;
图5为本申请实施例提供的第二种转发路径生成装置的结构示意图;
图6为本申请实施例提供的一种网络设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。本领域普通技术人员基于本申请中的实施例所获得的所有其他实施例,都属于本申请保护的范围。另外,以下所描述的实施例仅用于说明和解释本申请实施例提供的技术方案,并不用于限定本申请。并且在不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。
现有技术中,针对基于SR中Flex-Algo技术的网络生成转发路径时,依赖同一逻辑拓扑内网络节点间的物理链路,而逻辑拓扑发生改变,可能会引起逻辑拓扑内网络节点间的物理链路中断,进而导致难以生成连通的转发路径。为解决这一技术问题,本申请实施例提供了一种转发路径生成方法、装置、网络设备以及存储介质。
下面结合图1a-图1c,通过具体实例对上述技术问题进行说明。
在基于SR中Flex-Algo技术的网络中,各个网络节点可以发布自身所支持的路径计算算法。支持同一路径计算算法的网络节点间的拓扑视为一个逻辑拓扑,这样整个网络对应的物理拓扑被划分为多个逻辑拓扑。每一逻辑拓扑可以称为一个网络分片,用于为用户提供不同种类或者不同级别的业务。
另外,SR技术支持转发路径中的源节点在报文中插入转发路径的分段信息,网络节点间基于IPv6(Internet Protocol Version 6,互联网协议第6版)通信的情况下,源节点在报文中具体插入的是分段列表,为便于描述将插入分段列表后的报文称为SRv6报文。转发路径的分段列表指示该转发路径中各个网络节点进行报文转发的顺序。这样网络节点接收到SRv6报文后,能够按照SRv6报文中携带的分段列表进行报文转发。
鉴于上述情况,在转发报文之前需要先生成转发路径。相关技术中,针对基于SR中Flex-Algo技术的网络生成转发路径时,基于逻辑拓扑内的网络节点生成转发路径,也就是,所生成的转发路径包括的网络节点均为同一逻辑拓扑包括的网络节点,也即,所生成的转发路径包括的网络节点均支持同一路径计算算法。另外,生成转发路径时,依赖于逻辑拓扑内网络节点间的物理链路,一旦逻辑拓扑内网络节点间的物理链路不能够使得指定的源节点与指定的尾节点连通,则不能成功生成转发路径。
参见图1a,图1a示出了一种网络的物理拓扑示意图。图中的黑色实线表示网络节点间的物理链路,R0-R7表示八个网络节点。
假设,网络节点R0、R1、R2、R6、R7支持路径计算算法1,网络节点R0、R4、R2、R3、R7支持路径计算算法2。
这样R0、R1、R2、R6、R7属于一个逻辑拓扑,基于图1a所示的物理拓扑,可以得到如图1b所示的逻辑拓扑。由于R3和R5不支持路径计算算法1,所以,R2和R6间物理链路中断。因此,基于R0、R1、R2、R6、R7间的物理链路,不能生成从R0到R7连通的转发路径。
R0、R4、R2、R3、R7属于一个逻辑拓扑,基于图1a所示的物理拓扑,可以得到如图1c所示的逻辑拓扑。该逻辑拓扑是连通的,依据R0、R4、R2、R3、R7能够生成从R0到R7连通的转发路径。
下面通过具体实施例,对本申请实施例提供的转发路径生成方法、装置、网络设备及存储介质分别进行详细说明。
首先对本申请实施例的执行主体进行说明。
本申请实施例的执行主体为:驻有FCE(Path Computation Element,路径计算元素)的网络节点,为便于表述称为执行节点。该执行节点可以是路由设备,也可以是网络中的控制节点,其中,上述控制节点为网络中具有控制功能的设备。
在上述执行节点为路由设备的情况下,上述执行节点可以是待生成的转发路径中指定的源节点。
参见图2,图2为本申请实施例提供的第一种转发路径生成方法的流程示意图,该方法包括以下步骤S201-S205。步骤S201-S205由上述执行节点执行。
步骤S201:获取支持目标路径计算算法的第一网络节点的拓扑信息。
网络节点可以在基于SR技术的网络中通告其所支持的路径计算算法,这样执行节点可以获知各网络节点所支持的路径计算算法。鉴于此,本步骤中,执行节点可以通过各网络节点发布的通告,获知支持目标路径计算算法的第一网络节点。
一个网络节点可以支持一种路径计算算法,也可以支持多种路径计算算法。
其中,上述路径计算算法是指用于计算转发路径的算法。
例如,上述路径计算算法可以是Flex-Algo等算法。每一种Flex-Algo算法可以采用128-255区间的一个值表示。
步骤S202:采用目标路径计算算法,对第一网络节点的拓扑信息进行路径计算,生成第一转发路径。
其中,上述第一转发路径为:从第一网络节点中指定的源节点到指定的尾节点的转发路径。
具体的,执行节点可以基于目标路径计算算法对路径计算的约束条件,对第一网络节点的拓扑信息进行路径计算。
例如,Flex-Algo可以包含一组约束条件。其中,上述约束条件可以是针对链路指标的约束条件,如,上述链路指标可以是时延指标;上述约束条件可以是针对路径计算算法的约束条件,如,上述路径计算算法可以是SPF(Shortest Path First,最短路径优先)算法;上述约束条件可以是针对拓扑信息的约束条件,如,规定转发路径中需要包含的链路或者需要去掉的链路等。基于此,在上述目标路径计算算法为Flex-Algo的情况下,可以基于Flex-Algo包含的约束条件对第一网络节点的拓扑信息进行路径计算。
步骤S203:若第一转发路径存在路径中断,获得从源节点到尾节点的第二转发路径。
其中,第二转发路径为:由所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的转发路径。第二网络节点不支持目标路径计算算法。
第二转发路径可以是从源节点到尾节点的一条完整的转发路径。第二转发路径也可以是多条转发子路径的集合,这种情况下,上述多条转发子路径能够连接形成从源节点到尾节点的完整转发路径。
具体的,若第一网络节点间的物理链路不能够使得源节点与尾节点连通,则所生成的第一转发路径仅仅为从源节点到尾节点的部分转发路径,这时第一转发路径的最后一跳是与其它第一网络节点不连通的第一网络节点,而不是上述尾节点。鉴于上述情况,若第一转发路径中最后一跳不是上述尾节点,执行节点可以认为第一转发路径存在路径中断。
网络中除了存在第一网络节点外,还存在第二网络节点。第一网络节点之间可能存在物理链路,第一网络节点与第二网络节点之间也可能存在物理链路。本步骤中,执行节点确定第一转发路径存在路径中断后,不再局限于第一网络节点,而是将第二网络节点也纳入路径计算过程,以期通过第一网络节点 与第二网络节点之间的物理链路、第二网络节点与第二网络节点之间的物理链路,连通两个第一网络节点。
本申请的一个实施例中,执行节点可以基于所有第一网络节点的拓扑信息和所有第二网络节点的拓扑信息,进行路径计算,进而获得从源节点到尾节点的第二转发路径。
其中,进行路径计算时所采用的路径计算算法可以是最短路径优先算法,也可以是上述目标路径计算算法等。
步骤S204:从第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对。
第二转发路径中可能存在一段由第二网络节点连通的子路径,也可能存在多段由第二网络节点连通的子路径。
鉴于上述情况,在得到第二转发路径后,执行节点可以沿着从源节点到尾节点的方向,逐跳检查各网络节点,确定与第二网络节点直接连接的第一网络节点,作为一段子路径的第一个节点,并确定下一个与第二网络节点直接连接的第一网络节点,作为该子路径的第二个节点。上述第一个节点和第二个节点形成一个节点对,且沿第二转发路径的方向第二节点位于第一个节点之后。
这样在第二转发路径中存在多段子路径的情况下,本步骤可以得到多个节点对。
步骤S205:将第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从源节点到尾节点连通的转发路径。
各节点对中沿第二转发路径的方向第二个节点位于第一个节点之后。
在第二转发路径中,将每一节点对中的第二个节点更新为该节点对中第一个节点的下一跳设备,实现了第二转发路径更新,可以将第二网络节点从第二转发路径中剔除,第二转发路径中仅存在第一网络节点,这样不仅保证转发路径中的网络节点均来自同一逻辑拓扑,也保证第一网络节点间物理链路不连通的情况下,成功生成了转发路径。
参见图1d,示出了图1b所示转发路径存在路径中断的情况下,应用本申请实施例提供的方案生成的转发路径。图1d中R2与R6之间以虚线连接,表示R2通过第二网络节点与R6连通。
在依照前述步骤生成转发路径后,转发路径中的各第一网络节点转发SRv6报文时,基于SRv6报文的报文头携带的转发路径的分段列表,能够获知下一跳设备,这时即便第一网络节点与下一跳设备间不存在物理链路,第一网络节点也能够基于最短路径优先算法或者目标路径计算算法进行路径计算,获得自身与下一跳设备间的转发路径,从而沿所获得的转发路径将SRv6报文转发至下一跳设备。
由以上可见,应用本申请实施例提供的方案生成转发路径时,若采用目标路径计算算法对第一网络节点的拓扑信息进行路径计算,生成的第一转发路径存在路径中断,并非认为不能生成连通的转发路径,而是借助于不支持目标路径计算算法的第二网络节点,生成连通的转发路径。基于此,即便由于逻辑拓扑发生变化而引起该逻辑拓扑内网络节点间的物理链路中断,也能够保证生成连通的转发路径。
具体的,上述第二转发路径不仅可以由执行节点生成,还可以由网络中具有控制功能的控制节点生成。控制节点不仅可以获得网络中各网络节点通告的路径计算算法,还能够通过BGP-LS(BGP Link-State)等收集网络内网络节点的拓扑信息。
鉴于此,本申请的一个实施例中,上述步骤S203中,执行节点获得第二转发路径,可以通过控制节点实现。
具体的,执行节点向控制节点发送路径请求,该路径请求用于请求控制节点生成第二转发路径。控制节点基于所有第一网络节点的拓扑信息和第二网络节点的拓扑信息,确定从源节点到尾节点的第二转发路径,并向上述执行节点反馈第二转发路径,从而使得上述执行节点获得第二转发路径。
其中,控制节点可以采用最短路径优先算法确定第二转发路径,也可以采用目标路径计算算法确定第二转发路径,当然也可以采用其他算法确定第二转发路径,本申请并不对此进行限定。
由以上可见,本实施例提供的方案中,由于控制节点能够掌握网络中网络节点支持的路径计算算法以及网络节点的拓扑信息,因此,能够生成较为准确的转发路径。另外,控制节点承担了生成第二转发路径的工作,从而减轻了作为执行主体的网络节点的工作压力。
本申请的一个实施例中,参见图3,提供了第二种转发路径生成方法的流程示意图,与前述图2所示实施例相比,上述步骤S203中,若第一转发路径存在路径中断,获得从源节点到尾节点的第二转发路径,包括以下步骤S203A和S203B。
步骤S203A:若第一转发路径存在路径中断,确定第一转发路径中发生路径中断的第三网络节点、以及源节点到第三网络节点的第一转发子路径。
具体的,执行节点采用目标路径计算算法生成第一转发路径之后,可以对第一转发路径中的最后一跳进行检测,检测最后一跳是否为上述尾节点,若不是上述尾节点,说明第一转发路径存在路径中断,且将上述最后一跳称为第三网络节点。上述第一转发路径也即为从源节点到第三网络节点的转发路径,因此,可以将第一转发路径作为本步骤中的第一转发子路径。
步骤S203B:基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从第三网络节点到尾节点的第二转发子路径。
其中,第四网络节点为:未位于第一转发子路径的第一网络节点。
由于第一转发子路径仅仅为源节点至第三网络节点间的转发路径,这一转发路径还不能将报文转发至尾节点。又由于在第三网络节点处出现了与第四网络节点不能够连通的情况,而第三网络节点又可能能够借助于第二网络节点与第四网络节点连通,所以,本步骤中基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从第三网络节点到尾节点的第二转发子路径。
执行节点生成第二转发子路径时可以采用不同的路径计算算法生成,具体在后续实施例中说明,这里暂不详述。
在上述基础上,前述步骤S204中,执行节点从第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对,包括以下步骤S204A。
步骤S204A:从第二转发子路径中,确定与第二网络节点连通的第一网络节点,得到节点对。
由于第一转发子路径是采用目标路径计算算法,针对第一网络节点生成的转发路径,所以,第一转发子路径中肯定不会存在与第二网络节点连通的第一网络节点。为提高转发路径生成效率,本步骤中可以仅在第二转发子路径中确定与第二网络节点连通的第一网络节点,从而得到节点对。
具体的,执行节点可以沿着从第三网络节点到尾节点的方向,逐跳检查各网络节点,确定与第二网络节点直接连接的第一网络节点,作为第一个节点,并确定下一个与第二网络节点直接连接的第一网络节点,作为第二个节点。上述第一个节点和第二个节点形成一个节点对。
前述步骤S205中,执行节点将第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从源节点到尾节点连通的转发路径,包括以下步骤S205A和S205B。
步骤S205A:将第二转发子路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备。
执行节点将每一节点对中的第二个节点作为该节点对中第一个节点的下一跳设备,以此更新第二转发子路径,可以将第二网络节点从第二转发子路径中剔除,使得第二转发子路径中也仅存在第一网络节点。
步骤S205B:连接第一转发子路径和更新后的第二转发子路径,得到从源节点到尾节点连通的转发路径。
由于第一转发子路径是从源节点到第三网络节点的转发路径,而第二转发子路径是从第三网络节点到尾节点的转发路径,所以,第一转发子路径和第二转发子路径均为从源节点到尾节点的转发路径的一部分,且第一转发子路径和第二转发子路径中均存在第三网络节点,因此,可以通过第三网络节点连接第一转发子路径和第二转发子路径,得到从源节点到尾节点的完整转发路径。
由以上可见,本实施例提供的方案中,将采用目标路径计算算法得到的第一转发路径作为第一转发子路径,保证了第一转发子路径中的网络节点均为第一网络节点,然后仅针对第二转发子路径确定节点对,在保证所确定出节点对准确的前提下,提高了生成转发路径的效率。
下面通过两个不同的实施例,对如何生成第二转发子路径进行说明。
本申请的一个实施例中,上述步骤S203B中,执行节点基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从第三网络节点到尾节点的第二转发子路径时,可以采用目标路径计算算法,对第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从第三网络节点到尾节点的第二转发子路径。
由于第二转发子路径是采用目标路径计算算法生成的,为保证各节点对中的第一个节点转发SRv6报文时,能够准确的将SRv6报文转发至节点对中的第二个节点,需使得第一个节点能够知晓生成第二转发子路径时所采用的路径计算算法。
鉴于上述情况,在上述步骤S205B连接第一转发子路径和更新后的第二转发子路径,得到从源节点到尾节点连通的转发路径之后,执行节点生成上述连通的转发路径的分段列表时,可以在在第一SID(Segment Identifier,段标识)与第二SID之间增加BSID(Binding Segment Identifier,绑定段标识),以使得第一节点对中第一个节点调用BSID对应的SRv6转发策略选择到第一节点对中第二个节点的转发路径。这样可以保证源节点向报文中添加SID时,一并在报文中成功添加BSID。
上述BSID对应的转发策略使用的路径计算算法为:目标路径计算算法,第一节点对为:连通的转发路径中的节点对,第一SID为:第一节点对中第一个节点对应的SID,第二个SID为:第一节点对 中第二个节点对应的SID。
上述分段列表存储有多个SID,每一SID与转发路径中一个网络节点相对应。每一网络节点对应的SID中可以存储有:网络节点的标识、网络节点需要对SRv6报文执行的操作指令以及上述操作指令的指令参数等。
由于本实施例提供的方案中生成连通的转发路径的分段列表时,在第一SID和第二SID之间增加了BSID,而BSID对应的转发策略使用的路径计算算法又是目标路径计算算法,且更新之前的第二转发子路径也是采用目标路径计算算法生成的,因此,节点对中的第一个节点能够按照更新前的第二转发子路径进行路径选择,进而将SRv6报文转发至节点对中的第二个节点,从而能够有效保证准确的转发SRv6报文。
一种实现方式中,由于从每一节点对中的第一个节点向第二个节点转发SRv6报文时,需要通过第二网络节点,为保证所转发SRv6报文安全,执行节点生成连通的转发路径的分段列表时,还可以在第一节点对中各节点对应的SID的功能字段中增加安全认证指令和安全认证指令的指令参数。这样每一节点对中的第一个节点和第二个节点接收到待转发的SRv6报文后,可以按照SID中携带指令参数,执行SID中携带的安全认证指令,从而保证待转发的SRv6报文的安全性。这样还可以保证源节点向报文中添加SID时,一并在报文中成功添加安全认证指令和安全认证指令的指令参数。
例如,上述安全认证指令可以是针对IPSec的安全认证指令,也可以是针对SRv6HMAC的安全认证指令。
本申请的另一个实施例中,可以以最短路径优先算法为默认路径计算算法,这种情况下,上述步骤S203B中,执行节点基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从第三网络节点到尾节点的第二转发子路径时,可以采用最短路径优先算法,对第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从第三网络节点到尾节点的第二转发子路径。由于最短路径优先算法是默认的路径计算算法,所以,可以不另行告知节点对中第一个节点生成第二转发子路径时所采用的路径计算算法是最短路径优先算法。
这样节点对中的第一个节点接收到SRv6报文后,可以直接按照最短路径优先算法进行路径选择,进而将SRv6报文转发至节点对中的第二个节点。这样不仅能够准确的实现SRv6报文转发,还能够减少SRv6报文所携带信息的信息量。
下面结合图1b和图1d所示的拓扑示意图,对本申请实施例提供的转发路径生成方案进行说明。
假设,目标路径计算算法为前面提及的路径计算算法1。网络节点R0、R1、R2、R6、R7均支持路算法1,也就是,第一网络节点包括:R0、R1、R2、R6、R7,这样第二网络节点包括:R3、R4、R5。
指定的源节点为R0,指定的尾节点为:R7。
虽然R0、R1和R2间存在物理链路,R6和R7间存在物理链路,但是由于R2和R6之间不存在物理链路,导致R0、R1、R2、R6、R7间的物理链路不能够使得R0与R7连通。因此,采用路径计算算法1,对R0、R1、R2、R6、R7的拓扑信息,进行路径计算,生成的第一转发路径为R0->R1->R2,而 不包括路径R6->R7,该第一转发路径的最后一跳为R2,不是R7,说明第一转发路径存在路径中断。
此时,第三网络节点为R2,第一转发子路径为:R0->R1->R2。第四网络节点包括:R6和R7。
一种情况下,采用最短路径优先算法,对R6、R7、R3、R4和R5的拓扑信息,进行路径计算,生成第二转发子路径。若生成的第二转发子路径为:R2->R3->R6->R7,则一个节点对包括R2和R6,该节点对中第一个节点为R2,第二个节点为R6。将第二转发子路径中R6更新为R2的下一跳设备,则对第二转发子路径进行更新后为:R2->R6->R7。连接第一转发子路径和第二转发子路径所得连通的转发路径为:R0->R1->R2->R6->R7。
这种情况下,生成连通的转发路径的分段列表时,分段列表中依次包括:R0、R1、R2、R6、R7对应的SID。当R2接收到SRv6报文时,从分段列表中可以得知下一跳设备为:R6。由于R2能够获知与R6之间不存在物理链路,因此,R2向R6转发SRv6报文时,采用最短路径优先算法计算向R6转发SRv6报文的路径,可以计算得出,通过R3向R6转发SRv6报文,这样R2向R3转发SRv6报文,然后R3向R6转发SRv6报文。
另一种情况下,采用路径计算算法1,对R6、R7、R3、R4和R5的拓扑信息,进行路径计算,生成第二转发子路径。若生成的第二转发子路径为:R2->R5->R6->R7,则一个节点对包括R2和R6,该节点对中第一个节点为R2,第二个节点为R6。将第二转发子路径中R6更新为R2的下一跳设备,则对第二转发子路径进行更新后为:R2->R6->R7。连接第一转发子路径和第二转发子路径所得连通的转发路径为:R0->R1->R2->R6->R7。
这种情况下,生成连通的转发路径的分段列表时,分段列表中依次包括:R0、R1、R2、R6、R7对应的SID,且在R2对应的SID和R6对应的SID之间增加BSID。当R2接收到SRv6报文时,从分段列表中可以得知下一跳设备为:R6。由于R2能够获知与R6之间不存在物理链路,因此,R2向R6转发SRv6报文时,调用BSID对应的SRv6转发策略选择到R6的转发路径。由于BSID对应的SRv6转发策略使用的路径计算算法为:路径计算算法1,所以,可以计算得出,R2通过R5向R6转发SRv6报文,这样R2向R5转发SRv6报文,然后R5向R6转发SRv6报文。
与上述转发路径生成方法相对应,本申请实施例还提供了一种转发路径生成装置。
参见图4,图4为本申请实施例提供的一种转发路径生成装置的结构示意图,该装置包括:
拓扑获取模块401,用于获取支持目标路径计算算法的第一网络节点的拓扑信息;
路径生成模块402,用于采用所述目标路径计算算法,对所述第一网络节点的拓扑信息进行路径计算,生成第一转发路径,所述第一转发路径为:从第一网络节点中指定的源节点到指定的尾节点的转发路径;
路径获得模块403,用于若所述第一转发路径存在路径中断,获得从所述源节点到所述尾节点的第二转发路径,所述第二转发路径为:由所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的转发路径,所述第二网络节点不支持所述目标路径计算算法;
节点确定模块404,用于从所述第二转发路径中,确定与第二网络节点连通的第一网络节点,得到 节点对;
下一跳更新模块405,用于将所述第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从所述源节点到所述尾节点连通的转发路径,各节点对中沿所述第二转发路径的方向第二个节点位于第一个节点之后。
由以上可见,应用本申请实施例提供的方案生成转发路径时,若采用目标路径计算算法对第一网络节点的拓扑信息进行路径计算,生成的第一转发路径存在路径中断,并非认为不能生成连通的转发路径,而是借助于不支持目标路径计算算法的第二网络节点,生成连通的转发路径。基于此,即便由于逻辑拓扑发生变化而引起该逻辑拓扑内网络节点间的物理链路中断,也能够保证生成连通的转发路径。
本申请的一个实施例中,参见图5,提供了第二种转发路径生成装置的结构示意图,与前述图4所示实施例相比,所述路径获得模块403,包括:
子路径确定单元403A,用于若所述第一转发路径存在路径中断,确定所述第一转发路径中发生路径中断的第三网络节点、以及从所述源节点到所述第三网络节点的第一转发子路径;
子路径生成单元403B,用于基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,所述第四网络节点为:未位于所述第一转发子路径的第一网络节点;
所述节点确定模块404,具体用于从所述第二转发子路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
所述下一跳更新模块405,具体用于将所述第二转发子路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备;连接所述第一转发子路径和更新后的第二转发子路径,得到从所述源节点到所述尾节点连通的转发路径。
由以上可见,本实施例提供的方案中,将采用目标路径计算算法得到的第一转发路径作为第一转发子路径,保证了第一转发子路径中的网络节点均为第一网络节点,然后仅针对第二转发子路径确定节点对,在保证所确定出节点对准确的前提下,提高了生成转发路径的效率。
本申请的一个实施例中,所述子路径生成单元403B,具体用于采用所述目标路径计算算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径;
所述装置还包括:
BSID增加模块,用于在所述下一跳更新模块得到从所述源节点到所述尾节点连通的转发路径之后,在生成所述连通的转发路径的分段列表时,在第一段标识SID与第二SID之间增加绑定段标识BSID,以使得第一节点对中第一个节点调用所述BSID对应的SRv6转发策略选择到所述第一节点对中第二个节点的转发路径,所述BSID对应的转发策略使用的路径计算算法为:所述目标路径计算算法,所述第一节点对为:所述连通的转发路径中的节点对,所述第一SID为:所述第一节点对中第一个节点对应的SID,第二个SID为:所述第一节点对中第二个节点对应的SID。
由于本实施例提供的方案中生成连通的转发路径的分段列表时,在第一SID和第二SID之间增加 了BSID,而BSID对应的转发策略使用的路径计算算法又是目标路径计算算法,且更新之前的第二转发子路径也是采用目标路径计算算法生成的,因此,节点对中的第一个节点能够按照更新前的第二转发子路径进行路径选择,进而将SRv6报文转发至节点对中的第二个节点,从而能够有效保证准确的转发SRv6报文。
本申请的一个实施例中,所述装置还包括:
信息增加模块,用于在生成所述连通的转发路径的分段列表时,在所述第一节点对中各节点对应的SID的功能字段中增加安全认证指令和所述安全认证指令的指令参数。
这样每一节点对中的第一个节点和第二个节点接收到待转发的SRv6报文后,可以按照SID中携带指令参数,执行SID中携带的安全认证指令,从而保证待转发的SRv6报文的安全性。
本申请的一个实施例中,所述子路径生成单元403B,具体用于采用最短路径优先算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径。
这样节点对中的第一个节点接收到SRv6报文后,可以直接按照最短路径优先算法进行路径选择,进而将SRv6报文转发至节点对中的第二个节点。这样不仅能够准确的实现SRv6报文转发,还能够减少SRv6报文所携带信息的信息量。
本申请的一个实施例中,所述路径获得模块403,具体用于若所述第一转发路径存在路径中断,向控制节点发送路径请求;接收所述控制节点反馈的第二转发路径,所述第二转发路径为:所述控制节点基于所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的、从所述源节点到所述尾节点的转发路径。
由以上可见,本实施例提供的方案中,由于控制节点能够掌握网络中网络节点支持的路径计算算法以及网络节点的拓扑信息,因此,能够生成较为准确的转发路径。另外,控制节点承担了生成第二转发路径的工作,从而减轻了作为执行主体的网络节点的工作压力。
与上述转发路径生成方法相对应,本申请实施例还提供了一种网络设备。
参见图6,图6提供了一种网络设备的结构示意图,该网络设备包括:处理器601和机器可读存储介质602,所述机器可读存储介质602存储有能够被所述处理器601执行的机器可执行指令,所述处理器601被所述机器可执行指令促使:实现前述方法实施例所述的转发路径生成方法步骤。
与上述转发路径生成方法相对应,本申请实施例还提供了一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:实现前述方法实施例所述的转发路径生成方法步骤。
与上述转发路径生成方法相对应,本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行前述方法实施例所述的转发路径生成方法步骤。
需要说明的是,上述机器可读存储介质可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,上述 机器可读存储介质还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、网络设备、机器可读存储介质和计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (14)

  1. 一种转发路径生成方法,其特征在于,所述方法包括:
    获取支持目标路径计算算法的第一网络节点的拓扑信息;
    采用所述目标路径计算算法,对所述第一网络节点的拓扑信息进行路径计算,生成第一转发路径,所述第一转发路径为:从第一网络节点中指定的源节点到指定的尾节点的转发路径;
    若所述第一转发路径存在路径中断,获得从所述源节点到所述尾节点的第二转发路径,所述第二转发路径为:由所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的转发路径,所述第二网络节点不支持所述目标路径计算算法;
    从所述第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
    将所述第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从所述源节点到所述尾节点连通的转发路径,各节点对中沿所述第二转发路径的方向第二个节点位于第一个节点之后。
  2. 根据权利要求1所述的方法,其特征在于,所述获得从所述源节点到所述尾节点的第二转发路径,包括:
    确定所述第一转发路径中发生路径中断的第三网络节点、以及从所述源节点到所述第三网络节点的第一转发子路径;
    基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,所述第四网络节点为:未位于所述第一转发子路径的第一网络节点;
    所述从所述第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对,包括:
    从所述第二转发子路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
    所述将所述第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从所述源节点到所述尾节点连通的转发路径,包括:
    将所述第二转发子路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备;
    连接所述第一转发子路径和更新后的第二转发子路径,得到从所述源节点到所述尾节点连通的转发路径。
  3. 根据权利要求2所述的方法,其特征在于,所述基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,包括:
    采用所述目标路径计算算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径;
    在所述连接所述第一转发子路径和更新后的第二转发子路径,得到从所述源节点到所述尾节点连通的转发路径的步骤之后,还包括:
    在生成所述连通的转发路径的分段列表时,在第一段标识SID与第二SID之间增加绑定段标识BSID,以使得第一节点对中第一个节点调用所述BSID对应的SRv6转发策略选择到所述第一节点对中 第二个节点的转发路径,所述BSID对应的转发策略使用的路径计算算法为:所述目标路径计算算法,所述第一节点对为:所述连通的转发路径中的节点对,所述第一SID为:所述第一节点对中第一个节点对应的SID,第二个SID为:所述第一节点对中第二个节点对应的SID。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    在生成所述连通的转发路径的分段列表时,在所述第一节点对中各节点对应的SID的功能字段中增加安全认证指令和所述安全认证指令的指令参数。
  5. 根据权利要求2所述的方法,其特征在于,所述基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,包括:
    采用最短路径优先算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径。
  6. 根据权利要求1所述的方法,其特征在于,所述获得从所述源节点到所述尾节点的第二转发路径,包括:
    向控制节点发送路径请求;
    接收所述控制节点反馈的第二转发路径,所述第二转发路径为:所述控制节点基于所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的、从所述源节点到所述尾节点的转发路径。
  7. 一种转发路径生成装置,其特征在于,所述装置包括:
    拓扑获取模块,用于获取支持目标路径计算算法的第一网络节点的拓扑信息;
    路径生成模块,用于采用所述目标路径计算算法,对所述第一网络节点的拓扑信息进行路径计算,生成第一转发路径,所述第一转发路径为:从第一网络节点中指定的源节点到指定的尾节点的转发路径;
    路径获得模块,用于若所述第一转发路径存在路径中断,获得从所述源节点到所述尾节点的第二转发路径,所述第二转发路径为:由所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的转发路径,所述第二网络节点不支持所述目标路径计算算法;
    节点确定模块,用于从所述第二转发路径中,确定与第二网络节点连通的第一网络节点,得到节点对;
    下一跳更新模块,用于将所述第二转发路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备,得到从所述源节点到所述尾节点连通的转发路径,各节点对中沿所述第二转发路径的方向第二个节点位于第一个节点之后。
  8. 根据权利要求7所述的装置,其特征在于,所述路径获得模块,包括:
    子路径确定单元,用于若所述第一转发路径存在路径中断,确定所述第一转发路径中发生路径中断的第三网络节点、以及从所述源节点到所述第三网络节点的第一转发子路径;
    子路径生成单元,用于基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,生成从所述第三网络节点到所述尾节点的第二转发子路径,所述第四网络节点为:未位于所述第一转发子路径的第一网络节点;
    所述节点确定模块,具体用于从所述第二转发子路径中,确定与第二网络节点连通的第一网络节点, 得到节点对;
    所述下一跳更新模块,具体用于将所述第二转发子路径上每一节点对中的第二个节点更新为该节点对中的第一个节点的下一跳设备;连接所述第一转发子路径和更新后的第二转发子路径,得到从所述源节点到所述尾节点连通的转发路径。
  9. 根据权利要求8所述的装置,其特征在于,
    所述子路径生成单元,具体用于采用所述目标路径计算算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径;
    所述装置还包括:
    BSID增加模块,用于在所述下一跳更新模块得到从所述源节点到所述尾节点连通的转发路径之后,在生成所述连通的转发路径的分段列表时,在第一段标识SID与第二SID之间增加绑定段标识BSID,以使得第一节点对中第一个节点调用所述BSID对应的SRv6转发策略选择到所述第一节点对中第二个节点的转发路径,所述BSID对应的转发策略使用的路径计算算法为:所述目标路径计算算法,所述第一节点对为:所述连通的转发路径中的节点对,所述第一SID为:所述第一节点对中第一个节点对应的SID,第二个SID为:所述第一节点对中第二个节点对应的SID。
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括:
    信息增加模块,用于在生成所述连通的转发路径的分段列表时,在所述第一节点对中各节点对应的SID的功能字段中增加安全认证指令和所述安全认证指令的指令参数。
  11. 根据权利要求8所述的装置,其特征在于,
    所述子路径生成单元,具体用于采用最短路径优先算法,基于第四网络节点的拓扑信息和第二网络节点的拓扑信息,进行路径计算,生成从所述第三网络节点到所述尾节点的第二转发子路径。
  12. 根据权利要求7所述的装置,其特征在于,
    所述路径获得模块,具体用于若所述第一转发路径存在路径中断,向控制节点发送路径请求;接收所述控制节点反馈的第二转发路径,所述第二转发路径为:所述控制节点基于所有第一网络节点的拓扑信息和第二网络节点的拓扑信息确定的、从所述源节点到所述尾节点的转发路径。
  13. 一种网络设备,其特征在于,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令促使:实现权利要求1-6任一所述的方法步骤。
  14. 一种机器可读存储介质,其特征在于,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:实现权利要求1-6任一所述的方法步骤。
PCT/CN2021/101914 2021-06-23 2021-06-23 一种转发路径生成方法、装置、网络设备及存储介质 WO2022266905A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022577542A JP2023534126A (ja) 2021-06-23 2021-06-23 転送経路生成方法、装置、ネットワークデバイスおよび記憶媒体
EP21945362.8A EP4156635A4 (en) 2021-06-23 2021-06-23 METHOD AND APPARATUS FOR ROUTING PATH GENERATING, NETWORK DEVICE AND STORAGE MEDIA
CN202180001610.1A CN113748643A (zh) 2021-06-23 2021-06-23 一种转发路径生成方法、装置、网络设备及存储介质
PCT/CN2021/101914 WO2022266905A1 (zh) 2021-06-23 2021-06-23 一种转发路径生成方法、装置、网络设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/101914 WO2022266905A1 (zh) 2021-06-23 2021-06-23 一种转发路径生成方法、装置、网络设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022266905A1 true WO2022266905A1 (zh) 2022-12-29

Family

ID=78727738

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/101914 WO2022266905A1 (zh) 2021-06-23 2021-06-23 一种转发路径生成方法、装置、网络设备及存储介质

Country Status (4)

Country Link
EP (1) EP4156635A4 (zh)
JP (1) JP2023534126A (zh)
CN (1) CN113748643A (zh)
WO (1) WO2022266905A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117896738A (zh) * 2024-03-18 2024-04-16 深圳市景松科技有限公司 一种无线宽带专网通信方法、装置及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831382A (zh) * 2019-02-13 2019-05-31 华为技术有限公司 一种路径计算方法、装置及设备
CN110677341A (zh) * 2019-09-09 2020-01-10 锐捷网络股份有限公司 一种数据转发方法、装置、电子设备及存储介质
WO2020187308A1 (en) * 2019-03-20 2020-09-24 Huawei Technologies Co., Ltd. Method for optimal routing in an inter-area srmpls igp network, nodes and system thereof
WO2020211609A1 (zh) * 2019-04-15 2020-10-22 华为技术有限公司 一种基于SRv6的数据处理方法及相关网络设备
US20200344151A1 (en) * 2019-04-26 2020-10-29 Juniper Networks, Inc. Enhanced flexible-algorithm definition
CN112822106A (zh) * 2020-06-04 2021-05-18 中兴通讯股份有限公司 段路由业务处理方法、装置、源节点及存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10637768B1 (en) * 2018-11-02 2020-04-28 Juniper Networks, Inc. Enabling non-flexible-algorithm routers to participate in flexible-algorithm routing protocols

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831382A (zh) * 2019-02-13 2019-05-31 华为技术有限公司 一种路径计算方法、装置及设备
WO2020187308A1 (en) * 2019-03-20 2020-09-24 Huawei Technologies Co., Ltd. Method for optimal routing in an inter-area srmpls igp network, nodes and system thereof
WO2020211609A1 (zh) * 2019-04-15 2020-10-22 华为技术有限公司 一种基于SRv6的数据处理方法及相关网络设备
US20200344151A1 (en) * 2019-04-26 2020-10-29 Juniper Networks, Inc. Enhanced flexible-algorithm definition
CN110677341A (zh) * 2019-09-09 2020-01-10 锐捷网络股份有限公司 一种数据转发方法、装置、电子设备及存储介质
CN112822106A (zh) * 2020-06-04 2021-05-18 中兴通讯股份有限公司 段路由业务处理方法、装置、源节点及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4156635A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117896738A (zh) * 2024-03-18 2024-04-16 深圳市景松科技有限公司 一种无线宽带专网通信方法、装置及系统
CN117896738B (zh) * 2024-03-18 2024-05-14 深圳市景松科技有限公司 一种无线宽带专网通信方法、装置及系统

Also Published As

Publication number Publication date
EP4156635A4 (en) 2023-07-26
EP4156635A1 (en) 2023-03-29
JP2023534126A (ja) 2023-08-08
CN113748643A (zh) 2021-12-03

Similar Documents

Publication Publication Date Title
US10541905B2 (en) Automatic optimal route reflector root address assignment to route reflector clients and fast failover in a network environment
US11483235B2 (en) Method for establishing segment routing for IPv6 tunnel
US11438260B2 (en) Method and apparatus for forwarding MPLS data packet
EP3103230B1 (en) Software defined networking (sdn) specific topology information discovery
US20210092041A1 (en) Preferred Path Route Graphs in a Network
WO2016029862A1 (zh) 一种链路状态信息通告方法和设备
EP3229393A1 (en) Error code information transfer method, network device and communication system
EP3484107B1 (en) Parameter notification and obtaining methods and devices, and storage medium
Papán et al. The survey of current IPFRR mechanisms
WO2022266905A1 (zh) 一种转发路径生成方法、装置、网络设备及存储介质
CN112671652B (zh) 报文转发方法及装置
WO2021238207A1 (zh) 一种通告信息的处理方法、装置及存储介质
US10367732B2 (en) Route control for internet exchange point
US20220150167A1 (en) Bier packet processing method, network device, and system
CN113810288B (zh) 一种报文回程方法及装置
WO2017162202A1 (zh) 链路状态信息处理
US20240243989A1 (en) Method and apparatus generating a forwarding path, network device and storage medium
US10735252B2 (en) Outside router fault detection
WO2023016550A1 (zh) 一种路由发送方法及设备
WO2023173989A1 (zh) 转发表的生成方法及装置、存储介质、电子装置
CN109005121B (zh) 一种路由计算方法及装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 18001746

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022577542

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021945362

Country of ref document: EP

Effective date: 20221219

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

Ref document number: 21945362

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE