Method for simultaneously processing online of a large number of APs (access points) based on online user quantity
Technical Field
The invention relates to the field of wireless local area networks, in particular to a method for simultaneously processing a large number of APs on line based on the amount of on-line users.
Background
The application of the wireless local area network is more and more extensive, the application range of the AC-AP network deployment mode is wider and wider, and the wireless local area network is gradually popularized in occasions such as governments, schools, middle and large markets, squares, enterprises and the like. In the existing AC-AP network mode, the process of the AP going online (i.e. associating with the AC) is generally: after AP program starts, it sends broadcast message to network environment to seek AC address, AC receives the message and replies a message carrying its own address to AP, after AP obtains AC address, it sends request to AC to be on-line, AC interacts with it, verifies some information of AP (generally version number, manufacturer, AP model, etc. to confirm whether it should be allowed to be on-line), then lets AP on-line, then sends current network environment configuration stored by AC to it. The AP configures related wireless signals, etc. according to the received configuration information.
In the online process, the messages are mainly divided into two types, one is to interact with the AC when online is requested, and the other is to allow the AC to issue configuration to the AP after online. In the whole process, a large number of messages are generated, the whole network environment generally consists of one AC and a plurality of APs, and the number of the APs can be as many as thousands. Because the AC needs to process all the AP online messages and send configuration information to the APs, when many APs request to be online, a large amount of messages are generated, and if the AC cannot bear such a large amount of data, the network data messages may be blocked, and even if the AC is directly down, the APs cannot provide services to the outside in time.
The range of the application of the AC & AP networking mode is getting larger and more complex, only one AC in a working state is provided in the same network environment, but a plurality of APs are associated with the AC, and after the network environment is powered off, under the condition of powering on again, a plurality of APs can simultaneously request the AC to be on-line, which generally includes the following two conditions:
the first technical scheme is as follows:
when a large number of APs in the environment restart (e.g., recover after a circuit failure), the APs immediately connect to the AC. The APs will send data packets to the AC at the same time, and the AC will process the data packets almost simultaneously and send the data to the corresponding APs according to the processing result after the processing. The AP and the AC interact data in this way until the AC configuration is issued.
The second prior art scheme is:
when a large number of APs in the environment restart (e.g., recover after a circuit failure), the APs randomly back off for a period of time and then connect to the AC. After the AP is restarted, a delay is randomly generated, then the AC requests to be on-line, the AC responds to the AP, and the message is interacted until the AC sends the configuration.
In the prior art scheme 1, the AP simultaneously requests the AC to go online, the AC receives a large amount of data requesting the online in a short time, the AC cannot process the large amount of data in a short time, which may cause slow data packet processing or even loss, the AP fails to go online, and continues to request the online, a large amount of repeated messages are generated, which causes serious network congestion or even downtime of the AC, resources are wasted, efficiency is reduced, the online time of the AP is increased, and the network environment is initialized slowly. Some vendors have increased the hardware configuration of the AC to increase the data processing speed in order to avoid this situation as much as possible. But this increases the cost of the netting and the performance requirements and processing speed of the network on the AC do not need to be too high when the network is operating properly. Resulting in a waste of resources.
In the prior art scheme 2, the APs randomly delay to request the access to the AC, and although the problem that the AC cannot process the access due to the fact that the AC can receive a large amount of data in a short time can be basically solved, the APs with small user amount can be accessed to the internet first because the user amounts of each AP are different, and the APs with a large amount of users are accessed to the internet after being delayed for a long time, so that the user experience is reduced.
Disclosure of Invention
In view of the above, the present invention provides a method for processing a large number of APs simultaneously online based on online user amount, which solves the problems that an AC cannot process a large amount of data in time and an AP cannot provide an online service to a user as much as possible when the AP is online.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for processing a plurality of APs simultaneously online based on online user quantity provides a wireless local area network, the wireless local area network comprises an AC and a plurality of APs connected with the AC, and the method is characterized by comprising the following steps:
step S1: calculating the online user quantity of each AP and the total online user quantity of the whole wireless local area network in a certain period of time;
step S2: calculating the delay time of the AP according to the online user quantity of the AP and the total online user quantity of the whole wireless local area network;
step S3: and when the AP is restarted, the AP is on line after the delay time.
Further, the specific calculation method of the delay time in step S2 is as follows:
wherein T is a delay time, PiIs the online user amount of the ith AP, PGeneral assemblyTotal number of online users for the entire wireless local area network, TmaxIs the maximum delay time.
Further, the maximum delay time is 300 s.
Further, the specific calculation process of step S1 is as follows: at intervals, the AP reports the online and offline information of the users to the AC, and the AC obtains the online user amount of the AP and the total online user amount of the whole wireless local area network according to the online and offline information of the users reported by all the APs:
Pi=Xi-Yi
wherein N is the number of AP in the wireless local area network, XiUser online amount, Y, for the ith APiIs the user offline amount of the ith AP.
Further, the step S1 includes that the AC sends the total online users of the entire wireless lan to each AP, and the AP stores the total online users of the AP and the total online users of the entire wireless lan in the FLASH of the AP.
Further, the specific online process of step S3 is as follows: after the AC is restarted, a broadcast message is sent to the AC after delay time to obtain an AC address, an online request is sent to the AC according to the obtained AC address, the AC sends configuration information to the AP according to a CAPWAP protocol after receiving the configuration information, and the AP configures related wireless signals according to the configuration information and then is online.
Compared with the prior art, the invention has the following beneficial effects: the invention can automatically adjust the delay time of the AP online according to the user quantity, thereby not only avoiding the condition that the AC needs to process a large amount of AP online requests in a short time, but also ensuring that the AP with large network demand is online first and providing the online service for the user as much as possible.
Drawings
FIG. 1 is an overall flow chart of the present invention.
Fig. 2 is a flow chart of the AP restart of the present invention.
Detailed Description
The invention is further explained below with reference to the drawings and the embodiments.
Referring to fig. 1, the invention provides a method for processing a large number of APs simultaneously online based on online user quantity, and provides a wireless local area network, wherein the wireless local area network comprises an AC and a plurality of APs connected with the AC, firstly, the AP starts to send a DHCP message to search for an AC address, the AP sends a discovery message of a CAPWAP to the AC to request to be online, the AC receives a subsequent CAPWAP protocol to send corresponding configuration, and the AP finishes the online; further comprising the steps of:
step S1: calculating the online user quantity of each AP and the total online user quantity of the whole wireless local area network in a certain period of time; the specific method comprises the following steps:
at intervals, the AP reports the online and offline information of the users to the AC, and the AC obtains the online user amount of the AP and the total online user amount of the whole wireless local area network according to the online and offline information of the users reported by all the APs:
Pi=Xi-Yi
wherein N is the number of APs in the wlan, N is 500, XiUser online amount, Y, for the ith APiThe user offline amount of the ith AP is;
and at intervals, the AC sends the total online users of the whole wireless local area network to each AP, and the AP stores the self online users and the total online users of the whole wireless local area network on a FLASH of the AP.
Step S2: calculating the delay time of the AP according to the online user quantity of the AP and the total online user quantity of the whole wireless local area network; the specific calculation method comprises the following steps:
wherein T is a delay time, PiIs the online user amount of the ith AP, PGeneral assemblyTotal number of online users for the entire wireless local area network, TmaxThe maximum delay time is 300 s.
The first embodiment is as follows: if 50 online users of the AP are present, the total number of online users of all APs connected to the AC is 1000, and the maximum delay time is 5 minutes, then: the delay time is (1-50/1000) × 5 × 60 ═ 285 seconds.
Step S3: when the AP is restarted, after the delay time, the AP is on-line, please refer to fig. 2, which specifically includes the following on-line process: and after the AC is restarted, reading the storage content in the FLASH, sending a broadcast message to the AC after delay time to acquire an AC address, sending an online request to the AC according to the acquired AC address, sending configuration information to the AP according to a CAPWAP protocol after the AC receives the configuration information, and configuring related wireless signals by the AP according to the configuration information and then online.
The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.