Intelligent load method of multi-WAN-port network equipment
Technical Field
The invention relates to the technical field of network communication, in particular to an intelligent load method of multi-WAN-port network equipment.
Background
Under the large background of broadband acceleration and cost reduction, hundreds of megabytes of network access starts to be used by ordinary users in daily life through the construction of operators, and even gigabytes of access start to be popularized gradually. With the rapid development of network technology, people have higher and higher bandwidth requirements, and simultaneous access of multiple broadband also becomes a solution for increasing bandwidth with low cost. When a plurality of broadband access simultaneously, how to fully overlap the bandwidth and make the line utilization rate more sufficient is one of the necessary functions of the multi-WAN port network equipment.
Currently, broadband access provided by mainstream operators is generally unequal in uplink and downlink bandwidths. This also conforms to most usage scenarios of ordinary broadband access users. Applications such as web browsing, downloading, etc. mainly use the downstream bandwidth. The so-called hundreds of megabits/gigabytes access provided by an operator is a nominal index of downlink bandwidth, and uplink bandwidth is not hard guaranteed, for example, hundreds of megabits access of a common line, the downlink bandwidth of which is 100M but the uplink bandwidth is only 4M, whereas hundreds of megabits access of a private line, the downlink bandwidth of which is also 100M but the uplink bandwidth of which may be up to tens of megabits. It is easier to ignore a fair use of upstream bandwidth. As the bandwidth of the downlink 100M, the uplink bandwidth also has a large difference between different operators or lines.
At present, in many small and medium-sized enterprises, the situation that a private line and a common line are used in an overlapping manner is very common in consideration of cost, and the uplink bandwidth can be greatly different from the downlink bandwidth of 100M. Because the ratio of the uplink bandwidth to the downlink bandwidth is greatly different from the actual ratio, if the multi-WAN port device simply uses the downlink bandwidth usage as the load basis between WAN ports, the smaller uplink bandwidth is inevitably limited first. When the uplink bandwidth is occupied, the uplink request message cannot be sent out, packet loss occurs, and thus the utilization rate of the downlink bandwidth is also limited. On the other hand, in some cases, the upstream usage is low and the downstream usage is very high. The usage rate of the downlink bandwidth is usually one of the important criteria of the current network device. And reasonably improving the distribution of the uplink bandwidth, namely improving the utilization rate of the downlink bandwidth.
Based on the current network use environment and application analysis, an intelligent load strategy based on uplink and downlink bandwidth is provided.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides an intelligent load method for a multi-WAN port network device.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
an intelligent load method of a multi-WAN-port network device comprises the following steps:
(S1) detecting the flow using condition of all WAN ports of the multi-WAN port network equipment at regular time, and measuring, calculating and configuring the load related parameters of each WAN port according to the flow using condition, wherein the load related parameters comprise an uplink occupation ratio, a downlink occupation ratio, a residual uplink bandwidth average value and a residual downlink bandwidth average value;
(S2) receiving the data packets to be transmitted from other modules of the multi-WAN port network device and a plurality of designated optional WAN ports;
(S3) comparing the uplink occupation ratios of the appointed WAN ports, and if the uplink occupation ratio of the only WAN port is lower than a set threshold, selecting the WAN port as a sending outlet of the data packet to be sent; if the number of the WAN ports with the uplink occupation ratio lower than the set threshold is more than two, selecting one WAN port as a sending outlet of the data packet to be sent according to an uplink residual bandwidth ratio dynamic allocation principle; if the uplink occupation ratios of the WAN ports are not lower than the set threshold value, the next step is carried out;
(S4) comparing the downlink occupation ratios of the WAN ports, if the downlink occupation ratio of the only WAN port is lower than a set threshold, selecting the WAN port as a sending outlet of the data packet to be sent, and if not, carrying out the next step;
(S5) comparing the average values of the remaining uplink bandwidths of the WAN ports, if the average value of the remaining uplink bandwidths of the only WAN port is not less than a set threshold, selecting the WAN port as the sending outlet of the data packet to be sent, if the average value of the remaining uplink bandwidths of the only WAN port is not less than the set threshold, selecting the WAN port with the maximum average value of the remaining uplink bandwidths as the sending outlet of the data packet to be sent, and if the average values of the remaining uplink bandwidths of the WAN ports are less than the set threshold, performing the next step;
(S6) comparing the average value of the residual downlink bandwidths of the WAN ports, if the average value of the residual downlink bandwidths of the only WAN port is not smaller than a set threshold, selecting the WAN port as the sending outlet of the data packet to be sent, and if not, selecting the WAN port with the maximum average value of the residual downlink bandwidths as the sending outlet of the data packet to be sent;
and sending the corresponding data packet by the selected WAN port.
Specifically, the uplink occupation ratio is a ratio of an uplink bandwidth occupied by the WAN port in a unit time to a maximum bandwidth configured for the uplink bandwidth,
the downlink occupation ratio is the ratio of the downlink bandwidth occupied by the WAN port in unit time to the maximum bandwidth configured by the WAN port,
the average value of the residual uplink bandwidth is the average value of the residual uplink bandwidth of the WAN port in unit time,
the average value of the residual downlink bandwidth is the average value of the residual downlink bandwidth of the WAN port in unit time;
the remaining uplink/downlink bandwidth is the maximum uplink/downlink bandwidth — the occupied uplink/downlink bandwidth.
Further, the uplink/downlink maximum bandwidth is configured manually by a user or automatically by the multi-WAN port network device for each WAN port according to a maximum load detected within a period of time.
Preferably, the set threshold of the uplink occupancy ratio and the downlink occupancy ratio is not lower than 60%.
And the setting threshold of the average value of the residual uplink bandwidth is not lower than the value corresponding to 80 percent of the average value of the residual uplink bandwidth of all WAN ports except the bandwidth value corresponding to the uplink occupancy ratio setting threshold,
the set threshold of the average value of the residual downlink bandwidth is not lower than the value corresponding to 80% of the average value of the residual downlink bandwidth of all WAN ports except the bandwidth value corresponding to the set threshold of the downlink occupancy ratio.
Furthermore, in order to better adapt to some practical situations, in the step (S1), after detecting traffic usage of WAN ports, a throttling rule table is configured according to a current load amount of each WAN port, so that the packet to be sent preferentially selects one of WAN ports that is not recorded in the throttling rule table as a sending outlet.
Specifically, the configuration method of the suppression rule table is as follows:
opening up a region in the memory to establish a table body,
recording WAN port information meeting the adding condition in the table body every time the flow using conditions of all WAN ports are detected regularly, and deleting the WAN port information which does not meet the adding condition and exists in the table body in the detection;
the adding condition is that the flow use condition of the current WAN port reaches a set threshold of an uplink occupancy ratio or a downlink occupancy ratio.
The WAN port information recorded in the suppression rule table comprises WAN port names or numbers, current traffic use conditions and current load related parameters.
Further, in the step (S2), if there is only one WAN port that is not currently recorded in the suppression rule table among the designated multiple selectable WAN ports, the WAN port is selected as a transmission outlet of the packet to be transmitted, otherwise, the step (S3) is executed.
More specifically, in the step (S3), the dynamic allocation principle of the uplink remaining bandwidth proportion is
The WAN port with the smallest uplink occupancy ratio is preferentially selected,
or, preferably selecting the WAN port with the largest average value of the remaining upstream bandwidth,
or when the average values of the residual uplink bandwidths of the WAN ports do not exceed 5 percent of each other, the WAN port with the largest average value of the residual downlink bandwidths is preferably selected.
Compared with the prior art, the invention has the following beneficial effects:
(1) compared with the traditional mode that the load strategy of the multi-WAN-port network equipment is loaded according to the proportion of the downlink bandwidth, the intelligent load strategy is more flexible and intelligent, and the uplink bandwidth is considered while the downlink bandwidth is considered; if the traditional load strategy is to achieve the static balance of multiple WAN ports according to the bandwidth, the method achieves the dynamic balance according to the flexible allocation of the comprehensive uplink/downlink bandwidth, and has the advantages of good applicability, flexible network use, more humanized load, wide application prospect and suitability for popularization and application.
(2) The load strategy of the traditional multi-WAN-port network equipment only considers the downlink bandwidth, and a large amount of packet loss can be caused in the current network environment. Even for lines of the same hundred megabits of bandwidth, the upstream bandwidth varies greatly. If the load is simply carried according to the downlink proportion, the condition that a great amount of uplink and downlink bandwidth of a line with larger difference is vacant is caused. Compared with the traditional strategy, the intelligent load strategy of the invention can more fully use each line, and avoids the waste of spare bandwidth.
(3) The present invention is based on applicant's experience and knowledge in the industry over many years. The mixed use of special lines and common lines of small and medium-sized enterprises is very common at present, part of professional businesses of the companies need one or more uplink and downlink equivalent bandwidths, but in order to meet the daily network requirements of the companies, a common line is often added. Compared with a special line, the downlink bandwidth is far higher than the uplink bandwidth. For example, a company uses a private line with 20M uplink and downlink and a common bandwidth with 4M uplink and 100M downlink in a mixed manner. If the proportional load is downstream according to the conventional strategy. The situation of a large amount of packet loss after the uplink of the common line is full can be observed. The intelligent load strategy of the invention perfectly solves the mixed use situation by considering the use scene.
(4) The invention further creatively provides a WAN port flow feedback reverse inhibition strategy routing mechanism, and the invention is a supplementary function of comprehensively considering the load of the uplink and downlink flow service condition, so that the whole strategy is more perfect.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
Detailed Description
The present invention is further illustrated by the following figures and examples, which include, but are not limited to, the following examples.
Examples
As shown in fig. 1, the intelligent load method of the multi-WAN port network device includes the following steps:
(S1) detecting the flow use condition of all WAN ports of the multi-WAN port network device at regular time, and measuring and configuring the load related parameters of each WAN port according to the flow use condition, wherein the load related parameters comprise an uplink occupancy ratio, a downlink occupancy ratio, a residual uplink bandwidth average value and a residual downlink bandwidth average value. After the traffic use condition of the WAN port is detected, a suppression rule table is configured according to the current load quantity of each WAN port, so that the method is suitable for some special actual conditions.
Specifically, the configuration method of the suppression rule table is as follows:
opening up a region in the memory to establish a table body,
recording WAN port information meeting the adding condition in the table body every time the flow using conditions of all WAN ports are detected regularly, and deleting the WAN port information which does not meet the adding condition and exists in the table body in the detection;
the adding condition is that the flow use condition of the current WAN port reaches a set threshold of an uplink occupancy ratio or a downlink occupancy ratio.
The WAN port information recorded in the suppression rule table comprises WAN port names or numbers, current traffic use conditions and current load related parameters.
Specifically, the uplink occupancy ratio is a ratio of an uplink bandwidth occupied by the WAN port in unit time to a maximum bandwidth configured for the uplink bandwidth, and is an index for measuring the use condition of the uplink bandwidth on a certain line in unit time;
the downlink occupation ratio is the ratio of the downlink bandwidth occupied by the WAN port in unit time to the maximum bandwidth configured by the WAN port, and is an index for measuring the use condition of the downlink bandwidth of a certain line in unit time;
the average value of the residual uplink bandwidth is the average value of the residual uplink bandwidth of the WAN port in unit time, and is an index for measuring the available uplink bandwidth of a certain line in unit time;
the average value of the residual downlink bandwidth is the average value of the residual downlink bandwidth of the WAN port in unit time, and is an index for measuring the available downlink bandwidth of a certain line in unit time;
the remaining uplink/downlink bandwidth of a certain line refers to the bandwidth remaining after the maximum uplink/downlink bandwidth of the line is divided by the occupied uplink/downlink bandwidth, and may be expressed as the remaining uplink bandwidth, i.e., the maximum uplink bandwidth-occupied uplink bandwidth, and the remaining downlink bandwidth, i.e., the maximum downlink bandwidth-occupied downlink bandwidth.
For the uplink/downlink maximum bandwidth, the configuration may be manually set by a user, or may be automatically configured by the multi-WAN port network device according to the maximum load detected by each WAN port within a period of time.
(S2) receiving the data packets to be transmitted from other modules of the multi-WAN port network device and a plurality of designated optional WAN ports;
if there is only one WAN port not currently recorded in the suppression rule table among the designated multiple selectable WAN ports, selecting the WAN port as a transmission outlet of the packet to be transmitted, otherwise, executing step (S3); in this process, if there are a plurality of WAN ports that are not currently recorded in the suppression rule table in the designated plurality of selectable WAN ports, one of the WAN ports may also be selected as the transmission outlet of the to-be-transmitted data packet based on an uplink remaining bandwidth proportion dynamic allocation principle.
Wherein the dynamic allocation principle of the uplink residual bandwidth proportion is
The WAN port with a smaller upstream occupancy ratio is preferentially selected,
or, the WAN port with larger average value of the residual upstream bandwidth is preferentially selected,
or when the average values of the residual uplink bandwidths of the WAN ports do not exceed 5 percent, preferentially selecting the WAN port with the larger average value of the residual downlink bandwidths;
these conditions can be flexibly configured according to the situation in practical application.
(S3) comparing the uplink occupation ratios of the appointed WAN ports, and if the uplink occupation ratio of the only WAN port is lower than a set threshold, selecting the WAN port as a sending outlet of the data packet to be sent; if the number of the WAN ports with the uplink occupation ratio lower than the set threshold is more than two, selecting one WAN port as a sending outlet of the data packet to be sent according to an uplink residual bandwidth ratio dynamic allocation principle; if the uplink occupation ratios of the WAN ports are not lower than the set threshold value, the next step is carried out;
specifically, the set threshold of the uplink occupancy ratio is not lower than 60%, and preferably, the set threshold may be selected to be 80% based on the twenty-eight principle.
(S4) comparing the downlink occupation ratios of the WAN ports, if the downlink occupation ratio of the only WAN port is lower than a set threshold, selecting the WAN port as a sending outlet of the data packet to be sent, and if not, carrying out the next step;
specifically, the set threshold of the downlink occupancy ratio is not lower than 60%, and preferably, the set threshold may be selected to be 80% based on the twenty-eight principle.
(S5) comparing the average values of the remaining uplink bandwidths of the WAN ports, if the average value of the remaining uplink bandwidths of the only WAN port is not less than a set threshold, selecting the WAN port as the sending outlet of the data packet to be sent, if the average value of the remaining uplink bandwidths of the only WAN port is not less than the set threshold, selecting the WAN port with the maximum average value of the remaining uplink bandwidths as the sending outlet of the data packet to be sent, and if the average values of the remaining uplink bandwidths of the WAN ports are less than the set threshold, performing the next step;
the set threshold of the average value of the remaining uplink bandwidths is not lower than a value corresponding to 80% of the average value of the remaining uplink bandwidths of all WAN ports except the bandwidth values corresponding to the uplink occupancy ratio set threshold, and can be expressed as that the set threshold of the average value of the remaining uplink bandwidths is greater than or equal to 80% { [ (1-uplink occupancy ratio set threshold) × the uplink maximum bandwidth of the first WAN port + (1-uplink occupancy ratio set threshold) × the uplink maximum bandwidth of the second WAN port + … … + (1-uplink occupancy ratio set threshold) × the uplink maximum bandwidth of the nth WAN port ]/N }, where N is the number of WAN ports of the access line on the network device.
(S6) comparing the average value of the residual downlink bandwidths of the WAN ports, if the average value of the residual downlink bandwidths of the only WAN port is not smaller than a set threshold, selecting the WAN port as the sending outlet of the data packet to be sent, and if not, selecting the WAN port with the maximum average value of the residual downlink bandwidths as the sending outlet of the data packet to be sent;
the set threshold of the remaining downlink bandwidth average value is not lower than a value corresponding to 80% of the average value of the remaining downlink bandwidths of all WAN ports except the bandwidth values corresponding to the downlink occupancy ratio set threshold, and may be expressed as that the set threshold of the remaining downlink bandwidth average value is greater than or equal to 80% { [ (1-downlink occupancy ratio set threshold) × downlink maximum bandwidth of the first WAN port + (1-downlink occupancy ratio set threshold) × downlink maximum bandwidth of the second WAN port + … … + (1-downlink occupancy ratio set threshold) × downlink maximum bandwidth of the nth WAN port ]/N }, where N is the number of WAN ports of the access line on the network device.
And finally, sending the corresponding data packet by the selected WAN port.
Therefore, intelligent load control of the multi-WAN-port network equipment is realized.
The above-mentioned embodiments are only preferred embodiments of the present invention, and do not limit the scope of the present invention, but all the modifications made by the principles of the present invention and the non-inventive efforts based on the above-mentioned embodiments shall fall within the scope of the present invention.