Method, device and system for acquiring path association information
By carrying template indication information in the message, network devices are allowed to determine the target template associated with the target forwarding path, which solves the problem of poor path constraint information carrying flexibility in the prior art, and achieves the effect of improving the flexibility of obtaining path association information without affecting the stability of the protocol.
Patent Information
- Application Number
- CN202510168471.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-10
- Publication Date
- 2025-06-20
AI Technical Summary
The prior art has poor flexibility when carrying path constraint information, and frequent modification of protocol standards to improve flexibility will affect the stability and advancement efficiency of the protocol.
By carrying template indication information in the message, the receiving network device is instructed to determine the target template associated with the target forwarding path, thereby obtaining path association information. This method allows the use of different templates and improves the flexibility to obtain path-related information.
On the basis of not affecting the stability of the protocol, the flexibility of obtaining path association information is improved, and it can adapt to the path constraint category changes of different forwarding paths.
Smart Images

Figure CN120186072A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202011246059.0, and the filing date of the original application is November 10, 2020. The entire content of the original application is incorporated herein by reference. Technical Field
[0002] This application relates to the field of network technologies, and particularly to a method, device, and system for obtaining path association information. Background Art
[0003] A communication network usually includes a controller and multiple forwarding devices. The controller can calculate a forwarding path according to the network topology of the communication network and send the path information of the forwarding path to the forwarding devices on the forwarding path, so that the forwarding devices on the forwarding path perform service forwarding according to the forwarding path.
[0004] In an actual forwarding scenario, a forwarding device not only needs to know the path information of the forwarding path, but also needs to know the path constraints of the forwarding path, so as to facilitate the forwarding device to perform related operations. For example, the forwarding device also needs to know the bandwidth constraint of the forwarding path to reserve bandwidth for the forwarding path according to the bandwidth constraint of the forwarding path. Currently, the controller usually encapsulates the path constraints of the forwarding path in a message to send the path constraints of the forwarding path to the forwarding device.
[0005] However, when the current technical solution is implemented, it is necessary to define path constraint fields in the protocol to carry various types of path constraints. However, the types of path constraints required for a certain forwarding path vary in many cases, and the types of path constraints for different forwarding paths are often different. The flexibility of carrying path constraints by defining path constraint fields in the protocol is poor. If the supportability of the protocol standard is improved by frequently modifying and supplementing path constraint fields, it will affect the stability of the standard, and the standard promotion efficiency is also relatively low. Summary of the Invention
[0006] This application provides a method, device, and system for obtaining path association information, which can improve the flexibility of obtaining path association information such as path attributes or path constraints without affecting the stability of the protocol. The technical solution of this application is as follows:
[0007] In a first aspect, a method for obtaining path association information is provided, which is executed by a first network device. The method includes: generating a message that carries template indication information indicating a target template associated with a target forwarding path; sending the message to a second network device so that the second network device performs an operation associated with the target forwarding path according to the target template indicated by the template indication information. Wherein, the second network device may be a device on the target forwarding path. The target template may be associated with the target forwarding path through association information included in the target template.
[0008] In the technical solution provided in this application, the first network device can indicate different receiving network devices to determine a target template associated with a target forwarding path by carrying template indication information corresponding to different templates in a message, and determine association information associated with the target forwarding path according to the target template. By the method of carrying template indication information provided in this technical solution to publish path association information, the flexibility of obtaining path association information can be improved without affecting the stability of the protocol.
[0009] Optionally, the target template includes at least one path association attribute and / or at least one path association constraint.
[0010] Optionally, the message further carries path indication information indicating the target forwarding path. For example, the path indication information may be path information or a path identifier, and the path information may be strict path information or loose path information.
[0011] In the technical solution provided in this application, carrying path indication information in the message can facilitate the second network device to determine the target forwarding path according to the path indication information, so as to perform an operation associated with the target forwarding path.
[0012] Optionally, the method further includes: before sending the message to the second network device, obtaining at least one template, and the target template belongs to the at least one template. For example, the first network device obtains at least one template according to template configuration information, and the template configuration information may be template configuration information input by a user to the first network device.
[0013] In the technical solution provided in this application, the first network device obtaining at least one template can facilitate the first network device to determine the target template from the at least one template.
[0014] Optionally, the method further includes: before sending the message to the second network device, sending the at least one template to the second network device.
[0015] The technical solution provided by this application is that the first network device sends at least one template to the second network device, which can facilitate the second network device to obtain the at least one template, so as to facilitate the second network device to determine a target template associated with the target forwarding path from the at least one template in subsequent operations.
[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 verification indication information. Among them, the path detection indication information may be bidirectional forwarding detection (BFD) indication information, and the BFD indication information may specifically be seamless bidirectional forwarding detection (SBFD) indication information.
[0017] In a second aspect, a method for obtaining path association information is provided, which is executed by a second network device. The method includes: receiving a message from a first network device, where the message carries template indication information; determining a target template according to the template indication information, where the target template is associated with a target forwarding path; and performing an operation associated with the target forwarding path according to the target template. Wherein, the second network device is a device on the target forwarding path. The target template may be associated with the target forwarding path through association information included in the target template.
[0018] The technical solution provided by this application is that the first network device indicates the second network device to determine the target template associated with the target forwarding path by carrying template indication information corresponding to the target template in the message, and determines the association information associated with the target forwarding path according to the target template. By using the method of carrying template indication information provided by this technical solution to publish path association information, the flexibility of obtaining path association information can be improved without affecting the stability of the protocol.
[0019] Optionally, the message further carries path indication information, and the method further includes: determining the target forwarding path according to the path indication information. For example, the path indication information may be path information or a path identifier, and the path information may be strict path information or loose path information.
[0020] The technical solution provided by this application can facilitate the second network device to determine the target forwarding path according to the path indication information by carrying path indication information in the message, so as to perform an operation associated with the target forwarding path.
[0021] Optionally, the target template includes at least one path association attribute and / or at least one path association constraint.
[0022] Optionally, the method further includes: before determining the target template according to the template indication information, obtaining at least one template, and the target template belongs to the at least one template. Accordingly, determining the target template according to the template indication information includes: determining the target template from the at least one template according to the template indication information. Wherein, the second network device may obtain the at least one template according to the template configuration information, and the template configuration information may be the template configuration information input by the user to the second network device; or, 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 the at least one template obtained by the first network device according to the template configuration information.
[0023] In the technical solution provided by this application, the second network device obtaining at least one template can facilitate the second network device to determine the target template from the at least one template and perform an operation associated with the target forwarding path according to 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 verification indication information. Wherein, the path detection indication information may be BFD indication information, and the BFD indication information may specifically be SBFD indication information.
[0025] Optionally, performing an operation associated with the target forwarding path according to the target template includes: when the target template includes traffic statistics indication information, performing traffic statistics on the target forwarding path; when the target template includes hot standby protection indication information, if the target forwarding path fails, switching the forwarding path to the backup path of the target forwarding path; when the target template includes path detection indication information, detecting whether the target forwarding path fails; when the target template includes path verification indication information, verifying the connectivity of the target forwarding path according to the network topology.
[0026] Optionally, in the first aspect and the second aspect, the target forwarding path includes one of a segment routing traffic engineering (SR-TE) tunnel, a resource reservation protocol-traffic engineering (RSVP-TE) tunnel based on traffic engineering extension, or a segment routing policy (SR policy). According to the different tunnel types, it can be implemented by label forwarding based on multiprotocol label switching (MPLS), or Internet Protocol version 6 (IPv6) forwarding based on segment routing over Internet Protocol version 6 (SRv6) segment list (SID).
[0027] Optionally, in the first aspect and the second aspect, the message is a path computation element communication protocol (PCEP) message or a border gateway protocol (BGP) message.
[0028] Optionally, in the first aspect and the second aspect, the message includes a type length value (TLV) field, and the template indication information is located in the TLV field.
[0029] Optionally, in the first aspect and the second aspect, the template indication information is a template identifier. For example, a template identity (ID).
[0030] Optionally, in the first aspect and the second aspect, the first network device is a path calculation element (PCE) device, and the second network device is a path computation client (PCC) device.
[0031] In a third aspect, a network device is provided, and the network device includes modules for performing the methods provided in the first aspect or any optional manner of the first aspect as described above.
[0032] Fourthly, a network device is provided, which includes modules for performing the methods provided in the second aspect or any optional implementation manner of the second aspect as described above.
[0033] The modules in the third aspect or the fourth aspect as described above can be implemented based on software, hardware, or a combination of software and hardware, and the modules can be arbitrarily combined or divided based on specific implementations.
[0034] Fifthly, a network device is provided, including a memory and a processor;
[0035] The memory is used for storing a computer program;
[0036] The processor is used for executing the computer program stored in the memory to enable the network device to perform the methods provided in the first aspect or any optional implementation manner of the first aspect as described above, or to perform the methods provided in the second aspect or any optional implementation manner of the second aspect as described above.
[0037] Sixthly, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, it implements the methods provided in the first aspect or any optional implementation manner of the first aspect as described above, or implements the methods provided in the second aspect or any optional implementation manner of the second aspect as described above.
[0038] Seventhly, a computer program product containing instructions is provided. When the computer program product runs on a computer, it enables the computer to perform the methods provided in the first aspect or any optional implementation manner of the first aspect as described above, or to perform the methods provided in the second aspect or any optional implementation manner of the second aspect as described above.
[0039] Eighthly, a chip is provided, which includes programmable logic circuits and / or program instructions. When the chip runs, it is used to implement the methods provided in the first aspect or any optional implementation manner of the first aspect as described above, or to implement the methods provided in the second aspect or any optional implementation manner of the second aspect as described above.
[0040] Ninthly, a communication system is provided, including: a first network device and a second network device;
[0041] The first network device is the network device provided in the third aspect as described above, and the second network device is the network device provided in the fourth aspect as described above; or at least one of the first network device and the second network device is the network device provided in the fifth aspect as described above.
[0042] Optionally, the first network device is a PCE device, and the second network device is a PCC device.
[0043] The beneficial effects brought by the technical solution provided in this application are as follows:
[0044] The method, device, and system for obtaining path association information provided in this application. The first network device generates a message carrying template indication information and sends the message to the second network device. The target template indicated by the template indication information is associated with the target forwarding path. After receiving the message, the second network device determines the target template according to the template indication information carried in the message, and performs an operation associated with the target forwarding path according to the target template. Thus, the first network device can carry template indication information corresponding to different templates in the message to instruct different receiving network devices to determine the target template associated with the target forwarding path, and determine the association information such as path attributes or path constraints associated with the target forwarding path according to the target template. By using the method of carrying template indication information provided in the technical solution of this application to publish path association information, 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 is a schematic diagram of a communication network provided by an embodiment of this application;
[0046] Figure 2 is a flowchart of a method for obtaining path association information provided by an embodiment of this application;
[0047] Figure 3 is a schematic diagram of a TLV field provided by an embodiment of this application;
[0048] Figure 4 is a schematic diagram of another TLV field provided by an embodiment of this application;
[0049] Figure 5 is a schematic diagram of another communication network provided by an embodiment of this application;
[0050] Figure 6 is a schematic diagram of a method for obtaining path association information provided by an embodiment of this application;
[0051] Figure 7 is a schematic diagram of the logical structure of a first network device provided by an embodiment of this application;
[0052] Figure 8 is a schematic diagram of the logical structure of a second network device provided by an embodiment of this application;
[0053] Figure 9 is a schematic diagram of the hardware structure of a network device provided by an embodiment of this application;
[0054] Figure 10It is a schematic diagram of the hardware structure of another network device provided by an embodiment of the present application. Detailed implementation manners
[0055] To make the principles, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0056] The technical solution provided by the embodiment of the present application can be applied to a communication network, which can be, for example, a data center network (DCN), a metropolitan area network, a wide area network or a campus network, etc.
[0057] The communication network includes multiple network devices. Optionally, the multiple network devices include at least one control device and multiple forwarding devices. The multiple forwarding devices are communicatively connected, and each forwarding device is communicatively connected to the control device. The control device is used to control the forwarding devices, and the forwarding devices are used to forward services under the control of the control device. Among them, the forwarding device can be a switch, a router, a virtual switch or a virtual router, etc. And the multiple forwarding devices in the same communication network can be the same forwarding devices or different forwarding devices. For example, all the forwarding devices in the same communication network are routers, or some of the forwarding devices are routers and some are switches. The control device can be a controller, such as a terminal, a server, a functional module deployed in the server, a server cluster composed of several servers, or a cloud computing service center. The embodiments of the present application do not make any limitations in this regard.
[0058] The control device can calculate the forwarding path according to the network topology of the communication network and send the path information of the forwarding path to the forwarding devices on the forwarding path. The forwarding devices determine the forwarding path according to the received path information and forward services through the determined forwarding path. Among them, the forwarding path can include one of an SR-TE tunnel, an RSVP-TE tunnel or an SR policy. According to the different tunnel types, the forwarding path can be implemented through label forwarding based on MPLS or IPv6 forwarding based on SRv6 SID. The embodiments of the present application do not limit the implementable form of the forwarding path.
[0059] According to the traffic flow of the service, 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 also send the path information of the forwarding path to other devices on the forwarding path. This application embodiment does not make a limitation on this. Among them, the ingress device is a forwarding device located at the source end of the forwarding path (that is, the source forwarding device), and the egress device is a forwarding device located at the destination end of the forwarding path (that is, the destination forwarding device). The forwarding devices in the communication network may also be referred to as forwarding nodes. Among them, the ingress device may be referred to as the head node, the egress device may be referred to as the end node, and the transit device may be referred to as the transit node or the intermediate node. It is easy to understand that according to the length of the forwarding path, only the ingress device and the egress device may exist on the forwarding path, and there may be no transit device. Among them, the control device and the forwarding device may be based on BGP communication or PCEP communication. Exemplarily, the control device may be a PCE device, and the forwarding device (such as the ingress device) may be a PCC device. The PCE device and the PCC device are based on PCEP communication. Among them, the PCE device is an entity that can calculate the forwarding path according to the network topology. It may be a network node or a server. The PCE device can respond to the path calculation request in the communication network and calculate a forwarding path that meets the constraints according to the network topology of the communication network. The PCC device is a device that sends a path calculation request to the PCE device. Optionally, the PCC sends a path calculation request to the PCE device. The PCE application may be run on the PCE device, and the PCE application responds to the path calculation request to calculate the forwarding path.
[0060] In an actual forwarding scenario, the forwarding devices on the forwarding path not only need to know the path information of the forwarding path, but also need to know the path constraints of the forwarding path, so that the forwarding devices on the forwarding path can perform relevant operations. Then the control device may also send the path constraints of the forwarding path to the forwarding devices on the forwarding path. For example, the control device sends the bandwidth constraint of the forwarding path to the forwarding devices on the forwarding path, and the forwarding devices on the forwarding path reserve bandwidth according to the bandwidth constraint of the forwarding path.
[0061] Exemplarily, please refer to Figure 1, which shows a schematic diagram of a communication network provided by an embodiment of the present application. The communication network includes network devices 101 to 107. Network device 101 is a control device, and network devices 102 to 107 are all forwarding devices. Network device 101 can calculate a forwarding path according to the network topology of the communication network. For example, the forwarding path calculated by network device 101 is forwarding path S1 (this forwarding path S1 is: network device 102 -> network device 103 -> network device 104 -> network device 105). This network device 101 can send the path information of the forwarding path S1 and the path constraints of the forwarding path S1 (such as bandwidth constraints) to the network devices on the forwarding path S1 (such as network device 102, that is, the ingress device). This network device 102 determines the forwarding path S1 according to the received path information, and performs service forwarding through the forwarding path S1 according to the path constraints of the forwarding path S1. For example, bandwidth reservation is performed on the forwarding path S1 according to the bandwidth constraints of the forwarding path S1. It should be noted that Figure 1 The shown communication network is only for illustration and is not used to limit the technical solutions of the embodiments of the present application. In the specific implementation process, the communication network may also include other devices, and the number of control devices and the number of forwarding devices can be configured according to needs. In addition, those skilled in the art should understand that the embodiments of the present application take network device 101 sending the path information of the forwarding path S1 and the path constraints of the forwarding path S1 to network device 102 (that is, the ingress device) on the forwarding path S1 as an example for illustration. In actual applications, network device 101 can also send the path information of the forwarding path S1 and the path constraints of the forwarding path S1 to network devices 103 to 105 on the forwarding path S1. The embodiments of the present application do not make any limitations in this regard.
[0062] Currently, the control device usually encapsulates the path constraints of the forwarding path in a message to send the path constraints of the forwarding path to the forwarding devices on the forwarding path. For example, network device 101 encapsulates the path constraints of the forwarding path S1 in a message to send the path constraints of the forwarding path S1 to network device 102. However, as an implementation method for carrying the path constraints, it is necessary to define a path constraint field in the protocol to carry different types of path constraint information, such as information of types like bandwidth. However, the types of path constraints that a same forwarding path needs to satisfy may change, and the types of path constraints that different forwarding paths need to satisfy may also be different. Therefore, the flexibility of carrying path constraints by defining path constraint fields in the protocol is relatively poor.
[0063] In addition, the types of portable path association information provided in current standards are relatively limited, usually bandwidth constraints or latency constraints. However, with the continuous development of communication network technologies, it may be required that network devices support more types of path association information to implement other management or operations related to the forwarding path.
[0064] In view of this, embodiments of the present application provide a method, device, and system for obtaining path association information. In the technical solution provided by the embodiments of the present application, at least one template can be predefined. Each template in the at least one template includes corresponding association information (that is, the association information corresponding to the template). The first network device can determine the target template in the at least one template as the target template associated with the target forwarding path, encapsulate the template indication information used to indicate the target template in a message, and send the message to the second network device. The second network device can determine the target template according to the template indication information in the message, and perform an operation associated with the target forwarding path according to the target template. Thus, the first network device can indicate different receiving network devices to determine the association information associated with the target forwarding path, such as path attributes or path constraints, by carrying the template indication information corresponding to different templates in the message. By using the method of carrying template indication information provided by the embodiments of the present application to publish path association information, the flexibility of obtaining path association information can be improved without affecting the stability of the protocol.
[0065] In the embodiments of the present application, both the first network device and the second network device can be control devices (that is, there are at least two control devices in the communication network), or one of the first network device and the second network device is a control device, and the other is a path management device, or the first network device is a control device, and the second network device is a forwarding device on the target forwarding path, or both the first network device and the second network device are forwarding devices on the target forwarding path. The embodiments of the present application do not make any limitations in this regard. In the following description of the embodiments of the present application, an example is given where the first network device is a control device and the second network device is a forwarding device on the forwarding path.
[0066] Please refer to Figure 2 which shows a flowchart of a method for obtaining path association information provided by the embodiments of the present application. The method for obtaining path association information can be applied to a communication network as shown in Figure 1 The first network device described below can be a control device in the communication network, and the second network device is a device on the target forwarding path. For example, the second network device is an ingress device on the target forwarding path. As shown in Figure 2 the method may include the following steps:
[0067] Step 201: The first network device generates a message, which carries template indication information indicating a target template associated with a target forwarding path.
[0068] Optionally, the first network device may obtain the target template, then determine the template indication information of the target template, and generate a message 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. Exemplarily, the target template includes association information, and the target template is associated with the target forwarding path through 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 described in the embodiments of the present application includes at least one path association attribute and / or at least one path association constraint. The path association attribute can be used to indicate that the device obtains the attribute information associated with the forwarding path, such as path attribute information, attribute information of the service carried on the path, attribute information of the forwarding device on the path, etc. The path association constraint can be used to indicate the constraints that the forwarding path needs to meet. The constraints to be met here can be for the complete forwarding path or for 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 verification indication information. The path detection indication information may include BFD indication information, and the BFD indication information may specifically be SBFD indication information. Among them, the traffic statistics indication information, hot standby protection indication information, path detection indication information, and path verification indication information can 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, which are not limited in the embodiments of the present application.
[0070] In the embodiments of the present application, the indication information (such as traffic statistics indication information) included in the associated information may be information mainly having an indication function, that is, used to indicate the device receiving the associated information to determine the path attributes to be obtained or the path constraints to be satisfied, etc. Optionally, in addition to the indication function, the associated information may also have an enabling function, that is, the indication information instructs the device receiving the indication information to first enable the corresponding function, and then perform an operation associated with the corresponding forwarding path according to the indication information. In the embodiments 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 verification indication information. As an example, the traffic statistics indication information in the target template may be traffic statistics enabling information, the hot standby protection indication information may be hot standby protection enabling information, the path detection indication information may be path detection enabling information, and the path verification indication information may be path detection enabling information. Among them, the traffic statistics enabling information instructs the device receiving the target template (such as the second network device) to first enable the traffic statistics function, and then perform traffic statistics on the target forwarding path; the hot standby protection enabling information instructs the device receiving the target template to first enable the hot standby protection function, and then perform a hot standby operation on the target forwarding path; the path detection enabling information instructs the device receiving the target template to first enable the path detection function, and then detect whether the target forwarding path fails; the path verification enabling information instructs the device receiving the target template to first enable the path verification function, and then verify the connectivity of the target forwarding path.
[0071] Exemplarily, taking the target template including traffic statistics enabling information, hot standby protection enabling information, and SBFD enabling information as an example, the content of the target template may be as follows:
[0072] template 100
[0073] traffic-statistics enable
[0074] backup hot-standby enable
[0075] SBFD enable
[0076] Among them, "template 100" represents template 100, "100" represents the template identifier of the target template, "traffic-statistics enable" represents traffic statistics enabling information, "backup hot-standby enable" represents hot standby protection enabling information, and "SBFD enable" represents SBFD enabling information.
[0077] Optionally, the template indication information may be a template identifier, such as a template ID; or the template indication information may also be other information expression methods that can be used to indicate the target template. The message carrying the template indication information generated by the first network device may be a PCEP message or a BGP message. The message includes a TLV field, and the template indication information is located in the TLV field. Among them, the TLV field at least includes a type field and a length field. The value in the type field is used to indicate the type of the value in the TLV field, and the value in the length field is used to indicate the length of the value in the TLV field. Exemplarily, please refer to Figure 3 and Figure 4 , which shows schematic diagrams of two TLV fields provided by the embodiments of the present application. As Figure 3 and Figure 4 shown, the TLV field includes a type field and a length field, and the length of the TLV field is 4 bytes. As Figure 3 shown, the lengths of the type field and the length field in the TLV field are 2 bytes respectively. As Figure 4 shown, the TLV field further includes a reserved field. The lengths of the type field and the length field in the TLV field are 1 byte respectively, and the length of the reserved field is 2 bytes. Optionally, Figure 3 the TLV field shown may be the TLV field in a PCEP message, Figure 4 the TLV field shown may be the TLV field in a BGP message, Figure 4 the reserved field in the TLV field shown may be used to carry other information other than the template indication information, and the embodiments of the present application do not make any limitations in this regard.
[0078] Optionally, the target forwarding path described in the embodiments of this application may include one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy. According to the different tunnel types, the target forwarding path can be implemented through MPLS-based label forwarding or IPv6 forwarding based on SRv6 SIDs. As an alternative implementation, the packet generated by the first network device may further carry path indication information, which indicates the target forwarding path. Optionally, the path indication information may be path information or a path identifier (such as a path ID). Among them, the path information may be strict path information or loose path information. The strict path information indicates the complete target forwarding path. The strict path information may include indication information for indicating each network device on the target forwarding path and / or indication information for the links between the network devices on the target forwarding path. The strict path information may include hop-by-hop forwarding information on the target forwarding path. For example, the strict path information includes indication information for the ingress device, the egress device, and all intermediate devices between the ingress device and the egress device on the target forwarding path to achieve hop-by-hop specified forwarding. The loose path information indicates the key network devices on the target forwarding path and / or the links between the key network devices. The loose path information may include indication information for indicating the key network devices on the target forwarding path and / or indication information for the links between the key network devices on the target forwarding path. Other devices may exist between the network devices indicated by the indication information in the loose path information, or the indicated link is a partial link, etc. As an example, the loose path information indicates the egress device of the target forwarding path, and the loose path information is also the indication information of the egress device. Other network devices on the target forwarding path may be determined by the network device that receives the loose path information (such as the ingress device of the target forwarding path) through path calculation, or the network device that receives the loose path information may determine the next-hop network device on the path according to the local routing forwarding table. Among them, the indication information for indicating a network device may be the identifier of the network device, such as the SID of the network device; the indication information for indicating a link may be a link identifier, such as the SID of the link. Exemplarily, for an RSVP-TE tunnel, the packet may carry strict path information; for an SR-TE tunnel, the packet may carry strict path information or loose path information; for an SR policy, the packet may carry loose path information, such as path information specifying the head node and the tail node.
[0079] Exemplarily, please refer to Figure 5, which shows a schematic diagram of a forwarding path in a communication network provided by an embodiment of the present application. The communication network includes a forwarding path S1 and a forwarding path S2. The forwarding path S1 and the forwarding path S2 are each a complete path. The forwarding path S1 is: network device 102 -> network device 103 -> network device 104 -> network device 105. The forwarding path S2 is: network device 102 -> network device 107 -> network device 106 -> network device 105. The ingress device on the forwarding path S1 and the ingress device on the forwarding path S2 are both network device 102, and the egress device is both network device 105. Taking the forwarding path S1 as an example of the target forwarding path, the path indication information of the forwarding path S1 can be carried in the packet generated by the first network device (such as network device 101). The path indication information can be the path identifier "S1" of the forwarding path S1 or the path information used to indicate the forwarding path S1. Exemplarily, the path information used to indicate the forwarding path S1 can be strict path information, and the strict path information includes the indication information used to indicate the link between network devices 102 to 105. Or, the path information used to indicate the forwarding path S1 can be loose path information. The loose path information, for example, includes the indication information used to indicate network devices 104 and 105 on the forwarding path S1 (assuming that network devices 104 and 105 are the key network devices on the forwarding path S1), and / or the indication information used to indicate the link between network devices 104 and 105 (network device 104 -> network device 105). Or, the loose path information is the indication information used to indicate network device 105 (that is, the egress device on the forwarding path S1). The embodiments of the present application do not limit this.
[0080] In the embodiments of the present application, the first network device can obtain a target template from at least one template. It is easy to understand that the target template belongs to the at least one template, that is, the target template is one of the at least one templates. Each template in the at least one template can have a template identifier, and each template in the at least one template includes corresponding associated information. The first network device can determine the target template associated with the target forwarding path from the at least one template according to 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 can be located in the first network device or a third-party device (such as a server). The third-party device can be a device in the communication network where the first network device is located. The embodiments of the present application do not limit this.
[0081] Optionally, the at least one template is located in a third-party device (such as a server), and the first network device can 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 according to the service requirement. Alternatively, optionally, the at least one template is located in the first network device, and the at least one template can be generated and pre-stored by the first network device, such as by manual configuration or automatic generation, etc., or can also be sent to the first network device by other network devices (such as a second network device) and pre-stored by the first network device. The first network device can determine a target template associated with the target forwarding path from the at least one template pre-stored in itself according to the service requirement.
[0082] Taking the example that the at least one template is generated and pre-stored by the first network device, the first network device can generate the at least one template according to the template configuration information. Exemplarily, the first network device can provide a human-machine interface, and the user can input the template configuration information to the first network device through the human-machine interface, and the first network device generates the at least one template according to the template configuration information input by the user; or, the user can input the template configuration information through other human-machine interaction devices connected to the first network device, and the first network device obtains the template configuration information from the other human-machine interaction devices and generates the at least one template according to the obtained template configuration information. The embodiments of the present application do not limit this. As an optional implementation manner, after the first network device generates the at least one template, it can send the at least one template to other devices in the communication network, so that the other devices can perform matching according to the template indication information sent by the first network device in subsequent operations, and thus determine the target template from the at least one template that has been received. Among them, the manner of sending the at least one template can be using the NETCONF protocol, etc. The other devices can include the second network device described in the embodiments of the present application, that is, the first network device can send the at least one template to the second network device. The embodiments of the present application do not limit this.
[0083] Step 202: The first network device sends the message to the second network device.
[0084] After generating the message, the first network device can send the message to the second network device. The message carries template indication information, and the message can also carry path indication information.
[0085] Step 203: The second network device receives the message from the first network device.
[0086] Step 204: The second network device determines the target template according to the template indication information carried in the message.
[0087] Optionally, the second network device may parse the received packet, extract the template indication information from the packet, and then determine the target template according to the template indication information. As an alternative implementation, the second network device determines the target template from at least one template according to the template indication information. For example, the second network device determines the template indicated by the template indication information in the at least one template as the target template. Optionally, the template indication information is a template identifier, and each template in the at least one template may have a template identifier. The second network device compares the template identifier carried in the packet with the template identifiers of the at least one template, and determines the template in the at least one template with the same template identifier as the template identifier carried in the packet as the target template. Among them, the at least one template may be located in the second network device or a third-party device, and the third-party device may be a device in the communication network where the second network device is located. The embodiments of the present application do not limit this.
[0088] Optionally, the at least one template is located in a third-party device (such as 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 according to the template indication information. Alternatively, optionally, the at least one template is located in the second network device. The at least one template may be generated and pre-stored by the second network device, such as by manual configuration or automatic generation, etc. Or, it may also be sent to the second network device by another network device (such as 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 in itself according to the template indication information.
[0089] Taking the example that the at least one template is generated and pre - stored by a second network device, the second network device can generate the at least one template according to template configuration information. By way of example, the second network device can provide a human - machine interaction interface, through which a user can input template configuration information to the second network device, and the second network device generates the at least one template according to the template configuration information input by the user; or, the user can input template configuration information through another human - machine interaction device connected to the second network device, and the second network device obtains the template configuration information from the other human - machine interaction device and generates the at least one template according to the obtained template configuration information. The embodiments of the present application do not make any limitations in this regard. As an alternative implementation, after generating the at least one template, the second network device can send the at least one template to other devices in the communication network so that the other devices can determine a target template from the received at least one template. Among them, the method of sending the at least one template can be using the NETCONF protocol, etc. The other devices can include the first network device in the embodiments of the present application, that is, the second network device can send the at least one template to the first network device. The embodiments of the present application do not make any limitations in this regard.
[0090] By, for example, the first network device sending at least one template to the second network device as described in step 201, or the second network device sending at least one template to the first network device as described in step 204, the first network device and the second network device can pre - store the same at least one template, thereby facilitating the first network device and the second network device to determine the target template from the at least one template, and thereby determining the path - associated constraint or path - associated attribute associated with the target forwarding path.
[0091] Step 205: The second network device performs an operation associated with the target forwarding path according to the target template.
[0092] 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 relevant operations according to the association information in the target template, so as to perform operations 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 verification indication information. The path detection indication information may include BFD indication information, and the BFD indication information may specifically be SBFD indication information. Among them, traffic statistics indication information, hot standby protection indication information, path detection indication information, and path verification indication information may all be used as path association attributes, and the association information may further include path association constraints such as path bandwidth constraint and path delay constraint. Among them, in the target template, the path association attribute may be used to indicate that the device obtains attribute information associated with the target forwarding path, and the path association constraint may be used to indicate the constraints that the target forwarding path needs to meet. The target template may include at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path verification indication information, and the target template may further include path association constraints such as path bandwidth constraint and path delay constraint. The second network device may be a network device on the target forwarding path. For example, it may be the ingress device on the target forwarding path. As an optional implementation manner, the second network device performing operations associated with the target forwarding path according to the target template may include the following four possible cases:
[0093] The first case: When the target template includes traffic statistics indication information, traffic statistics are performed on the target forwarding path.
[0094] When the second network device determines that the target template includes traffic statistics indication information, the second network device may enable the traffic statistics function and perform traffic statistics on the target forwarding path. By way of example, the target forwarding path is used for service forwarding. The second network device may count the number of service packets received by the second network device from the previous-hop device of the second network device on the target forwarding path to count the traffic flowing into the second network device, or may count the number of service packets forwarded by the second network device to the next-hop device of the second network device on the target forwarding path to count the traffic flowing out of the second network device.
[0095] Take Figure 5 as an example. By way of example, the second network device may be Figure 5 the network device 102 shown in Figure 5For the forwarding path S1 shown in , when network device 102 determines that the target template includes traffic statistics indication information, network device 102 counts the number of service packets forwarded by network device 102 to network device 103 (i.e., the next-hop device of network device 102 on forwarding path S1) to count the traffic flowing out of network device 102, thereby performing traffic statistics for this forwarding path S1. By way of example, the second network device may be Figure 5 the network device 103 shown in , and the target forwarding path is Figure 5 the forwarding path S1 shown in . When network device 103 determines that the target template includes traffic statistics indication information, network device 103 counts the number of service packets received from network device 102 (i.e., the previous-hop device of network device 103 on forwarding path S1) to count the traffic flowing into network device 103, or may also count the number of service packets forwarded by network device 103 to network device 104 (i.e., the next-hop device of network device 103 on forwarding path S1) to count the traffic flowing out of network device 103, thereby performing traffic statistics for this forwarding path S1.
[0096] The second case: When the target template includes hot standby protection indication information, if the target forwarding path fails, the forwarding path is switched to the backup path of the target forwarding path.
[0097] When the second network device determines that the target template includes hot standby protection indication information, the second network device may enable the hot standby protection function and may determine the backup path of the target forwarding path. Among them, the second network device may calculate or select an available backup path by itself according to the received hot standby protection indication information, or the second network device may also receive the backup path indication information from the first network device to obtain the backup path. If the target forwarding path fails, the second network device switches the forwarding path to the backup path of the target forwarding path, that is, during the service forwarding process, if the second network device determines that the target forwarding path fails, the second network device switches the service from the target forwarding path to the backup path for forwarding. By way of example, the second network device forwards the service packets that should have been 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 to switch the service from the target forwarding path to the backup path for forwarding. Among them, the failure of the target forwarding path may include but is not limited to: the disconnection of the target forwarding path (for example, the link between two network devices on the target forwarding path is disconnected), the failure of a network device on the target forwarding path, or the failure of a port of a network device on the target forwarding path. The embodiments of the present application do not make any limitations in this regard.
[0098] TakeFigure 5 For example, illustratively, the second network device may be Figure 5 the network device 102 shown in Figure 5 the forwarding path S1 shown in Figure 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
[0099] Optionally, the target forwarding path is calculated and sent to the second network device by the first network device (here, the first network device is taken as an example of a control device). If the first network device determines that the path association attribute of the target forwarding path includes hot standby protection indication information, when the first network device sends the target forwarding path to the second network device, it may also send the backup path of 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 the other forwarding path as the backup path of the target forwarding path. For example, when the first network device sends the two forwarding paths to the second network device, it may also 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 the backup path as the backup path of the target forwarding path according to the indication of the first network device. This application embodiment does not make any limitations in this regard. Illustratively, taking Figure 5 as an example, the first network device may be Figure 5 the network device 101 shown in Figure 5 the network device 102 shown in Figure 5For the forwarding path S1 shown in the figure, if the network device 101 determines that the path association attribute of the forwarding path S1 includes hot standby protection indication information, when the network device 101 sends the forwarding path S1 to the network device 102, it can also send the backup path of the forwarding path S1 (such as the forwarding path S2) to the network device 102, and the network device 101 can send indication information to the network device 102 to indicate 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 indication information, the network device 102 determines the forwarding path S1 as the target forwarding path and the forwarding path S2 as the backup path of the forwarding path S1 according to the indication of the network device 101. For example, for the target forwarding path in the form of an SR-TE tunnel, this backup path acquisition method can be used.
[0100] Optionally, the target forwarding path is calculated and sent by a first network device (taking the first network device as a control device as an example) 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 can send multiple forwarding paths including the target forwarding path to the second network device. When the second network device determines that the target template includes hot standby protection indication information, the second network device can determine the target forwarding path and the backup path of the target forwarding path from the multiple forwarding paths. By way of example, Figure 5 for example, the first network device can be Figure 5 the network device 101 shown in the figure, and the second network device can be Figure 5 the network device 102 shown in the figure, and the target forwarding path is Figure 5 the forwarding path S1 shown in the figure. 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 multiple forwarding paths including the forwarding path S1 to the network device 102. For example, the network device 101 sends the forwarding path S1, the forwarding path S2, and the forwarding path S3 (for example, the 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 indication information, the network device 102 can determine the target forwarding path and the backup path of 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 of the forwarding path S1. For example, for the target forwarding path in the form of an SR policy tunnel, this backup path acquisition method can be used.
[0101] For the convenience of description, the embodiments of the present application are described by "the first network device sends a forwarding path to the second network device" (for example, "the first network device can send multiple forwarding paths including the target forwarding path to the second network device"). Those skilled in the art can understand that in actual applications, what the first network device sends to the second network can be path indication information for indicating the forwarding path, such as a path identifier or path information. The embodiments of the present application do not limit this.
[0102] The third case: When the target template includes path detection indication information, detect whether the target forwarding path fails.
[0103] When the second network device determines that the target template includes path detection indication information, the second network device can enable the path detection function and can detect whether the target forwarding path fails. Among them, the path detection indication information can include BFD indication information. Specifically, such as SBFD indication information, to indicate that the second network device detects whether the target forwarding path fails based on the BFD technology.
[0104] As an example, when the second network device determines that the target template includes path detection indication information, after enabling the path detection function, the second network device can send a detection message to the egress device of the target forwarding path and detect whether a response message for the detection message is received within a specified duration. If a response message for the detection message is received within the specified duration, the target forwarding path is not faulty; or, if a response message for the detection message is not received within the specified duration, the target forwarding path is faulty; or, although a response message for the detection message is received within the specified duration, the status information included in the response message indicates that there is a fault on the target forwarding path, such as an interface fault between the egress device and the user-side device, etc., then the target forwarding path is faulty. Exemplarily, the second network device can periodically send detection messages to the egress device of the target forwarding path (that is, the second network device periodically detects whether the target forwarding path fails).
[0105] Exemplarily, taking Figure 5 as an example, the second network device can be Figure 5 the network device 102 shown in Figure 5 and the target forwarding path is the forwarding path S1 shown in
[0106] When the network device 102 determines that the target template includes BFD indication information, the network device 102 detects whether the forwarding path S1 fails based on the BFD technology.
[0107] When the second network device determines that the target template includes path verification indication information, the second network device may enable the path verification function and verify the connectivity of the target forwarding path according to the network topology of the communication network, that is, the second network device determines whether the target forwarding path is connected according to the network topology of the communication network. For example, the second network device determines whether the packet sent by the ingress device (for example, the ingress device may be the second network device) of the target forwarding path can reach the egress device of the target forwarding path according to the network topology of the communication network. Optionally, the second network device may also determine whether the packet sent by the egress device of the target forwarding path can reach the ingress device of the target forwarding path according to the network topology of the communication network. For example, the first network device may also obtain the path connectivity from the egress device to the ingress device through negotiation and interaction with the second network device. That is, the second network device may perform unidirectional path connectivity verification or bidirectional path connectivity verification, which is not limited in the embodiments of the present application. For example, the target forwarding path may be an SR policy, the ingress device of the target forwarding path may be the head node of the SR policy, and the egress device of the target forwarding path may be the tail node of the SR policy. When the head node determines that the target template includes path verification indication information, the head node may determine the path connectivity from the head node to the tail node and the path connectivity from the tail node to the head node according to the network topology of the communication network.
[0108] For example, Figure 5 taking Figure 5 as an example, the second network device may be Figure 5 the network device 102 shown in
[0109] The fourth case may also be considered as detecting whether the target forwarding path fails. In some implementation scenarios, the fourth case may be applicable to verifying the reachability of the target forwarding path after the target forwarding path is established and before traffic is forwarded through the target forwarding path, that is, pre-verifying whether the packet can be smoothly forwarded through the target forwarding path. The above third case may be applicable to detecting whether the target forwarding path fails during the process of using the target forwarding path to forward traffic, which is not limited in the embodiments of the present application.
[0110] As can be easily understood from the foregoing steps 201 to 203, the path indication information is also carried in the packet received by the second network device, and the path indication information indicates the target forwarding path. Then, the second network device can also obtain the path indication information by parsing the packet. As an optional implementation manner, before the foregoing step 205, the method further includes: the second network device determines the target forwarding path according to the path indication information. Wherein, the target forwarding path may include one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy. According to the different tunnel types, the target forwarding path may be implemented by label forwarding based on MPLS or IPv6 forwarding based on an SRv6 SID. The process of the second network device determining the target forwarding path according to the path indication information is introduced below.
[0111] Optionally, the path indication information may be path information or a path identifier (such as a path ID). The path information may be strict path information or loose path information. Wherein, the strict path information indicates the complete target forwarding path, and the strict path information includes indication information for indicating each network device on the target forwarding path and / or indication information for the links between the network devices on the target forwarding path. The loose path information indicates the key network devices on the target forwarding path and / or the links between the key network devices, and the loose path information includes indication information for indicating the key network devices on the target forwarding path and / or indication information for the links between the key network devices on the target forwarding path. As an example, the loose path information indicates the egress device of the target forwarding path, and the other network devices on the target forwarding path are determined by the network device receiving the loose path information (such as the ingress device of the target forwarding path) through path calculation, or the network device receiving the loose path information determines the next-hop egress interface according to the local routing information.
[0112] In the embodiments of the present application, according to the different path indication information, the implementation manner of the second network device determining the target forwarding path according to the path indication information is different. Taking the path indication information as a path identifier or path information as an example, the process of the second network device determining the target forwarding path is introduced in two possible implementation manners below.
[0113] The first implementation manner: The second network device determines the target forwarding path according to the path identifier.
[0114] Optionally, the target forwarding path is a forwarding path that has been established in the communication network. For example, the target forwarding path is a forwarding path pre - sent by a first network device (taking the first network device as a control device as an example) to a second network device. The path identifier of the target forwarding path may be carried in the packet sent by the first network device to the second network device, and the second network device determines the forwarding path indicated by the path identifier in the communication network as the target forwarding path.
[0115] Exemplarily, taking Figure 5 as an example, the first network device may be network device 101, the second network device may be network device 102, and the communication network includes forwarding path S1 and forwarding path S2. The path identifier "S1" of the target forwarding path is carried in the packet sent by network device 101 to network device 102, and network device 102 determines the forwarding path (which is also forwarding path S1) indicated by the path identifier "S1" in the communication network as the target forwarding path.
[0116] The second implementation method: The second network device determines the target forwarding path according to the path information.
[0117] Optionally, the packet sent by the first network device to the second network device may carry strict path information for indicating the target forwarding path, and the second network device determines the target forwarding path according to the strict path information for indicating the target forwarding path. For example, for a target forwarding path in the form of an RSVP - TE tunnel or an SR - TE tunnel, this path acquisition method may be adopted. Exemplarily, taking Figure 5 as an example, the first network device may be network device 101, the second network device may be network device 102, the communication network includes forwarding path S1 and forwarding path S2, and both the forwarding path S1 and the forwarding path S2 may be RSVP - TE tunnels. The strict path information "102—>103—>104—>105" (where 102, 103, 104, and 105 are the indication information of network device 102, the indication information of network device 103, the indication information of network device 104, and the indication information of network device 105 in sequence, and "—>" represents the link between network devices) for indicating the target forwarding path is carried in the packet sent by network device 101 to network device 102. The forwarding path indicated by the strict path information is: network device 102—>network device 103—>network device 104—>network device 105. The forwarding path indicated by the strict path information is also the forwarding path S1 in the communication network. Therefore, network device 102 determines the forwarding path S1 as the target forwarding path.
[0118] Optionally, the message sent by the first network device to the second network device may carry loose path information for indicating the target forwarding path, and the second network device determines the target forwarding path according to the loose path information for indicating the target forwarding path. Optionally, the second network device determines the key network devices on the target forwarding path and / or the links between the key network devices according to the loose path information for indicating the target forwarding path, and determines the non-key network devices on the target forwarding path, the links between the non-key network devices, and the links between the non-key network devices and the key network devices through path calculation according to the network topology of the communication network. That is, the network devices and links other than the key network devices and / or the links between the key network devices on the target forwarding path are determined by the second network device through path calculation. Optionally, the second network device may also not perform full-path path calculation, but forward the service message carrying the loose path information through the outgoing interface on the device according to the local routing information, so as to indicate that the service message can be forwarded on the path segment indicated by the loose path information. For example, this path acquisition method may be adopted for a target forwarding path in the form of an SR-TE tunnel or an SR policy.
[0119] In summary, for the method for obtaining path association information provided in the embodiments of the present application, the first network device generates a message carrying template indication information and sends the message to the second network device. The target template indicated by the template indication information is associated with the target forwarding path. After receiving the message, the second network device determines the target template according to the template indication information carried in the message, and performs an operation associated with the target forwarding path according to the target template. Thus, the first network device can indicate different receiving network devices to determine the target template associated with the target forwarding path by carrying template indication information corresponding to different templates in the message, and determine association information such as path attributes or path constraints associated with the target forwarding path according to the target template. By using the method provided in this application to publish path association information by carrying template indication information, the flexibility of obtaining path association information can be improved without affecting the protocol stability. The method for obtaining path association information provided in the embodiments of the present application can conveniently carry path association information between different network devices (such as PCE devices and PCC devices). Based on the embodiments of the present application, if path association information is extended subsequently, there is no need to modify the protocol.
[0120] In the embodiments of the present application, the first network device may be a PCE device, and the second network device may be a PCC device. The following combines the attached Figure 6 , and introduces the method for obtaining path association information provided in the embodiments of the present application with a specific example.
[0121] Please refer to Figure 6, which shows a schematic diagram of the method for obtaining path association information provided by an embodiment of the present application, as Figure 6 shown, the communication network includes a PCE device and network devices A to F, where network devices A to F can all be PCC devices. Network device A is the head node of forwarding path P1 (this forwarding path P1 is: network device A -> network device B -> network device C -> network device D). At least one template is pre-stored in the PCE device and the PCC device respectively, each template includes corresponding association information, and at least one template in the PCE device is the same as at least one template in the network device A (the formats of the templates are the same and the association information in the templates is the same). In the 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. Exemplarily, the path association constraint may include a path bandwidth constraint and / or a path delay constraint, etc., 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 verification indication information.
[0122] In the process of establishing a forwarding path, specifically, the PCE device can first perform PCE member (such as PCC devices A to F) discovery. After the PCE member discovery is completed, the PCE device establishes sessions (such as PCEP sessions) with PCC devices A to F for information interaction. The PCE device can calculate the forwarding path based on service triggering or based on the triggering of a path calculation request sent by a PCC device (such as PCC device A) (PCC device A can send a path calculation request to the PCE device based on user triggering), and send path information indicating the forwarding path to the PCC device (such as PCC device A). The PCC device establishes the forwarding path according to the path information indicating the forwarding path. Exemplarily, the PCE device sends path information indicating the forwarding path P1 to PCC device A, and PCC device A establishes the forwarding path P1 according to the path information indicating the forwarding path P1. Among them, the forwarding path actively calculated by the PCE device based on service triggering can be called a PCE created (initiated) forwarding path. For example, a PCE initiated tunnel or a PCE initiated SR Policy.
[0123] In the embodiments of the present application, the path information used to indicate the forwarding path may be strict path information or loose path information. For example, for an RSVP-TE tunnel, the path information may be strict path information; for an SR policy, the path information may be loose path information; for an SR-TE tunnel, the path information may be strict path information or loose path information. Optionally, for an SR-TE tunnel or an SR policy, the forwarding path may be jointly determined by a PCE device and a PCC device. The following takes the PCE device actively calculating Figure 6 the forwarding path P1 in Figure 6 as an example to illustrate the establishment process of the forwarding path P1 in two scenarios.
[0124] Scenario 1: The PCE device actively calculates the forwarding path P1 based on service triggering.
[0125] Based on service triggering, the PCE device determines path association information (such as at least one path association attribute and / or at least one path association constraint) according to service requirements, and determines a target template from at least one template in the PCE device according to the path association information. The target template includes at least one path association attribute. And the PCE device calculates the forwarding path P1 according to the network topology of the communication network and / or the path association constraint. Then, the PCE device sends the template identifier of the target template and the strict path information used to indicate the forwarding path P1 to the PCC device A through a path computation label switched path create (PCInitiate) message.
[0126] After receiving the PCInitiate message, the PCC device A first establishes the forwarding path P1 according to the strict path information carried in the PCInitiate message used to indicate the forwarding path P1, and then sends the status information of the forwarding path P1 to the PCE device through a path computation label switched path state report (PCRpt) message to inform the PCE device that the forwarding path P1 is successfully established. Subsequently, if the network topology of the communication network changes, the PCE device can update the forwarding path P1 through a path computation label switched path update request (PCUpd) message.
[0127] After the PCC device A establishes the forwarding path P1 according to the strict path information carried in the PCInitiate message for indicating the forwarding path P1, it determines the target template associated with the forwarding path P1 from at least one template in the PCC device A according to the template identifier of the target template carried in the PCInitiate message, and performs an operation associated with the forwarding path P1 according to the path association attribute in the target template. For example, when the target template includes traffic statistics indication information, the PCC device A performs traffic statistics for the forwarding path P1; when the target template includes hot standby protection indication information, if the forwarding path P1 fails, 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 the forwarding path S1 fails; when the path verification indication information is included in the target template, the PCC device A verifies the connectivity of the forwarding path S1 according to the network topology.
[0128] Scenario 2: The PCE device and the PCC device jointly determine the forwarding path P1 based on service triggering.
[0129] Based on service triggering, the PCE device determines path association information (such as at least one path association attribute and / or at least one path association constraint) according to service requirements, and determines a target template from at least one template in the PCE device according to the path association information. The target template includes at least one path association attribute and / or at least one path association constraint. Moreover, the PCE device calculates the forwarding path P1 according to the network topology of the communication network and / or the at least one path association constraint. After that, the PCE device sends the template identifier of the target template and the loose path information for indicating the forwarding path P1 to the PCC device A through a PCInitiate message.
[0130] After receiving the PCInitiate message, the PCC device A first determines the key network devices on the forwarding path P1 and / or the links between the key network devices according to the loose path information carried in the PCInitiate message for indicating the forwarding path P1, and then determines the target template associated with the forwarding path P1 from at least one template in the PCC device A according to the template identifier of the target template carried in the PCInitiate message.
[0131] In a possible implementation, the PCC device A can determine the non-critical network devices on the forwarding path P1, the links between the non-critical network devices, and the links between the non-critical network devices and the critical network devices through path calculation based on at least one of the path association constraints in the network topology of the communication network and the target template. Then, based on the critical network devices, non-critical network devices, the links between the critical network devices, the links between the non-critical network devices, and the links between the critical network devices and the non-critical network devices on the forwarding path P1, the forwarding path P1 is established. After that, the PCC device A sends the status information of the forwarding path P1 to the PCE device through a PCRpt message to inform the PCE device that the forwarding path P1 is successfully established. Subsequently, if the network topology of the communication network changes, the PCE device can update the forwarding path P1 through a PCUpd message or the PCC device A updates the forwarding path P1 according to the changed network topology. In another possible implementation, the PCC device A determines the next-hop egress interface for forwarding the service packet based on the loose path information of the received forwarding path P1 and carries the loose path information in the service packet to instruct other devices on the target forwarding path to complete the forwarding of the service packet according to the loose path information and the local routing table. In this way, the target forwarding path can actually be dynamically determined during the service packet forwarding phase.
[0132] The PCC device A can perform operations associated with the forwarding path P1 according to the path association attributes 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 performs traffic statistics for the forwarding path P1; when the target template includes hot standby protection indication information, if the forwarding path P1 fails, 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 the forwarding path S1 fails; when the target template includes path verification indication information, the PCC device A verifies the connectivity of the forwarding path S1 according to the network topology.
[0133] In the above two scenarios, the embodiments of the present application take the example that the PCE device sends the path 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 in the same message (such as a PCInitiate message). In practical applications, the PCE device may send the path 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 through different messages. For example, the PCE device first sends the path information indicating the forwarding path P1 to the PCC device A through a PCInitiate message, and then sends the template indication information indicating the target template associated with the forwarding path P1 to the PCC device A through another message. Optionally, if the PCE device sends the path 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 through different messages, the target template may further include the corresponding relationship between the target template and the forwarding path P1 (for example, the target template further includes the ID of the forwarding path P1) to indicate the association between the target template and the forwarding path P1.
[0134] In the above two scenarios, the process in which the PCE device sends the path information of the forwarding path P1 to the PCC device through a PCInitiate message and updates the forwarding path P1 through a PCUpd message can refer to the 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 into the present application by reference.
[0135] The following is the device embodiment of the present application, which can be used to execute the method embodiment of the present application. For the details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.
[0136] Please refer to Figure 7 , which shows a schematic logical structure diagram of a first network device 700 provided by the embodiments 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. Refer to Figure 7 , the first network device 700 may include but is not limited to:
[0137] A generating module 710 is configured to generate a message, which carries template indication information associated with a target forwarding path. The implementation of the generating module 710 can refer to the relevant description in step 201 above.
[0138] A sending module 720 is configured to send the message to a second network device, so that the second network device performs an operation associated with the target forwarding path according to the target template indicated by the template indication information. The implementation of the sending module 720 can refer to the relevant description in step 202 above.
[0139] Optionally, the target template includes at least one path association attribute and / or at least one path association constraint.
[0140] Optionally, the message further carries path indication information indicating the target forwarding path.
[0141] Optionally, please continue to refer to Figure 7 , the first network device 700 further includes: an obtaining module 730, configured to obtain at least one template before the sending module 720 sends the message to the second network device, and the target template belongs to the at least one template.
[0142] Optionally, the sending module 720 is further configured to send the at least one template to the second network device before sending the message to the second network device.
[0143] Optionally, the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path verification indication information.
[0144] Optionally, the target forwarding path includes one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy.
[0145] Optionally, the message is a PCEP message or a BGP message.
[0146] Optionally, the message includes a TLV field, and the template indication information is located in the TLV field.
[0147] Optionally, the template indication information is a template identifier.
[0148] Optionally, the second network device is a device on the target forwarding path.
[0149] Optionally, the first network device is a PCE device, and the second network device is a PCC device.
[0150] In summary, the first network device provided by the embodiments of the present application generates a message carrying template indication information and sends the message to a second network device. The target template indicated by the template indication information is associated with a target forwarding path. After receiving the message, the second network device determines the target template according to the template indication information carried in the message, and performs an operation associated with the target forwarding path according to the target template. Thus, the first network device can indicate different receiving network devices to determine association information such as path attributes or path constraints associated with the target forwarding path by carrying template indication information corresponding to different templates in the message. By using the method of carrying template indication information provided by the embodiments of the present application to publish path association information, the flexibility of obtaining path association information can be improved without affecting the stability of the protocol.
[0151] Please refer to Figure 8 , which shows a schematic logical structure diagram of a second network device 800 provided by the embodiments 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. Refer to Figure 8 , the second network device 800 may include but is not limited to:
[0152] A receiving module 810, configured to receive a message from a first network device, where the message carries template indication information. The functional implementation of the receiving module 810 may refer to the relevant description of step 203 above.
[0153] A determining module 820, configured to determine a target template according to the template indication information, where the target template is associated with a target forwarding path. The functional implementation of the determining module 820 may refer to the relevant description of step 204 above.
[0154] An execution module 830, configured to perform an operation associated with the target forwarding path according to the target template. The functional implementation of the execution module 830 may refer to the relevant description of step 205 above.
[0155] Optionally, the message further carries path indication information, and the determining module 820 is further configured to determine a target forwarding path according to the path indication information.
[0156] Optionally, the target template includes at least one path association attribute and / or at least one path association constraint.
[0157] Optionally, please continue to refer to Figure 8 , the second network device 800 further includes:
[0158] An obtaining module 840, configured to obtain at least one template before the determining module 820 determines a target template according to the template indication information, and the target template belongs to the at least one template;
[0159] The determination module 820 is configured to determine a target template from the at least one template according to the template indication information.
[0160] Optionally, the target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path verification indication information.
[0161] Optionally, the execution module 830 is configured to:
[0162] When the target template includes traffic statistics indication information, perform traffic statistics on the target forwarding path;
[0163] When the target template includes hot standby protection indication information, if the target forwarding path fails, switch the forwarding path to the backup path of the target forwarding path;
[0164] When the target template includes path detection indication information, detect whether the target forwarding path fails;
[0165] When the target template includes path verification indication information, verify the connectivity of the target forwarding path according to the network topology.
[0166] Optionally, the target forwarding path includes one of an SR-TE tunnel, an RSVP-TE tunnel, or an SR policy.
[0167] Optionally, the message is a PCEP message or a BGP message.
[0168] Optionally, the message includes a TLV field, and the template indication information is located in the TLV field.
[0169] Optionally, the template indication information is a template identifier.
[0170] Optionally, the second network device is a device on the target forwarding path.
[0171] Optionally, the first network device is a PCE device, and the second network device is a PCC device.
[0172] In summary, the second network device provided in the embodiments of the present application receives a message 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 message, the second network device determines the target template according to the template indication information carried in the message, and performs an operation associated with the target forwarding path according to the target template. Thus, the first network device indicates the second network device to determine the target template associated with the target forwarding path by carrying the template indication information corresponding to the target template in the message, and determines the association information associated with the target forwarding path according to the target template. By using the method of carrying the template indication information provided in the embodiments of the present application to publish the path association information, the flexibility of obtaining the path association information can be improved without affecting the stability of the protocol.
[0173] It should be understood that the network device provided in the embodiments of the present application can also be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above PLD can 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 the path association information provided in the above method embodiments can also be implemented by software. When the method for obtaining the path association information provided in the above method embodiments is implemented by software, each module in the network device can also be a software module.
[0174] Please refer to Figure 9 , which shows a schematic hardware structure diagram of a network device 900 provided in the embodiments of the present application. The network device 900 can be the first network device or the second network device in the above embodiments. As Figure 9 shown, the network device 900 includes: a main control board 910, an interface board 930, and an interface board 940. In the case of multiple interface boards, a switching network board ( Figure 9 not shown in the figure) may be included. The switching network board is used to complete data exchange between each interface board (the interface board is also called a line card or a service board).
[0175] The main control board 910 is used to complete functions such as system management, device maintenance, and protocol processing. The interface boards 930 and 940 are used to provide various service interfaces (such as POS interfaces, GE interfaces, ATM interfaces, etc.) and implement the forwarding of packets. There are mainly three types of functional units on the main control board 910: a system management and 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 interconnected through a system bus and a system backplane. The interface board 930 includes one or more processors 931. The processor 931 is used to control and manage the interface board 930 and communicate with the central processor 912 on the main control board 910. The memory 932 on the interface board 930 is used to store at least one template. The processor 931 determines a target template associated with a target forwarding path by looking up at least one template stored in the memory 932, and performs an operation associated with the target forwarding path according to the target template.
[0176] The interface board 930 includes one or more network interfaces 933 for receiving packets 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 packets received by the network interface 933. The specific implementation process will not be elaborated one by one here. The specific functions of the processor 931 will not be elaborated one by one here either.
[0177] It can be understood that, as Figure 9 shown, this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. In this mechanism, the operations on the interface board 940 are basically similar to those on the interface board 930. For example, the processor 941 on the interface board 940 is used to control and manage the interface board 940 and communicate with the central processor 912 on the main control board 910. The memory 942 on the interface board 940 is used to store at least one template. The interface board 940 includes one or more network interfaces 943 for receiving packets carrying template indication information. For the sake of brevity, it will not be elaborated further. In addition, it can be understood that Figure 9 the processor 931 in the interface board 930 and / or the processor 941 in the interface board 940 in
[0178] In addition, it should be noted that there may be one or more main control boards. When there are multiple main control boards, it may include an active main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capacity of the network device, the more interface boards are provided. In the case of multiple interface boards, these multiple interface boards can communicate through one or more switching network boards. When there are multiple switching network boards, they can jointly achieve load sharing and redundant backup. In a centralized forwarding architecture, the network device may not require a switching network board, and the interface board undertakes the processing function of the service data of the entire system. In a distributed forwarding architecture, the network device includes multiple interface boards, and data exchange between multiple interface boards can be achieved through the switching network board, providing a large-capacity data exchange and processing capacity. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those of devices with a centralized architecture. Which architecture to specifically adopt depends on the specific networking deployment scenario and is not limited here.
[0179] In a specific embodiment, the memory 932 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 932 may exist independently and be connected to the processor 931 through a communication bus. The memory 932 may also be integrated with the processor 931.
[0180] The memory 932 is used to store program code and is controlled by the processor 931 to execute some or all of the steps of the method for obtaining path association information provided in the above embodiments. The processor 931 is used to execute the program code stored in the memory 932. The program code may include one or more software modules. These one or more software modules may be the Figure 7 and Figure 8 functional modules provided in any of the above embodiments.
[0181] In a specific embodiment, the network interface 933 may be any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0182] Please refer to Figure 10 , which shows a schematic hardware structure diagram of another network device 1000 provided by an embodiment of the present application. The network device 1000 may be the first network device or the second network device in any of the above embodiments. Refer to Figure 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 through the bus 1008. Those skilled in the art should understand that Figure 10 The connection manner shown between the processor 1002, the memory 1004, and the communication interface 1006 is merely exemplary. In the implementation process, the processor 1002, the memory 1004, and the communication interface 1006 may also communicate with each other using other connection manners other than the bus 1008.
[0183] Among them, the memory 1004 may be used to store a computer program 10042, and the computer program 10042 may include instructions and data. In the 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, etc. And, the memory 1004 may include a hard disk and / or memory.
[0184] Among them, the processor 1002 can be a general-purpose processor. A general-purpose processor can be a processor that executes specific steps and / or operations by reading and executing a computer program (such as the computer program 10042) stored in a memory (such as the memory 1004). The general-purpose processor may use data stored in the memory (such as the memory 1004) during the execution of the above steps and / or operations. The stored computer program can be executed, for example, to implement the related functions of the foregoing generation module 710, acquisition module 730, determination module 820, execution module 830, and acquisition module 940. The general-purpose processor can be, for example but not limited to, a CPU. In addition, the processor 1002 can also be a dedicated processor. A dedicated processor can be a processor specifically designed to execute specific steps and / or operations. The dedicated processor can be, for example but not limited to, a digital signal processor (DSP), an ASIC, and an FPGA, etc. In addition, the processor 1002 can also be a combination of multiple processors, such as a multi-core processor. The processor 1002 can include at least one circuit to execute all or part of the steps of the method for acquiring path association information provided in the foregoing embodiments.
[0185] Among them, the communication interface 1006 can include interfaces such as input / output (I / O) interfaces, physical interfaces, and logical interfaces for implementing the interconnection of components inside the network device 1000, as well as interfaces for implementing the interconnection between the network device 1000 and other devices (such as network devices or user devices). The physical interface can be a gigabit Ethernet (GE) interface, which can be used to implement the interconnection between the network device 1000 and other devices (such as network devices or user devices). The logical interface is an interface inside the network device 1000, which can be used to implement the interconnection of components inside the network device 1000. It is easy to understand that the communication interface 1006 can be used for the network device 1000 to communicate with other network devices and / or user devices. For example, the communication interface 1006 is used for sending and receiving packets between the network device 1000 and other network devices. The communication interface 1006 can implement the related functions of the foregoing sending module 720 and receiving module 810.
[0186] Among them, the bus 1008 can be of any type and is a communication bus for implementing the interconnection of the processor 1002, the memory 1004, and the communication interface 1006, such as a system bus.
[0187] The above-mentioned devices can be respectively disposed on independent chips, or at least partially or entirely disposed on the same chip. Whether to independently dispose each device on a different chip or integrate and dispose them on one or more chips often depends on the requirements of product design. The embodiments of the present application do not limit the specific implementation forms of the above-mentioned devices.
[0188] Figure 10 The shown network device 1000 is merely exemplary. During implementation, the network device 1000 may further include other components, which will not be listed one by one herein. The Figure 10 The shown network device 1000 may obtain the association information associated with the forwarding path by executing all or part of the steps of the method for obtaining path association information provided in the above-mentioned embodiments.
[0189] The embodiments of the present application provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, all or part of the steps of the method for obtaining path association information provided in the above-mentioned method embodiments are implemented.
[0190] The embodiments of the present application provide a computer program product containing instructions. When the computer program product runs on a computer, the computer is enabled to execute all or part of the steps of the method for obtaining path association information provided in the above-mentioned method embodiments.
[0191] The embodiments of the present application provide a chip, which includes programmable logic circuits and / or program instructions. When the chip runs, it is used to implement all or part of the steps of the method for obtaining path association information provided in the above-mentioned method embodiments.
[0192] The embodiments of the present application further provide a communication system, which includes a first network device and a second network device. The first network device may be the first network device as Figure 7 shown, and the second network device may be the second network device as Figure 8 shown; or at least one of the first network device and the second network device may be the network device as described above Figure 9 or Figure 10 shown. Optionally, the first network device is a PCE device and the second network device is a PCC device.
[0193] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (such as a solid-state drive), etc.
[0194] In the present application, the terms "first", "second", "third", "fourth", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. The term "at least one" means one or more, and "a plurality" means two or more. Unless otherwise clearly defined, the term "at least one kind" is the same. The term "and / or" is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0195] The method embodiments, device embodiments, and other different types of embodiments provided in the embodiments of the present application can refer to each other, and the embodiments of the present application do not limit this. The order of operations in the method embodiments provided in the embodiments of the present application can be appropriately adjusted, and the operations can also be increased or decreased according to the situation. Any person skilled in the art can easily think of a changed method within the technical scope disclosed in the present application, and it should be covered by the protection scope of the present application. Therefore, it will not be elaborated here.
[0196] In the corresponding embodiments provided in the present application, it should be understood that the disclosed devices and the like can be implemented in other constitutive manners. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical or other forms.
[0197] The units described as separate components may or may not be physically separated. The components described as units may or may not be physical units. They can be located in one place or distributed to multiple network devices (such as terminal devices). Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0198] As mentioned above, the above is only the exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for obtaining path association information, characterized in that, Performed by a first network device, the method includes: Generating a message, where the message carries template indication information, the template indication information indicates a target template, the target template includes at least one path association attribute, the at least one path association attribute is attribute information associated with a target forwarding path, and the target forwarding path is a segment routing policy (SR policy) path; Sending the message to a second network device, so that the second network device performs an operation associated with the target forwarding path according to the target template indicated by the template indication information.
2. The method according to claim 1, characterized in that, The target template further includes at least one path association constraint.
3. The method according to claim 1, characterized in that, The message further carries path indication information, and the path indication information indicates the target forwarding path.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Before sending the message to the second network device, obtaining at least one template, and the target template belongs to the at least one template.
5. The method according to claim 4, characterized in that, The method further includes: Before sending the message to the second network device, sending the at least one template to the second network device.
6. The method according to any one of claims 1 to 3, characterized in that, The target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path verification indication information.
7. A method for obtaining path association information, characterized in that, Performed by a second network device, the method includes: Receiving a message from a first network device, where the message carries template indication information; Determining a target template according to the template indication information, the target template includes at least one path association attribute, the at least one path association attribute is attribute information associated with a target forwarding path, and the target forwarding path is a segment routing policy (SR policy) path; Performing an operation associated with the target forwarding path according to the target template.
8. The method according to claim 7, characterized in that, The message further carries path indication information, and the method further includes: Determining the target forwarding path according to the path indication information.
9. The method according to claim 7, characterized in that, The target template further includes at least one path association constraint.
10. The method according to any one of claims 7 to 9, characterized in that, The method further includes: Before determining the target template according to the template indication information, obtaining at least one template, and the target template belongs to the at least one template; The determining the target template according to the template indication information includes: determining the target template from the at least one template according to the template indication information.
11. The method according to any one of claims 7 to 9, characterized in that, The target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path verification indication information.
12. The method according to claim 11, characterized in that, The performing the operation associated with the target forwarding path according to the target template includes: When the target template includes traffic statistics indication information, performing traffic statistics for the target forwarding path; When the target template includes hot standby protection indication information, if the target forwarding path fails, switching the forwarding path to a backup path of the target forwarding path; When the target template includes path detection indication information, detecting whether the target forwarding path fails; When the target template includes path verification indication information, verifying the connectivity of the target forwarding path according to the network topology.
13. The method according to any one of claims 1 to 3, 5, 7 to 9, 12, characterized in that, The message is a Path Computation Element Communication Protocol (PCEP) message or a Border Gateway Protocol (BGP) message.
14. The method according to any one of claims 1 to 3, 5, 7 to 9, 12, characterized in that, The message includes a Type-Length-Value (TLV) field, and the template indication information is located in the TLV field.
15. The method according to any one of claims 1 to 3, 5, 7 to 9, 12, characterized in that, The template indication information is a template identifier.
16. The method according to any one of claims 1 to 3, 5, 7 to 9, 12, characterized in that, The second network device is a device on the target forwarding path.
17. The method according to any one of claims 1 to 3, 5, 7 to 9, 12, characterized in that, The first network device is a Path Computation Element (PCE) device, and the second network device is a Path Computation Client (PCC) device.
18. A first network device, characterized in that, The first network device includes: A generating module, configured to generate a message, where the message carries template indication information, the template indication information indicates a target template, the target template includes at least one path association attribute, the at least one path association attribute is attribute information associated with a target forwarding path, and the target forwarding path is a Segment Routing Policy (SR policy) path; A sending module, configured to send the message to a second network device, so that the second network device performs an operation associated with the target forwarding path according to the target template indicated by the template indication information.
19. The first network device according to claim 18, characterized in that, The target template further includes at least one path association constraint.
20. The first network device according to claim 18, characterized in that, The message further carries path indication information, and the path indication information indicates the target forwarding path.
21. The first network device according to any one of claims 18 to 20, characterized in that, The first network device further includes: An obtaining module, configured to obtain at least one template before the sending module sends the message to the second network device, and the target template belongs to the at least one template.
22. The first network device according to claim 21, characterized in that, The sending module is further configured to send the at least one template to the second network device before sending the message to the second network device.
23. The first network device according to any one of claims 18 to 20, characterized in that, The target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path verification indication information.
24. A second network device, characterized in that, The second network device includes: A receiving module, configured to receive a message from a first network device, where the message carries template indication information; A determining module, configured to determine a target template according to the template indication information, the target template includes at least one path association attribute, the at least one path association attribute is attribute information associated with a target forwarding path, and the target forwarding path is a Segment Routing Policy (SR policy) path; An execution module, configured to perform an operation associated with the target forwarding path according to the target template.
25. The second network device according to claim 24, wherein The message further carries path indication information, and the determining module is further configured to determine the target forwarding path according to the path indication information.
26. The second network device according to claim 24, wherein The target template further includes at least one path association constraint.
27. The second network device according to any one of claims 24 to 26, wherein The second network device further includes: An obtaining module, configured to obtain at least one template before the determining module determines the target template according to the template indication information, and the target template belongs to the at least one template; The determining module, configured to determine the target template from the at least one template according to the template indication information.
28. The second network device according to any one of claims 24 to 26, wherein The target template includes at least one of traffic statistics indication information, hot standby protection indication information, path detection indication information, or path verification indication information.
29. The second network device according to claim 28, wherein The execution module is configured to: When the target template includes traffic statistics indication information, perform traffic statistics on the target forwarding path; When the target template includes hot backup protection indication information, if the target forwarding path fails, switch the forwarding path to the backup path of the target forwarding path; When the target template includes path detection indication information, detect whether the target forwarding path fails; When the target template includes path verification indication information, verify the connectivity of the target forwarding path according to the network topology.
30. The first network device according to any one of claims 18 to 20 and 22, or the second network device according to any one of claims 24 to 26 and 29, wherein The message is a Path Computation Element Communication Protocol (PCEP) message or a Border Gateway Protocol (BGP) message.
31. The first network device according to any one of claims 18 to 20 and 22, or the second network device according to any one of claims 24 to 26 and 29, wherein The message includes a Type-Length-Value (TLV) field, and the template indication information is located in the TLV field.
32. The first network device according to any one of claims 18 to 20 and 22, or the second network device according to any one of claims 24 to 26 and 29, wherein The template indication information is a template identifier.
33. The first network device according to any one of claims 18 to 20 and 22, or the second network device according to any one of claims 24 to 26 and 29, wherein The second network device is a device on the target forwarding path.
34. The first network device according to any one of claims 18 to 20 and 22, or the second network device according to any one of claims 24 to 26 and 29, wherein The first network device is a Path Computation Element (PCE) device, and the second network device is a Path Computation Client (PCC) device.
35. A network device, characterized in that, Comprising a memory and a processor; The memory is used for storing a computer program; The processor is used for executing the computer program stored in the memory so that the network device executes the method according to any one of claims 1 to 17.
36. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 17 is implemented.
37. A communication system, characterized in that, Comprising: A first network device and a second network device; The first network device is the first network device according to any one of claims 18 to 23 or any one of claims 30 to 35, and the second network device is the second network device according to any one of claims 24 to 35; or, At least one of the first network device and the second network device is the network device according to claim 35.