Method and device for configuring routing policy, equipment and storage medium
The method and device autonomously configure routing policies in data center networks to address network congestion and packet loss, ensuring timely and flexible traffic management, improving network performance by adapting to various scenarios without external control systems.
Patent Information
- Application Number
- CN202411365810.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-06
AI Technical Summary
Existing data center networks face challenges in managing network congestion and packet loss, leading to impaired service performance and potential failures, with current solutions like delayed release strategies being inflexible and dependent on external control systems, which are not timely and can fail under network or control system failures.
A method and device for autonomously configuring routing policies in response to trigger conditions, allowing for flexible policy configurations with adjustable application periods and modes, enabling devices to manage network traffic independently and adapt to various scenarios without relying on external control systems.
The solution provides timely and flexible management of network traffic, reducing congestion and packet loss, enhancing network performance in large-scale data center networks by allowing devices to autonomously switch between policy configurations and adapt to changing conditions.
Smart Images

Figure CN119094422A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to a method, apparatus, device, and computer-readable storage medium for configuring a routing policy. Background Art
[0002] With the rapid development of computer technology, the demand for network performance carried by the data center network is increasing. If there is network congestion or packet loss, the service performance may be impaired, and in serious cases, it may cause service failure. Therefore, it is of great practical significance to develop a standardized architecture with reasonable bandwidth planning for the data network center to achieve low network latency and zero packet loss, so as to meet the increasing demand for network performance. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for configuring a routing policy is provided. The method includes: in response to a first trigger condition being met, determining a first policy configuration corresponding to the first trigger condition from a plurality of predetermined policy configurations, the first policy configuration at least including a routing policy applied to at least one neighbor device and an application period of the first policy configuration; and based on the first policy configuration, determining an application mode for applying the routing policy to at least one neighbor device within the application period.
[0004] In a second aspect of the present disclosure, a device for configuring a routing policy is provided. The device includes: a determination module configured to determine, in response to a first trigger condition being satisfied, a first policy configuration corresponding to the first trigger condition from a plurality of predetermined policy configurations, wherein the first policy configuration at least includes a routing policy applied to at least one neighbor device and an application period of the first policy configuration; and an application module configured to determine, based on the first policy configuration, an application mode of applying the routing policy to at least one neighbor device within the application period.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes: at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0007] It should be understood that the content described in this section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram showing an environment in which an example configuration policy for routing of an embodiment of the present disclosure can be implemented;
[0010] Figure 2A A schematic diagram of a network topology is shown;
[0011] Figure 2B A schematic diagram showing a network topology according to some embodiments of the present disclosure;
[0012] Figure 3 A flowchart showing a process for policy configuration for routing according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A flowchart showing a process for determining an application manner of a routing policy according to some embodiments of the present disclosure is shown;
[0014] Figure 5 A block diagram showing an apparatus for configuring a routing policy according to some embodiments of the present disclosure; and
[0015] Figure 6 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0018] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0019] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0020] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0021] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.
[0022] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0023] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0024] As used herein, the term "policy configuration" may refer to the configuration of a routing policy for a specific neighbor under a specific trigger condition. The configuration may include information such as priority, associated neighbor, timeout, mode, routing policy, trigger condition, etc.
[0025] The term "Border Gateway Protocol (BGP)" may refer to a network routing protocol widely used in data center networks. BGP routing has multiple properties that can provide great flexibility for network operation and maintenance and the design of network routing strategies.
[0026] The term "neighbor" can refer to a directly connected device or node in a network. For example, in BGP, a BGP neighbor refers to a directly connected switch that exchanges routing information through the BGP protocol. Each BGP neighbor maintains a routing table containing configuration policies and regularly exchanges routing information with other BGP neighbors to ensure network connectivity and routing information updates.
[0027] Some example embodiments of the present disclosure will be described below with reference to the accompanying drawings.
[0028] Figure 1 Schematic diagram of an environment 100 in which an example configuration policy for routing of an embodiment of the present disclosure can be implemented is shown. Figure 1 As shown, illustratively, the policy configuration 110 may include information such as priority, associated neighbors, timeout period, mode, routing policy, trigger conditions, etc. Exemplarily, the first device 120 may include a switch in a network topology, and the neighbors of the first device 120 include multiple neighbor devices directly connected thereto, such as neighbor devices 130-1, ..., 130-N (N is a natural number). For ease of discussion, neighbor devices 130-1, ..., 130-N may be collectively or individually referred to as neighbor devices 130. By applying the policy configuration 110, the first device 120 may determine the application mode of applying the routing policy to at least one neighbor 130. It should be understood that the environment 100 is merely exemplary and is not intended to limit the present disclosure in any way.
[0029] Figure 1 The first device 120 shown can be implemented with any type of electronic device, such as a terminal device, a server device or other device. Examples of terminal devices include mobile terminals, fixed terminals or portable terminals, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device can also support any type of interface for the user (such as "wearable" circuits, etc.). Examples of server devices include, but are not limited to, mainframes, edge computing nodes, computing devices in cloud environments, and the like.
[0030] Since the services carried by data center networks have high requirements for network performance, the network needs to be able to achieve low latency and zero packet loss. If network congestion or packet loss occurs, service performance may be impaired, and in serious cases, the service may fail. Therefore, data center networks often adopt a standardized architecture with reasonable bandwidth planning.
[0031] Figure 2A A schematic diagram of a network topology 200 is shown. In a large-scale data center network, a multi-plane interconnection method is used to share network traffic. Among them, multiple planes at the same level will evenly distribute business traffic. For example, Figure 2A As shown, when cabinet 220 accesses cabinet 210, it will send 1 / 3 of the upstream traffic to device 260 on the leftmost plane 270, and device 260 will then divide 1 / 3 of the traffic equally between device 230 and device 240, that is, device 230 and device 240 each get 1 / 6 of the traffic. Assuming that the link between device 240 and device 250 is unstable, the links between device 230 and device 250, and between device 230 and device 260 will bear all 1 / 3 of the traffic on this plane. In this case, if the links within each plane can bear at most 1 / 4 of the traffic, network congestion and packet loss will occur.
[0032] In addition, during the routine maintenance of network devices, route publishing will be stopped so that network traffic will not be pulled to ensure that business traffic is not affected during the maintenance process. Assuming that the maintenance of device 250 is completed and the route is re-published, there may be a sequence in the route learning of device 230 and device 240. If the route learning of one of devices 230 and 240 is not completed, but the other device has forwarded the route to device 260, the 1 / 3 of the traffic pulled in will also exceed the available link load capacity, just like the above situation.
[0033] In some current solutions, in order to deal with the above situation, a delayed release strategy is used, such as: advertise lowest-priority on-peer-upduration, advertise lowest-priority on-startup duration, etc. However, this delayed release strategy still has some problems to be solved. First, this delayed release strategy cannot adjust the traffic on other three-layer links that share the load when the BGP neighbor is established or disconnected. In this case, neighbors on other links can still continue to publish routes and attract traffic. Second, the way this delayed release strategy reduces the priority of the route is uncontrollable. For example, under some conditions, the low priority attribute needs to be able to propagate across multiple hops on the network. In addition, this delayed release strategy cannot solve problems in scenarios other than reducing priority. Moreover, this delayed release strategy can only apply the policy to the routes published by the device, and cannot apply the policy in the receiving direction.
[0034] In other current solutions, an external network control system is used to monitor events on the device, so as to remotely adjust the device configuration to achieve the desired effect. However, in this way, the device needs to notify the control system of the event through the network and receive instructions from the control system. The whole process involves many interactive steps, so the timeliness of this method is not guaranteed. In addition, if there is a network or control system failure, the mechanism of this method will fail.
[0035] According to an embodiment of the present disclosure, a scheme for configuring a routing policy is proposed. In the scheme, if a trigger condition is met, a device determines a policy configuration corresponding to the trigger condition from a plurality of predetermined policy configurations. The policy configuration includes at least a routing policy applied to at least one neighbor device and an application period of the policy configuration. Then, based on the policy configuration, the device determines an application mode for applying the routing policy to at least one neighbor device within the application period.
[0036] The solution disclosed in the present invention can provide policy configuration for any number of neighbors in groups, supports multiple trigger conditions, and does not limit the operations performed by routing, but is determined by the bound route-map, thus providing higher flexibility and being applicable to various special scenarios in large-scale data center networks. Compared with conventional solutions, the solution disclosed in the present invention can switch between different reasonable policy configurations in response to network congestion, thereby improving network performance. In addition, the solution disclosed in the present invention can be performed autonomously by the device, the timeliness of the action is guaranteed, and it is not affected by external failures such as failures in the control system.
[0037] refer to Figure 2B , showing a schematic diagram of a network topology 200' according to some embodiments of the present disclosure. For example, in response to the aforementioned link instability problem, in some embodiments, when device 255 detects that the link between device 245 and device 255 is unstable, it can automatically reduce the routing priority on the link between device 235 and device 255, so that the leftmost plane 275 can be completely withdrawn from forwarding. At this time, cabinet 225 can divide the traffic into 1 / 2 equally to the remaining two planes, plane 285 and plane 295. In this case, the links within plane 285 and plane 295 are evenly divided into a maximum of 1 / 4 of the network traffic, which does not exceed the link load capacity, thereby not causing congestion and packet loss.
[0038] Similarly, in order to solve the problem in the above-mentioned routine maintenance process, in some embodiments, when the maintenance of device 255 is completed, device 235 first learns the low-priority route and publishes it to device 265, while device 245 has not completed route learning. At this time, the low-priority route sent by device 265 to cabinet 225 will not temporarily pull traffic, but when the normal route is published after the timer expires, plane 270 will start forwarding traffic. In this case, the packet loss rate can be reduced to 0%.
[0039] Figure 3 FIG. 3 is a flowchart of a process 300 for policy configuration of routing according to some embodiments of the present disclosure. By way of example and not limitation, the process 300 may be performed in Figure 1 The process is performed by the first device 120 in the environment 100. In the following, for the purpose of explanation, reference is made to Figure 1 The process 300 is described below.
[0040] In box 310, in response to the first trigger condition being satisfied, the first device 120 determines a first policy configuration corresponding to the first trigger condition from a plurality of predetermined policy configurations. The first policy configuration includes at least a routing policy applied to at least one neighbor device 130 and an application period of the first policy configuration. In some embodiments, determining the first policy configuration corresponding to the first trigger condition may include determining, based on the first trigger condition, a set of candidate policy configurations that match the first trigger condition and are applied to at least one neighbor device 130 from a plurality of predetermined policy configurations. Each candidate policy configuration in the set of candidate policy configurations has a corresponding priority. In addition, determining the first policy configuration corresponding to the first trigger condition may also include determining the first policy configuration from the set of candidate policy configurations based on the priority. The attributes of the policy configuration are described in detail below with reference to Table 1.
[0041] Table 1
[0042]
[0043] As shown in Table 1, each policy configuration has the route-map name of the routing policy it references, which is described in the table as policy 1, policy 2, and policy 3. By way of example and not limitation, the name of the route-map may be ADVERTISE_LOW_PRIORITY, BLOCK BIZ ROUTES, and the like. Each policy configuration has its corresponding serial number, which indicates the priority of the policy configuration. The smaller the serial number, the higher the priority of the policy configuration. The associated neighbor attribute of the policy configuration indicates the IP or IPv6 address of the neighbor to which this policy configuration is applied, for example, 192.0.2.1, 2001:db8:1::2, and the like.
[0044] The trigger conditions of the policy configuration include, but are not limited to, neighbor establishment, neighbor disconnection, policy adjustment, receiving a specific prefix / attribute route, manual triggering, and other events, for example, peer-up 192.0.2.1, peer-up 2001:db8:1::2, etc. Compared with conventional solutions, the trigger conditions of the policy configuration in the present disclosure include more event types.
[0045] The timeout of the policy configuration is in seconds, which can refer to the application time of the policy. For example, when the trigger condition event A of the policy configuration is met, the timer of the policy configuration corresponding to policy 1 will start, and the duration of the timer is its timeout time of 30 seconds. The policy configuration will be active before the timer times out. For any neighbor, if the associated policy configuration is active, the process will insert the route-map routing policy policy 1 referenced by the policy configuration on its pipeline to modify the attributes of the routes received from or sent to this neighbor, thereby affecting the routing in the network. If the neighbor itself has been configured with a static route-map routing policy, the routing policy referenced by the policy configuration will be applied before or after the application of this routing policy to achieve a superposition effect.
[0046] The policy configuration may have multiple modes, such as a shared mode, an independent mode, etc. For example, the policy configuration of the shared mode has only one timer, and multiple neighbor devices 130 may share the timer corresponding to the application period of the policy configuration. Different from this, the policy configuration of the independent mode may set a timer for each neighbor device, and multiple neighbor devices 130 may respectively have a timer corresponding to the application period of the policy configuration, and each neighbor may be active or inactive.
[0047] For example, referring to the example policy configuration in Table 1, when the neighbor at address 1 enters the state corresponding to the event A condition, the policy configuration with sequence number 5 will enter the active state. At this time, the system will apply the policy 1 routing policy to the neighbor at address 1 and the neighbor at address 3, resulting in all routes sent to the neighbor at address 1 and the neighbor at address 3 being marked with a specific community, thereby triggering the neighbor to lower the priority of the routes announced by this device.
[0048] In some embodiments, the trigger condition may include at least one of the following: at least one neighbor device 130 enters an active state, and at least one neighbor device 130 enters an inactive state. In some embodiments, at least one neighbor device 130 may comply with the Border Gateway Protocol (BGP).
[0049] Now return to Figure 3 In block 230, based on the first policy configuration, the first device 120 determines an application method for applying the routing policy to at least one neighbor device within the application period. The specific method and embodiment of determining the application method will be described below in conjunction with Figure 4 Further description.
[0050] In some embodiments, the first device 120 determines whether the second policy configuration is currently being applied to at least one neighbor device 130. If the second policy configuration is currently being applied to at least one neighbor device, the application mode is determined based on the priority of the second policy configuration and the priority of the first policy configuration.
[0051] In some embodiments, if the priority of the first policy configuration is higher than or equal to the priority of the second policy configuration, the first device 120 determines to apply the first policy configuration instead of the second policy configuration to at least one neighbor device 130. In some embodiments, if the priority of the first policy configuration is higher than or equal to the priority of the second policy configuration, the first device 120 stops applying the second policy configuration to at least one neighbor device 130, and the first device 120 starts a timer corresponding to the application period of the first policy configuration, and the first device 120 applies the first policy configuration to at least one neighbor device 130 until the timer expires.
[0052] In other embodiments, if the priority of the second policy configuration is higher than the priority of the first policy configuration, the first device 120 continues to apply the second policy configuration until the application period of the second policy configuration ends. In some embodiments, if the priority of the second policy configuration is higher than the priority of the first policy configuration, the first device 120 starts a timer corresponding to the application period of the first policy configuration, and then after the application period of the second policy configuration ends, the first device 120 determines whether the timer expires, and if the timer does not expire, the first device 120 applies the first policy configuration to at least one neighbor device 130.
[0053] The embodiments of the present disclosure can provide policy configuration for any number of neighbors in groups, support multiple trigger conditions, and do not limit the operations performed by routing, but are determined by the bound route-map, thus providing higher flexibility and being applicable to various special scenarios in large-scale data center networks. Compared with conventional solutions, the solution of the present disclosure can switch between different reasonable policy configurations in response to network congestion, thereby improving network performance. In addition, the solution of the present disclosure can be performed autonomously by the device, the timeliness of the action is guaranteed, and it is not affected by external failures such as failures in the control system.
[0054] As mentioned above, we will then combine Figure 4 The specific method and embodiment of determining the application method are further described. In some embodiments, reference Figure 4 , which shows a flow chart of a process 400 for determining the application mode of a routing policy according to some embodiments of the present disclosure. The process 400 may be Figure 1 It should be understood that in the environment 100, the first device 120 is executed. Figure 4 The embodiments shown in are exemplary only and are not intended to be limiting in any way.
[0055] In block 410, the first device 120 determines a candidate policy configuration set that matches the trigger condition and is applied to at least one neighbor device from a plurality of predetermined policy configurations based on the trigger condition. Each candidate policy configuration in the candidate policy configuration set has a corresponding priority. Next, the process 400 proceeds to block 420.
[0056] At block 420 , the first device 120 determines a first policy configuration from the set of candidate policy configurations based on the priority corresponding to each candidate policy configuration, the first policy configuration having the highest priority in the set of candidate policy configurations.
[0057] At block 430, the first device 120 determines whether the second policy configuration is currently being applied to at least one neighbor device 130. In some embodiments, if no, that is, no other policy configuration is currently being applied, the process 400 proceeds to block 480, the first device 120 starts a timer corresponding to the application period of the first policy configuration, and the process 400 proceeds to block 490, the first device 120 applies the first policy configuration to at least one neighbor device 130 until the timer expires. In other embodiments, if yes, that is, the first device 120 is currently applying the second policy configuration to at least one neighbor device 130, the process 400 proceeds to block 440.
[0058] In block 440 , the first device 120 determines the application mode based on the priority of the second policy configuration and the priority of the first policy configuration, that is, determines whether the priority of the second policy configuration is higher than the priority of the first policy configuration.
[0059] In some embodiments, if the result of the determination in block 440 is no, that is, if the priority of the first policy configuration is higher than or equal to the priority of the second policy configuration, the first device 120 determines to apply the first policy configuration instead of the second policy configuration to at least one neighbor device 130. In this case, the process 400 proceeds to block 470, the first device 120 stops applying the second policy configuration to at least one neighbor device 130, and the process 400 proceeds to block 480, the first device 120 starts a timer corresponding to the application period of the first policy configuration, and the process 400 proceeds to block 490, the first device 120 applies the first policy configuration to at least one neighbor device 130 until the timer expires.
[0060] In other embodiments, if the judgment result in box 440 is yes, that is, if the priority of the second policy configuration is higher than the priority of the first policy configuration, the second policy configuration continues to be applied, and the process 400 proceeds to box 450, and the first device 120 starts the timer corresponding to the application period of the first policy configuration. When the application period of the second policy configuration ends, the process 400 proceeds to box 460, and the first device 120 determines whether the timer corresponding to the application period of the first policy configuration has expired. In some embodiments, if the judgment result is no, that is, the timer corresponding to the application period of the first policy configuration has not expired, the process 400 proceeds to box 490, and the first device 120 applies the first policy configuration to at least one neighbor device 130 until the timer expires. Alternatively, if the judgment result is yes, that is, the timer corresponding to the application period of the first policy configuration has expired, the process 400 returns to box 410.
[0061] In some embodiments, when process 400 is before box 460, that is, when the second policy configuration has not expired, if a third policy configuration is determined from the candidate policy set, and the priority of the third policy configuration is higher than or equal to the second configuration that is currently being applied, the device 120 stops applying the second policy configuration and applies the third policy configuration. In some embodiments, after the application period of the third policy configuration ends, the timer corresponding to the application period of the second policy configuration has not expired, the first device reapplies the second policy configuration, and process 400 waits until the reapplication period of the second policy configuration ends, and then proceeds to box 460. Alternatively, after the application period of the third policy configuration ends, the timer corresponding to the application period of the second policy configuration has expired, and process 400 is equivalent to waiting until the application period of the third policy configuration ends, and then proceeds to box 460.
[0062] In other embodiments, when the process 400 waits to advance to 460 at box 450, if a third policy configuration is determined from the candidate policy set, and the priority of the third policy configuration is lower than the second configuration currently being applied, the device 120 still continues to apply the second policy configuration. After the application period of the second policy configuration ends, the process 400 corresponding to the first policy configuration and the process 400 corresponding to the first policy configuration advance to box 460. In some embodiments, if the timer corresponding to the first policy configuration policy and the timer corresponding to the third policy configuration policy have not expired, it is necessary to determine the priority of the first policy configuration and the third policy configuration, and then the first device 130 applies the policy configuration with a higher priority among the first policy configuration and the third policy configuration. In other embodiments, if one of the timer corresponding to the first policy configuration policy and the timer corresponding to the third policy configuration policy expires and the other does not expire, the first device 130 applies the policy configuration corresponding to the timer that has not expired. Alternatively, if the timer corresponding to the first policy configuration policy and the timer corresponding to the third policy configuration policy have both expired, the process 400 returns to 410.
[0063] In some embodiments, when the triggering condition of the policy configuration is met, if the policy configuration is in sharing mode, a timer is set on the policy configuration, and at the same time, the first device 110 traverses the neighbors associated with the policy configuration to trigger a policy configuration refresh.
[0064] In some embodiments, when the neighbor policy configuration is refreshed, the first device 110 traverses the policy configuration from small to large in sequence. In some examples, if a policy configuration associated with the current neighbor and in an active state is encountered, for example, the name is policy 1, then the selected routing policy of the current neighbor is set to policy 1, and the traversal ends. In other examples, if a policy configuration associated with the current neighbor and in an active state is not encountered, then the selected routing policy of the current neighbor is cleared. In some embodiments, if the selected routing policy of the current neighbor changes, a soft refresh of the current neighbor is triggered, and the routing policy is reapplied.
[0065] The policy configuration may have multiple modes, such as a shared mode, an independent mode, etc. If the policy configuration is a shared mode, when the timer expires, the first device 110 traverses the associated neighbors and triggers a policy configuration refresh. In other embodiments, if the policy configuration is an independent mode, when the timer expires, a policy configuration refresh is triggered for the neighbors associated with the timer.
[0066] Through the above-mentioned methods, the solution of the present disclosure provides high flexibility and is applicable to various special scenarios in large-scale data center networks. In addition, the solution of the present disclosure can be performed by the device autonomously, the timeliness of the action is guaranteed, and it is not affected by external failures such as failures of the control system.
[0067] Figure 5 A block diagram of an apparatus 500 for configuring a routing policy according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in Figure 1 The first device 120. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware or any combination thereof.
[0068] As shown in the figure, the device 500 includes a determination module 510, which is configured to determine a first policy configuration corresponding to the first trigger condition from a plurality of predetermined policy configurations in response to the first trigger condition being satisfied, wherein the first policy configuration at least includes a routing policy applied to at least one neighbor device and an application period of the first policy configuration. The device 500 also includes an application module 520, which is configured to determine an application mode of applying the routing policy to at least one neighbor device within the application period based on the first policy configuration.
[0069] In some embodiments, the determination module 510 is further configured to: based on the first trigger condition, determine a set of candidate policy configurations that match the first trigger condition and are applied to at least one neighboring device from a plurality of predetermined policy configurations, each candidate policy configuration in the set of candidate policy configurations having a corresponding priority; and based on the priority, determine the first policy configuration from the set of candidate policy configurations.
[0070] In some embodiments, the application module 520 is further configured to: determine whether a second policy configuration is currently being applied to at least one neighboring device; and in response to determining that a second policy configuration is currently being applied to at least one neighboring device, determine an application method based on a priority of the second policy configuration and a priority of the first policy configuration.
[0071] In some embodiments, the application module 520 is also configured to: in response to the priority of the first policy configuration being higher than or equal to the priority of the second policy configuration, determine to apply the first policy configuration instead of the second policy configuration to at least one neighboring device; and in response to determining that the priority of the second policy configuration is higher than the priority of the first policy configuration, continue to apply the second policy configuration until the application period of the second policy configuration ends.
[0072] In some embodiments, the application module 520 is further configured to: stop applying the second policy configuration to at least one neighbor device; start a timer corresponding to the application period of the first policy configuration; and apply the first policy configuration to at least one neighbor device until the timer expires.
[0073] In other embodiments, the application module 520 is also configured to: start a timer corresponding to the application period of the first policy configuration; after the application period of the second policy configuration ends, determine whether the timer has expired; and in response to the timer not expiring, apply the first policy configuration to at least one neighboring device.
[0074] In some embodiments, each of a plurality of predetermined policy configurations has an application mode of the policy configuration, the application mode comprising a shared mode and an independent mode, the shared mode indicating that a plurality of neighboring devices share a timer corresponding to an application period of the policy configuration, and the independent mode indicating that a plurality of neighboring devices respectively have timers corresponding to the application period of the policy configuration.
[0075] In some embodiments, the trigger condition includes at least one of the following: at least one neighbor device enters an active state, and at least one neighbor device enters an inactive state.
[0076] In some embodiments, at least one neighbor device complies with the Border Gateway Protocol BGP.
[0077] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 The first device 120 and Figure 5Device 500, etc.
[0078] like Figure 6 As shown, the electronic device 600 is in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capabilities of the electronic device 600.
[0079] The electronic device 600 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. The storage device 630 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 600.
[0080] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0081] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0082] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0083] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0084] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0085] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0086] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0087] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0088] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A method for configuring a routing policy, comprising: In response to a first trigger condition being met, determining a first policy configuration corresponding to the first trigger condition from a plurality of predetermined policy configurations, the first policy configuration comprising at least a routing policy applied to at least one neighbor device and an application period of the first policy configuration; as well as Based on the first policy configuration, determine an application manner for applying the routing policy to the at least one neighbor device within the application period.
2. The method according to claim 1, wherein determining a first policy configuration corresponding to the first trigger condition comprises: Based on the first trigger condition, determining a set of candidate policy configurations that match the first trigger condition and are applied to the at least one neighbor device from the multiple predetermined policy configurations, each candidate policy configuration in the set of candidate policy configurations having a corresponding priority; as well as Based on the priority, the first policy configuration is determined from the set of candidate policy configurations.
3. The method according to claim 1, wherein determining the application mode of applying the routing policy to the at least one neighbor device within the application period comprises: determining whether a second policy configuration is currently being applied to the at least one neighbor device; as well as In response to determining that the second policy configuration is currently being applied to the at least one neighbor device, the application mode is determined based on a priority of the second policy configuration and a priority of the first policy configuration.
4. The method according to claim 3, wherein determining the application mode comprises: In response to a priority of the first policy configuration being higher than or equal to a priority of the second policy configuration, determining to apply the first policy configuration to the at least one neighbor device instead of the second policy configuration; and In response to determining that the priority of the second policy configuration is higher than the priority of the first policy configuration, the second policy configuration continues to be applied until an application period of the second policy configuration ends.
5. The method of claim 4, wherein determining to apply the first policy configuration to the at least one neighbor device comprises: Stop applying the second policy configuration to the at least one neighbor device; Starting a timer corresponding to an application period of the first policy configuration; The first policy configuration is applied to the at least one neighbor device until the timer expires.
6. The method of claim 4, wherein continuing to apply the second policy configuration comprises: Starting a timer corresponding to an application period of the first policy configuration; After the application period of the second policy configuration ends, determining whether the timer has expired; as well as In response to the timer not expiring, applying the first policy configuration to the at least one neighbor device.
7. The method according to claim 1, wherein each of the multiple predetermined policy configurations has an application mode of the policy configuration, the application mode includes a shared mode and an independent mode, the shared mode indicates that multiple neighboring devices share a timer corresponding to the application period of the policy configuration, and the independent mode indicates that multiple neighboring devices respectively have timers corresponding to the application period of the policy configuration.
8. The method according to claim 1, wherein the trigger condition comprises at least one of the following: The at least one neighbor device enters an active state, and The at least one neighbor device enters an inactive state.
9. The method according to claim 1, wherein the at least one neighbor device complies with Border Gateway Protocol (BGP).
10. A device for configuring a routing policy, comprising: a determination module configured to determine, in response to a first trigger condition being met, a first policy configuration corresponding to the first trigger condition from a plurality of predetermined policy configurations, wherein the first policy configuration at least includes a routing policy applied to at least one neighbor device and an application period of the first policy configuration; as well as The application module is configured to determine, based on the first policy configuration, an application mode for applying the routing policy to the at least one neighbor device within the application period.
11. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the device to perform the method according to any one of claims 1 to 9 when executed by the at least one processing unit.
12. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 9 when executed by a processor.
