Method, device and system for obtaining route association information - Patents.com
The method and system improve the flexibility of conveying route constraints in communication networks by using template indication information, allowing network devices to determine and execute operations associated with forwarding paths without destabilizing the protocol.
Patent Information
- Application Number
- JP2023527663
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-11-10
- Filing Date
- 2021-08-05
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2041-08-05
AI Technical Summary
Current communication network protocols lack flexibility in conveying route constraints, as different forwarding paths require varying types of constraints, leading to instability and reduced standard promotion efficiency when these constraints are frequently changed.
A method and system that uses template indication information in packets to associate target templates with forwarding paths, allowing network devices to determine and perform operations based on route attributes or constraints without affecting protocol stability.
Enhances the flexibility of obtaining route association information, enabling network devices to determine and execute operations associated with forwarding paths efficiently while maintaining protocol stability.
Smart Images

Figure 0007572019000001 
Figure 0007572019000002 
Figure 0007572019000003
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 202011246059.0, entitled “METHOD FOR OBTAINING PATH ASSOCIATION INFORMATION, DEVICE, AND SYSTEM,” filed on November 10, 2020, the entire contents of which are incorporated herein by reference.
[0002] Technical Field The present application relates to the field of network technology, and in particular to a method, device and system for obtaining path association information. [Background technology]
[0003] A communication network typically includes a controller and multiple forwarding devices. The controller can calculate a forwarding path based on a network topology of the communication network, and send path information of the forwarding path to the forwarding devices on the forwarding path, so that the forwarding devices on the forwarding path can forward services based on the forwarding path.
[0004] In a real forwarding scenario, a forwarding device needs to learn both the path information of a forwarding path and the path constraint of the forwarding path to perform related operations. For example, the forwarding device needs to further learn the bandwidth constraint of the forwarding path to reserve the bandwidth of the forwarding path based on the bandwidth constraint of the forwarding path. Currently, a controller usually sends the path constraint of the forwarding path to a forwarding device by encapsulating the path constraint of the forwarding path in a packet.
[0005] However, in the implementation of the current technical solution, various types of route constraints are conveyed by defining a route constraint field in the protocol. The type of route constraint required by a forwarding path varies from case to case, and the type of route constraint usually varies from forwarding path to case. The flexibility of conveying constraints by defining a route constraint field in the protocol is poor. However, if the route constraint field is frequently changed and supplemented to improve the supportability of the protocol standard, it will affect the stability of the standard and the efficiency of promoting the standard will be low. Summary of the Invention [Problem to be solved by the invention]
[0006] The present application provides a method, device and system for obtaining route association information, so as to improve the flexibility of obtaining route association information, such as route attributes or route constraints, without affecting the stability of the protocol. [Means for solving the problem]
[0007] According to a first aspect, a method for obtaining path association information is provided, and is executed by a first network device. The method includes: generating a packet, the packet carrying template indication information, the template indication information indicating a target template, the target template being associated with a target forwarding path; and transmitting the packet to the second network device, such that the second network device performs an operation associated with the target forwarding path based on the target template indicated by the template indication information. The second network device may be a device on the target forwarding path. The target template may be associated with the target forwarding path based on association information included in the target template.
[0008] According to the technical solution provided in the present application, the first network device can include template indication information corresponding to different templates in a packet, to indicate that different receiving network devices determine a target template associated with the target forwarding path, and determine association information associated with the target forwarding path according to the target template. The path association information is published in the manner of conveying the template indication information provided in the present technical solution, so that the flexibility of obtaining the path association information can be improved without affecting the stability of the protocol.
[0009] Optionally, the target template includes at least one route association attribute and / or at least one route association constraint.
[0010] Optionally, the packet further carries routing information, where the routing information indicates a target forwarding path, for example, the routing information may be path information or a path identifier, and the path information may be strict path information or loose path information.
[0011] According to the technical solution provided in the present application, the routing information is carried in a packet, so that the second network device can determine a target forwarding path based on the routing information and perform an operation associated with the target forwarding path.
[0012] Optionally, the method further includes obtaining at least one template before sending the packet to the second network device, where the target template belongs to the at least one template. For example, the first network device obtains the at least one template based on template configuration information, and the template configuration information may be template configuration information input by a user to the first network device.
[0013] According to the technical solution provided in the present application, the first network device obtains at least one template, so that the first network device determines a target template from the at least one template.
[0014] Optionally, the method further comprises the step of transmitting at least one template to the second network device before transmitting the packet to the second network device.
[0015] According to the technical solution provided in the present application, the first network device sends at least one template to the second network device, so that the second network device can obtain the at least one template, and in a subsequent operation, the second network device determines a target template associated with a target forwarding path from the at least one template.
[0016] Optionally, the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. The path detection indication information may be bidirectional forwarding detection (BFD) indication information, and the BFD indication information may in particular be seamless bidirectional forwarding detection (SBFD) indication information.
[0017] According to a second aspect, a method for obtaining path association information is provided, and is executed by a second network device. The method includes: receiving a packet from a first network device, the packet carrying template indication information; determining a target template based on the template indication information, the target template being associated with a target forwarding path; and performing an operation associated with the target forwarding path based on the target template. The second network device is a device on the target forwarding path. The target template may be associated with the target forwarding path based on association information included in the target template.
[0018] According to the technical solution provided in the present application, the first network device can include template indication information corresponding to the target template in the packet, to indicate that the second network device determines the target template associated with the target forwarding path, and determines the association information associated with the target forwarding path according to the target template. The path association information is published in the manner of transmitting the template indication information provided in the present technical solution, which can improve the flexibility of obtaining the path association information without affecting the stability of the protocol.
[0019] Optionally, the packet further carries routing information, and the method further comprises determining a target forwarding path based on the routing information. For example, the routing information may be route information or a route identifier, and the route information may be strict route information or loose route information.
[0020] According to the technical solution provided in the present application, the routing information is transmitted in a packet, so that the second network device can determine a target forwarding path based on the routing information and perform an operation associated with the target forwarding path.
[0021] Optionally, the target template includes at least one route association attribute and / or at least one route association constraint.
[0022] Optionally, the method further includes a step of obtaining at least one template before determining the target template based on the template indication information, and the target template belongs to the at least one template. Correspondingly, the step of determining the target template based on the template indication information includes a step of determining the target template from the at least one template based on the template indication information. The second network device may obtain the at least one template based on the template configuration information, where the template configuration information may be template configuration information inputted by a user to the second network device. Alternatively, the second network device may receive the at least one template from the first network device, and the at least one template sent by the first network device to the second network device may be obtained by the first network device based on the template configuration information.
[0023] According to the technical solution provided in the present application, the second network device obtains at least one template, so that the second network device determines a target template from the at least one template, and performs an operation associated with the target forwarding path based on the target template.
[0024] Optionally, the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. The path detection indication information may be BFD indication information, and the BFD indication information may be SBFD indication information in particular.
[0025] Optionally, the step of performing an operation associated with the target forwarding path based on the target template includes: collecting traffic statistics of the target forwarding path when the target template includes traffic statistics indication information; switching the forwarding path to a backup path of the target forwarding path when there is a failure in the target forwarding path when the target template includes hot standby protection indication information; detecting whether there is a failure in the target forwarding path when the target template includes path detection indication information; and checking the connectivity of the target forwarding path based on the network topology when the target template includes path check indication information.
[0026] Optionally, in the first and second aspects, the target forwarding path comprises one of the following: a segment routing traffic engineering (SR-TE) tunnel, a resource reservation protocol-traffic engineering (RSVP-TE) tunnel, or a segment routing policy (SR policy). Depending on the different tunnel type, this may be implemented through multiprotocol label switching (MPLS) based label forwarding or segment routing over Internet Protocol version 6 (SRv6) segment identifier (segment list, SID) based Internet Protocol version 6 (IPv6) forwarding.
[0027] Optionally, in the first and second aspects, the packet is a path computation element communication protocol (PCEP) packet or a border gateway protocol (BGP) packet.
[0028] Optionally, in the first and second aspects, the packet includes a type length value (TLV) field, and the template indication information is in the TLV field.
[0029] Optionally, in the first and second aspects, the template indication information is a template identifier, for example a template identity (ID).
[0030] Optionally, in the first and second aspects, the first network device is a path calculation element (PCE) device and the second network device is a path computation client (PCC) device.
[0031] According to a third aspect, there is provided a network device, the network device including a module configured to perform a method according to the first aspect or any one of the optional aspects of the first aspect.
[0032] According to a fourth aspect there is provided a network device, the network device including modules configured to perform a method according to the second aspect or any one of the optional aspects of the second aspect.
[0033] The modules in the third or fourth aspect may be implemented based on software, hardware or a combination of software and hardware, and may be randomly combined or divided based on the particular implementation.
[0034] According to a fifth aspect, there is provided a network device including a memory and a processor.
[0035] The memory is configured to store a computer program.
[0036] The processor is configured to execute a computer program stored in the memory to enable the network device to perform a method according to the first aspect or any one of the optional aspects of the first aspect, or to perform a method according to the second aspect or any one of the optional aspects of the second aspect.
[0037] According to a sixth aspect, there is provided a computer readable storage medium, the computer readable storage medium storing a computer program which, when executed by a processor, implements a method according to the first aspect or any one of the optional features of the first aspect, or implements a method according to the second aspect or any one of the optional features of the second aspect.
[0038] According to a seventh aspect there is provided a computer program product comprising instructions which, when executed on a computer, enable the computer to perform a method according to the first aspect or any one of the optional features of the first aspect, or to perform a method according to the second aspect or any one of the optional features of the second aspect.
[0039] According to an eighth aspect there is provided a chip, the chip comprising programmable logic circuitry and / or program instructions which, when executed, are configured to implement a method according to the first aspect or any one of the optional features of the first aspect, or to implement a method according to the second aspect or any one of the optional features of the second aspect.
[0040] According to a ninth aspect, there is provided a communication system including a first network device and a second network device.
[0041] The first network device is a network device according to the third aspect and the second network device is a network device according to the fourth aspect, or at least one of the first network device and the second network device is a network device according to the fifth aspect.
[0042] Optionally, the first network device is a PCE device and the second network device is a PCC device. Effect of the Invention
[0043] The technical solutions provided in this application bring the following advantageous effects:
[0044] According to the method, device and system for obtaining path association information provided in the present application, a first network device generates a packet carrying template indication information, and sends the packet to a second network device. A target template indicated by the template indication information is associated with a target forwarding path. After receiving the packet, the second network device determines a target template based on the template indication information carried in the packet, and performs an operation associated with the target forwarding path based on the target template. In this way, the first network device can include template indication information corresponding to different templates in the packet to indicate that different receiving network devices determine a target template associated with the target forwarding path, and determine association information, such as path attributes or path constraints, associated with the target forwarding path based on the target template. Since the path association information is published in a manner of carrying template indication information provided in the technical solution of the present application, the flexibility of obtaining path association information can be improved without affecting the stability of the protocol. [Brief description of the drawings]
[0045] [Figure 1] 1 is a schematic diagram of a communication network according to an embodiment of the present application;
[0046] [Diagram 2] 2 is a flowchart of a method for obtaining route association information according to an embodiment of the present application;
[0047] [Diagram 3] FIG. 2 is a schematic diagram of a TLV field according to an embodiment of the present application;
[0048] [Figure 4] FIG. 2 is a schematic diagram of another TLV field according to an embodiment of the present application;
[0049] [Diagram 5] FIG. 2 is a schematic diagram of another communication network according to an embodiment of the present application.
[0050] [Figure 6] FIG. 2 is a schematic diagram of a method for obtaining route association information according to an embodiment of the present application;
[0051] [Figure 7] FIG. 2 is a schematic diagram of a logical structure of a first network device according to an embodiment of the present application.
[0052] [Figure 8] FIG. 2 is a schematic diagram of a logical structure of a second network device according to an embodiment of the present application.
[0053] [Figure 9] FIG. 2 is a schematic diagram of a hardware structure of a network device according to an embodiment of the present application;
[0054] [Figure 10] FIG. 2 is a schematic diagram of a hardware structure of another network device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0055] In order to make the principles, technical solutions and advantages of the present application clearer, the following describes the implementation of the present application in more detail with reference to the accompanying drawings.
[0056] The technical solutions provided in the embodiments of the present application may be applied to a communication network, which may be, for example, a data center network (DCN), a metropolitan area network, a wide area network, or a campus network.
[0057] The communication network includes a plurality of network devices. Optionally, the plurality of network devices includes at least one control device and a plurality of forwarding devices. The plurality of forwarding devices are communicatively connected, and each forwarding device is communicatively connected to the control device. The control device is configured to control the forwarding devices, and the forwarding devices are configured to forward services under the control of the control device. The forwarding device may be a device such as a switch, a router, a virtual switch, or a virtual router. In addition, the plurality of forwarding devices in the same communication network may be the same forwarding device or different forwarding devices. For example, all forwarding devices in the same communication network are routers, or some forwarding devices are routers and other forwarding devices are switches. The control device may be a controller, for example, a terminal, a server, a function module deployed in a server, a server cluster including a plurality of servers, or a cloud computing service center. This is not limited in the embodiment of the present application.
[0058] The control device may calculate a forwarding path based on the network topology of the communication network, and send the path information of the forwarding path to a forwarding device on the forwarding path. The forwarding device determines a forwarding path based on the received path information, and forwards the service through the determined forwarding path. The forwarding path may include one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy. Based on different tunnel types, the forwarding path may be implemented through MPLS-based label forwarding or SRv6 SID-based IPv6 forwarding. The implementable form of the forwarding path is not limited in the embodiments of the present application.
[0059] According to the direction of the service flow, the forwarding devices on the forwarding path may include an ingress device, an egress device, and a transit device located between the ingress device and the egress device. The control device may send the path information of the forwarding path to the ingress device on the forwarding path, or may send the path information of the forwarding path to another device on the forwarding path. This is not limited in the embodiment of the present application. The ingress device is a forwarding device located on the source side of the forwarding path (i.e., a source forwarding device), and the egress device is a forwarding device located on the destination side of the forwarding path (i.e., a destination forwarding device). The forwarding devices in the communication network may also be called forwarding nodes. The ingress device may be called a head node, the egress device may be called an end node, and the transit device may be called a transit node or an intermediate node. It can be easily understood that, based on the length of the forwarding path, only the ingress device and the egress device may be on the forwarding path, and the intermediate device may not be on the forwarding path. The control device and the forwarding device may communicate with each other based on BGP or PCEP. For example, the control device may be a PCE device, and the forwarding device (e.g., an ingress device) may be a PCC device, and the PCE device and the PCC device communicate with each other based on PCEP. The PCE device is an entity that can calculate a forwarding path based on a network topology, and may be a network node or a server. The PCE device responds to a path computation request in a communication network, and can calculate a forwarding path that satisfies constraints based on the network topology of the communication network. The PCC device is a device that sends a path computation request to the PCE device. Optionally, the PCC device may send a path computation request to the PCE device, and a PCE application program may be executed on the PCE device, and the PCE application program calculates a forwarding path in response to the path computation request.
[0060] In a real forwarding scenario, a forwarding device on a forwarding path needs to learn not only the path information of the forwarding path, but also the path constraint of the forwarding path, so that the forwarding device on the forwarding path performs related operations. In this case, the control device may further send the path constraint of the forwarding path to the forwarding device on the forwarding path. For example, the control device sends the bandwidth constraint of the forwarding path to the forwarding device on the forwarding path, and the forwarding device on the forwarding path reserves the bandwidth of the forwarding path according to the bandwidth constraint of the forwarding path.
[0061] For example, FIG. 1 is a schematic diagram of a communication network according to an embodiment of the present application. The communication network includes network devices 101-107. The network device 101 is a control device, and the network devices 102-107 are all forwarding devices. The network device 101 can calculate a forwarding path based on the network topology of the communication network. For example, the forwarding path calculated by the network device 101 is a forwarding path S1 (the forwarding path S1 is network device 102 → network device 103 → network device 104 → network device 105). The network device 101 may transmit the path information of the forwarding path S1 and the path constraint (e.g., bandwidth constraint) of the forwarding path S1 to a network device (e.g., the network device 102 which is an ingress device) on the forwarding path S1. The network device 102 determines the forwarding path S1 based on the received path information, forwards the service through the forwarding path S1 based on the path constraint of the forwarding path S1, and reserves the bandwidth for the forwarding path S1 based on, for example, the bandwidth constraint of the forwarding path S1. It should be noted that the communication network shown in FIG. 1 is merely used as an example, and is not used to limit the technical solutions of the embodiments of the present application. In a specific implementation process, the communication network may further include another device, and the quantity of the control device and the quantity of the forwarding device may be configured based on requirements. In addition, those skilled in the art can understand that in the embodiments of the present application, the example in which the network device 101 transmits the path information of the forwarding path S1 and the path constraint of the forwarding path S1 to the network device 102 (i.e., the ingress device) on the forwarding path S1 is used for explanation. In practical application, the network device 101 may further transmit the path information of the forwarding path S1 and the path constraint of the forwarding path S1 to the network devices 103 to 105 on the forwarding path S1. This is not limited in the embodiments of the present application.
[0062] Currently, a control device usually encapsulates a path constraint of a forwarding path in a packet and sends the path constraint of the forwarding path to a forwarding device on the forwarding path. For example, the network device 101 encapsulates a path constraint of a forwarding path S1 in a packet and sends the path constraint of the forwarding path S1 to the network device 102. However, in the implementation of transmitting the path constraint, a path constraint field needs to be defined in the protocol to transmit different types of path constraint information, such as bandwidth information. However, the type of path constraint that the same forwarding path needs to satisfy may change, and the type of path constraint that different forwarding paths need to satisfy may also be different. Therefore, there is little flexibility in transmitting the path constraint by defining a path constraint field in the protocol.
[0063] In addition, the types of route association information that can be conveyed and provided in current standards are limited, usually bandwidth constraints or delay constraints. However, with the continuous development of communication network technology, network devices may need to support more types of route association information to implement other management or operations related to forwarding routes.
[0064] In view of this, the embodiments of the present application provide a method, a device and a system for acquiring route association information. In the technical solution provided in the embodiments of the present application, at least one template may be predefined, and each of the at least one template includes corresponding association information (i.e., association information corresponding to the template). The first network device may determine a target template in the at least one template as a target template associated with a target forwarding path, encapsulate template indication information indicating the target template in a packet, and send the packet to the second network device. The second network device may determine a target template based on the template indication information in the packet, and perform an operation associated with the target forwarding path based on the target template. In this way, the first network device may include template indication information corresponding to different templates in the packet to indicate that different receiving network devices determine a target template associated with the target forwarding path, and determine association information, such as route attributes or route constraints, associated with the target forwarding path based on the target template. Since the route association information is published in a manner of conveying template indication information provided in the embodiments of the present application, the flexibility of acquiring route association information can be improved without affecting the stability of the protocol.
[0065] In the embodiment of the present application, both the first network device and the second network device may be control devices (i.e., the communication network includes at least two control devices), or one of the first network device and the second network device is a control device and the other is a path management device. Alternatively, the first network device is a control device and the second network device is a forwarding device on a target forwarding path, or both the first network device and the second network device are forwarding devices on a target forwarding path. This is not limited in the embodiment of the present application. In the following description of the embodiment of the present application, an example in which the first network device is a control device and the second network device is a forwarding device on a forwarding path is used for description.
[0066] Fig. 2 is a flowchart of a method for obtaining route association information according to an embodiment of the present application. The method for obtaining route association information may be applied to the communication network shown in Fig. 1. The first network device described below may be a control device in the communication network, and the second network device may be a device on a target forwarding path. For example, the second network device is an ingress device on the target forwarding path. As shown in Fig. 2, the method may include several steps as follows:
[0067] Step 201: A first network device generates a packet, where the packet carries template indication information, where the template indication information indicates a target template, and the target template is associated with a target forwarding path.
[0068] Optionally, the first network device may obtain a target template, then determine template indication information of the target template, and generate a packet carrying the template indication information according to the template indication information of the target template. The target template is associated with the target forwarding path. For example, the target template includes association information, and the target template is associated with the target forwarding path by using the association information included in the target template. The association information refers to the association information associated with the target forwarding path.
[0069] Optionally, the association information in this embodiment of the present application includes at least one path association attribute and / or at least one path association constraint. The path association attribute may indicate a device from which attribute information associated with the forwarding path is obtained, such as the path attribute information, the attribute information of the service carried on the path, and the attribute information of the forwarding device on the path. The path association constraint may indicate a constraint that the forwarding path needs to satisfy. The constraint that needs to be satisfied here may be specific to the complete forwarding path or specific to a part of the forwarding path. Optionally, the association information may include at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. The path detection indication information may include BFD indication information, and the BFD indication information may be SBFD indication information in particular. The traffic statistics indication information, hot standby protection indication information, path detection indication information, and path check indication information may all be used as path association attributes. The association information may further include path association constraints, such as path bandwidth constraints and path delay constraints. This is not limited in this embodiment of the present application.
[0070] In this embodiment of the present application, the indication information (e.g., traffic statistics indication information) included in the association information may be information mainly having an indication function, which indicates that the device receiving the association information determines, based on the indication information, the path attributes that need to be obtained, the path constraints that need to be satisfied, etc. Optionally, the association information may have an enablement function in addition to the indication function. Specifically, the indication information indicates that the device receiving the indication information first enables the corresponding function, and then performs the operation associated with the corresponding forwarding path based on the indication information. In this embodiment of the present application, the target template may include at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. In one example, the traffic statistics indication information in the target template may be traffic statistics enablement information, the hot standby protection indication information may be hot standby protection enablement information, the path detection indication information may be path detection enablement information, and the path check indication information may be path detection enablement information. check The information may be enablement information. The traffic statistics enablement information indicates that a device (e.g., a second network device) receiving the target template first enables a traffic statistics collection function, and then collects traffic statistics on the target forwarding path. The hot standby protection enablement information indicates that a device receiving the target template first enables a hot standby protection function, and then performs a hot standby operation on the target forwarding path. The path detection enablement information indicates that a device receiving the target template first enables a path detection function, and then detects whether there is a failure on the target forwarding path. The path check enablement information indicates that a device receiving the target template first enables a path check function, and then checks the connectivity of the target forwarding path.
[0071] For example, when the target template includes traffic statistics enable information, hot standby protection enable information, and SBFD enable information, the content of the target template may be as follows: Template 100 Enable Traffic Statistics Enable backup hot standby Enable SBFD "Template 100" indicates template 100, "100" indicates the template identifier of the target template, "traffic-statistics enable" indicates traffic statistics enablement information, "backup hot-standby enable" indicates hot-standby protection enablement information, and "SBFD enable" indicates SBFD enablement information.
[0072] Optionally, the template indication information may be a template identifier, e.g., a template ID. Alternatively, the template indication information may be expressed in another manner that can indicate a target template. The packet carrying the template indication information and generated by the first network device may be a PCEP packet or a BGP packet. The packet includes a TLV field, and the template indication information is in the TLV field. The TLV field includes at least a type field and a length field, and a value in the type field indicates a type of a value in the TLV field, and a value in the length field indicates a length of a value in the TLV field. For example, Figures 3 and 4 are schematic diagrams of two TLV fields according to an embodiment of the present application. As shown in each of Figures 3 and 4, the TLV field includes a type field and a length field, and the length of the TLV field is 4 bytes. As shown in Figure 3, the length of the type field and the length field in the TLV field are 2 bytes, respectively. As shown in Figure 4, the TLV field further includes a reserved field. The length of the type field and the length field in the TLV field are each 1 byte, and the length of the reserved field is 2 bytes. Optionally, the TLV field shown in Figure 3 may be a TLV field in a PCEP packet, the TLV field shown in Figure 4 may be a TLV field in a BGP packet, and the reserved field of the TLV field shown in Figure 4 may be used to convey information other than the template indication information. This is not limited in the embodiment of the present application.
[0073] Optionally, the target forwarding path of this embodiment of the present application may include one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy. Based on different tunnel types, the target forwarding path may be implemented through MPLS-based label forwarding or SRv6 SID-based IPv6 forwarding. In an optional implementation, the packet generated by the first network device may further carry route indication information, where the route indication information indicates the target forwarding path. Optionally, the route indication information may be route information or a route identifier (e.g., a route ID). The route information may be strict route information or loose route information. The strict route information indicates the complete target forwarding path. The strict route information may include indication information indicating each network device on the target forwarding path and / or indication information indicating links between the network devices on the target forwarding path. The strict route information may include hop-by-hop forwarding information on the target forwarding path. For example, the strict route information includes indication information of an ingress device, an egress device, and all intermediate devices between the ingress device and the egress device on the target forwarding path to implement the specified hop-by-hop forwarding. The loose route information indicates a key network device on the target forwarding path and / or a link between the key network devices. The loose route information may include indication information indicating a key network device on the target forwarding path and / or indication information indicating a link between the key network devices on the target forwarding path. If there is another device between the network devices indicated by the indication information in the loose route information, the indicated link is a local link, etc. In one example, the loose route information indicates an exit device of the target forwarding path, and the loose route information is indication information of the exit device. The other network device on the target forwarding path may be determined through a route calculation by a network device (e.g., an ingress device of the target forwarding path) that receives the loose route information. Alternatively, the network device that receives the loose route information may determine a next-hop network device on the path based on a local routing and forwarding table.The indication information indicating the network device may be an identifier of the network device, for example, the SID of the network device. The indication information indicating the link may be an identifier of the link, for example, the SID of the link. For example, in the case of an RSVP-TE tunnel, the packet may carry strict route information, in the case of an SR-TE tunnel, the packet may carry strict route information or loose route information, and in the case of an SR policy, the packet may carry loose route information, for example, route information of a designated head node and end node.
[0074] For example, FIG. 5 is a schematic diagram of forwarding paths in a communication network according to an embodiment of the present application. The communication network includes forwarding path S1 and forwarding path S2. The forwarding path S1 and the forwarding path S2 are each a complete path. The forwarding path S1 is a network device 102 → network device 103 → network device 104 → network device 105. The forwarding path S2 is a network device 102 → network device 107 → network device 106 → network device 105. The inlet device of the forwarding path S1 and the inlet device of the forwarding path S2 are both network devices 102, and the exit device of the forwarding path S1 and the exit device of the forwarding path S2 are both network devices 105. For example, the forwarding path S1 is a target forwarding path. A packet generated by a first network device (for example, the network device 101) may carry route indication information of the forwarding path S1. The route indication information may be a route identifier "S1" of the forwarding path S1 or route information indicating the forwarding path S1. For example, the route information indicating the forwarding path S1 may be strict route information, and the strict route information includes indication information indicating the link between the network devices 102 and 105. Alternatively, the route information indicating the forwarding path S1 may be loose route information. The loose route information includes, for example, information indicating the network device 104 and the network device 105 on the forwarding path S1 (here, it is assumed that the network device 104 and the network device 105 are key network devices on the forwarding path S1), and / or indication information indicating the link between the network device 104 and the network device 105 (network device 104 → network device 105). Alternatively, the loose route information is indication information indicating the network device 105 (i.e., the exit device on the forwarding path S1). This is not limited in this embodiment of the present application.
[0075] In this embodiment of the present application, the first network device may obtain a target template from at least one template. It is easy to understand that the target template belongs to at least one template. That is, the target template is one of the at least one template. Each of the at least one template may have one template identifier, and each of the at least one template includes corresponding association information. The first network device may determine a target template associated with the target forwarding path from the at least one template based on the service requirement, obtain the target template, and determine the template identifier of the target template as the template indication information of the target template. The at least one template may be in the first network device or a third party device (e.g., a server). The third party device may be a device in the communication network where the first network device exists. This is not limited in this embodiment of the present application.
[0076] Optionally, the at least one template is in a third party device (e.g., a server). The first network device may obtain the at least one template from the third party device, and then determine a target template associated with the target forwarding path from the at least one template based on the service requirements. Alternatively, optionally, the at least one template is in the first network device, and the at least one template may be generated and pre-stored by the first network device, for example, through manual configuration or automatic generation. Alternatively, the at least one template may be sent to the first network device by another network device (e.g., a second network device) and pre-stored by the first network device. The first network device may determine a target template associated with the target forwarding path based on the service requirements and from the at least one template pre-stored by the first network device.
[0077] For example, the at least one template is generated by the first network device and stored in advance. The first network device may generate the at least one template based on the template configuration information. For example, the first network device may provide a human-machine interaction interface. A user may input the template configuration information to the first network device through the human-machine interaction interface, and the first network device generates the at least one template based on the template configuration information input by the user. Alternatively, the user inputs the template configuration information through another human-machine interaction device connected to the first network device, and the first network device acquires the template configuration information from the other human-machine interaction device, and generates the at least one template based on the acquired template configuration information. This is not limited in this embodiment of the present application. In an optional implementation, after generating the at least one template, the first network device may send the at least one template to another device in the communication network, so that the other device can perform matching in a subsequent operation based on the template indication information sent by the first network device to determine a target template from the at least one received template. The at least one template may be transmitted by using the NETCONF protocol or the like. The above-mentioned another device may include a second network device in this embodiment of the present application. Specifically, the first network device may send at least one template to the second network device. This is not limited in this embodiment of the present application.
[0078] Step 202: The first network device sends a packet to the second network device.
[0079] After generating the packet, the first network device may transmit the packet to the second network device, where the packet carries template indication information, and the packet may further carry routing indication information.
[0080] Step 203: The second network device receives the packet from the first network device.
[0081] Step 204: The second network device determines a target template according to the template indication information carried in the packet.
[0082] Optionally, the second network device may analyze the received packet, extract template indication information from the packet, and then determine a target template based on the template indication information. In an optional implementation, the second network device determines a target template from the at least one template based on the template indication information. For example, the second network device determines a template indicated by the template indication information among the at least one template as a target template. Optionally, the template indication information is a template identifier, and each of the at least one template may have one template identifier. The second network device compares the template identifier carried in the packet with the template identifier of the at least one template, and determines a template having the same template identifier as the template identifier carried in the packet among the at least one template as a target template. The at least one template may be in the second network device or a third party device. The third party device may be a device in a communication network in which the second network device is located. This is not limited in this embodiment of the present application.
[0083] Optionally, the at least one template is in a third party device (e.g., a server). The second network device may obtain the at least one template from the third party device and then determine the target template from the at least one template based on the template indication information. Alternatively, optionally, the at least one template is in the second network device, and the at least one template may be generated and pre-stored by the second network device, for example, through manual configuration or automatic generation. Alternatively, the at least one template may be sent to the second network device by another network device (e.g., the first network device) and pre-stored by the second network device. The second network device may determine the target template from the at least one template pre-stored by the second network device based on the template indication information.
[0084] For example, the at least one template is generated and pre-stored by the second network device. The second network device may generate the at least one template based on the template configuration information. For example, the second network device may provide a human-machine interaction interface. A user may input the template configuration information to the second network device through the human-machine interaction interface, and the second network device generates the at least one template based on the template configuration information input by the user. Alternatively, a user may input the template configuration information through another human-machine interaction device connected to the second network device, and the second network device acquires the template configuration information from the other human-machine interaction device and generates the at least one template based on the acquired template configuration information. This is not limited in this embodiment of the present application. In an optional implementation, after generating the at least one template, the second network device may transmit the at least one template to another device in the communication network, so that the other device can determine the target template from the received at least one template. The at least one template may be transmitted by using the NETCONF protocol or the like. The other device may include the first network device in this embodiment of the present application. Specifically, the second network device may send at least one template to the first network device, which is not limited in this embodiment of the present application.
[0085] For example, step 201 is performed in which the first network device sends at least one template to the second network device, or step 204 is performed in which the second network device sends at least one template to the first network device, so that the first network device and the second network device can pre-store at least one identical template. In this way, the first network device and the second network device determine a target template based on the at least one template, and determine a route association constraint or a route association attribute to be associated with the target forwarding route.
[0086] Step 205: The second network device performs an operation associated with the target forwarding path based on the target template.
[0087] Optionally, the second network device obtains association information from the target template, determines the association information in the target template as the association information associated with the target forwarding path, and performs an associated operation based on the association information in the target template to perform the operation associated with the target forwarding path. As described in step 201, the association information includes at least one path association attribute and / or at least one path association constraint. The association information may include at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. The path detection indication information may include BFD indication information, and the BFD indication information may be SBFD indication information in particular. The traffic statistics indication information, hot standby protection indication information, path detection indication information, and path check indication information may all be used as path association attributes. The association information may further include path association constraints, such as path bandwidth constraints and path delay constraints. In the target template, the path association attributes may indicate a device from which to obtain attribute information associated with the target forwarding path, and the path association constraints may indicate constraints that the target forwarding path needs to satisfy. The target template may include at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. In addition, the target template may further include path association constraints, such as a path bandwidth constraint and a path delay constraint. The second network device may be a network device on the target forwarding path, such as an ingress device on the target forwarding path. In an optional implementation, the second network device performing an operation associated with the target forwarding path based on the target template may include the following four possible cases:
[0088] First case: When the target template includes traffic statistics indication information, traffic statistics are collected on the target forwarding path.
[0089] When the second network device determines that the target template includes traffic statistics indication information, the second network device may enable a traffic statistics collection function and may collect traffic statistics on the target forwarding path. For example, the target forwarding path is used for service forwarding. The second network device may collect statistics on an amount of service packets received by the second network device from a previous hop device of the second network device on the target forwarding path to collect statistics on traffic flowing into the second network device, or may collect statistics on an amount of service packets forwarded by the second network device to a next hop device of the second network device on the target forwarding path to collect statistics on traffic flowing out of the second network device.
[0090] Use Fig. 5 as an example. For example, the second network device may be the network device 102 shown in Fig. 5, and the target forwarding path is the forwarding path S1 shown in Fig. 5. When the network device 102 determines that the target template includes traffic statistics indication information, the network device 102 collects statistics on the amount of service packets forwarded by the network device 102 to the network device 103 (i.e., the next hop device of the network device 102 on the forwarding path S1), and collects statistics on the traffic flowing out from the network device 102. In this way, traffic statistics are collected on the forwarding path S1. As another example, the second network device may be the network device 103 shown in Fig. 5, and the target forwarding path is the forwarding path S1 shown in Fig. 5. When the network device 103 determines that the target template includes traffic statistics indication information, the network device 103: collects statistics on the amount of service packets received from the network device 102 (i.e., the previous hop device of the network device 103 on the forwarding path S1) and collects statistics on the traffic flowing into the network device 103; or collects statistics on the amount of service packets forwarded by the network device 103 to the network device 104 (i.e., the next hop device of the network device 103 on the forwarding path S1) and collects statistics on the traffic flowing out of the network device 103. In this way, traffic statistics are collected on the forwarding path S1.
[0091] Second case: When the target template includes hot standby protection indication information, if there is a failure in the target forwarding path, the forwarding path is switched to the backup path of the target forwarding path.
[0092] When the second network device determines that the target template includes hot standby protection indication information, the second network device may enable a hot standby protection function and determine a backup path of the target forwarding path. The second network device may calculate or select an available backup path based on the received hot standby protection indication information. Alternatively, the second network device may also receive backup path indication information from the first network device to obtain the backup path. If there is a failure in the target forwarding path, the second network device switches the forwarding path to the backup path of the target forwarding path. Specifically, in the process of forwarding a service, if the second network device determines that there is a failure in the target forwarding path, the second network device switches the service from the target forwarding path to the backup path for forwarding. For example, the second network device forwards a service packet that should be forwarded to the next hop device of the second network device on the target forwarding path to the next hop device of the second network device on the backup path, and switches the service from the target forwarding path to the backup path for forwarding. The failure of the target forwarding path may include, but is not limited to: the target forwarding path is disconnected (e.g., the link between two network devices on the target forwarding path is disconnected), a network device on the target forwarding path has a failure, or a port of a network device on the target forwarding path has a failure, which is not limited in this embodiment of the present application.
[0093] Take Fig. 5 as an example. For example, the second network device may be the network device 102 shown in Fig. 5, and the target forwarding path is the forwarding path S1 shown in Fig. 5. When the network device 102 determines that the target template includes hot standby protection indication information, the network device 102 determines that the backup path of the forwarding path S1 may be the forwarding path S2 shown in Fig. 5. When a failure occurs in the forwarding path S1, the network device 102 forwards the service packet that should be forwarded to the network device 103 (i.e., the next hop device of the network device 102 on the forwarding path S1) to the network device 107 (i.e., the next hop device of the network device 102 on the forwarding path S2), and switches the service from the forwarding path S1 to the forwarding path S2 for forwarding.
[0094] Optionally, the target forwarding path is calculated by a first network device (here, an example in which the first network device is a control device is used for explanation) and sent to a second network device. If the first network device determines that the path association attribute of the target forwarding path includes hot standby protection indication information, the first network device may send a backup path of the target forwarding path to the second network device when sending the target forwarding path to the second network device. That is, the first network device sends two forwarding paths to the second network device at the same time. When the second network device determines that the target template includes hot standby protection indication information, the second network device may determine one of the two forwarding paths as the target forwarding path and determine the other forwarding path as the backup path of the target forwarding path. For example, when sending the two forwarding paths to the second network device, the first network device may send indication information to the second network device to indicate which forwarding path is the primary path and which forwarding path is the backup path. The second network device determines the primary path as the target forwarding path and determines the backup path as the backup path of the target forwarding path according to the instruction of the first network device. This is not limited in this embodiment of the present application. For example, use FIG. 5 as an example. The first network device may be the network device 101 shown in FIG. 5, the second network device may be the network device 102 shown in FIG. 5, and the target forwarding path is the forwarding path S1 shown in FIG. 5. If the network device 101 determines that the path association attribute of the forwarding path S1 includes hot standby protection indication information, the network device 101 may send the backup path (e.g., forwarding path S2) of the forwarding path S1 to the network device 102 when sending the forwarding path S1 to the network device 102.In addition, the network device 101 may send instruction information to the network device 102 to indicate to the network device 102 that the forwarding path S1 is the primary path and the forwarding path S2 is the backup path. When the network device 102 determines that the target template includes hot standby protection instruction information, the network device 102 determines the forwarding path S1 as the target forwarding path and determines the forwarding path S2 as the backup path of the forwarding path S1 based on the instruction of the network device 101. For example, for a target forwarding path in the form of an SR-TE tunnel, a method of obtaining a backup path may be used.
[0095] Optionally, the target forwarding path is calculated by a first network device (here, an example in which the first network device is a control device is used for explanation) and sent to a second network device. If the first network device determines that the path association attribute of the target forwarding path includes hot standby protection indication information, the first network device may send a plurality of forwarding paths including the target forwarding path to the second network device. If the second network device determines that the target template includes hot standby protection indication information, the second network device may determine the target forwarding path and a backup path of the target forwarding path from the plurality of forwarding paths. For example, use FIG. 5 as an example. The first network device may be the network device 101 shown in FIG. 5, the second network device may be the network device 102 shown in FIG. 5, and the target forwarding path is the forwarding path S1 shown in FIG. 5. If the network device 101 determines that the path association attribute of the forwarding path S1 includes hot standby protection indication information, the network device 101 sends a plurality of forwarding paths including the forwarding path S1 to the network device 102. For example, the network device 101 transmits forwarding paths S1, S2, and S3 (for example, forwarding path S3 is network device 102 → network device 103 → network device 106 → network device 105) to the network device 102. When the network device 102 determines that the target template includes hot standby protection instruction information, the network device 102 may determine a target forwarding path and a backup path for the target forwarding path from the multiple forwarding paths. For example, the network device 102 determines the forwarding path S1 as the target forwarding path and the forwarding path S2 as the backup path for the forwarding path S1. For example, the SR policy -shape For the target forwarding path of the formula, a scheme of obtaining a backup path may be used.
[0096] For ease of explanation, this embodiment of the present application uses an example of "a first network device sends a forwarding path to a second network device" (e.g., "the first network device may send a plurality of forwarding paths, including a target forwarding path, to the second network device") for explanation. Those skilled in the art may understand that in practical application, the first network device may send route indication information, such as a route identifier or route information, indicating a forwarding path to the second network device. This is not limited in this embodiment of the present application.
[0097] Third case: When the target template includes path detection instruction information, detect whether there is a failure in the target forwarding path.
[0098] When the second network device determines that the target template includes path detection indication information, the second network device may enable a path detection function and detect whether the target forwarding path has a failure. The path detection indication information may include BFD indication information, such as SBFD indication information in particular, which instructs the second network device to detect whether the target forwarding path has a failure based on BFD technology.
[0099] In one example, when the second network device determines that the target template includes the path detection instruction information, after enabling the path detection function, the second network device may send a detection packet to an exit device on the target forwarding path and detect whether a response packet to the detection packet is received within a specified period. If a response packet to the detection packet is received within a specified period, there is no failure in the target forwarding path. Alternatively, if a response packet to the detection packet is not received within a specified period, there is a failure in the target forwarding path. Alternatively, a response packet to the detection packet is received within a specified period, but the status information included in the response packet indicates that a failure exists in the target forwarding path. For example, there is a failure in the interface between the exit device and the user side device. In this case, there is a failure in the target forwarding path. For example, the second network device may periodically send a detection packet to the exit device of the target forwarding path (i.e., the second network device periodically detects whether there is a failure in the target forwarding path).
[0100] For example, take Fig. 5 as an example. The second network device may be the network device 102 shown in Fig. 5, and the target forwarding path is the forwarding path S1 shown in Fig. 5. When the network device 102 determines that the target template contains BFD indication information, the network device 102 detects whether the forwarding path S1 has a failure based on the BFD technology.
[0101] Fourth case: When the target template includes path check indication information, the connectivity of the target forwarding path is checked based on the network topology.
[0102] When the second network device determines that the target template includes the path check indication information, the second network device may enable a path check function and check the connectivity of the target forwarding path based on the network topology of the communication network. That is, the second network device may determine whether the target forwarding path is connected based on the network topology of the communication network. For example, the second network device may determine whether a packet sent by an ingress device (e.g., the ingress device may be the second network device) of the target forwarding path can reach a destination device of the target forwarding path based on the network topology of the communication network. Optionally, the second network device may further determine whether a packet sent by an egress device of the target forwarding path can reach an egress device of the target forwarding path based on the network topology of the communication network. For example, the first network device may also obtain the connectivity of the path from the egress device to the egress device, such as by negotiating and interacting with the second network device. In other words, the second network device may check the connectivity of the unidirectional path or check the connectivity of the bidirectional path. This is not limited in this embodiment of the present application. For example, the target forwarding path may be an SR policy, an ingress device of the target forwarding path may be a head node of the SR policy, and an egress device of the target forwarding path may be an end node of the SR policy. When the head node determines that the target template includes path check instruction information, the head node may determine the connectivity of the path from the head node to the end node based on the network topology of the communication network, and may determine the connectivity of the path from the end node to the head node.
[0103] For example, using Fig. 5 as an example, the second network device may be the network device 102 shown in Fig. 5, and the target forwarding path is the forwarding path S1 shown in Fig. 5. When the network device 102 determines that the target template includes path check instruction information, the network device 102 checks the connectivity of the forwarding path S1 based on the network topology of the communication network.
[0104] The fourth case may be considered as detecting whether there is a failure in the target forwarding path. In some implementation scenarios, the fourth case may be applicable to checking the reachability of the target forwarding path after the target forwarding path is established and before the service is forwarded through the target forwarding path, i.e., to pre-check whether the packet can be forwarded successfully through the target forwarding path. 4 The above case is applicable to detecting whether the target forwarding path has a failure in the process of forwarding a service through the target forwarding path, which is not limited in this embodiment of the present application.
[0105] Based on the above steps 201 to 203, it is easy to understand that the packet received by the second network device further carries routing information, and the routing information indicates a target forwarding path. In this case, the second network device may further obtain the routing information by analyzing the packet. In an optional implementation, before the above step 205, the method further includes: the second network device determines a target forwarding path based on the routing information. The target forwarding path may include one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy. Based on different tunnel types, the target forwarding path may be implemented by MPLS-based label forwarding or SRv6 SID-based IPv6 forwarding. The following describes a process in which the second network device determines a target forwarding path based on the routing information.
[0106] Optionally, the route indication information may be route information or a route identifier (e.g., a route ID). The route information may be strict route information or loose route information. The strict route information indicates a complete target forwarding path, and the strict route information includes indication information indicating each network device on the target forwarding path and / or indication information indicating links between network devices on the target forwarding path. The loose route information indicates key network devices and / or links between key network devices on the target forwarding path, and the loose route information includes indication information indicating key network devices on the target forwarding path and / or indication information indicating links between key network devices on the target forwarding path. In one example, the loose route information indicates an exit device of the target forwarding path. Another network device on the target forwarding path is determined by a network device (e.g., an ingress device of the target forwarding path) that receives the loose route information through a route calculation. Alternatively, the network device that receives the loose route information determines the outbound interface of the next hop based on local routing information.
[0107] In the embodiment of the present application, according to different routing information, the implementation of the second network device determining a target forwarding path according to the routing information is different. An example in which the routing information is a path identifier or a path information is used below to describe two possible implementations of the process in which the second network device determines a target forwarding path.
[0108] Implementation 1: The second network device determines a target forwarding path based on the path identifier.
[0109] Optionally, the target forwarding path is an established forwarding path in the communication network. For example, the target forwarding path is a forwarding path previously sent by a first network device (for example, the first network device is a control device) to a second network device. A packet sent by the first network device to the second network device may carry a path identifier of the target forwarding path. The second network device determines the forwarding path in the communication network and indicated by the path identifier as the target forwarding path.
[0110] For example, using FIG. 5 as an example, the first network device may be the network device 101, the second network device may be the network device 102, and the communication network includes a forwarding path S1 and a forwarding path S2. A packet sent by the network device 101 to the network device 102 carries a path identifier “S1” of a target forwarding path, and the network device 102 determines the forwarding path (i.e., the forwarding path S1) that is in the communication network and is indicated by the path identifier “S1” as the target forwarding path.
[0111] Implementation 2: The second network device determines a target forwarding path based on the path information.
[0112] Optionally, the packet sent by the first network device to the second network device may carry strict route information indicating the target forwarding path, and the second network device determines the target forwarding path based on the strict route information indicating the target forwarding path. For example, when the target forwarding path is in the form of an RSVP-TE tunnel or an SR-TE tunnel, a method of obtaining a route may be used. For example, using FIG. 5 as an example. The first network device may be a network device 101, the second network device may be a network device 102, the communication network includes a forwarding path S1 and a forwarding path S2, and both the forwarding path S1 and the forwarding path S2 may be RSVP-TE tunnels. The packet sent by the network device 101 to the network device 102 carries strict path information "102 → 103 → 104 → 105" indicating the target forwarding path (102, 103, 104 and 105 are successively the indication information of the network device 102, the indication information of the network device 103, the indication information of the network device 104 and the indication information of the network device 105, and "→" indicates the link between the network devices). The forwarding path indicated by the strict path information is the network device 102 → the network device 103 → the network device 104 → the network device 105. The forwarding path indicated by the strict path information is also the forwarding path S1 in the communication network. Therefore, the network device 102 determines the forwarding path S1 as the target forwarding path.
[0113] Optionally, the packet sent by the first network device to the second network device may carry loose route information indicating the target forwarding path, and the second network device determines the target forwarding path based on the loose route information indicating the target forwarding path. Optionally, the second network device determines the key network devices and / or links between the key network devices on the target forwarding path based on the loose route information indicating the target forwarding path, and determines the non-key network devices, links between the non-key network devices, and links between the non-key network devices and the key network devices on the target forwarding path based on the network topology of the communication network through the route calculation. That is, the network devices other than the key network devices and / or the network devices other than the links between the key network devices on the target forwarding path are determined by the second network device through the route calculation. Optionally, the second network device forwards the service packet carrying the loose route information by using an outbound interface on the device based on local routing information, rather than performing route calculation for the complete path, indicating that the service packet can be forwarded on the path segment indicated by the loose route information. For example, in the case of a target forwarding path in the form of an SR-TE tunnel or an SR policy, a method of obtaining the route may be used.
[0114] In conclusion, in the method for acquiring route association information according to this embodiment of the present application, a first network device generates a packet carrying template indication information, and sends the packet to a second network device. A target template indicated by the template indication information is associated with a target forwarding path. After receiving the packet, the second network device determines a target template according to the template indication information carried in the packet, and performs an operation associated with the target forwarding path according to the target template. In this way, the first network device can include template indication information corresponding to different templates in the packet to indicate that different receiving network devices determine a target template associated with the target forwarding path, and determine association information, such as route attributes or route constraints, associated with the target forwarding path according to the target template. Since the route association information is published in the manner of carrying the template indication information provided in the present method, the flexibility of acquiring route association information can be improved without affecting the stability of the protocol. In the method for acquiring route association information according to this embodiment of the present application, the route association information can be conveniently transmitted between different network devices (e.g., a PCE device and a PCC device). Based on this embodiment of the present application, if the route association information is subsequently extended, there is no need to change the protocol.
[0115] In this embodiment of the present application, the first network device may be a PCE device, and the second network device may be a PCC device. In the following, in conjunction with Figure 6, a specific example of a method for obtaining route association information according to an embodiment of the present application is used for description.
[0116] FIG. 6 is a schematic diagram of a method for acquiring path association information according to an embodiment of the present application. As shown in FIG. 6, a communication network includes a PCE device and network devices A-F, and the network devices A-F may all be PCC devices. The network device A is a head node of a forwarding path P1 (the forwarding path P1 is network device A→network device B→network device C→network device D). At least one template is pre-stored separately in the PCE device and the PCC device, each template includes corresponding association information, and the at least one template in the PCE device is the same as the at least one template in the network device A (the format of the template is the same, and the association information in the template is the same). In this embodiment of the present application, the path association information may include at least one path association attribute and / or at least one path association constraint. For example, the path association constraint may include a path bandwidth constraint and / or a path delay constraint, and the path association attribute may include at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information.
[0117] During a specific implementation of the process of establishing a forwarding path, the PCE device may first discover PCE members (e.g., PCC devices A to F). After the discovery of the PCE members is completed, the PCE device establishes a session (e.g., PCEP session) with the PCC devices A to F and exchanges information. The PCE device may calculate a forwarding path based on a service trigger or based on a trigger of a path computation request sent by a PCC device (e.g., PCC device A) (PCC device A may send a path computation request to a PCE device based on a user trigger), and send path information indicating the forwarding path to the PCC device (e.g., PCC device A). The PCC device establishes a forwarding path based on the path information indicating the forwarding path. For example, the PCE device sends path information indicating a forwarding path P1 to the PCC device A, and the PCC device A establishes a forwarding path P1 based on the path information indicating the forwarding path P1. A forwarding path actively calculated by a PCE device based on a service trigger may be called a PCE-initiated forwarding path, such as a PCE-initiated tunnel or a PCE-initiated SR policy.
[0118] In this embodiment of the present application, the route information indicating the forwarding path may be strict route information or loose route information. For example, in the case of an RSVP-TE tunnel, the route information may be strict route information, in the case of an SR policy, the route information may be loose route information, and in the case of an SR-TE tunnel, the route information may be strict route information or loose route information. Optionally, in the case of an SR-TE tunnel or an SR policy, the forwarding path may be jointly determined by the PCE device and the PCC device in cooperation. In the following, two scenarios of the process of establishing the forwarding path P1 are described using an example in which the PCE device actively calculates the forwarding path P1 in FIG. 6 based on a service trigger.
[0119] Scenario 1: Based on a service trigger, the PCE device actively calculates a forwarding path P1.
[0120] The PCE device determines path association information (e.g., at least one path association attribute and / or at least one path association constraint) based on the trigger of the service and based on the service requirement, and determines a target template from at least one template in the PCE device based on the path association information. The target template includes at least one path association attribute. In addition, the PCE device calculates a forwarding path P1 based on the network topology and / or the path association constraint of the communication network. Then, the PCE device sends the template identifier of the target template and the exact path information indicating the forwarding path P1 to the PCC device A by using a path computation label switched path initiate (path computation LSP initiate, PCInitiate) packet.
[0121] After receiving the PCInitiate packet, the PCC device A first establishes a forwarding path P1 based on the exact path information carried in the PCInitiate packet, which indicates the forwarding path P1, and sends the state information of the forwarding path P1 to the PCE device by using a path computation LSP state report (PCRpt) packet, and notifies the PCE device that the forwarding path P1 has been successfully established. After that, if the network topology of the communication network changes, the PCE device may update the forwarding path P1 by using a path computation LSP update request (PCUpd) packet.
[0122] After establishing the forwarding path P1 based on the exact path information carried in the PCInitiate packet and indicating the forwarding path P1, the PCC device A determines a target template associated with the forwarding path P1 from at least one template in the PCC device A based on the template identifier of the target template carried in the PCInitiate packet, and performs an operation associated with the forwarding path P1 based on the path association attribute in the target template. For example, when the target template includes traffic statistics indication information, the PCC device A collects traffic statistics of the forwarding path P1. When the target template includes hot standby protection indication information, if there is a failure in the forwarding path P1, the PCC device A switches the forwarding path to the backup path of the forwarding path P1. When the target template includes path detection indication information, the PCC device A detects whether there is a failure in the forwarding path S1. When the target template includes path check indication information, the PCC device A checks the connectivity of the forwarding path S1 based on the network topology.
[0123] Scenario 2: Based on a service trigger, the PCE device and the PCC device jointly determine the forwarding path P1.
[0124] The PCE device determines path association information (e.g., at least one path association attribute and / or at least one path association constraint) based on the service trigger and based on the service requirement, and determines a target template from at least one template in the PCE device based on the path association information. The target template includes at least one path association attribute and / or at least one path association constraint. In addition, the PCE device calculates a forwarding path P1 based on the network topology of the communication network and / or the at least one path association constraint. Then, the PCE device sends loose path information indicating the template identifier of the target template and the forwarding path P1 to the PCC device A by using a PCInitiate packet.
[0125] After receiving the PCInitiate packet, PCC device A first determines key network devices and / or links between key network devices on the forwarding path P1 based on the loose route information transmitted in the PCInitiate packet and indicating the forwarding path P1, and then determines a target template associated with the forwarding path P1 from at least one template in PCC device A based on the template identifier of the target template transmitted in the PCInitiate packet.
[0126] In a possible implementation, the PCC device A determines the non-key network devices, links between the non-key network devices, and links between the non-key network devices and the key network devices on the forwarding path P1 through path calculation based on the network topology of the communication network and at least one path association constraint in the target template, and then establishes the forwarding path P1 based on the key network devices, links between the non-key network devices, links between the non-key network devices, and links between the non-key network devices and the key network devices on the forwarding path P1. Then, the PCC device A sends the status information of the forwarding path P1 to the PCE device by using a PCRpt packet, and notifies the PCE device that the forwarding path P1 has been successfully established. After that, if the network topology of the communication network changes, the PCE device may update the forwarding path P1 by using a PCUpd packet, or the PCC device A updates the forwarding path P1 based on the changed network topology. In another possible implementation, the PCC device A determines a next outbound interface for forwarding the service packet based on the received loose route information of the forwarding route P1, and includes the loose route information in the service packet to indicate another device on the target forwarding route to complete the forwarding of the service packet based on the loose route information and the local routing table. In this way, the target forwarding route may be actually dynamically determined at the stage of forwarding the service packet.
[0127] The PCC device A may perform an operation associated with the forwarding path P1 based on a path association attribute in the target template associated with the forwarding path P1. For example, when the target template includes traffic statistics indication information, the PCC device A collects traffic statistics of the forwarding path P1. When the target template includes hot standby protection indication information, if there is a failure in the forwarding path P1, the PCC device A switches the forwarding path to the backup path of the forwarding path P1. When the target template includes path detection indication information, the PCC device A detects whether there is a failure in the forwarding path S1. When the target template includes path check indication information, the PCC device A checks the connectivity of the forwarding path S1 based on the network topology.
[0128] In the above two scenarios, in the embodiment of the present application, an example in which the PCE device sends route information indicating the forwarding path P1 and template indication information indicating a target template associated with the forwarding path P1 to the PCC device A in the same packet (e.g., PCInitiate packet) is used for explanation. In practical application, the PCE device may send the route information indicating the forwarding path P1 and the template indication information indicating the target template associated with the forwarding path P1 to the PCC device A by using different packets. For example, the PCE device first sends the route information indicating the forwarding path P1 to the PCC device A by using a PCInitiate packet, and then sends the template indication information indicating the target template associated with the forwarding path P1 to the PCC device A by using another packet. Optionally, when the PCE device sends route information indicating the forwarding path P1 and template indication information indicating a target template associated with the forwarding path P1 to the PCC device A by using different packets, the target template may further include a correspondence between the target template and the forwarding path P1 (e.g., the target template further includes an ID of the forwarding path P1), indicating that the target template is associated with the forwarding path P1.
[0129] In the above two scenarios, the process of the PCE device sending the route information of the forwarding path P1 to the PCC device through the PCInitiate packet and updating the forwarding path P1 through the PCUpd packet can be found in Request for Comments (RFC) 8281, draft-barth-pce-segment-routing-policy-cp, draft-koldychev-pce-multipath and draft-ietf-idr-segment-routing-te-policy published by the Internet engineering task force (IETF). The above contents are all incorporated by reference into this application.
[0130] The following provides an apparatus embodiment of the present application, which can be used to implement the method embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the method embodiment of the present application.
[0131] 7 is a schematic diagram of a logical structure of a first network device 700 according to an embodiment of the present application. The first network device 700 may be a control device in a communication network. For example, the first network device 700 is a PCE device. See FIG. 7. The first network device 700 may include, but is not limited to: a generating module 710 configured to generate a packet, where the packet carries template indication information, and the template indication information is associated with a target forwarding path, and for the implementation of the functions of the generating module 710, reference may be made to the relevant description of step 201 above; A sending module 720 configured to send the packet to the second network device, so as to enable the second network device to perform an operation associated with the target forwarding path according to the target template indicated by the template indication information. Here, for the implementation of the function of the sending module 720, reference may be made to the relevant description of step 202 above.
[0132] Optionally, the target template includes at least one route association attribute and / or at least one route association constraint.
[0133] Optionally, the packet further carries path indication information, the path indication information indicating a target forwarding path.
[0134] Optionally, continue to refer to Figure 7. The first network device 700 further includes an acquiring module 730 configured to acquire at least one template before the sending module 720 sends the packet to the second network device, where the target template belongs to the at least one template.
[0135] Optionally, the sending module 720 is further configured to send at least one template to the second network device before sending the packet to the second network device.
[0136] Optionally, the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information.
[0137] Optionally, the target forwarding path includes one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy.
[0138] Optionally, the packet is a PCEP packet or a BGP packet.
[0139] Optionally, the packet includes a TLV field, and the template indication information is within the TLV field.
[0140] Optionally, the template indication information is a template identifier.
[0141] Optionally, the second network device is a device on the target forwarding path.
[0142] Optionally, the first network device is a PCE device and the second network device is a PCC device.
[0143] In conclusion, based on the first network device according to this embodiment of the present application, the first network device generates a packet carrying template indication information, and sends the packet to the second network device. The target template indicated by the template indication information is associated with the target forwarding path. After receiving the packet, the second network device determines the target template according to the template indication information carried in the packet, and performs an operation associated with the target forwarding path according to the target template. In this way, the first network device can include template indication information corresponding to different templates in the packet to indicate that different receiving network devices determine association information, such as route attributes or route constraints, associated with the target forwarding path. Since the route association information is published in the manner of carrying template indication information provided in this embodiment of the present application, the flexibility of obtaining route association information can be improved without affecting the stability of the protocol.
[0144] 8 is a schematic diagram of a logical structure of a second network device 800 according to an embodiment of the present application. The second network device 800 may be a forwarding device in a communication network. For example, the second network device 800 is a PCC device. See FIG. 8. The second network device 800 may include, but is not limited to: a receiving module 810 configured to receive a packet from a first network device, where the packet carries template indication information, and the implementation of the function of the receiving module 810 can refer to the relevant description of step 203 above; a determining module 820 configured to determine a target template according to the template indication information, where the target template is associated with the target forwarding path, and the implementation of the function of the determining module 820 can refer to the relevant description of step 204 above; An execution module 830 configured to execute an operation associated with the target forwarding path according to the target template, where, for the implementation of the function of the execution module 830, reference may be made to the relevant description of step 205 above.
[0145] Optionally, the packet further carries routing information, and the determination module 820 is further configured to determine a target forwarding path based on the routing information.
[0146] Optionally, the target template includes at least one route association attribute and / or at least one route association constraint.
[0147] Optionally, continue to refer to Figure 8. The second network device 800 further includes: an acquiring module 840 configured to acquire at least one template before the determining module 820 determines a target template based on the template indication information, where the target template belongs to the at least one template;
[0148] The determining module 820 is configured to determine a target template from the at least one template based on the template indication information.
[0149] Optionally, the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information.
[0150] Optionally, the execution module 830 is configured to: When the target template includes traffic statistics indication information, collect traffic statistics of the target forwarding path; When the target template contains hot standby protection instruction information, if the target forwarding path has a failure, switch the forwarding path to the backup path of the target forwarding path; When the target template includes path detection instruction information, detect whether there is a failure in the target transmission path; When the target template includes path check instruction information, the connectivity of the target forwarding path is checked based on the network topology.
[0151] Optionally, the target forwarding path includes one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy.
[0152] Optionally, the packet is a PCEP packet or a BGP packet.
[0153] Optionally, the packet includes a TLV field, and the template indication information is within the TLV field.
[0154] Optionally, the template indication information is a template identifier.
[0155] Optionally, the second network device is a device on the target forwarding path.
[0156] Optionally, the first network device is a PCE device and the second network device is a PCC device.
[0157] In conclusion, according to this embodiment of the present application, based on a second network device, the second network device receives a packet carrying template indication information from the first network device. The target template indicated by the template indication information is associated with a target forwarding path. After receiving the packet, the second network device determines a target template based on the template indication information carried in the packet, and performs an operation associated with the target forwarding path based on the target template. In this way, the first network device can include template indication information corresponding to different templates in the packet to indicate that the second network device determines a target template associated with the target forwarding path, and determines association information associated with the target forwarding path based on the target template. Since the path association information is published in the manner of carrying template indication information provided in this embodiment of the present application, the flexibility of obtaining path association information can be improved without affecting the stability of the protocol.
[0158] It can be understood that the network device of this embodiment of the present application may further be implemented by using 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 method for obtaining route association information provided in the above-mentioned method embodiment may be implemented by using software. When the method for obtaining route association information provided in the above-mentioned method embodiment is implemented by using software, each module in the network device may alternatively be a software module.
[0159] Figure 9 is a schematic diagram of a hardware structure of a network device 900 according to an embodiment of the present application. The network device 900 may be the first network device or the second network device in the above embodiment. As shown in Figure 9, the network device 900 includes a main control board 910, an interface board 930 and an interface board 940. When there are multiple interface boards, a switching board (not shown in Figure 9) may be included. The switching board is configured to complete data exchange between the interface boards (the interface board is also called a line card or a service board).
[0160] The main control board 910 is configured to complete functions such as system management, device maintenance, and protocol processing. The interface board 930 and the interface board 940 are configured to provide various service interfaces (e.g., POS interface, GE interface, and ATM interface) and implement packet forwarding. The main control board 910 mainly includes three types of functional units: a system management control unit, a system clock unit, and a system maintenance unit. The main control board 910, the interface board 930, and the interface board 940 are connected to a system backboard through a system bus and implement interworking. The interface board 930 includes one or more processors 931. The processor 931 is configured to control and manage the interface boards and communicate with the central processing unit on the main control board. The memory 932 on the interface board 930 is configured to store at least one template. The processor 931 determines a target template associated with a target forwarding path by searching the at least one template stored in the memory 932, and performs an operation associated with the target forwarding path based on the target template.
[0161] The interface board 930 includes one or more network interfaces 933 configured to receive a packet carrying template indication information. The processor 931 determines a target template associated with a target forwarding path according to the template indication information carried in the packet received by the network interface 933. The specific implementation process is not described again here. The specific functions of the processor 931 are not described again one by one here.
[0162] As shown in FIG. 9, in this embodiment, it can be understood that multiple interface boards are included and a distributed forwarding mechanism is used. In this mechanism, the operation on the interface board 940 is basically similar to the operation on the interface board 930. For the sake of brevity, the details will not be described again. In addition, it can be understood that the processor 931 on the interface board 930 and / or the processor 941 on the interface board 940 in FIG. 9 may be dedicated hardware or chips for implementing the above-mentioned functions, such as a network processor or an application specific integrated circuit. This implementation is generally referred to as a method using dedicated hardware or chips for processing on the forwarding plane. In another implementation, the processor 931 on the interface board 930 and / or the processor 941 on the interface board 940 may alternatively use a general-purpose processor, such as a general-purpose central processing unit (CPU), to implement the above-mentioned functions.
[0163] In addition, it is noted that there may be one or more main control boards, and when there are multiple main control boards, the main control boards may include a primary main control board and a standby main control board. There may be one or more interface boards. A network device with more powerful data processing capabilities provides more interface boards. When multiple interface boards are present, the multiple interface boards can communicate with each other by using one or more switching boards, and the multiple interface boards can jointly implement load balancing and redundancy backup. In a centralized forwarding architecture, a network device may not require a switching board, and the interface board provides the function of processing service data for the entire system. In a distributed forwarding architecture, a network device includes multiple interface boards. Data exchange between multiple interface boards may be implemented by using switching boards, providing large capacity data exchange and processing capabilities. Thus, the data access and processing capabilities of a network device in a distributed architecture are better than those of a device in a centralized architecture. The specific architecture used depends on a specific network deployment scenario, which is not limited herein.
[0164] In a particular embodiment, the memory 932 may be a read-only memory (ROM) or another type of static storage device capable of storing static information and instructions, or a random access memory (RAM) or another type of dynamic storage device capable of storing information and instructions. The memory 932 may alternatively be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or another type of compact disc storage, an optical disc storage (including a compact disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk or another magnetic storage device, or any other medium that can be used to transmit or store expected program code in the form of instructions or data structures and that can be accessed by a computer. However, the memory 932 is not limited thereto. The memory 932 may exist independently and be connected to the processor 931 through a communication bus. Alternatively, the memory 932 and the processor 931 may be integrated together.
[0165] The memory 932 is configured to store a program code, and the processor 931 controls the execution of the program code to perform some or all of the steps of the method for obtaining route association information provided in the above-mentioned embodiments. The processor 931 is configured to execute the program code stored in the memory 932. The program code may include one or more software modules. The one or more software modules may be functional modules provided in any of the embodiments of FIG. 7 and FIG. 8.
[0166] In particular embodiments, the network interface 933 may be any transceiver-type device configured to communicate with another device or communications network, such as an Ethernet, a radio access network (RAN), or a wireless local area network (WLAN).
[0167] FIG. 10 is a schematic diagram of a hardware structure of another network device 1000 according to an embodiment of the present application. The network device 1000 can be the first network device or the second network device in any one of the above embodiments. Please refer to FIG. 10. The network device 1000 includes a processor 1002, a memory 1004, a communication interface 1006, and a bus 1008. The processor 1002, the memory 1004, and the communication interface 1006 are communicatively connected to each other by using the bus 1008. Those skilled in the art can understand that the connection manner between the processor 1002, the memory 1004, and the communication interface 1006 shown in FIG. 10 is merely an example. In the implementation process, the processor 1002, the memory 1004, and the communication interface 1006 may alternatively be communicatively connected to each other by another connection manner other than using the bus 1008.
[0168] The memory 1004 may be configured to store a computer program 10042. The computer program 10042 may include instructions and data. In this embodiment of the present application, the memory 1004 may be various types of storage media, such as RAM, ROM, non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical memory, and registers. In addition, the memory 1004 may include a hard disk and / or internal storage.
[0169] The processor 1002 may be a general-purpose processor. The general-purpose processor may be a processor that reads and executes a computer program (e.g., computer program 10042) stored in a memory (e.g., memory 1004) to perform specific steps and / or operations. In the process of performing the above steps and / or operations, the general-purpose processor may use data stored in the memory (e.g., memory 1004). For example, the general-purpose processor may execute the stored computer programs to generate module 710, obtain module 730, determine module 820, execute module 830, and obtain module 740. 840 The relevant functions of the above may be implemented. The general-purpose processor may be, for example, but is not limited to, a CPU. In addition, the processor 1002 may alternatively be a special-purpose processor. The special-purpose processor may be a processor specifically designed to perform certain steps and / or operations. The special-purpose processor may be, for example, but is not limited to, a digital signal processor (DSP), an ASIC, or an FPGA, etc. In addition, the processor 1002 may alternatively be a combination of multiple processors, for example, a multi-core processor. The processor 1002 may include at least one circuit to perform all or a part of the steps of the method for obtaining route association information provided in the above embodiment.
[0170] The communication interface 1006 may include an interface used to implement an interconnection of components inside the network device 1000, such as an input / output (I / O) interface, a physical interface or a logical interface, and an interface used to implement an interconnection between the network device 1000 and another device (e.g., a network device or a user equipment). The physical interface may be a gigabit Ethernet (GE) interface and may be configured to implement an interconnection between the network device 1000 and another device (e.g., a network device or a user equipment). The logical interface is an interface inside the network device 1000, and the logical interface may be configured to implement an interconnection of components inside the network device 1000. It is easily understood that the communication interface 1006 may be used by the network device 1000 to communicate with another network device and / or a user equipment. For example, the communication interface 1006 is used for transmitting and receiving packets between the network device 1000 and another network device. The communication interface 1006 may implement the relevant functions of the transmitting module 720 and the receiving module 810.
[0171] The bus 1008 may be any type of communication bus, such as a system bus, configured to implement an interconnection between the processor 1002, the memory 1004, and the communication interface 1006.
[0172] The above components may be located separately on separate chips, or at least some or all of the components may be located on the same chip. Whether the components are located separately on different chips or integrated on one or more chips usually depends on the requirements of the product design. This embodiment of the present application does not impose any restrictions on the specific implementation of the above components.
[0173] The network device 1000 shown in Fig. 10 is merely an example. In the implementation process, the network device 1000 may further include other components that are not listed one by one in this specification. The network device 1000 shown in Fig. 10 can acquire association information associated with a forwarding path by performing all or part of the steps of the method for acquiring path association information provided in the above embodiment.
[0174] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program, which, when executed by a processor, implements all or part of the steps of the method for obtaining path association information provided in the above method embodiments.
[0175] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to perform all or part of the method steps for obtaining path association information provided in the above method embodiments.
[0176] An embodiment of the present application provides a chip, the chip including a programmable logic circuit and / or program instructions, which when executed is configured to implement all or part of the steps of the method for obtaining path association information provided in the above method embodiment.
[0177] An embodiment of the present application further provides a communication system. The communication system includes a first network device and a second network device. The first network device may be the first network device shown in Figure 7, and the second network device may be the second network device shown in Figure 8. Alternatively, at least one of the first network device and the second network device may be the network device shown in Figure 9 or Figure 10. Optionally, the first network device is a PCE device, and the second network device is a PCC device.
[0178] All or part of the above embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When implementing the embodiments using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into a computer and executed, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, optical fiber, or digital subscriber line, etc.) or wirelessly (e.g., infrared, radio, or microwave). The computer-readable storage medium may be any available medium accessible by a computer, or a data storage device such as a server or data center that integrates one or more available media. The usable media may be magnetic media (eg, floppy disk, hard disk, or magnetic tape), optical media, semiconductor media (eg, solid state drive), and the like.
[0179] In this application, terms such as "first", "second", "third", "fourth", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "at least one" refers to one or more, and "plurality" refers to two or more. The term "at least one" is equivalent unless otherwise stated. The term "and / or" refers only to an association relationship between related objects and indicates that three relationships may exist. For example, A and / or B may represent three cases: only A is present, both A and B are present, and only B is present. In addition, the symbol " / " is generally used herein to indicate an "or" relationship between related objects.
[0180] Different types of embodiments, such as the method embodiment and the device embodiment provided in the embodiments of the present application, should be cross-referenced. This is not limited in the embodiments of the present application. The sequence of operations of the method embodiment provided in the embodiments of the present application can be appropriately adjusted, and operations can be added or deleted correspondingly based on the situation. All modified methods that can be easily understood by those skilled in the art without departing from the technical scope disclosed in the present application shall be included in the protection scope of the present application, and will not be described in detail again.
[0181] In the corresponding embodiments provided in the present application, it can be understood that the disclosed devices, etc. may be implemented in other configuration manners. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical functional division, and other divisions may be used in actual implementation. For example, multiple units or components may be combined or integrated into other systems, or some functions may be ignored or not performed. In addition, the shown or discussed mutual couplings or direct couplings or communication connections may be implemented through some interface. Indirect couplings or communication connections between devices or units may be implemented in an electrical or other form.
[0182] Units described as separate parts may or may not be physically separated, and parts described as units may or may not be physical units, i.e., located in one location or distributed across multiple network devices (e.g., terminal devices). Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
[0183] The above description is merely an exemplary implementation of the present application, but is not intended to limit the scope of protection of the present application. Any equivalent modifications or replacements that are easily understood by those skilled in the art within the technical scope disclosed in this application shall be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. According to an example of the present invention, the present application further provides the following embodiments. Embodiment 1: A method for obtaining route association information, performed by a first network device, comprising: generating a packet, the packet conveying template indication information, the template indication information indicating a target template, the target template being associated with a target forwarding path; and transmitting the packet to a second network device so that the second network device performs an operation associated with the target forwarding path based on the target template indicated by the template indication information. Embodiment 2: The method of embodiment 1, wherein the target template includes at least one route association attribute and / or at least one route association constraint.
[0023] Embodiment 3: The method of embodiment 1 or 2, wherein the packet further carries routing information, and the routing information indicates the target forwarding path. Embodiment 4: The method comprises: 4. The method of any one of embodiments 1 to 3, further comprising obtaining at least one template before sending the packet to the second network device, the target template belonging to the at least one template. Embodiment 5: The method comprises: 5. The method of embodiment 4, further comprising the step of transmitting the at least one template to the second network device before transmitting the packet to the second network device. Embodiment 6: The method according to any one of embodiments 1 to 5, wherein the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information.
[0023] Embodiment 7: A method for obtaining route association information, performed by a second network device, comprising: receiving a packet from a first network device, the packet carrying template indication information; determining a target template based on the template indication information, the target template being associated with a target forwarding path; performing an operation associated with the target forwarding path based on the target template.
[0023] Embodiment 8: The packet further carries routing information, and the method further comprises: 8. The method of embodiment 7, further comprising determining a target forwarding path based on the routing information. Embodiment 9: The method of embodiment 7 or 8, wherein the target template includes at least one route association attribute and / or at least one route association constraint. Embodiment 10: Before determining the target template based on the template indication information, the method includes obtaining at least one template, and the target template belongs to the at least one template. 10. The method of any one of embodiments 7 to 9, wherein the step of determining a target template based on the template indication information includes the step of determining the target template from the at least one template based on the template indication information. Embodiment 11: The method according to any one of embodiments 7 to 10, wherein the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information.
[0036] Embodiment 12: The step of performing an operation associated with the target forwarding path based on the target template includes: collecting traffic statistics of the target forwarding path when the target template includes the traffic statistics indication information; When the target template includes the hot standby protection indication information, if there is a failure in the target forwarding path, switching a forwarding path to a backup path of the target forwarding path; detecting whether the target forwarding path has a fault when the target template includes the path detection indication information; 12. The method of embodiment 11, comprising: when the target template includes the path check indication information, checking the connectivity of the target forwarding path based on a network topology.
[0023] Embodiment 13: The method of any one of embodiments 1 to 12, wherein the target forwarding path includes one of a segment routing traffic engineering (SR-TE) tunnel, a resource reservation protocol (RSVP-TE) traffic engineering tunnel, or a segment routing policy (SR) policy.
[0031] Embodiment 14: The method according to any one of embodiments 1 to 13, wherein the packet is a Path Computation Element Communication Protocol (PCEP) packet or a Border Gateway Protocol (BGP) packet.
[0023] Embodiment 15: The method according to any one of embodiments 1 to 14, wherein the packet includes a Type Length Value TLV field, and the template indication information is in the TLV field. Embodiment 16: The method according to any one of embodiments 1 to 15, wherein the template indication information is a template identifier.
[0031] Embodiment 17: The method according to any one of embodiments 1 to 16, wherein the second network device is a device on the target forwarding path.
[0031] Embodiment 18: The method according to any one of embodiments 1 to 17, wherein the first network device is a path computation element (PCE) device and the second network device is a path computation client (PCC) device. Embodiment 19: A first network device, comprising: a generation module configured to generate a packet, the packet carrying template indication information, the template indication information indicating a target template, the target template being associated with a target forwarding path; A first network device comprising: a transmitting module configured to transmit the packet to a second network device so that the second network device performs an operation associated with the target forwarding path based on the target template indicated by the template indication information. Embodiment 20: The first network device of embodiment 19, wherein the target template includes at least one route association attribute and / or at least one route association constraint. Embodiment 21: The first network device of embodiment 19 or 20, wherein the packet further carries routing information, and the routing information indicates the target forwarding path. Embodiment 22: The first network device, The first network device of any one of embodiments 19 to 21, further comprising an acquisition module configured to acquire at least one template before the transmission module transmits the packet to the second network device, and the target template belongs to the at least one template.
[0046] Embodiment 23: The first network device of embodiment 22, wherein the transmission module is further configured to transmit the at least one template to the second network device before transmitting the packet to the second network device. Embodiment 24: The first network device of any one of embodiments 19 to 23, wherein the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. Embodiment 25: A second network device, comprising: a receiving module configured to receive a packet from a first network device, the packet carrying template indication information; A determination module configured to determine a target template based on the template indication information, the target template being associated with a target forwarding path; an execution module configured to execute an operation associated with the target forwarding path based on the target template.
[0046] Embodiment 26: The second network device of embodiment 25, wherein the packet further carries routing information, and the determination module is further configured to determine a target forwarding path based on the routing information. Embodiment 27: The second network device of embodiment 25 or 26, wherein the target template includes at least one route association attribute and / or at least one route association constraint. Embodiment 28: The second network device, The determination module further includes an acquisition module configured to acquire at least one template before determining the target template based on the template indication information, and the target template belongs to the at least one template; 28. The second network device of any one of embodiments 25 to 27, wherein the determination module is configured to determine the target template from the at least one template based on the template indication information. Embodiment 29: The second network device of any one of embodiments 25 to 28, wherein the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information. Embodiment 30: The execution module includes: When the target template includes the traffic statistics indication information, collecting traffic statistics of the target forwarding path; When the target template includes the hot standby protection indication information, if there is a failure in the target forwarding path, switch a forwarding path to a backup path of the target forwarding path; When the target template includes the path detection indication information, detect whether the target transmission path has a fault; 30. The second network device of embodiment 29, configured to check connectivity of the target forwarding path based on a network topology when the target template includes the path check instruction information. Embodiment 31: The first network device described in any one of embodiments 19 to 24 or the second network device described in any one of embodiments 25 to 30, wherein the target forwarding path includes one of a segment routing traffic engineering (SR-TE) tunnel, a resource reservation protocol traffic engineering (RSVP-TE) tunnel, or a segment routing policy (SR) policy. Embodiment 32: The first network device described in any one of embodiments 19 to 24 or embodiment 31 or the second network device described in any one of embodiments 25 to 31, wherein the packet is a Route Computation Element Communication Protocol (PCEP) packet or a Border Gateway Protocol (BGP) packet. Embodiment 33: The first network device described in any one of embodiments 19 to 24 or any one of embodiments 31 to 32 or the second network device described in any one of embodiments 25 to 32, wherein the packet includes a Type Length Value TLV field, and the template indication information is within the TLV field. Embodiment 34: The first network device described in any one of embodiments 19 to 24 or any one of embodiments 31 to 33, or the second network device described in any one of embodiments 25 to 33, wherein the template instruction information is a template identifier. Embodiment 35: The first network device described in any one of embodiments 19 to 24 or any one of embodiments 31 to 34 or the second network device described in any one of embodiments 25 to 34, wherein the second network device is a device on the target forwarding path. Embodiment 36: The first network device described in any one of embodiments 19 to 24 or any one of embodiments 31 to 35 or the second network device described in any one of embodiments 25 to 35, wherein the first network device is a path computation element PCE device and the second network device is a path computation client PCC device. Embodiment 37: A network device comprising a memory and a processor, the memory is configured to store a computer program; A network device, wherein the processor is configured to execute the computer program stored in the memory to enable the network device to perform the method of any one of embodiments 1 to 18. Embodiment 38: A computer-readable storage medium, the computer-readable storage medium storing a computer program, the computer program implementing the method of any one of embodiments 1 to 18 when executed by a processor. Embodiment 39: A communication system comprising a first network device and a second network device, The first network device is the first network device according to any one of embodiments 19 to 24 or any one of embodiments 31 to 36, and the second network device is the second network device according to any one of embodiments 25 to 36; A communication system, wherein at least one of the first network device and the second network device is the network device described in embodiment 37.
Claims
1. 1. A method for obtaining route association information, performed by a first network device, comprising: determining, from the at least one template, a target template to be associated with the target forwarding path based on the service requirement; obtaining the target template; determining template indication information for the target template, the template indication information indicating the target template; generating a packet, the packet conveying the template indication information; sending the packet to a second network device, such that the second network device performs an operation associated with the target forwarding path based on the target template indicated by the template indication; A method comprising:
2. the target template includes at least one path association attribute and / or at least one path association constraint; The method of claim 1.
3. the packet further conveys routing information, the routing information indicating the target forwarding path. The method according to claim 1 or 2.
4. The method comprises: obtaining at least one template before transmitting the packet to the second network device, the target template belonging to the at least one template; transmitting the at least one template to the second network device; The method of claim 1 , further comprising:
5. The target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information; 5. The method according to any one of claims 1 to 4.
6. The target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path check indication information; The second network device performing an operation associated with the target forwarding path based on the target template indicated by the template indication information, When the target template includes the traffic statistics indication information, collecting traffic statistics of the target forwarding path; When the target template includes the hot standby protection indication information, if there is a failure in the target forwarding path, switching a forwarding path to a backup path of the target forwarding path; Detecting whether the target forwarding path has a fault when the target template includes the path detection indication information; When the target template includes the path check instruction information, checking the connectivity of the target forwarding path based on a network topology; The method of any one of claims 1 to 5, comprising:
7. the target forwarding path comprises one of a segment routing and traffic engineering (SR-TE) tunnel, a resource reservation protocol and traffic engineering (RSVP-TE) tunnel, or a segment routing (SR) policy; 7. The method according to any one of claims 1 to 6.
8. The packet is a Path Computation Element Communication Protocol (PCEP) packet or a Border Gateway Protocol (BGP) packet.
8. The method according to any one of claims 1 to 7.
9. the packet includes a Type Length Value (TLV) field, and the template indication information is within the TLV field.
9. The method according to any one of claims 1 to 8.
10. A first network device, the first network device comprising: An acquisition module configured to determine a target template associated with a target forwarding path from at least one template based on a service requirement, acquire the target template, and determine template indication information of the target template, where the template indication information indicates the target template; a generation module configured to generate a packet, the packet conveying the template indication information; and a sending module configured to send the packet to a second network device, such that the second network device performs an operation associated with the target forwarding path based on the target template indicated by the template indication; A first network device comprising:
11. A network device comprising a memory and a processor, the memory is configured to store a computer program; The processor is configured to execute the computer program stored in the memory to enable the network device to perform the method of any one of claims 1 to 9. Network devices.
Citation Information
Patent Citations
Information management system and information management method
CN112106333A
A method for establishing segment routing for an IPV6 tunnel
JP2020526989A
Opaque profile identifiers for path computation element protocol
US20150249591A1
Information management system and information management method
US20210250238A1
Information management system and information management method
WO2019221170A1
