Communication method and related equipment
Through the BGP-LS message mechanism, the controller can promptly detect and adjust the issuance of SR Policy, solving the problem that the number of SR Policy issued by the controller exceeds the device's capabilities, avoiding bandwidth loss and traffic damage, and improving network stability.
Patent Information
- Application Number
- CN202311076111.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-02-25
AI Technical Summary
The number of segment routing policies (SR Policy) issued by the controller exceeds the device capabilities of the network equipment, resulting in bandwidth loss and traffic damage, and the controller cannot perceive this problem in time.
Through the Border Gateway Protocol-Link Status (BGP-LS) message mechanism, network devices report their device capabilities to the controller. When the controller receives the reported message, it can determine whether the number of SR Policy exceeds the device capabilities, and stop or adjust the issuance of SR Policy to avoid bandwidth loss.
It effectively avoids bandwidth loss and traffic damage caused by the number of SR Policy exceeding the device's capabilities, and improves the resource utilization rate and network stability of network devices.
Smart Images

Figure CN119520361A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method and related equipment. Background Art
[0002] Segment route (SR) policy is a tunnel diversion technology. SR Policy specifies multiple message forwarding paths. When the controller sends SR Policy to the network device, the network device sends data flow according to the multiple message forwarding paths instead of the shortest path calculated by the interior gateway protocol (IGP). Load sharing is formed among multiple message forwarding paths.
[0003] Usually, the controller can send multiple SR Policies to a network device, but the number of SRPolicies that can be installed on the network device is limited. If the number of SR Policies sent by the controller exceeds the device capacity of the network device, and the controller cannot know this, the controller will continue to send more SR Policies to the network device, resulting in bandwidth loss. Summary of the invention
[0004] The embodiments of the present application provide a communication method and related devices for issuing SR Policy messages according to the device capabilities of a network device.
[0005] A first aspect of the present application provides a communication method.
[0006] In the present application, the controller first sends a first routing policy SR Policy message to the first network device, and the first SR Policy message includes the first SR Policy configured for the first network device. Then, the first network device receives and sends a first Border Gateway Protocol-Link State BGP-LS message to the controller, and the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds the first device capability of the first network device, and the first device capability includes the upper limit of the number of SR Policies that can be installed on the first network device. If the controller determines based on the first BGP-LS message that the number of SR Policies configured for the first network device exceeds the first device capability, the controller can stop sending SR Policy messages to the first network device to avoid bandwidth loss.
[0007] In some possible implementations, the first SR Policy message also includes a first candidate path CP under the first SR Policy, and the first BGP-LS message is also used to indicate that the number of CPs under the first SR Policy exceeds the capability of the first device, and the first device capability also includes an upper limit on the number of CPs that can be installed in an SR Policy. If the controller determines based on the first BGP-LS message that the number of CPs in the first SR Policy configured for the first network device exceeds the capability of the first device, the controller may stop sending SR Policy messages to the first network device to avoid bandwidth loss.
[0008] In some possible implementations, the first CP includes multiple first SID Lists, each SID List in the multiple first SID Lists is a message forwarding path from the first network device to the destination network device, and the first BGP-LS message is also used to indicate that the number of multiple first SID Lists in the first CP exceeds the capability of the first device, and the first device capability also includes the upper limit of the number of SID Lists that can be installed in a CP by the first network device.
[0009] Then, the controller can determine, based on the first BGP-LS message, that the number of SID Lists in the first CP configured for the first network device exceeds the capability of the first device, and send a second SRPolicy message to the first network device, the second SR Policy message including the first SR Policy configured for the first network device and the second CP under the first SR Policy, the second CP including multiple second SID Lists, the number of the multiple second SID Lists not exceeding the capability of the first device, so that the first network device is configured with a second CP that does not exceed the capability of the first device.
[0010] In some possible implementations, before the controller sends a second SR Policy message to the first network device based on the first BGP-LS message, the controller may also receive a second BGP-LS message sent by the second network device, where the second BGP-LS message includes the device capabilities of at least one network device, and the at least one network device includes the first network device, so that the controller can directly configure the SR Policy, CP and multiple SID Lists for the first network device based on the acquired first device capabilities.
[0011] In some possible implementations, before the controller sends the second SR Policy message to the first network device based on the first BGP-LS message, the controller may also send a query request to the first network device, and the query request is used to query the capabilities of the first device, so that the controller can directly configure the SR Policy, CP and multiple SID Lists for the first network device based on the acquired first device capabilities.
[0012] A second aspect of the present application provides a communication method.
[0013] In the present application, a first network device receives a first SR Policy message sent by a controller, the first SRPolicy message includes a first SR Policy configured for the first network device, and then the first network device sends a first BGP-LS message to the controller, the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds the first device capability of the first network device, the first device capability includes the upper limit of the number of SR Policies that can be installed by the first network device. Then, the controller can stop sending SR Policy messages to the first network device based on the first BGP-LS message to avoid bandwidth loss.
[0014] In some possible implementations, the first SR Policy message also includes a first candidate path CP under the first SR Policy, and the first BGP-LS message is also used to indicate that the number of CPs under the first SR Policy exceeds the capability of the first device, and the first device capability also includes an upper limit on the number of CPs that can be installed in an SR Policy. In this case, the controller stops sending SRPolicy messages to the first network device based on the first BGP-LS message to avoid bandwidth loss.
[0015] In some possible implementations, the first CP includes multiple first SID Lists, each SID List in the multiple first SID Lists is a message forwarding path from the first network device to the destination network device, and the first BGP-LS message is also used to indicate that the number of multiple first SID Lists in the first CP exceeds the capability of the first device, and the first device capability also includes the upper limit of the number of SID Lists that can be installed in a CP by the first network device.
[0016] Then, the first network device receives a second SRPolicy message sent by the controller based on the first BGP-LS message, the second SR Policy message includes the first SR Policy configured for the first network device and the second CP under the first SR Policy, the second CP includes multiple second SID Lists, and the number of the multiple second SID Lists does not exceed the capability of the first device, so that the first network device is configured with a second CP that does not exceed the capability of the first device.
[0017] In some possible implementations, before the first network device receives the second SR Policy message sent by the controller based on the first BGP-LS message, the first network device may also send a second BGP-LS message to the controller, where the second BGP-LS message includes the device capabilities of at least one network device, and the at least one network device includes the first network device, so that the controller can directly configure the SR Policy, CP and multiple SID Lists for the first network device based on the acquired first device capabilities.
[0018] In some possible implementations, before the first network device receives the second SR Policy message sent by the controller based on the first BGP-LS message, the first network device receives a query request sent by the controller, and the query request is used to query the capabilities of the first device; the first network device sends a message carrying the capabilities of the first device to the controller based on the query request, so that the controller can directly configure the SR Policy, CP and multiple SID Lists for the first network device according to the acquired first device capabilities.
[0019] A third aspect of the present application provides a controller, which is used to execute any one of the methods described in the first aspect.
[0020] A fourth aspect of the present application provides a network device, used as a first network device, and configured to execute any of the methods described in the second aspect.
[0021] A fifth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute any of the methods in the first or second aspects above.
[0022] In a sixth aspect, the present application provides a computer program product, which includes computer execution instructions, which are stored in a computer-readable storage medium; at least one processor of a device can read the computer execution instructions from the computer-readable storage medium, and at least one processor executes the computer execution instructions so that the device implements the method provided by any possible implementation of the first aspect or the second aspect above.
[0023] In a seventh aspect, the present application provides a communication device, which may include at least one processor, a memory, and a communication interface. At least one processor is coupled to the memory and the communication interface. The memory is used to store instructions, at least one processor is used to execute the instructions, and the communication interface is used to communicate with other communication devices under the control of at least one processor. When the instruction is executed by at least one processor, the at least one processor executes the method in any possible implementation of the first aspect or the second aspect.
[0024] An eighth aspect of the present application provides a chip system, which includes a processor for supporting the functions involved in any possible implementation of the first aspect or the second aspect.
[0025] In a possible design, the chip system may also include a memory, which is used to store necessary program instructions and data. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0026] Among them, the technical effects brought about by the third to eighth aspects or any possible implementation methods thereof can refer to the technical effects brought about by different possible implementation methods of the first aspect or the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1-1 A schematic diagram of the structure of a system architecture provided in an embodiment of the present application;
[0028] Figure 1-2 A schematic diagram of the structure of a communication network provided in an embodiment of the present application;
[0029] Figure 1-3 A schematic diagram of a candidate path description for reporting SR Policy at a granular level provided in an embodiment of the present application;
[0030] Figure 1-4 A schematic diagram of information such as the status of the SR Policy provided in an embodiment of the present application and the status of the candidate path of the CP indicated by the SR Policy;
[0031] Figure 1-5 A schematic diagram of the SR segment list of each SID List under the CP provided in an embodiment of the present application;
[0032] Figure 1-6 A schematic diagram of the structure of a communication network provided in an embodiment of the present application;
[0033] Figure 1-7 A schematic diagram of a message transmission path provided in an embodiment of the present application;
[0034] Figure 2 A flow chart of a communication method provided in an embodiment of the present application;
[0035] Figure 3 A flow chart of a communication method provided in an embodiment of the present application;
[0036] Figure 4-1 A flow chart of a communication method provided in an embodiment of the present application;
[0037] Figure 4-2 This is a schematic diagram of an indication message that a first network device can return to a controller based on a YANG model of a Telemetry mechanism in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of the structure of a controller provided in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of the structure of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The embodiments of the present application provide a communication method and related devices for issuing SR Policy messages according to the device capabilities of a network device.
[0042] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0043] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0044] Please refer to Figure 1-1 , which shows a schematic diagram of a system architecture involved in an embodiment of the present application, the system architecture includes a communication network 100, a first user device 200 and a second user device 300, the communication network 100 includes multiple network devices, and data packets can be transmitted between the first user device 200 and the second user device 300 through the multiple network devices in the communication network 100.
[0045] In some possible implementations, the first user device 200 or the second user device 300 may be a terminal device or a server. In some possible implementations, the first user device 200 or the second user device 300 may be a physical device or a virtual device, and the first user device 200 or the second user device 300 may also be a container instance. The first user device 200 and the second user device 300 may be the same type of communication devices (terminal device or server, physical device or virtual device or container instance), or different communication devices.
[0046] Among them, the terminal device can be called a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device can be a mobile phone, a tablet computer (pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
[0047] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, as well as big data and artificial intelligence platforms.
[0048] Since the server needs to respond to service requests and process them to provide reliable services, generally speaking, the server should have the ability to undertake and guarantee services. The server needs to have strong processing power, high stability, high reliability, high security, scalability and manageability. In the embodiment of the present application, the server can be an x86 server, which is also called a complex instruction set computer (CISC) architecture server, that is, a personal computer (PC) server, which is based on the PC architecture and uses Intel or other x86 instruction set compatible processor chips and Windows operating system.
[0049] For example, please refer to Figure 1-2 The communication network 100 may include a controller 111 and M network devices (M is a positive integer), wherein the controller 111 may be respectively communicatively connected with each of the M network devices, and the M network devices are used to forward data packets between the first user device 200 and the second user device 300 under the control of the controller 111.
[0050] In the embodiment of the present application, the controller 111 may be a functional module deployed in a server, or a server, or a server cluster consisting of several servers, or a cloud computing service center, which is not limited. It should be noted that in order to distinguish from the message forwarding path, Figure 1-2 The communication connection between the controller 111 and each network device is shown in the form of a dotted double arrow. The controller 111 is the brain of the future cloud network, integrating network management, service control, network analysis and other functions, and is the core enabling system for realizing network resource pooling, network connection automation and self-optimization, and operation and maintenance automation.
[0051] For example, Figure 1-2 As shown, the M network devices include CE1, CE2, PE1, PE2, and P1-P8. In the example where the first user equipment 200 transmits a data message to the second user equipment 300 through the communication network 100, the message forwarding path may be CE1->PE1->P1->P2->PE2->CE2. Figure 1-2The two adjacent network devices shown in the figure can be directly connected to each other or connected through the Internet. Among them, each network device among CE1, CE2, PE1, PE2, P1~P8 can be a switch (virtual switch or physical switch) or a router (router) (virtual router or physical router) and other devices used to forward messages in the communication network 100. CE1, CE2, PE1, PE2, P1~P8 can be the same type of network devices, for example, CE1, CE2, PE1, PE2, P1~P8 can all be routers. Alternatively, CE1, CE2, PE1, PE2, P1~P8 can be different types of network devices, for example, some of CE1, CE2, PE1, PE2, P1~P8 are routers, and the other parts are switches.
[0052] Among them, a router / switch is a hardware device that connects two or more user devices and acts as a gateway between user devices. A router / switch is a dedicated intelligent network device that can read the destination address in a message and decide how to transmit the message according to the destination address. A router / switch can understand different protocols, such as the Ethernet protocol used in a local area network and the transmission control protocol / internet protocol (TCP / IP) protocol used in the Internet. In this way, a router / switch can analyze the destination addresses of data messages transmitted from various types of networks, convert non-TCP / IP addresses into TCP / IP addresses, or vice versa; and then transmit each message to the destination address along the best transmission path according to the routing algorithm, so a router / switch can connect a non-TCP / IP network to the Internet.
[0053] It should be pointed out that the above Figure 1-1 , Figure 1-2 The system architecture shown is only used as an example and is not used to limit the technical solutions of the embodiments of the present application. In the specific implementation process, the communication network 100 may also include other devices, and the number of network devices can be configured as needed.
[0054] SR Policy is a tunnel traffic diversion technology. SR Policy specifies multiple message forwarding paths. When the controller sends SR Policy to the network device, the network device sends data flows according to the multiple message forwarding paths instead of the shortest path calculated by IGP. Load sharing is achieved among the multiple message forwarding paths.
[0055] Generally, the controller can send multiple SR Policies to a network device. However, the device capabilities of a network device are limited. For example, a common device capability is the number of SR Policies that can be installed. If the number of SR Policies sent by the controller exceeds the device capabilities of the network device, and the controller cannot know this, the controller will continue to send more SR Policies to the network device, resulting in bandwidth loss.
[0056] It should be noted that an SR Policy is used to indicate one or more candidate paths (CP), each CP includes multiple SR Segment Lists (SR Segment Lists) (also called Segment Identification Lists (SID Lists)), each SID List is used to indicate a message forwarding path, and a SID List includes multiple segments, each segment is used to indicate a network device and the function performed, and multiple segments constitute the message forwarding path indicated by the SID List. Multiple SID Lists in a CP form load sharing. When a network device receives an SR Policy, it can select a CP from multiple CPs to send the corresponding data stream.
[0057] After the controller sends the SR Policy to the network device, the network device can report the relevant information through the border gateway protocol-link state (BGP-LS). BGP-LS introduces a series of network layer reachability information (NLRI) based on the border gateway protocol (BGP). For example, the network device can report the SR Policy candidate path descriptor (SR Policy candidate path descriptor) with the candidate path (CP) as the granularity through BGP-LS (such as Figure 1-3 ), SR Policy state and other information, the state of the candidate path of the CP indicated by the SR Policy (SR Candidate Path State) (as shown in Figure 1-4 ), the SR Segment List of each SID List under the CP (as shown in Figure 1-5The SR Candidate Path State defines a series of flags in the format of tag-length-value (TLV), such as A-Flag indicating whether the current CP is active or backup, V-Flag indicating whether the current CP is valid, and so on.
[0058] like Figure 1-3 As shown, the SR Policy Candidate Path Descriptor is in TLV format, including type (type), length (length) and value (value), wherein the value includes protocol type (protocol-origin), flags, reserved (reserved), end point (endpoint) (4 or 16 bytes (octets)), policy color (policy color) (4 bytes (octets)), originator number (originator AS Number) (4 bytes (octets)), originator address (originator address) (4 or 16 bytes (octets)), and discriminator (discriminator) (4 bytes (octets)).
[0059] like Figure 1-4 As shown, the SR Candidate Path State is in TLV format, including type (type), length (length) and value (value), wherein the value includes message priority (priority), flags, reserved (reserved), and routing priority (preference).
[0060] like Figure 1-5 As shown, the SR Segment List is in TLV format, including type, length and value, where the value includes flags, 2 reserved, manager total item data (MTID), algorithm, weight (4 octets) and sub-TLVs (extensible variable).
[0061] For example, Figure 1-6As shown, it is a schematic diagram of a communication network 100. If an SRPolicy is to be established from PE1 to PE2, and the expected reserved bandwidth is 500 megabytes per second (Mbps), the controller 111 can send an SR Policy to PE1 through the border gateway protocol (BGP). The controller 111 determines an SR Policy by performing path calculation. The SR Policy includes multiple CPs, one of which includes 3 SID Lists. The 3 SID Lists form load sharing. The CP can meet the bandwidth of 500Mpbs. The 3 SID Lists are: (1) PE1->P3->P4->PE2 (cost is 100, bandwidth is 200Mbps); (2) PE1->P5->P6->PE2 (cost is 100, bandwidth is 200Mbps); (3) PE1->P7->P8->PE2 (cost is 100, bandwidth is 100Mbps).
[0062] However, if PE1 only supports the installation of two SID Lists for a CP, after the controller 111 sends the above SRPolicy to PE1, PE1 may need to discard one of the three SID Lists in the CP, or PE1 may consider the SR Policy as invalid as a whole based on the local processing strategy, resulting in traffic damage, and the controller 111 is unable to perceive the cause of the problem.
[0063] In addition, if PE1 only supports the installation of 2 CPs for an SR Policy, when the controller 111 sends the above SRPolicy to PE1, the SR Policy includes 3 CPs. PE1 may need to discard one of the CPs, or PE1 considers that the SR Policy is invalid as a whole based on the local processing strategy, resulting in traffic damage, and the controller 111 is unable to perceive the cause of the problem.
[0064] In addition, the number of SR Policies supported by a network device is not unlimited. There is currently no technical means to allow the controller 111 to obtain the number of SR Policies supported by the network device. Figure 1-7As shown, the message forwarding path determined by the controller 111 through the path computation element communication protocol (PCEP) is: PE1->P1->P3->PE2. Among them, the number of SRPolicy that PE1 can support is 500, the number of SR Policies that P1 can support is 1000, and the number of SR Policies that P2 can support is 800. If PE1 receives 600 SR Policies, it exceeds the number of SR Policies that PE1 can support, and the additional SR Policies cannot be installed.
[0065] To this end, the present application proposes a communication method and related devices for sending SR Policy messages according to the device capabilities of the network device.
[0066] In the present application, the controller first sends a first routing policy SR Policy message to the first network device, and the first SR Policy message includes the first SR Policy configured for the first network device. Then, the first network device receives and sends a first Border Gateway Protocol-Link State BGP-LS message to the controller, and the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds the first device capability of the first network device, and the first device capability includes the upper limit of the number of SR Policies that can be installed on the first network device. If the controller determines based on the first BGP-LS message that the number of SR Policies configured for the first network device exceeds the first device capability, the controller can stop sending SR Policy messages to the first network device to avoid bandwidth loss.
[0067] In the embodiments of the present application, a communication method is described through three embodiments, namely, Embodiment 1, Embodiment 2 and Embodiment 3.
[0068] See also Figure 2 As shown, a communication method provided in Embodiment 1 of the present application mainly includes the following steps:
[0069] 201. The controller sends a first SR Policy message to a first network device.
[0070] In some possible implementations, the first SR Policy message includes a first SR Policy configured for the first network device, the first SR Policy includes information about the first CP, and information about multiple first SID Lists in the first CP. It should be noted that the controller can send multiple SR Policy messages to the first network device, and different SR Policy messages can indicate different SR Policies, or the same SR Policy but different CPs, which is not limited here. In some possible implementations, the first network device can configure the first SRPolicy, the first CP, and multiple first SID Lists in the first CP based on the first SR Policy message.
[0071] It should be noted that the first SR Policy in the first SR Policy message may also include a headend (HeadEnd) (i.e., a network device receiving the SR Policy, such as a first network device), a color (Color) (i.e., the intention of the SR Policy, such as low latency, large bandwidth, etc.), and an end (Endpoint) (the destination network device indicated by the SR Policy).
[0072] For example, Figure 1-2 As shown, in the SR Policy information indicated by the SR Policy message, the head end is PE1, the color indicates that its intended bandwidth = 500Mbps, the tail end is PE2, and the CP indicated includes 3 SID Lists, namely: path 1 (PE1->P1->P2->PE2), path 2 (PE1->P3->P4->PE2) and path 4 (PE1->P7->P8->PE2).
[0073] In some possible implementations, the controller may also dynamically generate SRPolicy information through network topology information, and then send a first SR Policy message to the first network device, where the first SR Policy message includes the first SR Policy information, such as the controller sending the first SR Policy message through BGP or path computation element communication protocol (PCEP). In some possible implementations, the developer may also statically configure the SR Policy on the first network device, such as by inputting the first SR Policy information into the first network device based on the command-line interface (CLI) or the network configuration protocol (Netconf) for static configuration.
[0074] Exemplarily, the controller may generate the first SR Policy information based on the network topology information. Figure 1-2 In the communication network shown, the network topology information includes: 1. The network devices in the communication network include P1~P8, PE1, PE2, CE1 and CE2. Four message forwarding paths can be formed from PE1 to PE2, namely path 1 (PE1->P1->P2->PE2), path 2 (PE1->P3->P4->PE2), path 3 (PE1->P5->P6->PE2) and path 4 (PE1->P7->P8->PE2); 2. The bandwidth of path 1 is 300Mbps, the bandwidth of path 2 is 200Mbps, the bandwidth of path 3 is 200Mbps, and the bandwidth of path 4 is 100Mbps; 3. The overhead of path 1 is 500, the overhead of path 2 is 100, the overhead of path 3 is 100, and the overhead of path 4 is 100.
[0075] Exemplarily, the controller may determine the information of the first SR Policy based on the information of the above network topology, the first SR Policy including the first CP, the first CP including: path 1, path 2 and path 4, wherein load sharing is formed between path 1, path 2 and path 4, and the overhead is minimized. In some possible implementations, after the controller generates the information of the first SR Policy, it may send a first SR Policy message to the first network device, the first SR Policy message including the information of the first SRPolicy.
[0076] It should be noted that, among the multiple first SID Lists in the first CP, each first SID List carries a different weight attribute, so that load sharing can be formed between the multiple first SID Lists. Among them, each first SID List is an explicit label stack, and the first SID List can instruct each network device in the path to forward data packets according to the specified function.
[0077] In some possible implementations, the controller may send multiple SR Policy messages to the first network device, each SR Policy message indicating the same SR Policy but may respectively indicate different CPs, then the first network device may select a CP from the multiple CPs to send a data packet.
[0078] 202. The first network device determines that the number of SR Policies exceeds the capability of the first device.
[0079] In some possible implementations, the first network device has an upper limit on the number of SR Policies that it can support for installation. When the controller sends multiple SR Policy messages indicating different SR Policies, if the number of SRPolicies exceeds the upper limit, the first network device cannot support the installation of all SR Policies. In this case, the first network device determines that the number of SR Policies exceeds the capability of the first device.
[0080] For example, the first network device receives 1000 SR Policy messages sent by the controller, each indicating 1000 different SR Policies. However, the first device capability of the first network device can only support 800 SR Policies. After receiving the first SR Policy message, the first network device obtains the first SRPolicy indicated by the first SR Policy message. The first network device has installed 800 different SR Policies. If the first SR Policy indicated by the first SR Policy message is different from any of the first 800 installed SR Policies, the first network device determines that the number of SR Policies exceeds the first device capability.
[0081] In some possible implementations, when the first network device determines that the number of SR Policies exceeds the capabilities of the first device, the first network device may not install some of the SR Policies whose number exceeds the capabilities of the first device. For example, if the first network device has not installed the first SR Policy indicated in the first SR Policy message received by the first network device, and the number of SR Policies installed by the first network device including the first SR Policy does not exceed the capabilities of the first device, for example, 800 SR Policies, then the first network device may install the first SR Policy. However, when the first network device has already installed 800 SR Policies, when the first network device installs the 801st SR Policy, the first network device may not install the 801st SR Policy (i.e., the first SR Policy), and the first network device determines that the number of SR Policies exceeds its device capabilities.
[0082] Similarly, when the first network device continues to receive the first SR Policy message, if the first SR Policy indicated by the first SRPolicy message is different from the 800 installed SR Policies, the first network device may not install the first SR Policy, and the first network device determines that the number of first SR Policies exceeds the capacity of the first device.
[0083] 203. The first network device determines that the number of CPs of the first SR Policy indicated in the first SR Policy message exceeds the capability of the first device.
[0084] In some possible implementations, the first network device has an upper limit on the number of CPs that can be installed for an SR Policy. When multiple SR Policy messages indicating the same SR Policy sent by the controller indicate multiple different CPs of the first SR Policy, if the number of CPs in the indicated first SR Policy exceeds the upper limit, the first network device cannot support all CPs under the first SR Policy. The first network device determines that the number of CPs under the first SR Policy indicated in the first SRPolicy message exceeds the capability of the first device.
[0085] For example, the first SR Policy indicates 10 CPs, but the device capability of the first network device can only support 8 CPs for one SR Policy. After receiving the first SR Policy message, the first network device obtains the first SR Policy indicated by the first SRPolicy message. The first network device has installed 8 CPs under the first SR Policy. If the first CP of the first SR Policy indicated by the first SR Policy message is different from any of the first 8 installed CPs, the first network device determines that the number of CPs under the first SR Policy indicated in the first SR Policy message exceeds the capability of the first device.
[0086] In some possible implementations, when the first network device determines that the number of CPs in the first SR Policy exceeds the capabilities of the first device, the first network device may not install some CPs in the first SR Policy that exceed the capabilities of the first device. For example, the first network device receives multiple SR Policy messages indicating that the first SR Policy includes 10 different CPs, then the first network device may install each CP included in the first SR Policy in sequence. Since the first device capability of the first network device can only support 8 CPs for one SR Policy, the first network device can successfully install the first 8 CPs indicated by the first SR Policy, but when installing the 9th CP, the first network device may not install the 9th CP, and the first network device determines that the number of CPs under the first SR Policy indicated in the first SR Policy message exceeds the capabilities of the first device.
[0087] 204. The first network device determines that the number of the multiple first SID Lists of the first CP in the first SR Policy message exceeds the first device capability of the first network device.
[0088] In some possible implementations, the first network device has an upper limit on the number of SID Lists that can be installed in a CP. When the number of multiple first SID Lists in the first CP indicated by the first SR Policy message sent by the controller exceeds the upper limit, the first network device cannot support all multiple first SID Lists under the first CP. The first network device determines that the number of multiple first SID Lists in the first CP exceeds the first device capability of the first network device.
[0089] Exemplarily, the first SR Policy indicates a first CP, which includes three first SID Lists, but the first device capability of the first network device can only support two SID Lists for one CP, then the first network device determines that the number of SID Lists in the first CP exceeds the first device capability.
[0090] In some possible implementations, when the first network device determines that the number of SID Lists of the first CP in the first SR Policy message exceeds the capabilities of the first device, the first network device may not install some SID Lists in the first CP that exceed the capabilities of the first device. For example, the first network device receives a first CP in the first SR Policy message indicating three first SID Lists, then the first network device may install the first SID Lists indicated by the first CP in sequence. Since the first device capability can only support two SID Lists for one CP, the first network device can successfully install the first two first SID Lists of the three first SID Lists indicated by the first CP, but when installing the third first SID List, the first network device may not install the third first SID List, and determines that the number of SID Lists of the first CP in the first SR Policy message exceeds the capabilities of the first device.
[0091] In some possible implementations, when the first network device determines that the number of first SID Lists of the first CP in the first SR Policy message exceeds the capability of the first device, the first network device may also directly not install any first SID List in the first CP. For example, if the first network device receives a first CP in the first SR Policy message indicating three first SID Lists, the first network device can obtain its own first device capability and determine that it can install two SID Lists for one CP, then the first network device directly does not install the first CP and any first SID List in the first CP.
[0092] It should be noted that if there is no timing relationship between step 202, step 203 and step 204, for example, step 202 may be performed before step 203, or step 202 may be performed before step 203. This is not limited here.
[0093] 205. The first network device sends a first BGP-LS message to the controller.
[0094] In some possible implementations, the first BGP-LS message includes multiple TLVs. In the first BGP-LS message, at least one target indication bit in at least one TLV can be used to indicate: the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds the first device capability of the first network device, and the first device capability includes the upper limit of the number of SR Policies that can be installed by the first network device; and / or; the number of CPs under the first SRPolicy exceeds the first device capability, and the first device capability also includes the upper limit of the number of CPs that can be installed in an SRPolicy; and / or, the number of multiple first SID Lists in the first CP exceeds the first device capability, and the first device capability also includes the upper limit of the number of SID Lists that can be installed in a CP by the first network device.
[0095] It should be noted that the first network device may reply a BGP-LS message to each SR Policy message, and the BGP-LS message includes a TLV (SR Policy CandidatePath Descriptor TLV) describing the state of a candidate path of the SR Policy (such as Figure 1-3 As shown), a SR candidate path state TLV (SR CandidatePath State TLV) (as shown Figure 1-4 As shown) and the TLVs of the segment routing lists of multiple SRs (SR Segment List TLV) (as shown Figure 1-5 ). Among them, SR Policy Candidate Path Descriptor TLV (such as Figure 1-3 ) is the key of the SR Policy indicated in the SRPolicy message, and an SR Candidate Path State TLV (such as Figure 1-4 ) and multiple SR Segment List TLVs (such as Figure 1-5 ) can be regarded as the value of the SR Policy. Figure 1-4 ) is used to describe the status information of the CP indicated in the SR Policy, multiple SR Segment List TLVs (such as Figure 1-5 As shown) is used to describe the relevant information of each SID List in the CP respectively.
[0096] In some possible implementations, in the first BGP-LS message, the at least one target indication bit can be carried in the SR Candidate PathState TLV. In some possible implementations, the Flags field in the SR CandidatePath State TLV includes 16 bits (2 bytes). As shown in Table 2, bits 0 to 10 of the 16 bits can be S, A, B, E, V, O, D, C, I, T, and U, respectively, which are used to represent different information, and at least one of the remaining 5 bits (bits 11 to 15) can be used as at least one target indication bit to indicate that the number of the first SR Policy exceeds the capability of the first device, and / or that the number of CPs under the first SR Policy indicated in the first SR Policy message exceeds the capability of the first device.
[0097] Exemplarily, when bit 11 (as shown in Table 1, represented as L-flag) of Flags of SR Candidate Path State TLV is set, it indicates that the number of first SR Policies exceeds the capability of the first device, and or, when bit 12 (as shown in Table 1, represented as M-flag) of Flags of SR Candidate Path State TLV is set, it indicates that the number of CPs under the first SR Policy indicated in the SR Policy message exceeds the capability of the first device.
[0098] Table 1
[0099] 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 S A B E V O D C I T U L M
[0100] In some possible implementations, in the first BGP-LS message, the at least one target indication bit can be carried in the SR Segment List TLV. In some possible implementations, the Flags field in the SR Segment List TLV includes 16 bits (2 bytes). As shown in Table 2, bits 0 to 7 of the 16 bits can be D, E, C, V, R, F, A, and T, respectively, which are used to represent different information, and at least one of the remaining 8 bits is used as at least one target indication bit, which is used to indicate that the number of multiple first SID Lists of the first CP in the first SR Policy message exceeds the capability of the first device. Exemplarily, at least one bit in bits 10 to 15 of the Flags of the SR Segment List TLV can be used as the target indication bit.
[0101] Exemplarily, when bit 9 (expressed as L-flag) of Flags of the SR Segment List TLV is set, it indicates that the number of multiple first SID Lists of the first CP in the first SR Policy message exceeds the capability of the first device.
[0102] Table 2
[0103] 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 D E C V R F A T M L
[0104] In some possible implementations, since the number of undefined Flags in the SR Candidate Path State TLV and the SR SegmentList TLV is small, a sub-TLV may be added to the SR Candidate Path State TLV and / or the SR Segment List TLV.
[0105] Exemplarily, when the E-Flag of Flags in the SR Candidate Path State TLV is set (indicating that there is a verification result) and the V-Flag is not set (indicating that the CP is invalid), a sub-TLV is added to the SR Candidate Path State TLV, and the sub-TLV is used to indicate that the number of CPs under the first SR Policy indicated in the first SR Policy message exceeds the capability of the first device, and / or the number of SR Policies exceeds the capability of the first device.
[0106] Exemplarily, as shown in Table 3, the sub-TLV of SR Candidate Path State may be referred to as an Invalid Reason TLV, wherein the value may be referred to as an Invalid Flags, and the Invalid Flags may include 32 bits (4 bytes).
[0107] Table 3
[0108]
[0109] Exemplarily, as shown in Table 4, when bit 0 (expressed as L-flag) of Invalid Flags is set, it indicates that the number of SR Policies exceeds the device capability; and or, when bit 1 (expressed as M-flag) of Invalid Flags is set, it indicates that the number of CPs under the first SR Policy exceeds the device capability.
[0110] Table 4
[0111] 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 L M
[0112] In some possible implementations, a sub-TLV may be added to the SR Segment List TLV to indicate that the number of multiple first SID Lists of the first CP in the first SR Policy message exceeds the first device capability. Exemplarily, when the V-Flag of Flags in the SR Segment List TLV is not set (indicating that the CP is invalid), the sub-TLV of the SR Segment List TLV may be as shown in Table 4. Exemplarily, when bit 0 (expressed as L-flag) of Flags in the sub-TLV of the SR Segment List TLV is set, it indicates that the number of multiple first SID Lists of the first CP in the first SR Policy message exceeds the first device capability.
[0113] 206. The controller determines, based on the first BGP-LS message, that the number of SR Policies configured for the first network device, the number of CPs in the first SR Policy, and / or the number of SID Lists in the first CP exceeds the capability of the first device.
[0114] In some possible implementations, after the controller receives the first BGP-LS message, if the first BGP-LS message indicates that the number of first SR Policies exceeds the capacity of the first device, the controller stops sending new SR Policy messages to the first network device.
[0115] In some possible implementations, after the controller receives the first BGP-LS message, if the first BGP-LS message indicates that the number of CPs under the first SR Policy indicated in the first SR Policy message exceeds the capacity of the first device, then the controller stops sending new CPs of the first SR Policy to the first network device.
[0116] In some possible implementations, after the controller receives a first BGP-LS message, if the first BGP-LS message indicates that the number of multiple first SID Lists of the first CP in the corresponding first SR Policy message exceeds the capability of the first device, then the controller may reduce the number of SID Lists in the first CP (for example, from 3 SID Lists to 2 SIDLists) and re-determine a second SR Policy message, wherein the second SR Policy message indicates the same first SR Policy and the same first CP as the first SR Policy message, but the second SR Policy message indicates different multiple second SIDLists.
[0117] In the present application, the controller first sends a first routing policy SR Policy message to the first network device, and the first SR Policy message includes the first SR Policy configured for the first network device. Then, the first network device receives and sends a first Border Gateway Protocol-Link State BGP-LS message to the controller, and the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds the first device capability of the first network device, and the first device capability includes the upper limit of the number of SR Policies that can be installed on the first network device. If the controller determines based on the first BGP-LS message that the number of SR Policies configured for the first network device exceeds the first device capability, the controller can stop sending SR Policy messages to the first network device to avoid bandwidth loss.
[0118] The following describes, through the second embodiment, that a first network device obtains the device capability of at least one network device and reports it to a controller.
[0119] See also Figure 3 As shown, the communication method provided in the second embodiment of the present application mainly includes the following steps:
[0120] 301. A first network device obtains device capability of at least one network device.
[0121] In some possible implementations, the first device capability of the first network device includes an upper limit on the number of SID Lists that can be installed with a CP, an upper limit on the number of CPs that can be installed with an SR Policy, and / or an upper limit on the number of SR Policies that can be installed.
[0122] For example, for the upper limit of the number of SID Lists that a CP can support for installation, please refer to step 204 of Example 1, for the upper limit of the number of CPs that an SR Policy can support for installation, please refer to step 203 of Example 1, and for the upper limit of the number of SR Policies that can be supported for installation, please refer to step 202 of Example 1, which will not be repeated here.
[0123] In some possible implementations, multiple network devices in a communication network may flood their own device capabilities, so that each of the multiple network devices knows the device capabilities of itself and other network devices. The multiple network devices in the communication network include a first network device. For example, multiple network devices flood their own device capabilities, so that the first network device can obtain the device capabilities of each of the multiple network devices; the first network device may also flood its own first device capabilities, so that multiple network devices can obtain the device capabilities of the first network device. For example, Figure 1-2 In the communication network shown, CE1, CE2, PE2, P1-P8 respectively flood their own equipment capabilities, so that PE1 can learn the equipment capabilities of CE1, CE2, PE2, P1-P8. Exemplarily, PE1 floods its own equipment capabilities, so that CE1, CE2, PE2, P1-P8 respectively learn the equipment capabilities of PE1.
[0124] Exemplarily, the first network device may flood its own device capabilities via intermediate system to intermediate system protocol (ISIS) / open shortest path first (OSPF) so that other network devices in the communication network acquire the device capabilities of the first network device.
[0125] In some possible implementations, the first network device may not flood its own device capabilities, but obtain its own device capabilities to obtain the device capabilities of at least one network device, which is not limited here.
[0126] In some possible implementations, the first network device floods its own device capabilities by extending RFC9352 in ISIS, that is, the first network device can send a flood message, which is an ISIS message.
[0127] In some possible implementations, a new sub-TLV is added to the ISIS message, called the Segment Routing IPv6 (SRv6) capability sub-TLV (SRv6Capabilities Sub-TLV) based on the Internet Protocol Version 6 (IPv6) forwarding plane. The SRv6 Capabilities Sub-TLV carries the first device capabilities of the first network device.
[0128] Exemplarily, as shown in Table 5, it is a newly added SRv6 Capabilities Sub-TLV in the ISIS / OSPF message, wherein an optional sub-sub-TLVs may be added to its value, and the optional sub-sub-TLVs may be used to indicate the device capabilities of the network device. Exemplarily, 1 to 3 optional sub-sub-TLVs may be added to the value of the SRv6 CapabilitiesSub-TLV, which are used to indicate the upper limit of the number of SR Policies that can be installed by the first network device, the upper limit of the number of CPs that can be installed by the first network device for a single SR Policy, and / or the upper limit of the number of SID Lists installed by the first network device for a single CP.
[0129] Table 5
[0130]
[0131] Among them, type has 1 octet. Length has 1 octet, and the value of length is the length of Optional sub-sub-TLVs + 2. Flags has 2 octets and is defined as shown in Table 6. The second bit must be 0. The reserved field can be used to express other information.
[0132] Table 6
[0133]
[0134] Exemplarily, if the upper limit of the number of SR Policies that can be installed by the first network device is 800, as shown in Table 7, the value of one of the optional sub-sub-TLVs (called SR Policy number) of the newly added SRv6 Capabilities Sub-TLV in the ISIS / OSPF message is 00001100100000 (binary, equal to 800 in decimal) to indicate the upper limit of the number of SR Policies that can be installed by the first network device.
[0135] Table 7 (SR Policy Number Sub-TLV)
[0136]
[0137] Exemplarily, if the upper limit of the number of CPs that can be installed by the first network device for a single SR Policy is 2, as shown in Table 8, the value of one of the optional sub-sub-TLVs (called CP number) of the newly added SRv6 Capabilities Sub-TLV in the ISIS / OSPF message is 00000000000010 (binary, equal to decimal 2), which indicates the upper limit of the number of CPs that can be installed by the first network device for a single SR Policy.
[0138] Table 8 (SR Policy Number Sub-TLV)
[0139]
[0140] Exemplarily, if the upper limit of the number of SID Lists that can be installed by the first network device for a single CP is 2, as shown in Table 9, the value of one of the optionalsub-sub-TLVs (called SID List number) of the newly added SRv6 Capabilities Sub-TLV in the ISIS / OSPF message is 00000000000010 (binary, equal to decimal 2) to represent the upper limit of the number of SID Lists that can be installed by the first network device for a single CP.
[0141] Table 9 (SR Policy Number Sub-TLV)
[0142]
[0143] 302. The first network device sends a second BGP-LS message to the controller, where the second BGP-LS message indicates a device capability of at least one network device.
[0144] In some possible implementations, after the first network device obtains the device capability of at least one network device in the communication network, the first network device may send a second BGP-LS message to the controller, where the second BGP-LS message is used to indicate the device capability of the at least one network device.
[0145] In some possible implementations, after the controller and the first network device establish a BGP-LS neighbor, the first network device sends a BGP-LS message to the controller. In some possible implementations, when the first SRPolicy message sent by the controller causes the first network device to determine that the number of multiple first SID Lists of the first CP in the first SR Policy message exceeds the first device capability, the number of CPs under the first SR Policy indicated in the first SR Policy message exceeds the first device capability and / or the number of SR Policies exceeds the first device capability, the first network device may report its own first device capability to the controller via a second BGP-LS message.
[0146] Exemplarily, as shown in Table 10, the draft-ietf-idr-bgp-ls-sr-policy of the second BGP-LS message may be improved, wherein the Node description TLV is used to indicate relevant information of the head end, and the TE Policy description and TE Policy attribute are used to indicate relevant information of the SR Policy. Exemplarily, a sub-TLV may be added to the TE Policy Attributes field of the draft-ietf-idr-bgp-ls-sr-policy, and the sub-TLV is used to indicate the device capability of at least one network device.
[0147] Table 10
[0148]
[0149] In some possible implementations, the second BGP-LS message may also be based on MPLS or SRv6, which is not limited here.
[0150] Exemplarily, as shown in Table 11, it is a second BGP-LS message based on MPLS, which defines a sub-TLV in the TE Policy Attributes field of draft-ietf-idr-bgp-ls-sr-policy, and the sub-TLV is called SR-MPLS TEPolicy capability TLV, which includes Type, length and value, and the value is called optional sub-TLVs. In some possible implementations, the optional sub-TLVs is variable, and the device capability of at least one network device is indicated in the optional sub-TLVs.
[0151] Table 11
[0152]
[0153] Exemplarily, as shown in Table 12, for a second BGP-LS message based on SRv6, a sub-TLV is defined in the TE Policy Attributes of draft-ietf-idr-bgp-ls-sr-policy, and the sub-TLV is called SRv6 TE PolicyCapability TLV, which includes Type, length, and value, and the value is called optional sub-TLVs. In some possible implementations, the optional sub-TLVs is variable, and the device capability of at least one network device is indicated in the optional sub-TLVs.
[0154] Table 12
[0155]
[0156] In some possible implementations, the optional sub-TLVs may include multiple sub-TLVs, and different sub-TLVs may carry different information. For example, as shown in Table 13, a sub-TLV in the optional sub-TLVs is used to indicate the upper limit of the number of SR Policies that can be installed in the first network device (SR Policy Number); as shown in Table 14, a sub-TLV in the optional sub-TLVs is used to indicate the upper limit of the number of CPs that can be installed in the first network device (SR Policy Multipath Number); as shown in Table 15, a sub-TLV in the optional sub-TLVs is used to indicate the upper limit of the number of SID Lists that can be installed in a single CP that the first network device can support (SID-ListNumber).
[0157] Table 13
[0158]
[0159] Table 14
[0160]
[0161] Table 15
[0162]
[0163] 303. The controller determines, based on the first BGP-LS message, that the number of SR Policies configured for the first network device, the number of CPs in the first SR Policy, and / or the number of multiple first SID Lists in the first CP exceeds the capability of the first device.
[0164] For example, if the second BGP-LS message indicates that the upper limit of the number of SR Policies that the first network device can support is 800, if the controller has already sent an SR Policy message indicating different SR Policies to the first network device, it first determines the number of SR Policies already installed on the first network device. If the first network device has already installed 800 different SR Policies, the controller can stop sending SRPolicy messages indicating different SR Policies to the first network device.
[0165] For example, if the BGP-LS message indicates that the upper limit of the number of CPs under the first SR Policy that the first network device can support is 2, if the controller has already sent the first SR Policy message indicating different CPs under the first SR Policy to the first network device, it first determines the number of CPs under the first SR Policy that the first network device has installed. If the first network device has already installed two different CPs under the first SR Policy, the controller may stop sending SR Policy messages for new CPs of the first SR Policy to the first network device.
[0166] For example, if the second BGP-LS message indicates that the upper limit of the number of SID Lists of the first CP that the first network device can support is 2, if the controller has first determined the number of SID Lists under the first CP that the first network device has installed before sending the first SR Policy message to the first network device, and the number of SID Lists under the first CP exceeds 2, then the controller can re-send the second SR Policy message to the first network device, and the number of multiple second SID Lists of the first CP in the second SR Policy message shall not exceed 2.
[0167] In the present application, the first network device can report the first device capability to the controller, so that the controller obtains the first device capability of the first network device, and then the controller can send a first SR Policy message to the first network device based on the first device capability of the first network device to avoid bandwidth loss. Alternatively, the controller can send a second SR Policy message based on the first device capability of the first network device, the second SR Policy message includes the first SR Policy configured for the first network device and the second CP under the first SR Policy, the second CP includes multiple second SID Lists, the number of the multiple second SID Lists does not exceed the device capability of the first network device, so that the first network device can smoothly install multiple second SID Lists to avoid bandwidth loss.
[0168] In some possible implementations, since the first device capability of the first network device is relatively stable and does not change frequently, the following describes, through Embodiment 3, that the controller can actively query the first device capability of the first network device.
[0169] See also Figure 4-1 As shown, a communication method provided in Embodiment 3 of the present application mainly includes the following steps:
[0170] 401. A controller sends a query request to a first network device, where the query request is used to query a first device capability of the first network device.
[0171] In some possible implementations, the first device capability of the first network device includes an upper limit on the number of SID Lists that can be installed with a CP, an upper limit on the number of CPs that can be installed with an SR Policy, and / or an upper limit on the number of SR Policies that can be installed.
[0172] For example, for the upper limit of the number of SID Lists that a CP can support for installation, please refer to step 204 of Example 1, for the upper limit of the number of CPs that an SR Policy can support for installation, please refer to step 203 of Example 1, and for the upper limit of the number of SR Policies that can be supported for installation, please refer to step 202 of Example 1, which will not be repeated here.
[0173] In some possible implementations, the controller may query the first device capability of the first network device through the management plane.
[0174] Exemplarily, the controller may send a query request to the first network device, which query request may be a command-line interface (CLI) message, yet another next generation (YANG) message, or a network simple network management protocol (SNMP) message to query the first device capability of the first network device.
[0175] Exemplarily, the controller may also obtain the first device capability of the first network device through a telemetry mechanism. It should be noted that Telemetry is widely used to collect interface traffic statistics, central processing unit (CPU) or memory data of the device, and Telemetry may also be applied to collect the first device capability of the first network device. Then, the controller may send a query request based on the Telemetry mechanism to the first network device to collect the first device capability of the first network device. When the device capability of the first network device changes, the controller may quickly obtain the new device capability of the first network device.
[0176] 402. The first network device sends a message carrying the first device capability to the controller based on the query request.
[0177] Exemplarily, the first network device may send an indication message to the controller, the indication message being used to indicate the first device capability of the first network device. In some possible implementations, the first network device may return an indication message to the controller based on a YANG model organization of a Telemetry mechanism, the indication message being used to indicate the device capability of the first network device.
[0178] For example, Figure 4-2 As shown, the first network device can organize the indication message returned to the controller based on the YANG model of the Telemetry mechanism. Among them, srpolicy-max-number indicates the upper limit of the number of SR Policies that can be installed by the first network device; candidate-path-max-number indicates the upper limit of the number of CPs that can be installed by the first network device for a single SRPolicy; Sid-list-max-number indicates the upper limit of the number of SID Lists that can be installed by the first network device for a single CP. Among them, uint32 indicates that the value type is a 32-bit unsigned integer.
[0179] In addition, rw policies indicates the relevant information of a specific SR Policy, including policy*[endpoint color], endpoint (endpoint), color (color) (i.e., intent), and name (name).
[0180] Among them, policy*[endpoint color] indicates the end point of the SR Policy and the corresponding color (i.e., intent). Among them, endpoint indicates the end point, which is represented by an IP address (ip-address), inet indicates the numerical type of endpoint, and inet indicates the format of ip-address in dotted decimal notation. Color is the color of the SR Policy, which is represented by the uint32 type. Name is the name of the SR Policy, which is represented by the uint32 type.
[0181] 403. The controller determines, based on the second BGP-LS message, that the number of SR Policies configured for the first network device, the number of CPs in the first SR Policy, and / or the number of multiple first SID Lists in the first CP exceeds the capability of the first device.
[0182] Please refer to step 303, which will not be described in detail here.
[0183] In the present application, the controller can obtain the first device capability of the first network device through telemetry, and then the controller can send a first SR Policy message to the first network device based on the first device capability of the first network device to avoid bandwidth loss. Alternatively, the controller can send a second SRPolicy message based on the first device capability of the first network device, the second SR Policy message includes the first SR Policy configured for the first network device and the second CP under the first SRPolicy, the second CP includes multiple second SID Lists, the number of the multiple second SID Lists does not exceed the device capability of the first network device, so that the first network device can smoothly install multiple second SID Lists to avoid bandwidth loss.
[0184] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0185] In order to better implement the above-mentioned solution of the embodiment of the present application, relevant devices for implementing the above-mentioned solution are also provided below.
[0186] See also Figure 5 , a controller 500 provided in an embodiment of the present application may include:
[0187] The transceiver module 501 is configured to send a first routing policy SR Policy message to a first network device, where the first SR Policy message includes a first SR Policy configured for the first network device;
[0188] The transceiver module 501 is further used to receive a first Border Gateway Protocol-Link State BGP-LS message sent by the first network device, where the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds the first device capability of the first network device, where the first device capability includes an upper limit on the number of SR Policies that can be installed by the first network device;
[0189] The processing module 502 is configured to determine, based on the first BGP-LS message, that the number of SRPolicies configured for the first network device exceeds the capability of the first device.
[0190] In some possible implementations, the first SR Policy message further includes a first candidate path CP under the first SR Policy;
[0191] The first BGP-LS message is further used to indicate that the number of CPs under the first SR Policy exceeds the capability of the first device, where the capability of the first device also includes an upper limit on the number of CPs that can be installed in one SR Policy;
[0192] The processing module is further used to determine, based on the first BGP-LS message, that the number of CPs in the first SR Policy configured for the first network device exceeds the capability of the first device.
[0193] In some possible implementations, the first CP includes multiple first SID Lists, each SID List in the multiple first SID Lists is a message forwarding path from the first network device to a destination network device;
[0194] The first BGP-LS message is further used to indicate that the number of the plurality of first SID Lists in the first CP exceeds the first device capability, where the first device capability also includes an upper limit on the number of SID Lists that can be installed in one CP by the first network device;
[0195] The transceiver module 501 is further configured to send a second SR Policy message to the first network device based on the first BGP-LS message, where the second SR Policy message includes a first SRPolicy configured for the first network device and a second CP under the first SR Policy, where the second CP includes a plurality of second SID Lists, and the number of the plurality of second SID Lists does not exceed the capability of the first device;
[0196] The processing module 502 is further configured to determine, based on the first BGP-LS message, that the number of SID Lists in the first CP configured for the first network device exceeds a capability of the first device.
[0197] In some possible implementations, the transceiver module 501 is further configured to:
[0198] A second BGP-LS message sent by a second network device is received, where the second BGP-LS message includes a device capability of at least one network device, and the at least one network device includes the first network device.
[0199] In some possible implementations, the transceiver module 501 is further configured to:
[0200] A query request is sent to the first network device, where the query request is used to query the capability of the first device.
[0201] Please refer to Figure 6 The embodiment of the present application provides a network device 600, which is used as a first network device, including:
[0202] The transceiver module 601 is configured to receive a first SR Policy message sent by a controller, where the first SR Policy message includes a first SR Policy configured for the first network device;
[0203] The transceiver module 601 is further used to send a first BGP-LS message to the controller, where the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds the first device capability of the first network device, where the first device capability includes an upper limit on the number of SR Policies that can be installed on the first network device;
[0204] The processing module 602 is used to stop sending the SRPolicy message to the first network device based on the first BGP-LS message.
[0205] In some possible implementations, the first SR Policy message further includes a first candidate path CP under the first SR Policy;
[0206] The first BGP-LS message is further used to indicate that the number of CPs under the first SR Policy exceeds the first device capability, and the first device capability also includes an upper limit on the number of CPs that can be installed in one SR Policy.
[0207] In some possible implementations, the first CP includes multiple first SID Lists, each SID List in the multiple first SID Lists is a message forwarding path from the first network device to a destination network device;
[0208] The first BGP-LS message is further used to indicate that the number of the plurality of first SID Lists in the first CP exceeds the first device capability, where the first device capability also includes an upper limit on the number of SID Lists that can be installed in one CP by the first network device;
[0209] The transceiver module 601 is further used for:
[0210] Receive a second SR Policy message sent by the controller based on the first BGP-LS message, the second SR Policy message including the first SR Policy configured for the first network device and the second CP under the first SR Policy, the second CP including multiple second SID Lists, and the number of the multiple second SID Lists does not exceed the capability of the first device.
[0211] In some possible implementations, the transceiver module 601 is further configured to:
[0212] A second BGP-LS message is sent to the controller, where the second BGP-LS message includes a device capability of at least one network device, where the at least one network device includes the first network device.
[0213] In some possible implementations, the transceiver module 601 is further configured to:
[0214] The first network device receives a query request sent by the controller, where the query request is used to query the capability of the first device;
[0215] The first network device sends a message carrying the first device capability to the controller based on the query request.
[0216] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0217] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a program, and the program executes some or all of the steps recorded in the above method embodiment.
[0218] Next, another communication device provided by the embodiment of the present application is introduced. Figure 7 As shown, the communication device 700 includes:
[0219] Receiver 701, transmitter 702, processor 703 and memory 704. In some embodiments of the present application, the receiver 701, transmitter 702, processor 703 and memory 704 may be connected via a bus or other means, wherein: Figure 7 The example of connecting through bus is taken in the following.
[0220] The memory 704 may include a read-only memory and a random access memory, and provides instructions and data to the processor 703. A portion of the memory 704 may also include a non-volatile random access memory (NVRAM). The memory 704 stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
[0221] The processor 703 controls the operation of the communication device 700, and the processor 703 may also be referred to as a central processing unit (CPU). In a specific application, the various components of the communication device 700 are coupled together through a bus system, wherein the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0222] The method disclosed in the above embodiment of the present application can be applied to the processor 703, or implemented by the processor 703. The processor 703 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 703. The above processor 703 can be a general processor, a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 704, and the processor 703 reads the information in the memory 704 and completes the steps of the above method in combination with its hardware.
[0223] The receiver 701 may be used to receive input digital or character information and generate signal input related to relevant settings and function control. The transmitter 702 may include a display device such as a display screen. The transmitter 702 may be used to output digital or character information through an external interface.
[0224] In the embodiment of the present application, the processor 703 is used to execute the aforementioned communication method.
[0225] In another possible design, when the controller 500 or the network device 600 or the communication device 700 is a chip, it includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute the computer execution instructions stored in the storage unit so that the chip in the terminal executes the method for sending wireless report information of any one of the above-mentioned first aspects. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit in the terminal located outside the chip, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0226] The processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above method.
[0227] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0228] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0229] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0230] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A communication method, characterized in that: include: The controller sends a first routing policy SR Policy message to the first network device, where the first SR Policy message includes a first SR Policy configured for the first network device; The controller receives a first Border Gateway Protocol-Link State BGP-LS message sent by the first network device, where the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds a first device capability of the first network device, where the first device capability includes an upper limit on the number of SRPolicies that can be installed by the first network device; The controller determines, based on the first BGP-LS message, that the number of SR Policies configured for the first network device exceeds the capability of the first device.
2. The method according to claim 1, characterized in that: The first SR Policy message also includes a first candidate path CP under the first SRPolicy; The first BGP-LS message is further used to indicate that the number of CPs under the first SR Policy exceeds the capability of the first device, where the capability of the first device also includes an upper limit on the number of CPs that can be installed in one SR Policy; The method further comprises: The controller determines, based on the first BGP-LS message, that the number of CPs in the first SRPolicy configured for the first network device exceeds the capability of the first device.
3. The method according to claim 2, characterized in that: The first CP includes a plurality of first SID Lists, each of which is a message forwarding path from the first network device to a destination network device; The first BGP-LS message is further used to indicate that the number of the plurality of first SID Lists in the first CP exceeds the first device capability, and the first device capability also includes an upper limit on the number of SID Lists that can be installed in one CP by the first network device; The method further comprises: The controller determines, based on the first BGP-LS message, that the number of SIDLists in the first CP configured for the first network device exceeds the capability of the first device; The controller sends a second SR Policy message to the first network device, where the second SR Policy message includes a first SR Policy configured for the first network device and a second CP under the first SR Policy, where the second CP includes multiple second SID Lists, and the number of the multiple second SID Lists does not exceed the capability of the first device.
4. The method according to claim 3, characterized in that: Before the controller sends a second SR Policy message to the first network device based on the first BGP-LS message, the method further includes: The controller receives a second BGP-LS message sent by a second network device, where the second BGP-LS message includes a device capability of at least one network device, and the at least one network device includes the first network device.
5. The method according to claim 3, characterized in that: Before the controller sends a second SR Policy message to the first network device based on the first BGP-LS message, the method further includes: The controller sends a query request to the first network device, where the query request is used to query the capability of the first device.
6. A communication method, characterized in that: include: The first network device receives a first SR Policy message sent by a controller, where the first SR Policy message includes a first SR Policy configured for the first network device; The first network device sends a first BGP-LS message to the controller, where the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds a first device capability of the first network device, where the first device capability includes an upper limit on the number of SR Policies that can be installed on the first network device.
7. The method according to claim 6, characterized in that: The first SR Policy message also includes a first candidate path CP under the first SRPolicy; The first BGP-LS message is further used to indicate that the number of CPs under the first SR Policy exceeds the first device capability, and the first device capability also includes an upper limit on the number of CPs that can be installed in one SR Policy.
8. The method according to claim 7, characterized in that: The first CP includes a plurality of first SID Lists, each of which is a message forwarding path from the first network device to a destination network device; The first BGP-LS message is further used to indicate that the number of the plurality of first SID Lists in the first CP exceeds the first device capability, and the first device capability also includes an upper limit on the number of SID Lists that can be installed in one CP by the first network device; The method further comprises: The first network device receives a second SR Policy message sent by the controller based on the first BGP-LS message, the second SR Policy message includes the first SR Policy configured for the first network device and the second CP under the first SR Policy, the second CP includes multiple second SID Lists, and the number of the multiple second SID Lists does not exceed the capability of the first device.
9. The method according to claim 8, characterized in that: Before the first network device receives the second SR Policy message sent by the controller based on the first BGP-LS message, the method further includes: The first network device sends a second BGP-LS message to the controller, where the second BGP-LS message includes a device capability of at least one network device, where the at least one network device includes the first network device.
10. The method according to claim 9, characterized in that: Before the first network device receives the second SR Policy message sent by the controller based on the first BGP-LS message, the method further includes: The first network device receives a query request sent by the controller, where the query request is used to query the capability of the first device; The first network device sends a message carrying the first device capability to the controller based on the query request.
11. A controller, characterized in that: include: A transceiver module, configured to send a first routing policy SR Policy message to a first network device, wherein the first SRPolicy message includes a first SR Policy configured for the first network device; The transceiver module is further used to receive a first Border Gateway Protocol-Link State BGP-LS message sent by the first network device, where the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds a first device capability of the first network device, where the first device capability includes an upper limit on the number of SR Policies that can be installed by the first network device; A processing module is used to determine, based on the first BGP-LS message, that the number of SR Policies configured for the first network device exceeds the capability of the first device.
12. The controller according to claim 11, characterized in that: The first SR Policy message further includes a first candidate path CP under the first SR Policy; The first BGP-LS message is further used to indicate that the number of CPs under the first SR Policy exceeds the capability of the first device, where the capability of the first device also includes an upper limit on the number of CPs that can be installed in one SR Policy; The processing module is further used to determine, based on the first BGP-LS message, that the number of CPs in the first SR Policy configured for the first network device exceeds the capability of the first device.
13. The controller according to claim 12, characterized in that: The first CP includes a plurality of first SID Lists, each of which is a message forwarding path from the first network device to a destination network device; The first BGP-LS message is further used to indicate that the number of the plurality of first SID Lists in the first CP exceeds the first device capability, and the first device capability also includes an upper limit on the number of SID Lists that can be installed in one CP by the first network device; The transceiver module is further configured to send a second SRPolicy message to the first network device based on the first BGP-LS message, where the second SR Policy message includes a first SR Policy configured for the first network device and a second CP under the first SR Policy, where the second CP includes a plurality of second SID Lists, and the number of the plurality of second SID Lists does not exceed the capability of the first device; The processing module is further configured to determine, based on the first BGP-LS message, that the number of SID Lists in the first CP configured for the first network device exceeds a capability of the first device.
14. The controller according to claim 13, characterized in that: The transceiver module is also used for: A second BGP-LS message sent by a second network device is received, where the second BGP-LS message includes a device capability of at least one network device, and the at least one network device includes the first network device.
15. The controller according to claim 13, characterized in that: The transceiver module is also used for: A query request is sent to the first network device, where the query request is used to query the capability of the first device.
16. A network device, characterized in that: Used as the first network device, including: a transceiver module, configured to receive a first SR Policy message sent by a controller, where the first SR Policy message includes a first SR Policy configured for the first network device; The transceiver module is further used to send a first BGP-LS message to the controller, where the first BGP-LS message is used to indicate that the number of SR Policies configured for the first network device exceeds a first device capability of the first network device, where the first device capability includes an upper limit on the number of SR Policies that can be installed on the first network device; A processing module is used to stop sending SR Policy messages to the first network device based on the first BGP-LS message.
17. The network device according to claim 16, characterized in that: The first SR Policy message further includes a first candidate path CP under the first SR Policy; The first BGP-LS message is further used to indicate that the number of CPs under the first SR Policy exceeds the first device capability, and the first device capability also includes an upper limit on the number of CPs that can be installed in one SR Policy.
18. The network device according to claim 16 or 17, characterized in that: The first CP includes a plurality of first SID Lists, each of which is a message forwarding path from the first network device to a destination network device; The first BGP-LS message is further used to indicate that the number of the plurality of first SID Lists in the first CP exceeds the first device capability, and the first device capability also includes an upper limit on the number of SID Lists that can be installed in one CP by the first network device; The transceiver module is also used for: Receive a second SR Policy message sent by the controller based on the first BGP-LS message, the second SRPolicy message including the first SR Policy configured for the first network device and the second CP under the first SR Policy, the second CP including multiple second SID Lists, and the number of the multiple second SID Lists does not exceed the capability of the first device.
19. The network device according to claim 18, characterized in that: The transceiver module is also used for: A second BGP-LS message is sent to the controller, where the second BGP-LS message includes a device capability of at least one network device, where the at least one network device includes the first network device.
20. The network device according to claim 19, characterized in that: The transceiver module is also used for: The first network device receives a query request sent by the controller, where the query request is used to query the capability of the first device; The first network device sends a message carrying the first device capability to the controller based on the query request.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and the program causes a computer device to execute the method according to any one of claims 1 to 10.
22. A computer program product, characterized in that The computer program product includes computer-executable instructions, which are stored in a computer-readable storage medium; at least one processor of a device reads the computer-executable instructions from the computer-readable storage medium, and the at least one processor executes the computer-executable instructions so that the device performs the method as described in any one of claims 1-10.
23. A communication device, characterized in that: The communication device includes at least one processor, a memory and a communication interface; The at least one processor is coupled to the memory and the communication interface; The memory is used to store instructions, the processor is used to execute the instructions, and the communication interface is used to communicate with other communication devices under the control of the at least one processor; When the instructions are executed by the at least one processor, the at least one processor is caused to perform the method according to any one of claims 1 to 10.
24. A chip system, characterized in that: The chip system includes a processor and a memory, the memory and the processor are interconnected via a line, instructions are stored in the memory, and the processor is used to execute the method as described in any one of claims 1-10.