Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," etc. are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in some other embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more, but not all, embodiments" unless otherwise expressly specified. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
For a network device (such as a router, a switch, etc.) configured with multiple wide area network interfaces (i.e., WAN ports), when multiple wide area network interfaces are simultaneously connected, a corresponding policy needs to be adopted to perform routing so as to fully utilize bandwidth resources of the multiple wide area network interfaces.
In the related art, the bandwidth routing policy is to perform routing according to the ratio of bandwidth steps of each wide area network interface of the same network device. When the flow is regulated, the flow brought by each connection/flow is consistent by default, and in fact, the flow brought by each connection/flow is uncontrollable, and although the connection/flow can be distributed according to the proportion of the bandwidth gear, the proportion of the current bandwidth gear and the proportion of the preset bandwidth gear cannot be guaranteed to be consistent by the real-time flow. Because the probability of obtaining large traffic is larger for the wide area network interface with more connections than for the wide area network interface with fewer connections, the wide area network interface with more connections is easy to rise to the next level of bandwidth gear, and the rising speed of the bandwidth gear of the wide area network interface with fewer connections is slower, even no longer rises. Based on the above related art, when the number of connections between the plurality of wan interfaces is different, the phenomenon that the wan interface with a larger bandwidth gear is still preferentially adjusted to flow when reaching the upper limit of the traffic, so that the wan interface frequently loses packets, is easy to occur, and the reliability of the related art is poor.
In view of the above drawbacks, an embodiment of the present application provides a bandwidth routing method, which performs routing according to a weight ratio of each wan interface, where updating of weights of each wan interface is determined based on a weight setting rule and a bandwidth usage state. Because the weight setting rule includes the constraint that the weight of the wide area network interface with the bandwidth using state being in the idle state is greater than the weight of the wide area network interface with the bandwidth using state being in the non-idle state, and the determination of the bandwidth using state combines the bandwidth gear and the real-time traffic, for the wide area network interface with a larger bandwidth gear, when the wide area network interface reaches the upper limit of the traffic (namely, is in the non-idle state), the weight is updated, so that the wide area network interfaces are not preferentially regulated when the weight ratio of each wide area network interface is selected, the packet loss rate of the wide area network interface is reduced, and the reliability of the route selection is better.
The implementation process of the bandwidth routing method provided by the embodiment of the application is described by a specific embodiment.
Referring to fig. 1, fig. 1 is a flowchart illustrating an overall implementation of a bandwidth routing method according to an embodiment of the present application. As shown in fig. 1, the method may include the steps of:
s101, according to the bandwidth gear and the real-time flow of each wide area network interface on the network equipment, the bandwidth use state of each wide area network interface is respectively determined.
In some embodiments, the network device includes a router, switch, etc., and the wide area network interface, also referred to as a WAN port (Wide Area Network ), is configured with a plurality of wide area network interfaces. The bandwidth gear is also called as bandwidth gradient, and is divided into different gears, each gear corresponds to a preset bandwidth, and taking a main stream bandwidth package in each large operator as an example, the bandwidth is divided into seven different gears of 100M, 200M, 300M, 400M, 500M, 600M and 1000M. The setting of the bandwidth gear value can be replaced, and the bandwidth gear value can be modified according to a new bandwidth package proposed by an operator or different bandwidth gears adapted according to different models, and the maximum available bandwidth gear signed by the operator is generally called a signed bandwidth gear. In some embodiments, if the contracted bandwidth gear is unknown, the mode of automatically learning the bandwidth gear may be used to dynamically adjust the bandwidth gear of the wide area network interface on the network device (e.g., the bandwidth gear of the wide area network interface may be increased when the real-time traffic of the wide area network interface is greater than or equal to the current bandwidth gear shift threshold of the wide area network interface), or if the contracted bandwidth gear is known, the bandwidth gear of the wide area network interface may be directly set as the contracted bandwidth gear when the bandwidth gear of the wide area network interface is set.
In some embodiments, the real-time traffic is data traffic passing through the corresponding wan interfaces in a unit time, and the data traffic passing through each wan interface in real time in different unit times is not necessarily the same, for example, the data traffic may be smaller than or equal to the current bandwidth gear of the wan interface in a certain period of time, or the real-time traffic may be larger than the current bandwidth gear of the wan interface in a case that the network environment is excellent or the current bandwidth gear of the wan interface does not exceed the contracted bandwidth gear.
In some embodiments, a network device configured with a plurality of wan interfaces may, in operation, invoke the plurality of wan interfaces for transmission of data traffic. Before routing a plurality of wan interfaces, one important step is to determine the bandwidth usage status of each wan interface, where the bandwidth usage status is mainly determined by the bandwidth gear and real-time traffic of the wan interface. The bandwidth utilization status of each wan interface is different due to the different bandwidth gear and real-time traffic of the different wan interfaces. Therefore, the bandwidth usage status of each wan interface needs to be determined according to the bandwidth gear and the real-time traffic of each wan interface.
In some embodiments, the execution entity of the present application (e.g. the aforementioned network device) may count the real-time traffic of each wan interface, that is, the step of "counting the real-time traffic of each wan interface" may be further included before step S101, and of course, after the execution entity of the present application (e.g. the external device connected to the network device) counts the real-time traffic of each wan interface, the counted real-time traffic of each wan interface may be fed back to the execution entity of step S101, which is not limited herein.
In some embodiments, the bandwidth usage status is a condition that each wide area network interface occupies bandwidth, and reflects a relationship between real-time traffic and a bandwidth gear of each wide area network interface, where the more bandwidth occupied by each wide area network interface, the smaller the difference between real-time traffic and the bandwidth gear. The bandwidth utilization state can be divided into an idle state and a non-idle state, wherein the idle state is that the corresponding wide area network interface occupies less bandwidth, the real-time traffic and the bandwidth gear difference are larger, and the non-idle state is that the corresponding wide area network interface occupies more bandwidth, and the real-time traffic and the bandwidth gear difference are smaller. For the same wide area network interface under the same bandwidth gear, when the real-time traffic does not exceed the bandwidth gear, the residual bandwidth in the idle state is larger than the residual bandwidth in the non-idle state, and the residual bandwidth is the difference value between the bandwidth gear of the corresponding wide area network interface and the real-time traffic. When the real-time traffic exceeds the bandwidth gear, the bandwidth usage state of the wide area network interface can be determined according to the exceeding situation, for example, when the real-time traffic exceeds the bandwidth gear but does not exceed the target threshold, the bandwidth usage state of the wide area network interface can be determined to be a non-idle state, and when the real-time traffic exceeds the bandwidth gear and exceeds the target threshold, the bandwidth usage state of the wide area network interface can be determined according to the next-stage bandwidth gear and the real-time traffic, and at the moment, the residual bandwidth of the wide area network interface can be the difference value between the next-stage bandwidth gear and the real-time traffic.
In step S101, the bandwidth usage status of each wan interface may be determined according to the real-time residual bandwidth of each wan interface, or a traffic interval for representing different bandwidth usage status may be set for each bandwidth gear in advance, and in step S101, the bandwidth usage status of each wan interface is determined according to the real-time traffic of each wan interface and the traffic interval corresponding to the current bandwidth gear of each wan interface. For example, for a bandwidth gear 100M, setting the traffic intervals of the idle state and the non-idle state as [0,70M ] and (70M, 120M ] respectively, for a wide area network interface with the current bandwidth gear of 100M, if the real-time traffic is in the traffic interval of [0,70M ], determining that the bandwidth usage state of the wide area network interface is the idle state, if the real-time traffic is in the traffic interval of [ 70M,120M ], determining that the bandwidth usage state of the wide area network interface is the non-idle state.
S102, based on the weight setting rule and the bandwidth use state of each wide area network interface, the weights of each wide area network interface are respectively updated.
In this embodiment, the weight setting rule includes the constraint that the weight of the wide area network interface whose bandwidth usage state is idle is greater than the weight of the wide area network interface whose bandwidth usage state is non-idle.
In some embodiments, the weights set for the wan interfaces are not constant, but need to be updated continuously according to the bandwidth usage states of the wan interfaces, if the weights set are kept constant, the wan interfaces with larger bandwidth steps may still be preferentially tuned when reaching the upper limit of the traffic, so that the wan interfaces frequently lose packets. When updating the weights of the various wide area network interfaces, it is necessary to be constrained by the weight setting rules.
S103, selecting routes according to the weight ratio of each wide area network interface.
In some embodiments, after updating the weights of the wan interfaces, the weight ratio of each wan interface may be obtained, and then a route may be selected according to the obtained weight ratio, so that a communication link with a corresponding proportion is selected for each wan interface, that is, a data stream with a corresponding proportion is connected to each wan interface, and the larger the proportion is, the more communication links or data streams are selected.
In some embodiments, the number of data streams for each wan interface connection is related to the magnitude of the weighting set for each wan interface, the greater the number of data streams for each wan interface connection.
For example, assuming that 3 wan interfaces are connected to the network device, the weight ratio set for the 3 wan interfaces is 6:4:2, the ratio of the data flows connected by the 3 wan interfaces may be 6:4:2.
In some embodiments, the weight setting rule is mainly used for restricting the setting of the weights of the wide area network interfaces, and the specific restriction condition is that the weights of the wide area network interfaces with the bandwidth use state being in the idle state are larger than the weights of the wide area network interfaces with the bandwidth use state being in the non-idle state. The flow of the wide area network interface in the idle state is about to reach the upper limit or reaches the upper limit, and the flow of the wide area network interface in the non-idle state needs to be reduced or stopped.
Correspondingly, the constraint is that a larger weight is set for the wide area network interface in the idle state, a smaller weight is set for the wide area network interface in the non-idle state, so that the flow regulating proportion of the wide area network interface in the idle state is increased, and meanwhile, the flow regulating proportion of the wide area network interface in the non-idle state is reduced, and the packet loss rate of the wide area network interface is lower.
Further, to improve the reliability of the routing, a suppression factor may be introduced to modify the weights updated in step S102 (the related scheme is illustrated in the embodiment shown in fig. 2). Furthermore, in order to prevent that the weights of one wan interface are too large, so that the data flows are all tuned to the wan interface in a short time, the advantages of multiple wan interfaces cannot be exerted, the weights may be further modified so that the ratio of the maximum weight to the minimum weight in the weights of the wan interfaces does not exceed a preset threshold (the related scheme is illustrated in the embodiment shown in fig. 3).
The present embodiment performs routing according to the weight ratio of each wan interface, and updating of the weight of each wan interface is determined based on the weight setting rule and the bandwidth usage state. Because the weight setting rule includes the constraint that the weight of the wide area network interface with the bandwidth using state being in the idle state is greater than the weight of the wide area network interface with the bandwidth using state being in the non-idle state, and the determination of the bandwidth using state combines the bandwidth gear and the real-time traffic, for the wide area network interface with a larger bandwidth gear, when the wide area network interface reaches the upper limit of the traffic (namely, is in the non-idle state), the weight is updated, so that the wide area network interfaces are not preferentially regulated when the weight ratio of each wide area network interface is selected, the packet loss rate of the wide area network interface is reduced, and the reliability of the route selection is better.
Referring to fig. 2, fig. 2 is a flowchart illustrating a specific implementation of a bandwidth routing method based on a suppression factor correction weight according to an embodiment of the present application. As shown in fig. 2, the method may include the steps of:
s201, counting real-time flow of each wide area network interface.
In some embodiments, there are two main methods for counting the real-time traffic of each wan interface, the first is to use the average traffic as the real-time traffic, and the second is to use the maximum real-time traffic as the real-time traffic.
The method comprises the specific steps of firstly detecting real-time flow of each wide area network interface in preset time, wherein the preset time comprises a plurality of unit time, the unit time can be 1 second, the real-time flow of each wide area network interface in the preset time is specifically a plurality of statistic values of data flow passing through the wide area network interface in the preset unit time, secondly calculating average flow of each wide area network interface according to the statistic values, specifically calculating the average flow through an average algorithm or an average calculation method, and finally taking the calculated average flow as the real-time flow of each wide area network interface.
The second method comprises the specific steps of firstly detecting the real-time flow of each wide area network interface within preset time, and secondly taking the detected maximum real-time flow of each wide area network interface as the real-time flow of each wide area network interface.
It should be noted that, in order to obtain more accurate bandwidth gear of each wan interface, so as to implement a better routing policy, an average flow of the bandwidth gear of each wan interface in a plurality of unit time is calculated according to the real-time flow of each wan interface in the plurality of unit time, and the calculated average flow is used as the real-time flow of each wan interface and compared with the bandwidth gear of each wan interface, so as to determine whether the bandwidth gear of each wan interface needs to be lifted, thereby implementing a better routing policy and making the user experience feel better.
Accordingly, the maximum real-time flow obtained by detection is used as the real-time flow of each wide area network interface, and the proper bandwidth gear can be timely adjusted when the flow service condition of a user is determined to be greatly changed, so that a better route selection strategy is realized, the conditions of blocking, slow buffering and the like caused by large data flow transmission are avoided, and the user experience is better.
And S202, if the wide area network interface meeting the gear-lifting condition exists, the bandwidth gear of the wide area network interface meeting the gear-lifting condition is lifted.
In this embodiment, the signed bandwidth gear is unknown, and the bandwidth gear of the wide area network interface on the network device can be dynamically adjusted by using the mode of automatically learning the bandwidth gear, that is, when the wide area network interface meeting the gear-lifting condition exists, the bandwidth gear of the wide area network interface meeting the gear-lifting condition is automatically lifted. The gear-up condition comprises that the real-time flow is larger than or equal to a gear-up threshold value of the current bandwidth gear of the user. Specifically, for a certain bandwidth gear, the gear-up threshold value can be set as the next-stage bandwidth gear itself. For example, when the current bandwidth gear of one wan interface is 500M and the next bandwidth gear is 600M, the threshold value of the bandwidth gear of 500M may be set to 600M for the bandwidth gear of 500M, and when the real-time traffic of the wan interface is greater than or equal to 600M, the above-mentioned condition is determined to be met, and at this time, the bandwidth gear of the wan interface is promoted to 600M. Of course, for a certain bandwidth gear, the gear-up threshold may also be set to any value greater than the bandwidth gear and less than the lower level bandwidth gear, for example, the current bandwidth gear of one wide area network interface is 500M, the lower level bandwidth gear is 600M, and the lower level bandwidth gear is 1000M, and for the bandwidth gear of 500M, the gear-up threshold may be set to any value greater than 500M and less than 1000M, which is not limited herein.
S203, the bandwidth use state of each wide area network interface is respectively determined according to the bandwidth gear and the real-time flow of each wide area network interface on the network equipment.
In some embodiments, the bandwidth usage status of each wide area network interface is different due to the different bandwidth gear and real-time traffic of each wide area network interface on the network device. Therefore, the bandwidth usage state of each wan interface needs to be determined according to the bandwidth gear and the real-time traffic of each wan interface, and two bandwidth usage states, namely an idle state and a non-idle state, are mainly available.
The method includes determining that a bandwidth usage state of a wide area network interface is an idle state if the bandwidth occupation of the wide area network interface is small, i.e., the difference between the real-time traffic and the bandwidth is large, and determining that the bandwidth usage state of the wide area network interface is a non-idle state if the bandwidth occupation of the wide area network interface is large, i.e., the difference between the real-time traffic and the bandwidth is small.
In some embodiments, a traffic interval for representing different bandwidth usage states may be set for each bandwidth gear in advance, and in step S203, the bandwidth usage states of each wan interface are determined according to the real-time traffic of each wan interface and the traffic interval corresponding to the current bandwidth gear of each wan interface. This scenario can be divided into two cases:
1. The real-time flow is in the flow interval of the current bandwidth gear, and the bandwidth use state of the wide area network interface can be directly determined according to the flow interval where the real-time flow is. For example, for a bandwidth gear 100M, traffic intervals in an idle state and a non-idle state may be respectively set to [0,70M ] and (70M, 120M ], if the current bandwidth gear of the wan interface is 100M, the real-time traffic is at the traffic interval of [0,70M ], the wan interface is determined to be in the idle state, and if the real-time traffic is at the traffic interval of (70M, 120M), the wan interface is determined to be in the non-idle state.
2. And the real-time flow exceeds all flow intervals corresponding to the current bandwidth gear, at the moment, the flow interval corresponding to the next-stage bandwidth gear can be called, and the bandwidth use state of the wide area network interface is determined according to the flow interval where the real-time flow is located. For example, for the bandwidth gear 100M, the traffic intervals of the idle state and the non-idle state may be respectively set to [0,70M ] and (70M, 120M ], for the bandwidth gear 200M, the traffic intervals of the idle state and the non-idle state may be respectively set to [0,170M ] and (170M, 230M ], if the current bandwidth gear of the wide area network interface is 100M, the real-time traffic is 130M, and since the real-time traffic exceeds (70M, 120M) the traffic interval, the traffic interval corresponding to the next-stage bandwidth gear (i.e., the traffic interval corresponding to the 200M bandwidth gear) is called to determine the bandwidth usage state, and since 130M falls in (170M, 230M) the traffic interval, the wide area network interface is determined to be in the idle state, and the corresponding residual bandwidth is the difference between the next-stage bandwidth gear and the real-time traffic (i.e., 200M-130 m=70m).
S204, based on the weight setting rule and the bandwidth use state of each wide area network interface, the weights of each wide area network interface are respectively updated.
In some embodiments, when updating the weights of the wan interfaces, it is required to determine the bandwidth usage states of the wan interfaces according to the real-time residual bandwidths of the wan interfaces, and update the weights of the idle wan interfaces and the non-idle wan interfaces based on the weight setting rules.
The idle wide area network interface is a wide area network interface with a bandwidth using state of an idle state, and the non-idle wide area network interface is a wide area network interface with a bandwidth using state of a non-idle state.
The specific process of updating the weights of the idle wide area network interfaces and the non-idle wide area network interfaces respectively based on the weight setting rule comprises the steps of updating the weights of the idle wide area network interfaces to the current residual bandwidths of the idle wide area network interfaces, and setting the weights of the non-idle wide area network interfaces respectively based on the ratio of the bandwidth gear of each non-idle wide area network interface and the weights of the idle wide area network interfaces.
In some embodiments, when the weight of the idle wan interface is updated, the weight of the idle wan interface may be updated to the current residual bandwidth of the idle wan interface, where the residual bandwidth is the difference between the bandwidth gear of the corresponding wan interface and the real-time traffic. As shown in fig. 4a, for a wide area network interface whose real-time traffic does not exceed its current bandwidth gear, the residual traffic is the difference between its current bandwidth gear and the real-time traffic, and as shown in fig. 4b, for a wide area network interface whose real-time traffic exceeds its current bandwidth gear and is in an idle state, the residual bandwidth is the difference between the next-stage bandwidth gear and the real-time traffic.
Exemplary, if the current bandwidth gear of a wide area network interface is 200M, the next level bandwidth gear is 300M, and the real-time traffic is 150M, the residual bandwidth of the wide area network interface is the difference between the current bandwidth gear 200M and the real-time traffic 150M, i.e. 50M, and if the real-time traffic of the wide area network interface is 260M, the current bandwidth gear 200M is exceeded, and the wide area network interface is in an idle state, the residual bandwidth of the wide area network interface is the difference between the next level bandwidth gear 300M and the real-time traffic 260M, i.e. 40M.
In some embodiments, for a non-idle wide area network interface, it is desirable to reduce the proportion of streaming it. When the weight of each non-idle wide area network interface is set, the weight of each non-idle wide area network interface is required to be set according to the proportion of the bandwidth gear of each non-idle wide area network interface and the weight of the idle wide area network interface, and meanwhile, the weight sum of the non-idle wide area network interfaces is required to be constrained by corresponding rules, wherein the weight sum of the non-idle wide area network interfaces is equal to the weight of any idle wide area network interface, and the weight ratio of each non-idle wide area network interface is equal to the proportion of the bandwidth gear of each non-idle wide area network interface.
In the example, when the weights of the non-idle wide area network interfaces are set, the sum of the weights of the non-idle wide area network interfaces is equal to the minimum value of the weights of the idle wide area network interfaces, and two wide area network interfaces with bandwidth gear positions of 1000M and 500M are respectively, and the link connection of the wide area network interface with the bandwidth gear position of 1000M is eliminated at a speed which is faster than that of the wide area network interface with the bandwidth gear position of 500M under normal conditions, so that the flow regulating ratio is relatively higher, the flow regulating can be carried out according to the ratio of the bandwidth gear positions of the two wide area network interfaces (namely 1000:500), and the weight ratio of the two wide area network interfaces is equal to the ratio of the bandwidth gear positions (namely 1000:500).
Correspondingly, three WAN interfaces WAN1, WAN2 and WAN3 are provided, wherein the WAN1 is in an idle state, the residual bandwidth is 100M, WAN2 and WAN3 are in a non-idle state, the corresponding bandwidth gear is 200M and 300M respectively, so the weight ratio of WAN1, WAN2 and WAN3 is 100:40:60, the specific calculation process is that the weight of WAN1 is equal to the residual bandwidth 100, the weight of WAN2 is x, the weight of WAN3 is y, the weight ratio of WAN2 and WAN3 is equal to the ratio of the corresponding bandwidth gear, namely x:y=2:3, the sum of the weights of WAN2 and WAN3 is equal to the weight of WAN1, namely x+y=100, so x=40, y=60, namely the weight of WAN2 is 40, and the weight of WAN3 is 60. Thus, the weight ratio of WAN1, WAN2, WAN3 is 100:40:60.
S205, aiming at the non-idle wide area network interfaces, determining the suppression factors of the corresponding non-idle wide area network interfaces according to the times that the corresponding non-idle wide area network interfaces are continuously determined to be in the non-idle state.
Wherein the suppression factor is inversely related to the number of times the corresponding non-idle wide area network interface is continuously determined to be in the non-idle state, and the magnitude of the weight decrease is inversely related to the suppression factor after correction based on the suppression factor. The non-idle state is divided into at least a blocking state and a saturation state, and for the same wide area network interface in the same bandwidth gear, the remaining bandwidth in the blocking state is greater than the remaining bandwidth in the saturation state.
In some embodiments, the bandwidth usage state of the wide area network interface may be divided into an idle state and a non-idle state, and the non-idle state may be divided into at least a blocking state and a saturation state. For each wide area network interface, different bandwidth intervals may be divided, for example, into an idle zone, a blocking zone, or a speed limit zone, and a saturation zone. In the idle zone, the bandwidth use state of the wide area network interface is idle, in the blocking zone or the speed limit zone, the bandwidth use state of the wide area network interface is blocking state or speed limit state, and in the saturation zone, the bandwidth use state of the wide area network interface is saturated. The bandwidth usage status of each wan interface may be determined based on real-time traffic or remaining bandwidth of the respective wan interface. For the same wide area network interface in the same bandwidth gear, the residual bandwidth in the blocking state is larger than the residual bandwidth in the saturation state. Step S205 may specifically be to determine, for the non-idle wide area network interfaces in the saturated state, the suppression factors of the corresponding non-idle wide area network interfaces according to the number of times the corresponding non-idle wide area network interfaces are continuously determined to be in the saturated state.
The current bandwidth gear of a certain wide area network interface is 1000M, when the real-time traffic is in 0-800M under the current bandwidth gear, the wide area network interface can be determined to be in an idle area, namely, the bandwidth use state is in an idle state, when the real-time traffic is in 800-900M, the wide area network interface can be determined to be in a blocking area or a speed limit area, namely, the bandwidth use state is in a blocking state or a speed limit state, and when the real-time traffic is in 900-1050m, the wide area network interface can be determined to be in a saturated area, namely, the bandwidth use state is in a saturated state.
It can be understood that when the bandwidth usage state of the wan interface is in an idle state, the corresponding wan interface can easily handle the subsequent connection without time-out, packet loss, etc., when the bandwidth usage state of the wan interface is in a blocking state, the subsequent connection of the corresponding wan interface may be limited in speed, the connection may occasionally time-out, packet loss, etc., and when the bandwidth usage state of the wan interface is in a saturated state, the real-time traffic of the corresponding wan interface has reached an upper limit, but is not stabilized at a specific value but at a section due to the fluctuation of the real-time traffic.
Correspondingly, according to three bandwidth use states of the wide area network interface, different flow regulating strategies can be formulated, namely the flow regulating proportion of the wide area network interface with the idle bandwidth use state can be increased, the flow regulating proportion of the wide area network interface with the blocking bandwidth use state can be properly reduced, and the flow regulating proportion of the wide area network interface with the saturated bandwidth use state can be greatly reduced, and even the flow regulating of the wide area network interface with the saturated bandwidth use state can be stopped.
In some embodiments, for a wide area network interface in a saturated state, it cannot be determined whether the current bandwidth gear reaches the real subscription bandwidth, and based on this problem, the embodiments of the present application propose a concept of a suppression factor, where the concept of the suppression factor is to distinguish whether the current bandwidth gear of the wide area network interface reaches the real subscription bandwidth. If the bandwidth gear learns the real subscription bandwidth and is in a saturated state, the bandwidth gear is called true saturation, and if the bandwidth gear does not learn the real subscription bandwidth but is in a saturated state, the bandwidth gear is called false saturation.
In some embodiments, the size of the suppression factor may be set according to the real-time traffic of each wan interface, which is not limited by the present application. When the real-time traffic of the wide area network interface is counted, if the real-time traffic of the wide area network interface reaches the saturation interval of the current bandwidth gear, the corresponding inhibition factor of the wide area network interface is reduced. The suppression factor is inversely related to the number of times the corresponding non-idle wide area network interface is continuously determined to be in a non-idle state, and the magnitude of the weight decrease is inversely related to the suppression factor after correction based on the suppression factor. For the non-idle wide area network interfaces in the saturation state, the suppression factors of the corresponding non-idle wide area network interfaces can be determined according to the times that the corresponding non-idle wide area network interfaces are continuously determined to be in the saturation state. The greater the number of times that the succession is determined to be saturated, the smaller the suppression factor for the corresponding non-idle wide area network interface, the smaller the suppression factor, and the greater the magnitude of the weight reduction (i.e., the suppression strength) after correction based on the suppression factor.
Fig. 5a, fig. 5b, and fig. 5c are schematic diagrams illustrating the correspondence between the suppression factor and the number of times that the suppression factor is continuously determined to be in a saturated state according to an embodiment of the present application. When the corresponding non-idle wide area network interface is not determined to be saturated or is determined to be saturated for the first time, the weight of the corresponding non-idle wide area network interface is not required to be suppressed. As shown in fig. 5a, the suppression factor was 90% when the number of times of continuous determination as saturated was 2, 70% when the number of times of continuous determination as saturated was 4, as shown in fig. 5b, 70% when the number of times of continuous determination as saturated was 2, 40% when the number of times of continuous determination as saturated was 4, as shown in fig. 5c, 98% when the number of times of continuous determination as saturated was 2, and 90% when the number of times of continuous determination as saturated was 4.
S206, based on the suppression factors, correcting the weight of the corresponding non-idle wide area network interface.
The specific step of correcting the weight of the corresponding non-idle wide area network interface based on the suppression factor is to multiply the suppression factor with the weight of the corresponding non-idle wide area network interface to obtain the corrected weight of the corresponding non-idle wide area network interface.
In some embodiments, the suppression factor is a fraction of 0 or more and 1 or less, and if the suppression factor is greater than 1, the suppression factor cannot play a suppression role, because the weight multiplied by a number greater than 1 is greater than the original weight, and the suppression factor plays a role in enhancing the weight. The weight of the corresponding non-idle wide area network interface may be modified, i.e. inhibited, by a suppression factor, and in particular, may be modified by multiplying its weight by the corresponding suppression factor.
Illustratively, there are two wide area network interfaces WAN1, WAN2, the current bandwidth gear of WAN1, WAN2 is 1000M, 500M, respectively. In some case, if the real-time traffic of WAN1 and WAN2 remains at 500M at all times, then WAN1 is in an idle state, weighted for the remaining bandwidth, i.e., 500M. WAN2 is in saturation, its weight is initially equal to 100% (i.e. 500) of the weight of WAN1, if WAN2 is determined to be in saturation for the first time, no suppression of its weight is needed, and when the next time the routing policy adjustment is made, if the real-time traffic of WAN2 is still 500M, i.e. WAN2 is still in saturation, the number of times WAN2 is continuously determined to be in saturation is 2, the suppression of the weight of WAN2, i.e. the weight of WAN2 is 500×90% =450, can be performed with the suppression factor as shown in fig. 5 a. As the number of times of continuously determining as the saturation state is larger, the inhibition strength is larger, the inhibition effect is more obvious, when the inhibition strength is maximum, the weight of WAN2 is 500×10% =50, at this time, the weight ratio of WAN1 to WAN2 is 500:50=10:1, and the route can be selected according to the ratio of 10:1 in the subsequent steps.
S207, selecting routes according to the weight ratio of each wide area network interface.
In some embodiments, after the "based on the weight setting rule and the bandwidth usage state of each wan interface" in the above steps, the weight of each wan interface is updated respectively, and the weight of the corresponding non-idle wan interface is corrected based on the suppression factor ", the weight ratio of each wan interface can be obtained, and then the route can be selected according to the obtained weight ratio, so that a communication link with a corresponding proportion is selected for each wan interface, that is, a data stream with a corresponding proportion is connected to each wan interface.
The present embodiment performs routing according to the weight ratio of each wan interface, and updating of the weight of each wan interface is determined based on the weight setting rule and the bandwidth usage state. Because the weight setting rule includes the constraint that the weight of the wide area network interface with the bandwidth using state being in the idle state is greater than the weight of the wide area network interface with the bandwidth using state being in the non-idle state, and the determination of the bandwidth using state combines the bandwidth gear and the real-time traffic, for the wide area network interface with a larger bandwidth gear, when the wide area network interface reaches the upper limit of the traffic (namely, is in the non-idle state), the weight is updated, so that the wide area network interfaces are not preferentially regulated when the weight ratio of each wide area network interface is selected, the packet loss rate of the wide area network interface is reduced, and the reliability of the route selection is better. Further, considering the condition of false saturation, the weight of the wide area network interface is further corrected by introducing the suppression factor, so that the reliability of the routing can be further improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a specific implementation of a bandwidth routing method based on a correction weight for preventing a throttle ratio from cracking according to an embodiment of the present application. As shown in fig. 3, the method may include the steps of:
S301, counting real-time traffic of each wide area network interface.
And S302, if the wide area network interface meeting the gear-lifting condition exists, the bandwidth gear of the wide area network interface meeting the gear-lifting condition is lifted.
S303, according to the bandwidth gear and the real-time flow of each wide area network interface on the network equipment, the bandwidth use state of each wide area network interface is respectively determined.
S304, based on the weight setting rule and the bandwidth use state of each wide area network interface, the weights of each wide area network interface are respectively updated.
S305, for the non-idle wide area network interfaces, determining the suppression factors of the corresponding non-idle wide area network interfaces according to the times that the corresponding non-idle wide area network interfaces are continuously determined to be in the non-idle state.
S306, based on the suppression factors, the weight of the corresponding non-idle wide area network interface is corrected.
The steps S301 to S306 refer to the steps S201 to S206 in FIG. 2, and the specific implementation process is described above and will not be repeated here.
S307, if the ratio of the maximum weight to the minimum weight in the weights of the wide area network interfaces exceeds a preset threshold, the maximum weight is reduced or the minimum weight is increased, so that the ratio of the maximum weight to the minimum weight in the weights of the adjusted wide area network interfaces does not exceed the preset threshold.
In some embodiments, to prevent the weighting of one or several wan interfaces from being too high, if a small number of data flows but large flows occur in a short time, all flows are tuned to one or several wan interfaces, so that the advantages of multiple wan interfaces cannot be exerted. Therefore, after updating the weights of the wan interfaces, the weights of the wan interfaces need to be checked and adjusted, and if the ratio of the maximum weight to the minimum weight in the weights of the wan interfaces exceeds a preset threshold, the maximum weight can be reduced, the minimum weight can be increased, the maximum weight can be reduced at the same time, and the minimum weight can be increased, so that the ratio of the maximum weight to the minimum weight in the adjusted weights of the wan interfaces does not exceed the preset threshold, and the step is also called flow regulation proportion cracking correction prevention.
The preset threshold value of the maximum weight and the minimum weight is 5. The weight ratio of the updated 3 wide area network interfaces is 6:3:1, and the ratio of the maximum weight to the minimum weight is 6, so that the weights of the WAN1, the WAN2 and the WAN3 are required to be adjusted, the maximum weight (namely the weight 6 of the WAN 1) can be reduced, the weight ratio of the WAN1, the WAN2 and the WAN3 is adjusted to be 5:3:1, and the ratio of the maximum weight to the minimum weight is equal to the preset threshold, so that the data flow can be relatively and evenly adjusted to each wide area network interface, and the advantage of the multi-wide area network interface can be conveniently exerted.
And S308, selecting a route according to the weight ratio of each wide area network interface.
In some embodiments, after the "setting rule based on weight and bandwidth usage state of each wan interface" in the above steps, the weight of each wan interface is updated respectively, and the weight of the corresponding non-idle wan interface is modified based on the suppression factor, and the flow regulation proportion is prevented from cracking modification ", the weight ratio of each wan interface can be obtained, and then a route can be selected according to the obtained weight ratio, so that a communication link with a corresponding proportion is selected for each wan interface, that is, a data flow with a corresponding proportion is connected to each wan interface.
The present embodiment performs routing according to the weight ratio of each wan interface, and updating of the weight of each wan interface is determined based on the weight setting rule and the bandwidth usage state. Because the weight setting rule includes the constraint that the weight of the wide area network interface with the bandwidth using state being in the idle state is greater than the weight of the wide area network interface with the bandwidth using state being in the non-idle state, and the determination of the bandwidth using state combines the bandwidth gear and the real-time traffic, for the wide area network interface with a larger bandwidth gear, when the wide area network interface reaches the upper limit of the traffic (namely, is in the non-idle state), the weight is updated, so that the wide area network interfaces are not preferentially regulated when the weight ratio of each wide area network interface is selected, the packet loss rate of the wide area network interface is reduced, and the reliability of the route selection is better. Further, in order to prevent that the weight of a certain wan interface is too large, so that all data streams are regulated to the wan interface in a short time, the advantages of multiple wan interfaces cannot be exerted, and the weight of the wan interface is further corrected by preventing the regulation proportion cracking correction, so that the reliability of route selection can be further improved.
The bandwidth routing method provided by the embodiment of the application considers the influence caused by real-time traffic and residual bandwidth when the routing is performed according to the weight ratio of the wide area network interface, so that the bandwidth routing method is more flexible in the actual application scene than the bandwidth gear ratio in the related art, can more fully exert the advantages of multiple wide area network interfaces, and shows the effect of bandwidth superposition. Introducing a suppression factor to perform flow regulation suppression on a wide area network interface with the real-time flow reaching an upper limit, and reducing the connection number of the wide area network interface with the flow reaching the upper limit to a proper number in limited times when the real-time flow of a certain wide area network interface reaches the upper limit of bandwidth, so that when the bandwidth utilization rate of the wide area network interface is close to 100%, a small amount of data flow can be regulated to the wide area network interface, and the rest of data flow can be regulated to the rest of wide area network interfaces in an idle state. In order to prevent that the weight of a certain wide area network interface is too large, so that all data streams are regulated to the wide area network interface in a short time, the advantages of multiple wide area network interfaces cannot be exerted, the weight of the wide area network interface is further corrected by preventing the regulation proportion from cracking correction, and the reliability of route selection can be further improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Corresponding to the bandwidth routing method provided in the above embodiment, fig. 6 shows a schematic structural diagram of the bandwidth routing device provided in the embodiment of the present application, and for convenience of explanation, only the portion relevant to the embodiment of the present application is shown.
Referring to fig. 6, the bandwidth routing apparatus includes:
A determining unit 601, configured to determine bandwidth usage states of each wan interface according to bandwidth gear and real-time traffic of each wan interface on the network device;
An updating unit 602, configured to update weights of the wan interfaces based on the weight setting rule and the bandwidth usage status of the wan interfaces, respectively;
a routing unit 603, configured to perform routing according to the weight ratio of each wan interface.
In this embodiment, the bandwidth routing device may be specifically a network device (such as a router or a switch) as described above.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Fig. 7 is a schematic structural diagram of an electronic device 7 according to an embodiment of the present application. As shown in fig. 7, the electronic device 7 of this embodiment comprises at least one processor 701 (only one is shown in fig. 7), a memory 703 and a computer program 702 stored in the memory 703 and executable on the at least one processor 701, the processor 701 implementing the steps in the above-described method embodiments when the computer program 702 is executed.
The electronic device 7 may be a network device (e.g. router, switch) as described previously. The electronic device 7 may include, but is not limited to, a processor 701, a memory 703. It will be appreciated by those skilled in the art that fig. 7 is merely an example of the electronic device 7 and is not meant to be limiting of the electronic device 7, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The Processor 701 may be a central processing unit (Central Processing Unit, CPU), and the Processor 701 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 703 may in some embodiments be an internal storage unit of the electronic device 7, such as a hard disk or a memory of the electronic device 7. The memory 703 may also be an external storage device of the electronic device 7 in other embodiments, such as a plug-in hard disk provided on the electronic device 7, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital card (SD), a flash memory card (FLASH CARD), etc. Further, the memory 703 may also include both an internal storage unit and an external storage device of the electronic device 7. The memory 703 is used for storing an operating system, application programs, boot Loader (Boot Loader), data, other programs, and the like, such as program codes of computer programs, and the like. The memory 703 may also be used to temporarily store data that has been output or is to be output.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application realizes the whole of the methods of the above embodiments
In part or in part, the process may be performed by instructing the associated hardware through a computer program, which may be stored in a 5-piece computer-readable storage medium, which, when executed by a processor, may implement the above-described embodiments of the application to a method
Is provided. Wherein the computer program comprises computer program code which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable storage medium may include at least any entity or device capable of carrying computer program code to a computing device/electronic apparatus, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random-access Memory (RAM, random Access Memory), a 0-electric carrier signal, a telecommunications signal, and a software distribution medium such as a U-disk, a removable hard disk, a magnetic or optical disk, etc. In some cases
Jurisdictions, in accordance with legislation and patent practice, computer readable storage media may not be electrical carrier signals and telecommunication signals.
The embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the respective method embodiments described above.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and reference is made to the related descriptions of other embodiments in section 5, which is not detailed or described in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled person can for each
Various methods are used to implement the described functionality, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. The above-described embodiments of the apparatus/electronic device are merely illustrative, and the above-described division of modules or units is merely a logical function division, and may be implemented in other ways, such as multiple units, components
May be combined or may be integrated into another system, some features may not be implemented. Alternatively, the indirect, direct, or communicative connection of the illustrated or discussed 5 with one another may be via some interface, device, or unit, and may be in electrical, mechanical, or other form.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
0 The above examples are only for illustrating the technical scheme of the present application and are not to be construed as limiting the same, although the present application is described with reference to the above examples
It should be understood by those skilled in the art that the technical solutions described in the above embodiments may be modified or some of the technical features may be replaced with other technical solutions, and those modifications or replacements do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.