Method and system for limiting association number based on WDS
Technical Field
The invention relates to the technical field of wireless local area network processing, in particular to a method and a system for WDS-based association number limitation.
Background
The WDS, namely the wireless distributed bridging function, is that wireless routers are covered by a wireless bridging extension network, when one AP is used as a main router of the WDS, and both normal STA association and WDS access of an auxiliary router are available, a message from an uplink port is required to be forwarded on the WDS as long as the message is not the message of the MAC address of the directly connected STA, even if the target of the message is not connected with the WDS at all (because the AP of the main router cannot be distinguished), the message which is probably not required to be sent to the WDS is also sent to the WDS, the burden of a wireless channel is caused, the association number of the AP is required to be strictly limited, and further blockage is avoided.
For example, the patent with publication number 102685812B discloses a method for controlling an AP-associated terminal of an access point, including: when the association state of a terminal associated to an AP changes, the control equipment records the association state information of the terminal and starts timing; after a preset timing time, if the association state of the terminal is not changed and the association state information indicates that the terminal is not authenticated or the terminal is authenticated but no service traffic occurs within the timing time, the control device controls the AP to disconnect the association of the terminal corresponding to the association state information; wherein the association state comprises: the scheme involved in the patent performs control of AP association through fusion of various information and combination of a plurality of different steps, the steps are complicated, the fault tolerance rate is low during execution, abnormality is easy to occur, timing and the like need to be started, the cost is relatively high, control equipment is added, the structure is more, overall management is not facilitated, and in fact, certain requirements on flow are required.
Disclosure of Invention
An object of the present invention is to provide a method and system for WDS-based correlation limit that is easy to implement, simple to operate, and efficient in controlling correlation.
The technical purpose of the invention is realized by the following technical scheme:
a method for limiting association number based on WDS comprises the following steps:
step 1, forming a tree-shaped wireless AP network group by a plurality of wireless APs with WDS functions according to the levels from bottom to top, and defining the wireless AP at the top level as a main router and other wireless APs as auxiliary routers;
and 2, limiting the association number of the wireless terminal STA of the wireless AP network group according to the actual association number of the wireless terminal STA.
As a preference for the present invention, the limiting process includes:
2.1, when a wireless terminal STA accesses the wireless AP of the wireless AP network group, the wireless AP informs the wireless AP of the previous stage through an Action frame and uploads the wireless AP of the previous stage step by step until the wireless AP serving as a main router;
2.2, after receiving the notification, the wireless AP serving as a main router compares the maximum association number N of the wireless AP with the actual association number of the wireless terminal STA;
and 2.3, the wireless AP serving as the main router makes a decision according to the size comparison result in the process 2.2 and issues the decision step by step until the wireless AP is directly accessed to the wireless terminal STA. Preferably, the decision includes deciding whether to accept the association or reject the content of the wireless terminal STA.
Preferably, the Action frame is internally provided with a Vendor Specific IE field.
Preferably, the content of the Vendor Specific IE field in the Action frame used for the notification uploaded to the upper level includes the association request of the wireless terminal STA and the actual association number of the wireless terminal STA.
Preferably, the actual association number of the wireless terminal STA includes a direct association number of the wireless terminal STA of the local wireless AP and a direct association number of the wireless terminal STA of the next-stage wireless AP.
Preferably, the content of the vector Specific IE field in the Action frame used for issuing the decision to the lower stage includes a decision indication for deciding whether the wireless terminal STA allows access.
Preferably, in the present invention, the maximum number of associations of the wireless AP is N.
Preferably, after receiving the notification uploaded from the lower level, the wireless AP first counts the actual association number of the wireless terminal STA, then determines whether the wireless AP is a master router, if the wireless AP is not a master router, the wireless AP continues to perform notification to the upper level, if the wireless AP is a master router, the wireless AP determines whether N is greater than or equal to the actual association number +1 of the wireless terminal STA, if the host router is established, the wireless terminal STA is accepted to be associated, and if the host router is not established, the wireless AP refuses to associate with the wireless terminal STA.
A system for limiting association number based on WDS comprises a plurality of wireless APs with WDS function and a wireless terminal STA, wherein the wireless terminal STA comprises a terminal communication module and a terminal association request sending module, the wireless AP comprises an AP communication module, a terminal association request receiving module, a main router judging module, an Action frame generating module, an Action frame uploading module, an Action frame issuing module, an Action frame receiving module and a decision generating module,
the terminal communication module is used for communicating with the wireless AP;
the terminal association request sending module is used for sending an association request to the wireless AP;
the wireless AP communication module is used for communicating with a wireless terminal STA;
the terminal association request receiving module is used for receiving an association request of a wireless terminal STA;
the main router judgment module is used for judging whether the wireless AP is a main router or not by the wireless AP;
the Action frame generating module is used for generating an Action frame;
the Action frame uploading module is used for uploading an Action frame to a wireless AP at the upper stage by the wireless AP where the local station is located;
the Action frame issuing module is used for issuing an Action frame to a next set of wireless AP by the wireless AP where the local is located;
the Action frame receiving module is used for receiving Action frames from other wireless APs;
the decision generation module is used for making a decision when the wireless AP judges that the wireless AP is used as a main router.
Preferably, the Action frame generation module comprises a Vendor Specific IE field built-in module, the Vendor Specific IE field built-in module comprises an association request information acquisition sub-module, a decision information acquisition sub-module and a wireless terminal STA actual association number generation sub-module, the decision generation module comprises a maximum association number judgment sub-module and a wireless terminal STA access judgment indication sub-module, wherein,
the association request information acquisition submodule is used for acquiring association request information of the wireless terminal STA;
the decision information acquisition sub-module is used for acquiring the decision information of the wireless AP serving as the main router;
the wireless terminal STA actual association number generation sub-module is used for counting the actual association number of the wireless AP, and the actual association number comprises the wireless terminal STA direct association number of the local wireless AP and the wireless terminal STA direct association number of the next-stage wireless AP;
the Vendor Specific IE field built-in module is used for internally forming Action frame content uploaded to an upper-level wireless AP according to the information of the association request information acquisition sub-module and the actual association number generation sub-module of the wireless terminal STA or internally forming Action frame content issued to a lower-level wireless AP according to the decision information of the decision information acquisition sub-module;
the maximum association number judgment sub-module is used for judging whether the maximum association number N is greater than or equal to the actual association number +1 of the wireless terminal STA or not by the wireless AP serving as the main router;
the wireless terminal STA access judgment indication sub-module is used for giving out decision information which rejects the associated wireless terminal STA if the judgment of the maximum association number judgment sub-module is not true and accepts the associated wireless terminal STA if the judgment is not true.
The method is based on WDS, is easy to realize and simple to operate in the form of Action frames, can more accurately control the association number of the STA of the wireless terminal, is efficient and accurate, is not easy to make mistakes, and effectively solves the problems of network congestion and the like.
Drawings
FIG. 1 is a view of a scene of embodiment 1 of the present invention;
fig. 2 is a system block diagram of embodiment 2 of the present invention.
Detailed Description
The following specific examples are given by way of illustration only and not by way of limitation, and it will be apparent to those skilled in the art from this disclosure that various changes and modifications can be made in the examples without inventive faculty, and yet still be protected by the scope of the claims.
Embodiment 1, a method for WDS-based association number limiting, comprising the steps of:
step 1, forming a tree-shaped wireless AP network group by a plurality of wireless APs with WDS functions according to the levels from bottom to top, and defining the wireless AP at the top level as a main router and other wireless APs as auxiliary routers;
and 2, limiting the association number of the wireless terminal STA of the wireless AP network group according to the actual association number of the wireless terminal STA.
The method for effectively realizing the association number limitation mainly utilizes the WDS and the main router, and certainly, in the realization of the association number limitation, the auxiliary router also needs to transmit and store information in time and the like.
Further, the limiting process includes:
2.1, when a wireless terminal STA accesses the wireless AP of the wireless AP network group, the wireless AP informs the wireless AP of the previous stage through an Action frame and uploads the wireless AP of the previous stage step by step until the wireless AP serving as a main router;
2.2, after receiving the notification, the wireless AP serving as a main router compares the maximum association number N of the wireless AP with the actual association number of the wireless terminal STA;
and 2.3, the wireless AP serving as the main router makes a decision according to the size comparison result in the process 2.2 and issues the decision step by step until the wireless AP is directly accessed to the wireless terminal STA.
The method is realized on the premise that: in the whole wireless environment, the wireless AP does not support the down-linked LAN port, namely all terminals are directly associated with a certain wireless AP in the whole environment, the invention can adopt an Action frame to inform a superior wireless AP when the wireless terminal STA accesses the wireless AP, the primary wireless AP uploads, the wireless AP serving as a main router, namely a root AP, makes a decision, and then the wireless AP sends the decision to the wireless AP directly accessing the wireless terminal STA to decide whether to accept the association or reject the association.
Further, the scheme is specifically designed as follows:
the decision comprises deciding whether to accept the association or reject the content of the wireless terminal STA, so as to absolutely allow the wireless terminal STA to associate the wireless AP;
the Action frame is internally provided with a Vendor Specific IE field, which is characterized in that the message format of the information element of the conventional Vendor Specific standard is convenient for information transmission.
In addition, the content of the Vendor Specific IE field in the Action frame adopted by the notification uploaded to the upper level comprises the association request of the wireless terminal STA and the actual association number of the wireless terminal STA,
the actual association number of the wireless terminal STA comprises a direct association number of the wireless terminal STA of the local wireless AP and a direct association number of the wireless terminal STA of the next wireless AP, if the wireless AP is the lowest wireless AP, the direct association number of the wireless terminal STA of the next wireless AP does not exist, and can be considered as 0, the mentioned direct association number refers to the number of the wireless terminal STA which is actually allowed to be associated by the current wireless AP, and it is important to point out that if the maximum association number of all the wireless APs is determined as N instead of only the main router, wherein N is a preset maximum value, on one hand, the main router makes a decision by judging the number size, on the other hand, if the actual association number of the wireless terminal STA is assumed as X, when X is a numerical value smaller than N, the main router can determine that the value of N-X is the maximum number which can be associated, the actual association number of the wireless terminal STA is limited within N, and since the association number is the whole group, N-X is the maximum number of any AP which can allow association, so that the association number of the wireless terminal STA of the group can be well controlled, and the smoothness of a network environment is ensured.
The content of the Vendor Specific IE field in the Action frame used for the decision issued to the lower level includes a decision indication for deciding whether the wireless terminal STA allows access, that is, the content of the Vendor Specific IE field in the issuing process is different from that in the uploading process and needs to be set by a corresponding system.
After receiving the notification uploaded from the lower level, the wireless AP firstly counts the actual association number of the wireless terminal STA, and then determines whether the wireless AP is a master router, if not, the wireless AP continues to perform notification to the upper level, if yes, it determines whether N is greater than or equal to the actual association number +1 of the wireless terminal STA, if yes, the wireless AP accepts to associate the wireless terminal STA, and if not, the wireless AP rejects to associate the wireless terminal STA.
In the following, a scenario case is provided in which the above method is applied specifically, as shown in figure 1,
the wireless AP1, the wireless AP2 and the wireless AP3 form a tree structure, and give all the decision of acceptance and association to the main router (root AP) of the whole wireless AP network group, namely the wireless AP1, wherein
The wireless AP3 is directly associated with wireless terminals STA5 and STA6 in real time;
the wireless AP2 has wireless terminals STA3 and STA4 directly associated with it in real time;
the wireless AP1 has wireless terminals STA1 and STA2 directly associated with it in real time;
the wireless AP1, the wireless AP2, and the wireless AP3 are respectively in bridge network coverage by WDS, and the wireless AP3 is the lowest-level wireless AP, and the wireless AP1 is the highest-level wireless AP, that is, the root AP,
then, assume that the maximum association numbers of the wireless AP1, the wireless AP2, and the wireless AP3 are all N;
now, there is one wireless terminal STA7 requesting to associate with the AP3,
then the following steps are formed by using the method:
1. the wireless terminal STA7 requests to associate with the wireless AP 3;
2. the wireless AP3 counts the number of direct association of the wireless terminal STA of the local wireless AP, which is 2 (excluding the wireless terminal STA7), because it is the lowest level, the number of direct association of the wireless terminal STA of the next-level wireless AP is 0, that is, the actual number of association of the wireless terminal STA of the wireless AP3 is 2, and in addition, it needs to determine whether it is the root AP, and if it is, it needs to be notified by the previous level;
3. the wireless AP3 sends an Action frame to the wireless AP2, a Vendor Specific IE is built in, and the actual association number of the wireless terminal STA with the content of association request and the current wireless AP3 is 2;
4. the wireless AP2 receives the Action frame of the wireless AP3, and the actual association number of the wireless terminal STA is: the direct association number of the wireless terminal STA of the local wireless AP + the actual association number of the wireless terminal STA of the wireless AP3 is 2+ 2-4, and in addition, whether the wireless terminal STA is the root AP needs to be judged, and if the judgment result is no, the upper level needs to perform notification;
5. the wireless AP2 sends an Action frame to the wireless AP1, a Vendor Specific IE is built in, and the actual association number of the wireless terminal STA with the content of association request and the current wireless AP2 is 4;
6. the wireless AP1 receives the Action frame of the wireless AP2, and the statistical number of the actual association of the wireless terminal STA is as follows: the direct association number of the wireless terminal STA of the local wireless AP + the actual association number of the wireless terminal STA of the wireless AP2 is 4+ 2-6;
7. the wireless AP1 determines that it is the root AP, and therefore the wireless AP1 determines whether N > is 6+ 1? The wireless AP1 sends the judgment result to be the wireless AP2 through an Action frame and a built-in Vendor Specific IE;
8. the wireless AP2 transmits the judgment result to the wireless AP3 through an Action frame and a built-in Vendor Specific IE;
9. the wireless AP3 decides whether the wireless terminal STA7 can associate according to the decision indication in the Vendor Specific IE in the Action frame.
According to the foregoing method, if the determination that N > is 6+1 is true before, the decision indication should be to allow the wireless terminal STA7 to associate, and if the determination that N > is 6+1 is false, the decision indication should be to reject the wireless terminal STA7 to associate.
In an implementation example, if the wireless terminal STA7 accesses the wireless AP2, the steps are different as follows:
1. the wireless terminal STA7 requests to associate with the wireless AP 2;
2. the wireless AP2 counts the actual association number of the wireless terminal STA as: the direct association number of the wireless terminal STA of the local wireless AP + the actual association number of the wireless terminal STA of the wireless AP3 is 2+ 2-4, in addition, it needs to determine whether the wireless terminal STA is the root AP, and if the determination result is no, the wireless terminal STA needs to be notified by the previous stage, where it needs to be noted that: the value of the actual association number of the wireless terminal STA of the wireless AP3 is obtained through an Action frame when the wireless terminal STA is associated on the wireless AP3 last time;
3. the wireless AP2 sends an Action frame to the wireless AP1, a Vendor Specific IE is built in, and the actual association number of the wireless terminal STA with the content of association request and the current wireless AP2 is 4;
4. the wireless AP1 receives the Action frame of the wireless AP2, and the statistical number of the actual association of the wireless terminal STA is as follows: the direct association number of the wireless terminal STA of the local wireless AP + the actual association number of the wireless terminal STA of the wireless AP2 is 4+ 2-6;
5. the wireless AP1 determines that it is the root AP, and therefore the wireless AP1 determines whether N > is 6+ 1? The wireless AP1 sends the judgment result to be the wireless AP2 through an Action frame and a built-in Vendor Specific IE;
6. the wireless AP2 decides whether the wireless terminal STA7 can associate according to the decision indication in the Vendor Specific IE in the Action frame.
According to the foregoing method, if the determination that N > is 6+1 is true before, the decision indication should be to allow the wireless terminal STA7 to associate, and if the determination that N > is 6+1 is false, the decision indication should be to reject the wireless terminal STA7 to associate.
Through the cases, the method has very quick and efficient processing capacity, has a good effect of limiting the association of the wireless terminal STA with the wireless AP, is based on WDS, is easy to realize and simple to operate through the form of an Action frame, can more accurately control the association number of the wireless terminal STA, is efficient and accurate, is not easy to make mistakes, and effectively solves the problems of network congestion and the like.
Embodiment 2, a system for association number limitation based on WDS, comprising a plurality of wireless APs having WDS function and a wireless terminal STA, wherein the wireless terminal STA comprises a terminal communication module and a terminal association request sending module, and the wireless AP comprises an AP communication module, a terminal association request receiving module, a main router determining module, an Action frame generating module, an Action frame uploading module, an Action frame issuing module, an Action frame receiving module, and a decision generating module,
the terminal communication module is used for communicating with the wireless AP;
the terminal association request sending module is used for sending an association request to the wireless AP;
the wireless AP communication module is used for communicating with a wireless terminal STA;
the terminal association request receiving module is used for receiving an association request of a wireless terminal STA;
the main router judgment module is used for judging whether the wireless AP is a main router or not by the wireless AP;
the Action frame generating module is used for generating an Action frame;
the Action frame uploading module is used for uploading an Action frame to a wireless AP at the upper stage by the wireless AP where the local station is located;
the Action frame issuing module is used for issuing an Action frame to a next set of wireless AP by the wireless AP where the local is located;
the Action frame receiving module is used for receiving Action frames from other wireless APs;
the decision generation module is used for making a decision when the wireless AP judges that the wireless AP is used as a main router.
The module design is further characterized in that the Action frame generation module comprises a Vendor Specific IE field built-in module, the Vendor Specific IE field built-in module comprises an association request information acquisition sub-module, a decision information acquisition sub-module and a wireless terminal STA actual association number generation sub-module, the decision generation module comprises a maximum association number judgment sub-module and a wireless terminal STA access judgment indication sub-module, wherein,
the association request information acquisition submodule is used for acquiring association request information of the wireless terminal STA;
the decision information acquisition sub-module is used for acquiring the decision information of the wireless AP serving as the main router;
the wireless terminal STA actual association number generation sub-module is used for counting the actual association number of the wireless AP, and the actual association number comprises the wireless terminal STA direct association number of the local wireless AP and the wireless terminal STA direct association number of the next-stage wireless AP;
the Vendor Specific IE field built-in module is used for internally forming Action frame content uploaded to an upper-level wireless AP according to the information of the association request information acquisition sub-module and the actual association number generation sub-module of the wireless terminal STA or internally forming Action frame content issued to a lower-level wireless AP according to the decision information of the decision information acquisition sub-module;
the maximum association number judgment sub-module is used for judging whether the maximum association number N is greater than or equal to the actual association number +1 of the wireless terminal STA or not by the wireless AP serving as the main router;
the wireless terminal STA access judgment indication sub-module is used for giving out decision information which rejects the associated wireless terminal STA if the judgment of the maximum association number judgment sub-module is not true and accepts the associated wireless terminal STA if the judgment is not true.
The above system is suitable for the method of association number limitation in embodiment 1, a block diagram of the system is shown in fig. 2, and certainly, the system still needs to configure some corresponding storage modules to perform timely data storage, which is a simple process: after the wireless terminal STA accesses the wireless AP through the terminal communication module to perform communication, the wireless terminal STA sends an association request to the corresponding wireless AP through the terminal association request sending module, and then, in a network formed by the wireless APs, each step of the method in embodiment 1 is executed through each module arranged on the wireless AP.
The stability and compatibility of the whole system are relatively better, the out-of-business probability of the system can be reduced, and the problems of network congestion and the like are not easy to generate.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.