Load balancing method and device based on wired port and WDS wireless port
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for load balancing based on a wired port and a Wireless Distribution System (WDS) Wireless port.
Background
In the existing Wireless network topology, a Wireless Access Point (AP) connected to a switch may extend network coverage through WDS Wireless bridging. In general, WDS is built between two wireless APs, wherein one of the wireless APs serves as a wireless signal relay device to achieve the purpose of extending the coverage of the wireless network. Fig. 1 is a schematic diagram of a network topology of a switch and a primary/secondary AP provided in the prior art. The main AP10 and the auxiliary AP20 are connected to the switch 30 through ethernet, WDS bridging is established between the main AP10 and the auxiliary AP20, and the expansion of wireless network coverage is realized through the auxiliary AP 20.
The inventor finds that the prior art has at least the following problems in the process of implementing the invention: after the WDS connection is established between the secondary AP20 and the primary AP10, if the transmission of the secondary AP20 and the switch 30 through the wired port of the ethernet connection is valid, the secondary AP20 has two uplink outlets, namely, a wired port and a WDS wireless port, and the two uplink outlets can perform load balancing. If we load balance the two upstream exits, there is a problem that the bandwidth of the wired port is stable and the error rate is very low, while the bandwidth of the WDS wireless port dynamically changes and is often affected by the error rate, so that it is difficult to obtain the effective bandwidth of the WDS wireless port. Therefore, there is a problem how to reasonably load balance the two upstream outlets.
Disclosure of Invention
In summary, embodiments of the present invention provide a load balancing method and apparatus based on a wired port and a WDS wireless port, so as to achieve reasonable effective load balancing of a wireless AP wired port and a WDS wireless port.
In a first aspect, an embodiment of the present invention provides a load balancing method based on a wired port and a WDS wireless port, which is applied to a wireless AP, and includes: acquiring the current SNR, the current RSSI and the current connection rate of the WDS wireless port; evaluating a current effective bandwidth of the WDS wireless port; comparing remaining bandwidths of the wired port and the WDS wireless port; wherein the remaining bandwidth of the wired port is equal to the actual bandwidth minus the currently actually used bandwidth, and the remaining bandwidth of the WDS wireless port is equal to the currently effective bandwidth minus the currently actually used bandwidth; and selecting the wired port or the WDS wireless port with large residual bandwidth for data transmission.
Further, the evaluating a current effective bandwidth of the WDS wireless port comprises: the current effective bandwidth of the WDS wireless port is equal to the current connection rate Score, where Score is calculated as follows: (a SNR '/SNRmax + b RSSI'/RSSImax) channel utilization, where SNR is the current signal-to-noise ratio of the WDS radio port; SNRmax is the empirically determined maximum signal-to-noise ratio of the WDS wireless port; SNR ═ Min (SNR, SNRmax), i.e. taking the minimum value between the current SNR and the SNRmax; the RSSI is the current received signal strength indication of the WDS wireless port; RSSImax is an empirically determined maximum received signal strength indication of the WDS wireless port; RSSI ═ Min (RSSI, RSSImax), i.e. taking the minimum value between the current RSSI and the RSSImax; a and b are weighted values of SNR and RSSI, respectively, set empirically, a + b being 1.0; channel utilization is a percentage parameter, ranging between 0, 1.
Further, said evaluating a current effective bandwidth of said WDS wireless port to include: the current effective bandwidth of the WDS wireless port is equal to the current connection rate Score, where Score is calculated as follows: (a × SNR '/SNRmax + b × RSSI'/RSSImax) × channel utilization rate × c, where SNR is the current signal-to-noise ratio of the WDS wireless port; SNRmax is the empirically determined maximum signal-to-noise ratio of the WDS wireless port; SNR ═ Min (SNR, SNRmax), i.e. taking the minimum value between the current SNR and the SNRmax; the RSSI is the current received signal strength indication of the WDS wireless port; RSSImax is an empirically determined maximum received signal strength indication of the WDS wireless port; RSSI ═ Min (RSSI, RSSImax), i.e. taking the minimum value between the current RSSI and the RSSImax; a and b are weighted values of SNR and RSSI, respectively, set empirically, a + b being 1.0; the channel utilization rate is a percentage parameter and ranges between [0, 1 ]; c is a weighted value set according to the number of terminals connected with the wireless AP, and the range is between [0 and 1 ].
In a second aspect, an embodiment of the present invention provides a load balancing apparatus based on a wired port and a WDS wireless port, including: an obtaining unit, configured to obtain a current SNR, a current RSSI, and a current connection rate of the WDS wireless port; a WDS evaluation unit for evaluating a current effective bandwidth of the WDS wireless port; a comparing unit for comparing the remaining bandwidth of the wired port and the WDS wireless port; wherein the remaining bandwidth of the wired port is equal to the actual bandwidth minus the currently actually used bandwidth, and the remaining bandwidth of the WDS wireless port is equal to the currently effective bandwidth minus the currently actually used bandwidth; and a selecting unit, configured to select the wired port or the WDS wireless port with a large remaining bandwidth for data transmission.
Further, the WDS evaluation unit, configured to evaluate a current effective bandwidth of the WDS wireless port, includes: the current effective bandwidth of the WDS wireless port is equal to the current connection rate Score, where Score is calculated as follows: (a SNR '/SNRmax + b RSSI'/RSSImax) channel utilization, where SNR is the current signal-to-noise ratio of the WDS radio port; SNRmax is the empirically determined maximum signal-to-noise ratio of the WDS wireless port; SNR ═ Min (SNR, SNRmax), i.e. taking the minimum value between the current SNR and the SNRmax; the RSSI is the current received signal strength indication of the WDS wireless port; RSSImax is an empirically determined maximum received signal strength indication of the WDS wireless port; RSSI ═ Min (RSSI, RSSImax), i.e. taking the minimum value between the current RSSI and the RSSImax; a and b are weighted values of SNR and RSSI, respectively, set empirically, a + b being 1.0; channel utilization is a percentage parameter, ranging between 0, 1.
Further, the WDS evaluation unit, configured to evaluate a current effective bandwidth of the WDS wireless port, includes: the current effective bandwidth of the WDS wireless port is equal to the current connection rate Score, where Score is calculated as follows: (a × SNR '/SNRmax + b × RSSI'/RSSImax) × channel utilization rate × c, where SNR is the current signal-to-noise ratio of the WDS wireless port; SNRmax is the empirically determined maximum signal-to-noise ratio of the WDS wireless port; SNR ═ Min (SNR, SNRmax), i.e. taking the minimum value between the current SNR and the SNRmax; the RSSI is the current received signal strength indication of the WDS wireless port; RSSImax is an empirically determined maximum received signal strength indication of the WDS wireless port; RSSI ═ Min (RSSI, RSSImax), i.e. taking the minimum value between the current RSSI and the RSSImax; a and b are weighted values of SNR and RSSI, respectively, set empirically, a + b being 1.0; the channel utilization rate is a percentage parameter and ranges between [0, 1 ]; c is a weighted value set according to the number of terminals connected with the wireless AP, and the range is between [0 and 1 ].
According to the load balancing method based on the wired port and the WDS wireless port provided by the embodiment of the invention, the influence of the signal-to-noise ratio and the signal receiving intensity on the actual bandwidth of the WDS wireless port is fully considered, the current effective bandwidth of the WDS wireless port is reasonably estimated, and then the outlet with the high transmission rate is selected to transmit data by comparing the residual bandwidth of the wired port with the residual bandwidth of the WDS wireless port, so that the load balancing of the wireless AP wired port and the WDS wireless port is reasonably and effectively realized.
Drawings
While the drawings needed to describe the invention or prior art arrangements in a more complete description of the embodiments or prior art are briefly described below, it should be apparent that the drawings described below are illustrative of some embodiments of the invention and that other drawings may be derived therefrom by those skilled in the art without the benefit of the inventive faculty. Method and device for load balancing based on wired port and wireless port
Fig. 1 is a schematic diagram of a network topology structure of a switch and a master/slave Wireless router (AP) provided in the prior art;
fig. 2 is a schematic flowchart of a method for load balancing based on a wired port and a WDS wireless port according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a network topology of a switch, a primary/secondary wireless AP and a wireless terminal (Station, STA) according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for load balancing based on a wired port and a WDS wireless port according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely illustrative of some, but not all, of the embodiments of the invention, and that the preferred embodiments of the invention are shown in the drawings. This invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather should be construed as broadly as the present disclosure is set forth in order to provide a more thorough understanding thereof. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Example one
The load balancing method based on the wired port and the WDS Wireless port provided by the embodiment of the invention is applied to Wireless routers (AP). Referring to fig. 1, a schematic diagram of a network topology of the switch 30 and the primary AP10 and the secondary AP20 is shown. After the WDS connection is established between the secondary AP20 and the primary AP10, if the transmission of the secondary AP20 and the switch 30 through the wired port of the ethernet connection is valid, the secondary AP20 has two uplink outlets, namely, a wired port and a WDS wireless port, and the two uplink outlets can perform load balancing. In view of the above situation, the present embodiment provides a method for implementing load balancing of a wired port and a WDS wireless port of a wireless AP, as shown in fig. 2.
Step S1001: and acquiring a current Signal to Noise Ratio (SNR), a current Received Signal Strength Indicator (RSSI) and a current connection rate of the WDS wireless port.
In this embodiment, based on the network topology shown in fig. 1, the secondary AP20 obtains the current SNR, the current RSSI, and the current connection rate of its WDS wireless port.
Step S1002: evaluating a current effective bandwidth of the WDS wireless port.
The current effective bandwidth of the WDS wireless port is equal to the current connection rate × Score, where Score is calculated as follows:
(a SNR '/SNRmax + b RSSI'/RSSImax) channel utilization, where SNR is the current signal-to-noise ratio of the WDS radio port; SNRmax is the maximum signal-to-noise ratio of the WDS wireless port determined according to experience; SNR ═ Min (SNR, SNRmax), i.e., the minimum value between the current SNR and SNRmax. RSSI is the current received signal strength indication of the WDS wireless port; RSSImax is an empirically determined maximum received signal strength indication for the WDS radio port; RSSI' is Min (RSSI, RSSImax), i.e. the minimum between the current RSSI and RSSImax. In addition, a and b are weighted values of SNR and RSSI, respectively, which are set empirically, and it is necessary to satisfy that a + b is 1.0. Channel utilization is a percentage parameter, ranging between 0, 1.
For the current SNR, the current RSSI and the current connection rate of the WDS wireless port of the wireless AP to be used, the user may set a certain period for acquisition, perform an average processing in the period, and calculate the Score accordingly.
Step S1003: comparing remaining bandwidths of a wired port and the WDS wireless port; and the residual bandwidth of the WDS wireless port is equal to the current effective bandwidth minus the current actually used bandwidth.
The current actual used bandwidth of the wired port of the secondary AP20 may be obtained from the measurement, and the remaining bandwidth of the wired port is equal to the actual bandwidth minus the current actual used bandwidth; the current actual used bandwidth of the WDS wireless port may be obtained from the measurements, and the remaining bandwidth of the WDS wireless port is equal to the current effective bandwidth of the WDS wireless port evaluated in step S1002 minus the current actual used bandwidth.
Step S1004: and selecting a wired port or a WDS wireless port with large residual bandwidth for data transmission.
The slave AP20 selects a wired port or a WDS wireless port having a large residual bandwidth for uplink data transmission.
The load balancing method based on the wired port and the WDS wireless port is adopted, and the following examples are given by combining actual measurement and evaluation data: the actual bandwidth of the wired port of the secondary AP20 is 100M, and the currently actually used bandwidth is 50M; the bandwidth of the WDS wireless port is affected by the snr, the rssi, and the like, and the calculated Score value is 0.6, and the actual bandwidth of the WDS wireless port is 150M, so that the currently effective bandwidth of the WDS wireless port is 150M × 0.6 — 90M, and the currently used bandwidth of the WDS wireless port is 10M. In this case, the remaining bandwidth of the wired port is 100M to 50M, the remaining bandwidth of the WDS wireless port is 90M to 10M to 80M, the remaining bandwidth of the wired port is larger than the remaining bandwidth of the WDS wireless port, and the slave AP20 selects the WDS wireless port to perform data transmission.
According to the load balancing method based on the wired port and the WDS wireless port provided by the embodiment of the invention, the influence of the signal-to-noise ratio and the signal receiving intensity on the actual bandwidth of the WDS wireless port is fully considered, the current effective bandwidth of the WDS wireless port is reasonably estimated, and then the outlet with the high transmission rate is selected to transmit data by comparing the residual bandwidth of the wired port with the residual bandwidth of the WDS wireless port, so that the load balancing of the wireless AP wired port and the WDS wireless port is reasonably and effectively realized.
Example two
Based on the first embodiment, as an alternative to the first embodiment of the present invention, when evaluating the current effective bandwidth of the WDS wireless port, the influence of the number of terminals (Station, STA) connected to the master AP10 on the wireless data transmission is further considered. As shown in fig. 3, a network topology diagram of a switch, a primary/secondary wireless AP and a wireless terminal (STA) according to an embodiment of the present invention is shown, wherein a plurality of STAs 40 are connected to a primary AP 10. Since the WDS bridge established between the master AP10 and the slave AP20 may also share bandwidth with several STAs 40 connected to the master AP10, the more STAs 40 connected, the more likely to cause packet collisions and affect data transmission. Therefore, the coefficient c is further set according to the terminal connection number of the master AP, for example, when the connection number of the STA40 is 10, the coefficient c is 0.8; when the number of connections of the STA is 20, the coefficient c is 0.6.
In this embodiment, the current effective bandwidth of the WDS wireless port is evaluated by the following method:
the current effective bandwidth of the WDS wireless port is equal to the current connection rate × Score, where Score is calculated as follows:
score, (a SNR '/SNRmax + b RSSI'/RSSImax) channel utilization rate, c, where SNR is the current signal-to-noise ratio of the WDS wireless port; SNRmax is the maximum signal-to-noise ratio of the WDS wireless port determined according to experience; SNR ═ Min (SNR, SNRmax), i.e., the minimum value between the current SNR and SNRmax. RSSI is the current received signal strength indication of the WDS wireless port; RSSImax is an empirically determined maximum received signal strength indication for the WDS radio port; RSSI' is Min (RSSI, RSSImax), i.e. the minimum between the current RSSI and RSSImax. In addition, a and b are weighted values of SNR and RSSI, respectively, which are set empirically, and it is necessary to satisfy that a + b is 1.0. Channel utilization is a percentage parameter, ranging between 0, 1. Further, the coefficient c is a weight value set according to the number of terminals connected to the master AP, and the larger the number of terminals, the lower the weight value, and the range is between [0, 1 ].
Other steps are the same as those described in the first embodiment, and are not described herein again.
According to the load balancing method based on the wired port and the WDS wireless port provided by the embodiment of the invention, according to empirical values, the influence of the signal-to-noise ratio and the signal receiving intensity on the actual bandwidth of the WDS wireless port is fully considered, the influence of the number of STAs connected with the main AP is further considered, the current effective bandwidth of the WDS wireless port is reasonably evaluated, and then an outlet with a high transmission rate is selected to transmit data by comparing the residual bandwidth of the wired port with the residual bandwidth of the WDS wireless port, so that the load balancing of the wireless AP wired port and the WDS wireless port is reasonably and effectively realized.
EXAMPLE III
An embodiment of the present invention provides a load balancing apparatus based on a wired port and a WDS wireless port, as shown in a structural block diagram of fig. 4, where the apparatus includes an obtaining unit 202, a WDS evaluating unit 204, a comparing unit 206, and a selecting unit 208, and the following describes each unit in detail, where:
an obtaining unit 202, configured to obtain a current Signal to Noise Ratio (SNR), a current Received Signal Strength Indicator (RSSI), and a current connection rate of the WDS wireless port.
A WDS evaluation unit 204, configured to evaluate a current effective bandwidth of the WDS wireless port.
The current effective bandwidth of the WDS wireless port is equal to the current connection rate × Score, where Score is calculated as follows:
(a SNR '/SNRmax + b RSSI'/RSSImax) channel utilization, where SNR is the current signal-to-noise ratio of the WDS radio port; SNRmax is the maximum signal-to-noise ratio of the WDS wireless port determined according to experience; SNR ═ Min (SNR, SNRmax), i.e., the minimum value between the current SNR and SNRmax. RSSI is the current received signal strength indication of the WDS wireless port; RSSImax is an empirically determined maximum received signal strength indication for the WDS radio port; RSSI' is Min (RSSI, RSSImax), i.e. the minimum between the current RSSI and RSSImax. In addition, a and b are weighted values of SNR and RSSI, respectively, which are set empirically, and it is necessary to satisfy that a + b is 1.0. Channel utilization is a percentage parameter, ranging between 0, 1.
For the current SNR, the current RSSI and the current connection rate of the WDS wireless port of the wireless AP to be used, the user may set a certain period for acquisition, perform an average processing in the period, and calculate the Score accordingly.
Preferably, in the case of considering the number of STAs connected to the master AP to share the bandwidth of the WDS bridge, a coefficient c is further introduced, where the coefficient c is a weighted value set according to how many terminals are connected to the master AP, and the larger the number of terminals, the lower the weighted value, and the range is between [0, 1 ]. At this time, Score is (a × SNR '/SNRmax + b × RSSI'/RSSImax) × channel utilization rate × c.
A comparing unit 206, configured to compare remaining bandwidths of a wired port and the WDS wireless port; and the residual bandwidth of the WDS wireless port is equal to the current effective bandwidth minus the current actually used bandwidth.
A selecting unit 208, configured to select a wired port with a large residual bandwidth or a WDS wireless port for data transmission.
According to the load balancing device based on the wired port and the WDS wireless port, the influence of the signal-to-noise ratio and the signal receiving intensity on the actual bandwidth of the WDS wireless port is fully considered according to empirical values, the current effective bandwidth of the WDS wireless port is reasonably estimated, and then an outlet with high transmission quality is selected to transmit data by comparing the residual bandwidth of the wired port with the residual bandwidth of the WDS wireless port, so that the load balancing of the wireless AP wired port and the WDS wireless port is reasonably and effectively realized.
In the above embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing detailed description, or equivalent changes may be made in some of the features of the embodiments. All equivalent structures made by using the contents of the specification and the attached drawings of the invention can be directly or indirectly applied to other related technical fields, and are also within the protection scope of the patent of the invention.