Method and apparatus for adjusting link weight, electronic device and computer readable medium
Patent Information
- Application Number
- CN202310842706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-07-10
AI Technical Summary
In UCMP scenarios with link aggregation, existing technologies cannot dynamically adjust link weights, leading to service congestion and packet loss when traffic is concentrated on the remaining member links for forwarding. Furthermore, reselecting links to join the aggregation link incurs time overhead.
By obtaining the initial penalty value and penalty step size from the suppression policy parameters, the link weight is dynamically adjusted based on the number of failures of the aggregated link and the current available bandwidth. This introduces a penalty suppression and reuse mechanism to prevent the aggregated link from participating in traffic forwarding until the penalty value is restored to the reuse threshold.
It enables dynamic and flexible adjustment of link weights, solves the problems of service congestion and packet loss, and avoids the time overhead of reselecting links and adding them to aggregated links, thereby improving the reliability and efficiency of traffic forwarding.
Smart Images

Figure CN116866251B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and more specifically, to a method for adjusting link weight, a device for adjusting link weight, an electronic device, and a computer-readable medium. Background Technology
[0002] Link aggregation technology refers to increasing bandwidth by bundling multiple physical interfaces into a single logical interface. Unequal-Cost Multiple Path (UCMP) refers to multiple equally priced links with different bandwidths leading to the same destination, with each link distributing traffic according to its bandwidth ratio.
[0003] In UCMP scenarios that incorporate link aggregation, the weights assigned to each link, including the aggregated link, cannot be dynamically adjusted. When multiple member links in the aggregated link fail, traffic will be concentrated on the remaining member links for forwarding. If the traffic forwarded through the aggregated link exceeds the total bandwidth of the remaining member links, it will cause problems such as service congestion and packet loss.
[0004] Therefore, there is an urgent need in this field for a method that can dynamically adjust link weights.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a method, apparatus, electronic device, and computer-readable medium for adjusting link weights, thereby enabling dynamic adjustment of the weights of each link, at least to a certain extent.
[0007] According to a first aspect of this disclosure, a method for adjusting link weights is provided, comprising:
[0008] Obtain device links, wherein the device links include at least one set of aggregated links, and each set of aggregated links includes two or more member links;
[0009] Obtain the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period, wherein the suppression strategy parameters include the initial penalty value and the penalty step size;
[0010] Within the current statistical period, when a member link in the aggregated link fails, the current penalty value of the aggregated link is determined based on the number of failures of the aggregated link, the initial penalty value, and the penalty step size, and the current available bandwidth of the aggregated link is obtained.
[0011] Based on the current available bandwidth of the aggregated link and the current penalty value, the traffic allocation weights of all device links, including the aggregated link, are adjusted.
[0012] In one exemplary embodiment of this disclosure, the inhibition policy parameters further include a penalty inhibition threshold, and the method further includes:
[0013] Within the current statistical period, when the current penalty value of the aggregated link is greater than or equal to the penalty suppression threshold, the usage status of the aggregated link is changed from normal to suppressed. In the suppressed state, the aggregated link does not participate in the device's traffic forwarding.
[0014] In one exemplary embodiment of this disclosure, the inhibition policy parameters further include a penalty reuse threshold, and the method further includes:
[0015] After the usage state of the aggregated link changes from normal to suppressed, the current penalty value of the aggregated link is reduced according to a preset time interval.
[0016] When the current penalty value of the aggregated link is reduced to less than or equal to the penalty reuse threshold, the usage state of the aggregated link is restored from the suppressed state to the normal state, and the current penalty value of the aggregated link is reset to the initial penalty value corresponding to the aggregated link.
[0017] In one exemplary embodiment of this disclosure, determining the current penalty value of the aggregated link based on the number of failures of the aggregated link, the initial penalty value, and the penalty step size includes:
[0018] The penalty increment of the aggregated link is obtained based on the number of failures of the aggregated link and the penalty step size, and the current penalty value of the aggregated link is determined based on the initial penalty value and the penalty increment.
[0019] In one exemplary embodiment of this disclosure, the method further includes:
[0020] At the start of the current statistical period, the initial traffic allocation weights for each device link are determined based on the bandwidth values corresponding to each device link and the initial penalty values corresponding to each group of aggregated links in the device links.
[0021] In one exemplary embodiment of this disclosure, the device links further include at least one single link. The step of determining the initial traffic allocation weight for each device link based on the bandwidth value corresponding to each device link and the initial penalty value corresponding to each group of aggregated links within the device links includes:
[0022] The allocated bandwidth value of the aggregated link is obtained by comparing the bandwidth value of the aggregated link with the initial penalty value of the aggregated link.
[0023] The total bandwidth value is obtained by summing the bandwidth values corresponding to each individual link and the allocated bandwidth values corresponding to each group of aggregated links.
[0024] The initial traffic allocation weight for each individual link is obtained by the ratio of the bandwidth value of each individual link to the total bandwidth value.
[0025] The initial traffic allocation weights for each group of aggregated links are obtained based on the ratio of the allocated bandwidth value to the total bandwidth value for each group of aggregated links.
[0026] In one exemplary embodiment of this disclosure, adjusting the traffic allocation weights of all device links, including the aggregated link, based on the current available bandwidth of the aggregated link and the current penalty value includes:
[0027] The current allocated bandwidth value of the aggregated link is obtained based on the ratio of the current available bandwidth of the aggregated link to the current penalty value.
[0028] The current total bandwidth value is obtained by summing the bandwidth values corresponding to each of the individual links and the currently allocated bandwidth values corresponding to each of the aggregated links.
[0029] Based on the ratio of the bandwidth value corresponding to each individual link to the current total bandwidth value, the adjusted traffic allocation weights corresponding to each individual link are obtained.
[0030] Based on the ratio of the current allocated bandwidth value to the current total bandwidth value for each of the aggregated links in each group, the adjusted traffic allocation weights for each of the aggregated links in each group are obtained.
[0031] In one exemplary embodiment of this disclosure, the method further includes:
[0032] Based on the number of failures of each group of aggregated links within the current statistical period, determine the oscillation frequency corresponding to each group of aggregated links;
[0033] Based on the oscillation frequency of each group of aggregated links, determine the suppression strategy parameters corresponding to each group of aggregated links in the current statistical period;
[0034] The suppression strategy parameters corresponding to each group of aggregated links in the current statistical period are used to adjust the traffic allocation weight in the next statistical period.
[0035] According to a second aspect of this disclosure, a link weight adjustment apparatus is provided, comprising:
[0036] The device link acquisition module is used to acquire device links, wherein the device links include at least one set of aggregated links, and each set of aggregated links includes two or more member links;
[0037] The suppression parameter acquisition module is used to acquire the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period. The suppression strategy parameters include the initial penalty value and the penalty step size.
[0038] The penalty value adjustment module is used to determine the current penalty value of the aggregated link and obtain the current available bandwidth of the aggregated link when a member link in the aggregated link fails within the current statistical period, based on the number of failures of the aggregated link, the initial penalty value, and the penalty step size.
[0039] The link weight adjustment module is used to adjust the traffic allocation weight of all device links, including the aggregated link, based on the current available bandwidth of the aggregated link and the current penalty value.
[0040] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the link weight adjustment method described in any one of the preceding claims by executing the executable instructions.
[0041] According to a fourth aspect of this disclosure, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the link weight adjustment method described in any one of the preceding claims.
[0042] The exemplary embodiments disclosed herein can have the following beneficial effects:
[0043] In the link weight adjustment method of this exemplary embodiment, the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period are obtained. In the current statistical period, when a member link in an aggregated link fails, the current penalty value is determined based on the number of failures, the initial penalty value, and the penalty step size of the aggregated link. The current available bandwidth of the aggregated link is also obtained. Then, the traffic allocation weight of all device links, including the aggregated link, is adjusted based on the current available bandwidth and the current penalty value. This link weight adjustment method, by introducing suppression strategy parameters for aggregated links, dynamically and flexibly adjusts the traffic allocation weight of each link when a member link in an aggregated link fails. This not only solves the problems of service congestion and packet loss caused by concentrating traffic on remaining member links for forwarding, but also avoids the unnecessary time overhead caused by reselecting links to join the aggregated link.
[0044] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0046] Figure 1 The illustration shows a schematic diagram of aggregated link failure adjustment according to a related embodiment of the present disclosure;
[0047] Figure 2 A flowchart illustrating a link weight adjustment method according to an exemplary embodiment of this disclosure is shown.
[0048] Figure 3 A flowchart illustrating the process of determining the initial traffic allocation weights for each link in an exemplary embodiment of this disclosure is shown.
[0049] Figure 4 A schematic diagram illustrating the flow of traffic allocation weight adjustment when a member link in an aggregated link fails, according to an exemplary embodiment of this disclosure;
[0050] Figure 5 The illustration shows a schematic diagram of a traffic allocation weight adjustment method in the event of a member link failure according to a specific embodiment of the present disclosure;
[0051] Figure 6The illustration shows a schematic diagram of a traffic allocation weight adjustment method after member link recovery according to a specific embodiment of the present disclosure;
[0052] Figure 7 A flowchart illustrating a method for reusing aggregated links according to an exemplary embodiment of this disclosure is shown.
[0053] Figure 8 A flowchart illustrating the method for determining suppression strategy parameters according to an exemplary embodiment of this disclosure is shown.
[0054] Figure 9 A block diagram of a link weight adjustment apparatus according to an exemplary embodiment of the present disclosure is shown;
[0055] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown. Detailed Implementation
[0056] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0057] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0058] In some related embodiments, the SDN (Software Defined Networks) controller can perceive the entire network topology and intelligently select dynamic load balancing of links based on the source and destination MAC (Media Access Control Addresses) or source and destination IP (Internet Protocol Address) of packets. It can also recalculate and select other links to join the aggregated link as new member links when a member link fails in the aggregated link.
[0059] Figure 1 The illustration shows a schematic diagram of aggregated link failure adjustment according to a related embodiment of the present disclosure. Assuming that a member link fails in aggregated link 3, the controller can select to add link 2 to aggregated link 3 as a new member link based on MAC / IP policy.
[0060] However, the methods in the above-mentioned related embodiments have the following drawbacks:
[0061] 1. Whenever a member link fails, the controller needs time to recalculate and select links to add to the aggregate link.
[0062] 2. Routing strategies based on message MAC and IP addresses cannot remember or avoid high-risk paths with frequent failures.
[0063] To address the issue that the weights assigned to each link in a UCMP scenario involving link aggregation cannot be dynamically adjusted, this example implementation first provides a method for adjusting link weights. (Reference) Figure 2 As shown, the above-mentioned link weight adjustment method may include the following steps:
[0064] Step S210. Obtain device links, which include at least one set of aggregated links, and each set of aggregated links includes two or more member links.
[0065] Step S220. Obtain the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period. The suppression strategy parameters include the initial penalty value and the penalty step size.
[0066] Step S230. During the current statistical period, when a member link in the aggregated link fails, determine the current penalty value of the aggregated link based on the number of failures, the initial penalty value, and the penalty step size, and obtain the current available bandwidth of the aggregated link.
[0067] Step S240. Adjust the traffic allocation weight of all device links, including the aggregated link, based on the current available bandwidth and current penalty value of the aggregated link.
[0068] In the link weight adjustment method of this exemplary embodiment, the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period are obtained. In the current statistical period, when a member link in an aggregated link fails, the current penalty value is determined based on the number of failures, the initial penalty value, and the penalty step size of the aggregated link. The current available bandwidth of the aggregated link is also obtained. Then, the traffic allocation weight of all device links, including the aggregated link, is adjusted based on the current available bandwidth and the current penalty value. This link weight adjustment method, by introducing suppression strategy parameters for aggregated links, dynamically and flexibly adjusts the traffic allocation weight of each link when a member link in an aggregated link fails. This not only solves the problems of service congestion and packet loss caused by concentrating traffic on remaining member links for forwarding, but also avoids the unnecessary time overhead caused by reselecting links to join the aggregated link.
[0069] Below, in conjunction with Figures 3 to 8 The steps described above in this example implementation will be explained in more detail.
[0070] In step S210, a device link is obtained, which includes at least one set of aggregated links, and each set of aggregated links includes two or more member links.
[0071] In this example implementation, the device links used for traffic transmission between the two devices can include two types: single links and aggregated links. Each aggregated link group includes two or more member links, and the bandwidth value corresponding to the aggregated link is the sum of the bandwidth values of all member links included in that aggregated link.
[0072] In step S220, the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period are obtained. The suppression strategy parameters include the initial penalty value and the penalty step size.
[0073] In this example implementation, the weight adjustment process for each link can be divided into multiple statistical periods. In each statistical period, it is necessary to obtain the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period, and adjust the link weights in the current statistical period based on these parameters.
[0074] In this example implementation, at the beginning of the current statistical period, the initial traffic allocation weight for each device link can be determined based on the bandwidth value corresponding to each device link and the initial penalty value corresponding to each group of aggregated links in the device links.
[0075] Within the current statistical period, the first step is to determine the initial traffic allocation weights for each individual link and each group of aggregated links.
[0076] In this example implementation, such as Figure 3 As shown, when a device link includes both single links and aggregated links, the initial traffic allocation weight for each device link is determined based on the bandwidth value corresponding to each device link and the initial penalty value corresponding to each group of aggregated links within the device link. This can specifically include the following steps:
[0077] Step S310. Obtain the allocated bandwidth value corresponding to the aggregated link based on the ratio of the bandwidth value corresponding to the aggregated link to the initial penalty value corresponding to the aggregated link.
[0078] In this example implementation, a suppression policy parameter is introduced based on UCMP's allocation of weights to aggregated links according to bandwidth ratio. First, the allocated bandwidth value for the aggregated link is obtained according to the ratio of the bandwidth value corresponding to the aggregated link to the initial penalty value corresponding to the aggregated link.
[0079] Suppose there is an aggregate link that bundles n member links, each with a bandwidth of C, and the total bandwidth is nC. The allocated bandwidth value for this aggregate link is... , where P is the initial penalty value for the aggregated link.
[0080] Step S320. Obtain the total bandwidth value by summing the bandwidth values corresponding to each individual link and the allocated bandwidth values corresponding to each group of aggregated links.
[0081] Secondly, based on the sum of the bandwidth values corresponding to each individual link and the allocated bandwidth values corresponding to each group of aggregated links, the total bandwidth value corresponding to all device links is obtained.
[0082] Assuming there are single-link 1 and single-link 2 between the devices, with bandwidths A and B respectively, and an aggregate link that bundles n member links each with bandwidth C, the total bandwidth is nC.
[0083] Step S330. Based on the ratio of the bandwidth value of each individual link to the total bandwidth value, obtain the initial traffic allocation weight corresponding to each individual link.
[0084] The initial traffic allocation weight for a single link can be determined based on the ratio of the bandwidth value corresponding to that link to the total bandwidth value.
[0085] For example, the initial traffic allocation weight for single link 1 with bandwidth A is as follows:
[0086]
[0087] The initial traffic allocation weight for the single link 2 with bandwidth B is as follows:
[0088]
[0089] Step S340. Based on the ratio of the allocated bandwidth value to the total bandwidth value for each group of aggregated links, obtain the initial traffic allocation weight for each group of aggregated links.
[0090] The initial traffic allocation weight for an aggregated link can be determined based on the ratio of the allocated bandwidth value to the total bandwidth value for that aggregated link.
[0091] For example, the initial traffic allocation weights for the aggregated link consisting of n member links described above are:
[0092]
[0093] Continue to refer to Figure 2 As shown, in step S230, when a member link in the aggregated link fails within the current statistical period, the current penalty value of the aggregated link is determined based on the number of failures, the initial penalty value, and the penalty step size, and the current available bandwidth of the aggregated link is obtained.
[0094] In this example implementation, when a member link in the aggregated link fails, both the current available bandwidth and the penalty value of the aggregated link will change.
[0095] In this example implementation, when determining the current penalty value, the penalty increment of the aggregated link can be obtained based on the number of failures of the aggregated link and the penalty step size, and the current penalty value of the aggregated link can be determined based on the initial penalty value and the penalty increment.
[0096] For example, when the aggregated link fails for the first time, the penalty value will be increased by a penalty step size P based on the initial penalty value P. step It becomes P+P step If a second failure occurs, two penalty steps P are added. step And so on.
[0097] In this example implementation, the SDN controller can collect available bandwidth in real time and dynamically adjust the aggregated link weights according to the bandwidth ratio. Assume an aggregated link that bundles n member links, each with a bandwidth of C, has a total bandwidth of nC. When m member links fail, the controller detects that the current available bandwidth of the aggregated link has decreased to (nm)C.
[0098] In step S240, the traffic allocation weights of all device links, including the aggregated link, are adjusted based on the current available bandwidth and the current penalty value of the aggregated link.
[0099] After determining the current available bandwidth and current penalty value of the aggregated links, the traffic allocation weights corresponding to each link can be recalculated based on these parameters.
[0100] In this example implementation, such as Figure 4 As shown, when a device link includes both single links and aggregated links, the traffic allocation weights of all device links, including aggregated links, are adjusted based on the current available bandwidth and current penalty value of the aggregated links. This adjustment may involve the following steps:
[0101] Step S410. Obtain the current allocated bandwidth value corresponding to the aggregated link based on the ratio of the current available bandwidth of the aggregated link to the current penalty value.
[0102] In this example implementation, an SDN controller can be introduced to sense the currently available bandwidth of the aggregated links in real time, and the weight of the aggregated links can be dynamically adjusted based on the currently available bandwidth of the aggregated links in a UCMP scenario.
[0103] Suppose an aggregated link has n member links, each with a bandwidth of C. After m member links fail, the current available bandwidth is (nm)C. If this is the first failure, the current penalty value is P+P. step At this point, the currently allocated bandwidth value corresponding to this aggregated link is...
[0104] Step S420. Obtain the current total bandwidth value by summing the bandwidth values corresponding to each single link and the currently allocated bandwidth values corresponding to each group of aggregated links.
[0105] Next, based on the sum of the bandwidth values corresponding to each individual link and the current allocated bandwidth values corresponding to each group of aggregated links, the current total bandwidth value corresponding to all device links is obtained.
[0106] Assume there are single-link 1 and single-link 2 between the devices, with bandwidths A and B respectively. There is also an aggregate link that bundles n member links, each with a bandwidth of C, and its currently allocated bandwidth is... The current total bandwidth value is
[0107] Step S430. Based on the ratio of the bandwidth value corresponding to each single link to the current total bandwidth value, obtain the adjusted traffic allocation weight corresponding to each single link.
[0108] The traffic allocation weight for a single link can be redefined based on the ratio of the bandwidth value corresponding to that link to the current total bandwidth value.
[0109] For example, if m member links in an aggregated link fail, the traffic allocation weight of single link 1 with bandwidth A increases to:
[0110]
[0111] The traffic allocation weight for single link 2 with bandwidth B above increases to:
[0112]
[0113] Step S440. Based on the ratio of the current allocated bandwidth value to the current total bandwidth value for each group of aggregated links, obtain the adjusted traffic allocation weights for each group of aggregated links.
[0114] The traffic allocation weight corresponding to the aggregated link can be re-determined based on the ratio of the current allocated bandwidth value to the current total bandwidth value corresponding to the aggregated link.
[0115] For example, in the above aggregated link consisting of n member links, after m member links fail, its traffic allocation weight decreases to:
[0116]
[0117] After m member links are restored, the current available bandwidth of the aggregated link is increased back to nC, but the current penalty value remains P+P. step At this point, the aggregated link weights sent to the device are readjusted as follows:
[0118]
[0119] Figure 5 The diagram illustrates a traffic allocation weight adjustment method in the event of member link failure according to a specific embodiment of the present disclosure. When m member links in aggregate link 3 fail, the aggregate link bandwidth changes to (nm)C. At this time, device R1 notifies the controller that the available bandwidth of aggregate link 3 has changed to (nm)C, and the controller issues new weights to each link.
[0120] Figure 6 The diagram illustrates a traffic allocation weight adjustment method after member links are restored, according to a specific embodiment of this disclosure. When m member links in aggregate link 3 are restored, the aggregate link bandwidth changes to nC. At this time, device R1 notifies the controller that the available bandwidth of aggregate link 3 has become nC, and the controller then issues new weights to each link. The weight calculation retains the penalty value.
[0121] In addition, the suppression strategy parameters in this example implementation also include a penalty suppression threshold and a penalty reuse threshold, and the link weight adjustment method in this example implementation also includes the suppression and reuse of aggregated links.
[0122] In this example implementation, the method for suppressing aggregated links includes: within the current statistical period, when the current penalty value of the aggregated link is greater than or equal to the penalty suppression threshold, the usage state of the aggregated link is changed from the normal state to the suppressed state, wherein the aggregated link in the suppressed state does not participate in the device's traffic forwarding.
[0123] Whenever a member failure occurs in an aggregated link, the penalty value of that aggregated link is incremented by a penalty step P. step When the penalty value accumulates to the penalty suppression threshold P... suppress At this time, the aggregated link is suppressed and no longer participates in traffic forwarding.
[0124] In this example implementation, such as Figure 7 As shown, the method for reusing aggregated links can specifically include the following steps:
[0125] Step S710. After the usage state of the aggregated link changes from normal state to suppressed state, the current penalty value of the aggregated link is reduced according to a preset time interval.
[0126] The penalty value for suppressed aggregation links can be reduced at certain time intervals, for example, every time t. half This reduces the penalty value by half. The half-life t is one of these values. half The length can be set reasonably according to actual needs.
[0127] Step S720. When the current penalty value of the aggregated link is reduced to less than or equal to the penalty reuse threshold, the usage state of the aggregated link is restored from the suppressed state to the normal state, and the current penalty value of the aggregated link is reset to the initial penalty value corresponding to the aggregated link.
[0128] When the penalty value decreases to the penalty reuse threshold P reuse When this happens, the controller re-registers the aggregated link as available, resets the penalty value to P, and recalculates and assigns weights to it.
[0129] In addition, such as Figure 8 As shown, the link weight adjustment method in this example implementation also includes a method for determining suppression strategy parameters. In the adaptive suppression strategy, each parameter is dynamically adjusted according to the aggregation link oscillation frequency within the statistical period. The specific method may include the following steps:
[0130] Step S810. Determine the oscillation frequency corresponding to each group of aggregated links based on the number of failures of each group of aggregated links within the current statistical period.
[0131] The controller checks the link status in the network according to a set statistical period T. At the beginning of a period, the oscillation counters of each aggregated link in the network are set to 0. When the controller detects a member link failure in an aggregated link, the oscillation counter of that aggregated link is incremented by 1. At the end of a period, the oscillation frequency f of each aggregated link for that period is calculated using the following formula:
[0132]
[0133] Step S820. Based on the oscillation frequency of each aggregation link, determine the suppression strategy parameters corresponding to each aggregation link in the current statistical period.
[0134] The controller can look up the corresponding strategy information in the custom-configured suppression strategy table based on the oscillation frequency value, and dynamically adjust the parameter settings in the suppression strategy, namely the initial penalty value P and the penalty step size P. step Suppression threshold P suppress Reuse threshold P reuse This information is then distributed to the devices. The suppression policy table can be, for example:
[0135] Oscillation frequency Initial penalty value Penalty step length Suppression threshold Reuse threshold <![CDATA[[f1,f2]]]> 1 0.5 5 1.25 <![CDATA[(f2,f3]]]> 2 0.7 9 2.25
[0136] The suppression strategy parameters corresponding to each group of aggregated links in the current statistical period are used to adjust the traffic allocation weights in the next statistical period. At the beginning of the next period, the oscillation counters of the aggregated links in the network are reset to 0.
[0137] In this example implementation, by introducing a dynamic adaptive suppression strategy based on the oscillation frequency of member links into the weight calculation of aggregated links, the weight of aggregated links with more member failures will be further reduced, thereby realizing the memory and avoidance of high-risk paths and improving the reliability of traffic forwarding.
[0138] In a specific embodiment, it is assumed that there are single link 1 and single link 2 between the two devices, with bandwidths of 100G and 50G respectively, and an aggregated link that bundles 10 member links with a bandwidth of 10G each (total bandwidth of 100G).
[0139] Assume the suppression strategy parameters corresponding to the oscillation frequency of the aggregation link within the previous statistical period T = 72 hours are as follows:
[0140] Initial penalty value Penalty step length Suppression threshold Reuse threshold 1 0.5 5 1.25
[0141] The initial UCMP weights assigned by the controller to Link 1, Link 2, and the aggregated link are as follows:
[0142] Link 1:
[0143]
[0144] Link 2:
[0145]
[0146] Aggregated Links:
[0147]
[0148] When two member links in an aggregated link fail, the available bandwidth becomes a penalty value increased by one step to 1.5. The weights of each link then become:
[0149] Link 1:
[0150]
[0151] Link 2:
[0152]
[0153] Aggregated Links:
[0154]
[0155] After the two failed member links are restored, the current penalty value is retained when recalculating the aggregate link weight. Therefore, the aggregate link weight becomes:
[0156]
[0157] Within the statistical period T=72 hours, for each instance of member link oscillation in the aggregated link, the penalty value accumulates by 0.5. When the accumulated value reaches 5 (the suppression threshold), the aggregated link is suppressed and no longer participates in traffic forwarding. Assume a half-life t. 9:lf If set to 10 hours, the penalty value will be reduced by half every 10 hours. When it drops to 1.25 (reuse threshold), the aggregated link penalty value will be reset to the initial value of 1 and it will rejoin forwarding.
[0158] It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0159] Furthermore, this disclosure also provides a link weight adjustment device. (See reference) Figure 9As shown, the link weight adjustment device may include a device link acquisition module 910, a suppression parameter acquisition module 920, a penalty value adjustment module 930, and a link weight adjustment module 940. Wherein:
[0160] The device link acquisition module 910 can be used to acquire device links, which include at least one set of aggregated links, and each set of aggregated links includes two or more member links.
[0161] The suppression parameter acquisition module 920 can be used to acquire the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period. The suppression strategy parameters include the initial penalty value and the penalty step size.
[0162] The penalty value adjustment module 930 can be used to determine the current penalty value of the aggregated link and obtain the current available bandwidth of the aggregated link when a member link in the aggregated link fails within the current statistical period, based on the number of failures, the initial penalty value, and the penalty step size of the aggregated link.
[0163] The link weight adjustment module 940 can be used to adjust the traffic allocation weight of all device links, including the aggregated link, based on the current available bandwidth and current penalty value of the aggregated link.
[0164] In some exemplary embodiments of this disclosure, the link weight adjustment device provided in this disclosure may further include an aggregated link suppression module, which can be used to change the usage state of the aggregated link from a normal state to a suppressed state when the current penalty value of the aggregated link is greater than or equal to the penalty suppression threshold within the current statistical period. In this case, the aggregated link in the suppressed state does not participate in the traffic forwarding of the device.
[0165] In some exemplary embodiments of this disclosure, the link weight adjustment apparatus provided in this disclosure may further include an aggregated link reuse module, which may include a penalty value reduction unit and a usage state recovery unit. Wherein:
[0166] The penalty value reduction unit can be used to reduce the current penalty value of the aggregated link according to a preset time interval after the usage state of the aggregated link changes from the normal state to the suppressed state.
[0167] The state recovery unit can be used to restore the usage state of the aggregated link from the suppressed state to the normal state when the current penalty value of the aggregated link is reduced to less than or equal to the penalty reuse threshold, and reset the current penalty value of the aggregated link to the initial penalty value corresponding to the aggregated link.
[0168] In some exemplary embodiments of this disclosure, the penalty value adjustment module 930 may include a current penalty value determination unit, which can be used to obtain the penalty increment of the aggregated link based on the number of failures of the aggregated link and the penalty step size, and determine the current penalty value of the aggregated link based on the initial penalty value and the penalty increment.
[0169] In some exemplary embodiments of this disclosure, the link weight adjustment device provided in this disclosure may further include an initial weight determination module, which can be used to determine the initial traffic allocation weight corresponding to each device link at the beginning of the current statistical period, based on the bandwidth value corresponding to each device link and the initial penalty value corresponding to each group of aggregate links in the device links.
[0170] In some exemplary embodiments of this disclosure, the initial weight determination module may include an allocated bandwidth value determination unit, a total bandwidth value determination unit, a single link weight determination unit, and an aggregated link weight determination unit. Wherein:
[0171] The bandwidth allocation value determination unit can be used to obtain the allocated bandwidth value corresponding to the aggregated link based on the ratio of the bandwidth value corresponding to the aggregated link to the initial penalty value corresponding to the aggregated link;
[0172] The total bandwidth value determination unit can be used to obtain the total bandwidth value based on the sum of the bandwidth values corresponding to each individual link and the allocated bandwidth values corresponding to each group of aggregated links.
[0173] The single-link initial weight determination unit can be used to obtain the traffic allocation weight corresponding to each single link based on the ratio of the bandwidth value corresponding to each single link to the total bandwidth value.
[0174] The initial weight determination unit for aggregated links can be used to obtain the traffic allocation weight corresponding to each group of aggregated links based on the ratio of the allocated bandwidth value to the total bandwidth value for each group of aggregated links.
[0175] In some exemplary embodiments of this disclosure, the link weight adjustment module 940 may include a current allocated bandwidth value determination unit, a current total bandwidth value determination unit, a single link weight adjustment unit, and an aggregated link weight adjustment unit. Wherein:
[0176] The current allocated bandwidth value determination unit can be used to obtain the current allocated bandwidth value of the aggregated link based on the ratio of the current available bandwidth of the aggregated link to the current penalty value;
[0177] The current total bandwidth value determination unit can be used to obtain the current total bandwidth value based on the sum of the bandwidth values corresponding to each single link and the currently allocated bandwidth values corresponding to each group of aggregated links;
[0178] The single-link weight adjustment unit can be used to obtain the adjusted traffic allocation weight for each single link based on the ratio of the bandwidth value corresponding to each single link to the current total bandwidth value.
[0179] The aggregation link weight adjustment unit can be used to obtain the adjusted traffic allocation weight of each aggregation link based on the ratio of the current allocated bandwidth value to the current total bandwidth value of each aggregation link.
[0180] In some exemplary embodiments of this disclosure, the link weight adjustment apparatus provided in this disclosure may further include a suppression strategy parameter determination module, which may include an oscillation frequency determination unit and a suppression strategy parameter determination unit. Wherein:
[0181] The oscillation frequency determination unit can be used to determine the oscillation frequency of each aggregated link group based on the number of failures of each aggregated link group within the current statistical period.
[0182] The suppression strategy parameter determination unit can be used to determine the suppression strategy parameters corresponding to each group of aggregated links in the current statistical period based on the oscillation frequency corresponding to each group of aggregated links.
[0183] The suppression strategy parameters corresponding to each group of aggregated links in the current statistical period are used to adjust the traffic allocation weight in the next statistical period.
[0184] The specific details of each module / unit in the above-mentioned link weight adjustment device have been described in detail in the corresponding method embodiment section, and will not be repeated here.
[0185] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown.
[0186] It should be noted that, Figure 10 The computer system 1000 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0187] like Figure 10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1002 or programs loaded from storage section 1008 into random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0188] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1010 as needed so that computer programs read from it can be installed into storage section 1008 as needed.
[0189] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit (CPU) 1001, it performs various functions defined in the system of this disclosure.
[0190] It should be noted that the computer-readable medium disclosed herein may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0191] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0192] In another aspect, this disclosure also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0193] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0194] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0195] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for adjusting link weights, characterized in that, include: Obtain device links, wherein the device links include at least one set of aggregated links and at least one single link, and each set of aggregated links includes two or more member links; Obtain the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period, wherein the suppression strategy parameters include the initial penalty value and the penalty step size; Within the current statistical period, when a member link in the aggregated link fails, the current penalty value of the aggregated link is determined based on the number of failures of the aggregated link, the initial penalty value, and the penalty step size, and the current available bandwidth of the aggregated link is obtained. Based on the current available bandwidth of the aggregated link and the current penalty value, the traffic allocation weight of all device links, including the aggregated link, is adjusted. The step of adjusting the traffic allocation weight of all device links, including the aggregated link, based on the current available bandwidth of the aggregated link and the current penalty value includes: obtaining the current allocated bandwidth value corresponding to the aggregated link based on the ratio of the current available bandwidth of the aggregated link to the current penalty value; The current total bandwidth value is obtained by summing the bandwidth values corresponding to each individual link and the currently allocated bandwidth values corresponding to each group of aggregated links; the adjusted traffic allocation weights corresponding to each individual link are obtained by the ratio of the bandwidth values corresponding to each individual link to the current total bandwidth value; and the adjusted traffic allocation weights corresponding to each group of aggregated links are obtained by the ratio of the currently allocated bandwidth values corresponding to each group of aggregated links to the current total bandwidth value.
2. The link weight adjustment method according to claim 1, characterized in that, The suppression strategy parameters also include a penalty suppression threshold, and the method further includes: Within the current statistical period, when the current penalty value of the aggregated link is greater than or equal to the penalty suppression threshold, the usage status of the aggregated link is changed from normal to suppressed. In the suppressed state, the aggregated link does not participate in the device's traffic forwarding.
3. The link weight adjustment method according to claim 2, characterized in that, The suppression strategy parameters also include a penalty reuse threshold, and the method further includes: After the usage state of the aggregated link changes from normal to suppressed, the current penalty value of the aggregated link is reduced according to a preset time interval. When the current penalty value of the aggregated link is reduced to less than or equal to the penalty reuse threshold, the usage state of the aggregated link is restored from the suppressed state to the normal state, and the current penalty value of the aggregated link is reset to the initial penalty value corresponding to the aggregated link.
4. The link weight adjustment method according to claim 1, characterized in that, Determining the current penalty value of the aggregated link based on the number of failures of the aggregated link, the initial penalty value, and the penalty step size includes: The penalty increment of the aggregated link is obtained based on the number of failures of the aggregated link and the penalty step size, and the current penalty value of the aggregated link is determined based on the initial penalty value and the penalty increment.
5. The link weight adjustment method according to claim 1, characterized in that, The method further includes: At the start of the current statistical period, the initial traffic allocation weights for each device link are determined based on the bandwidth values corresponding to each device link and the initial penalty values corresponding to each group of aggregated links in the device links.
6. The link weight adjustment method according to claim 5, characterized in that, The step of determining the initial traffic allocation weight for each device link based on the bandwidth value corresponding to each device link and the initial penalty value corresponding to each group of aggregated links in the device links includes: The allocated bandwidth value of the aggregated link is obtained by comparing the bandwidth value of the aggregated link with the initial penalty value of the aggregated link. The total bandwidth value is obtained by summing the bandwidth values corresponding to each individual link and the allocated bandwidth values corresponding to each group of aggregated links. The initial traffic allocation weight for each individual link is obtained by the ratio of the bandwidth value of each individual link to the total bandwidth value. The initial traffic allocation weights for each group of aggregated links are obtained based on the ratio of the allocated bandwidth value to the total bandwidth value for each group of aggregated links.
7. The link weight adjustment method according to claim 1, characterized in that, The method further includes: Based on the number of failures of each group of aggregated links within the current statistical period, determine the oscillation frequency corresponding to each group of aggregated links; Based on the oscillation frequency of each group of aggregated links, determine the suppression strategy parameters corresponding to each group of aggregated links in the current statistical period; The suppression strategy parameters corresponding to each group of aggregated links in the current statistical period are used to adjust the traffic allocation weight in the next statistical period.
8. A link weight adjustment device, characterized in that, include: The device link acquisition module is used to acquire device links, wherein the device links include at least one set of aggregated links and at least one single link, and each set of aggregated links includes two or more member links; The suppression parameter acquisition module is used to acquire the suppression strategy parameters corresponding to each group of aggregated links in the previous statistical period. The suppression strategy parameters include the initial penalty value and the penalty step size. The penalty value adjustment module is used to determine the current penalty value of the aggregated link and obtain the current available bandwidth of the aggregated link when a member link in the aggregated link fails within the current statistical period, based on the number of failures of the aggregated link, the initial penalty value, and the penalty step size. The link weight adjustment module is used to adjust the traffic allocation weight of all device links, including the aggregated link, according to the current available bandwidth of the aggregated link and the current penalty value; the adjustment of the traffic allocation weight of all device links, including the aggregated link, according to the current available bandwidth of the aggregated link and the current penalty value includes: obtaining the current allocated bandwidth value corresponding to the aggregated link according to the ratio of the current available bandwidth of the aggregated link to the current penalty value; The current total bandwidth value is obtained by summing the bandwidth values corresponding to each individual link and the currently allocated bandwidth values corresponding to each group of aggregated links; the adjusted traffic allocation weights corresponding to each individual link are obtained by the ratio of the bandwidth values corresponding to each individual link to the current total bandwidth value; and the adjusted traffic allocation weights corresponding to each group of aggregated links are obtained by the ratio of the currently allocated bandwidth values corresponding to each group of aggregated links to the current total bandwidth value.
9. An electronic device, characterized in that, include: processor; as well as A memory for storing one or more programs that, when executed by the processor, cause the processor to implement the link weight adjustment method as described in any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the link weight adjustment method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Link damage degree-based dynamic adaptive routing oscillation inhibiting method
CN102868603A
A system and method for distributing packets in a network
CN112236982A
