AP grouping method and device, electronic equipment and medium
By passing location information between the DHCP server and the AP, the problem of high network planning cost in AC group management for multiple APs is solved, and the automated packet and unified configuration of APs are realized.
Patent Information
- Application Number
- CN202510399217.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, when AC manages multiple APs in packet management, each AP needs to be configured one by one, resulting in high network planning costs and easy configuration errors.
By intercepting the original offer packet sent by the DHCP server, filling in location information, generating target offer packets, and sending them to the AP. The AP establishes a tunnel connection with the AC based on location information, realizing automatic packetization of the AP.
It realizes that APs with different locations but the same network segment are automatically divided into different groups, reducing the cost of network planning on the AC and avoiding duplicate configuration errors.
Smart Images

Figure CN120343000A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of communication technologies, and in particular, to a method, apparatus, electronic device, and medium for grouping APs. Background Art
[0002] Currently, wireless local area networks adopt an AC and AP (hereinafter referred to as AP) architecture, that is, the AP is centrally controlled and managed by the AC, and all configurations are saved on the AC and issued by the AC. No configuration is required on the AP.
[0003] In practical applications, customers have a need to issue the same configuration to multiple APs. Therefore, a group management function is introduced, that is, APs that need to issue the same configuration are divided into the same AP group, and then configured uniformly under the AP group. In this way, it is not necessary to repeat the configuration for each of the multiple APs one by one, which can save management costs and avoid configuration errors. However, how to group APs is an urgent problem to be solved. Summary of the Invention
[0004] To overcome the problems existing in the related art, this specification provides a method, apparatus, electronic device, and medium for grouping APs.
[0005] According to the first aspect of the embodiments of this specification, a method for grouping APs is provided, which is applied to a DHCP snooping device. The method includes: intercepting an original offer message sent by a DHCP server to an AP, where the original offer message includes an IP address assigned by the DHCP server to the AP; filling location information in the original offer message to obtain a target offer message; and sending the target offer message to the AP.
[0006] According to the second aspect of the embodiments of this specification, a method for grouping APs is provided, which is applied to an AP. The method includes: sending an IP address acquisition request to a DHCP server; receiving a target offer message sent by a DHCP snooping device, where the target offer message includes location information and an IP address assigned by the DHCP server to the AP; and sending a tunnel connection request to an AC according to the IP address, where the tunnel connection request includes the location information.
[0007] According to the third aspect of the embodiments of this specification, a method for grouping APs is provided, which is applied to an AC. The method includes: receiving a tunnel connection request sent by the AP, where the tunnel connection request includes location information; establishing a tunnel with the AP according to the tunnel connection request, and dividing the AP into an AP group corresponding to the location information.
[0008] According to a fourth aspect of the embodiments of the present specification, a grouping device for an AP is provided, which is applied to a DHCP snooping device. The device includes: an interception module, configured to intercept an original offer message sent by a DHCP server to the AP, where the original offer message includes an IP address assigned by the DHCP server to the AP; a filling module, configured to fill position information in the original offer message to obtain a target offer message; and a first sending module, configured to send the target offer message to the AP.
[0009] According to a fifth aspect of the embodiments of the present specification, a grouping device for an AP is provided, which is applied to the AP. The device includes: a second sending module, configured to send an IP address acquisition request to a DHCP server; a first receiving module, configured to receive a target offer message sent by a DHCP snooping device, where the target offer message includes position information and an IP address assigned by the DHCP server to the AP; and a third sending module, configured to send a tunnel connection request to an AC according to the IP address, where the tunnel connection request includes the position information.
[0010] According to a sixth aspect of the embodiments of the present specification, a grouping device for an AP is provided, which is applied to an AC. The device includes: a second receiving module, configured to receive a tunnel connection request sent by the AP, where the tunnel connection request includes position information; and a establishing module, configured to establish a tunnel with the AP according to the tunnel connection request and divide the AP into an AP group corresponding to the position information.
[0011] According to a seventh aspect of the embodiments of the present specification, a grouping device for an AP is provided, including:
[0012] a processor;
[0013] a memory for storing executable instructions of the processor;
[0014] Wherein, the processor is configured to execute the AP grouping method according to the first aspect, the second aspect, the third aspect or any corresponding implementation manner thereof.
[0015] According to an eighth aspect of the embodiments of the present specification, a computer-readable storage medium is provided. Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the AP grouping method according to the first aspect, the second aspect, the third aspect or any corresponding implementation manner thereof.
[0016] The technical solutions provided by the embodiments of the present specification may include the following beneficial effects:
[0017] In the embodiments of this specification, the requirement of dividing APs with the same network segment but in different locations into different groups is achieved, and there is no need for one-by-one configuration, reducing the network planning cost on the AC.
[0018] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this specification. Brief Description of the Drawings
[0019] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with this specification, and are used together with the specification to explain the principles of this specification.
[0020] Figure 1 It is a schematic diagram of an application scenario shown according to an exemplary embodiment of this specification.
[0021] Figure 2 It is a flowchart of a method for grouping APs shown according to an exemplary embodiment of this specification.
[0022] Figure 3 It is a hardware structure diagram of a computer device where the AP grouping device in the embodiments of this specification is located.
[0023] Figure 4 It is a block diagram of an AP grouping device shown according to an exemplary embodiment of this specification.
[0024] Figure 5 It is a block diagram of another AP grouping device shown according to an exemplary embodiment of this specification.
[0025] Figure 6 It is a block diagram of another AP grouping device shown according to an exemplary embodiment of this specification. Detailed Description of the Embodiments
[0026] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. On the contrary, they are only examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0027] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the", and "said" used in this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0028] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".
[0029] Next, the embodiments of this specification will be described in detail.
[0030] The following combines Figure 1 to describe the application scenarios of the grouping method and device of the AP in the embodiments of this specification. It should be noted that Figure 1 The examples shown are only examples of the application scenarios to which the embodiments of this specification can be applied to help those skilled in the art understand the technical content of this specification, but it does not mean that the embodiments of this specification cannot be used in other devices, systems, environments or scenarios.
[0031] Figure 1 is a schematic diagram of an application scenario shown according to an exemplary embodiment of this specification.
[0032] As Figure 1 shown, this application scenario may include devices such as an AC (Access Controller), an AP (Access Point), a DHCP (Dynamic Host Configuration Protocol Server) server, a DHCP snooping device, and a switch.
[0033] The AC can be used to perform service configuration and management on the AP.
[0034] The AP can be used to provide wireless network access services for clients (such as mobile phones, laptops, etc.).
[0035] The DHCP server can be used to automatically assign IP addresses and other network configurations, such as subnet masks, default gateways, DNS servers, etc., to DHCP clients.
[0036] A DHCP Snooping device can be used to monitor DHCP packets, verify their legality, filter illegal DHCP packets, so as to block illegal DHCP servers in the access network. The DHCP Snooping device can include, for example, a switch or a router, etc.
[0037] A switch can be a network device for forwarding electrical (optical) signals. It can provide an exclusive electrical signal path for any two network nodes accessing the switch. Exemplarily, the switch can be a POE (Power Over Ethernet) switch, that is, a switch supporting Ethernet power supply.
[0038] In this embodiment, each switch can include at least one AP, for example, it can include AP1, …… APn, where n is a positive integer. The AP can be used as a DHCP client.
[0039] According to the embodiments of this specification, the APs managed by the AC can be distributed at multiple locations. The APs at the same location are required to have the same configuration, and the APs at different locations are required to have different configurations. Since the number of APs is large, the AC can divide the APs at these multiple locations into multiple different AP groups and then perform unified configuration. Each location can correspond to an AP group.
[0040] Exemplarily, in this embodiment, the APs managed by the AC can be distributed at two locations, namely Region 1 and Region 2. The APs at these two locations can be assigned IP addresses by the same DHCP server, and the assigned IP addresses are in the same network segment. The APs in each location can access the Internet, obtain IP addresses, and be managed by the AC through a multi-level layer-2 switch. The switch adjacent to the AP can be responsible for power supply. The top-layer switch can not only converge but also play the role of DHCP snooping. The APs in Region 1 and Region 2 access the DHCP snooping device and communicate with the DHCP server through the DHCP snooping device to obtain IP addresses.
[0041] In the related art, when grouping APs, each AP needs to be configured one by one, and the network planning cost on the AC is relatively high. According to the AP grouping method of the embodiments of this specification, the requirement of dividing APs with the same network segment but at different locations into different groups is realized, and there is no need to configure them one by one, reducing the network planning cost on the AC.
[0042] The following will elaborate on the AP grouping method provided by the embodiments of this specification. As Figure 2 shown, Figure 2It is a flowchart of a grouping method for an AP shown in this specification according to an exemplary embodiment. The grouping method for an AP provided in the embodiments of this specification may include the following steps.
[0043] In step S201, the AP sends an IP address acquisition request to the DHCP server.
[0044] According to the embodiments of this specification, the IP address acquisition request can be used to request the DHCP server to allocate an IP address.
[0045] In step S202, the DHCP server receives the IP address acquisition request sent by the AP.
[0046] In step S203, the DHCP server allocates an IP address to the AP according to the IP address acquisition request.
[0047] According to the embodiments of this specification, the DHCP server can be configured with an IP address pool. After receiving the IP address acquisition request, the DHCP server can select an IP address from the IP address pool and allocate it to the AP. Optionally, the DHCP server can allocate IP addresses in the same network segment to different APs.
[0048] Optionally, in addition to the IP address, the DHCP server can also allocate other network configuration information to the AP, such as the gateway, subnet mask, DNS, etc.
[0049] In step S204, the DHCP snooping device sends a raw offer message to the AP via the DHCP snooping device, and the raw offer message includes the IP address.
[0050] According to the embodiments of this specification, the raw offer message is an offer message sent by the DHCP snooping device. The offer message can be used to notify the AP of the allocated IP address. Optionally, in addition to the IP address, the offer message can also include other network configuration information allocated to the AP, such as the gateway, subnet mask, DNS (Domain Name Server), etc.
[0051] In step S205, the DHCP snooping device intercepts the raw offer message sent by the DHCP server to the AP.
[0052] According to the embodiments of this specification, the DHCP snooping device can listen to the DHCP messages sent by the DHCP server. When it listens to the raw offer message sent by the DHCP server to the AP, it intercepts the raw offer message.
[0053] In step S206, the DHCP snooping device fills in the location information in the original offer message to obtain a target offer message.
[0054] According to the embodiments of this specification, the location information may represent the location of the AP. The location information can be user-defined or carry the MAC (Media Access Control) address of the AP or the DHCP snooping device as the location information.
[0055] In step S207, the DHCP snooping device sends the target offer message to the AP.
[0056] In step S208, the AP receives the target offer message sent by the DHCP snooping device.
[0057] According to the embodiments of this specification, the target offer message includes the location information and the IP address assigned by the DHCP server to the AP. The AP can obtain the location information and the IP address assigned by the DHCP server to the AP according to the target offer message.
[0058] In step S209, the AP sends a tunnel connection request to the AC according to the IP address, and the tunnel connection request includes the location information.
[0059] In step S210, the AC receives the tunnel connection request sent by the AP.
[0060] In step S211, the AC establishes a tunnel with the AP according to the tunnel connection request and divides the AP into an AP group corresponding to the location information.
[0061] According to the embodiments of this specification, the DHCP server can divide APs with the same location into the same AP group according to the location information.
[0062] According to the method for grouping APs in the embodiments of this specification, the requirement of dividing APs with different locations but the same network segment into different groups according to their locations is realized, and there is no need for one-by-one configuration, reducing the network planning cost on the AC.
[0063] Optionally, the original offer message contains an Option (option) field. Based on this, the DHCP snooping device can, for example, fill in the location information into the Option field of the original offer message.
[0064] For example, according to the definition in RFC2132, Options 128 to 254 in the DHCP packet are reserved fields and can be used for custom purposes. Based on this, any one or more fields among Options 128 to 254 can be selected to carry location information. Exemplarily, in this embodiment, Option182 is used to carry address information. The DHCP snooping device fills the location information in Option 182 of the original offer packet to obtain the target offer packet. The AP extracts the address information in Option 182 from the received target offer packet,
[0065] Optionally, the tunnel connection request can be based on the CAPWAP protocol. The AP can establish a CAPWAP tunnel with the AC through the tunnel connection request. The CAPWAP protocol packet contains a location definition field. Based on this, during the process of the AP establishing a CAPWAP tunnel with the AC, the location information can be carried in the location definition field of the tunnel connection request and passed to the AC.
[0066] Corresponding to the embodiments of the foregoing method, this specification also provides embodiments of a packet device of the AP and a terminal to which it is applied.
[0067] The embodiments of the packet device of the AP in this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented through software, or through hardware, or a combination of software and hardware. Taking software implementation as an example, as a logically meaningful device, it is formed by the corresponding computer program instructions in the non-volatile memory being read into the memory and running by the processor where it is located. From a hardware level, as Figure 3 shown, it is a hardware structure diagram of a computer device where the packet device of the AP in the embodiments of this specification is located. In addition to Figure 3 the processor 310, memory 330, network interface 320, and non-volatile memory 340 shown, for the server or electronic device where the device 331 is located in the embodiments, usually according to the actual functions of the computer device, other hardware may also be included, which will not be elaborated here.
[0068] As Figure 4 shown, Figure 4 is a block diagram of a packet device of an AP shown according to an exemplary embodiment of this specification. The device can be applied to a DHCP snooping device, and the device includes:
[0069] An interception module 410, configured to intercept an original offer packet sent by a DHCP server to the AP, where the original offer packet includes an IP address assigned by the DHCP server to the AP;
[0070] A filling module 420, configured to fill location information in an original offer message to obtain a target offer message;
[0071] A first sending module 430, configured to send the target offer message to an AP.
[0072] Optionally, the filling module may include:
[0073] A location information filling sub-module, configured to fill location information into the Option field of the original offer message.
[0074] Optionally, the location information may include a MAC address.
[0075] Correspondingly, this specification also provides an electronic device, which includes a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to: intercept an original offer message sent by a DHCP server to an AP, the original offer message includes an IP address assigned by the DHCP server to the AP; fill location information in the original offer message to obtain a target offer message; send the target offer message to the AP.
[0076] As Figure 5 shown, Figure 5 is a block diagram of another packet device of an AP shown in this specification according to an exemplary embodiment. This device can be applied to an AP, and the device includes:
[0077] A second sending module 510, configured to send an IP address acquisition request to a DHCP server;
[0078] A first receiving module 520, configured to receive a target offer message sent by a DHCP snooping device, the target offer message includes location information and an IP address assigned by the DHCP server to the AP;
[0079] A third sending module 530, configured to send a tunnel connection request to an AC according to the IP address, the tunnel connection request includes location information.
[0080] Optionally, the tunnel connection request may be based on the CAPWAP protocol.
[0081] Correspondingly, this specification also provides an electronic device, which includes a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to: send an IP address acquisition request to a DHCP server; receive a target offer message sent by a DHCP snooping device, the target offer message including location information and an IP address assigned by the DHCP server to the AP; according to the IP address, send a tunnel connection request to the AC, the tunnel connection request including location information.
[0082] As Figure 6 shown, Figure 6 is a block diagram of another AP grouping device shown in this specification according to an exemplary embodiment. This device can be applied to an AC and includes:
[0083] A second receiving module 610, configured to receive a tunnel connection request sent by the AP, the tunnel connection request including location information;
[0084] A establishing module 620, configured to establish a tunnel with the AP according to the tunnel connection request, and divide the AP into an AP group corresponding to the location information.
[0085] Correspondingly, this specification also provides an electronic device, which includes a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to: receive a tunnel connection request sent by the AP, the tunnel connection request including location information; according to the tunnel connection request, establish a tunnel with the AP, and divide the AP into an AP group corresponding to the location information.
[0086] The AP grouping device according to the embodiment of this specification realizes the requirement of dividing APs with the same network segment but different locations into different groups according to their locations, and there is no need for one-by-one configuration, reducing the network planning cost on the AC.
[0087] For the specific implementation processes of the functions and roles of each module in the above device, please refer to the implementation processes of the corresponding steps in the above method for details, and will not be elaborated here.
[0088] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial descriptions of the method embodiments. The device embodiments described above are only illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this specification. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0089] The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0090] Those skilled in the art will readily conceive of other implementations of the present specification after considering the specification and practicing the invention herein. This specification is intended to cover any variations, uses, or adaptations of the present specification, which follow the general principles of the present specification and include common general knowledge or conventional technical means in the technical field not claimed in the present specification. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present specification are pointed out by the following claims.
[0091] It should be understood that the present specification is not limited to the exact structures described above and shown in the figures, and various modifications and changes can be made without departing from its scope. The scope of the present specification is only limited by the appended claims.
[0092] The foregoing is only a preferred embodiment of the present specification and is not intended to limit the present specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present specification shall be included within the scope of protection of the present specification.
Claims
1. A grouping method for an AP, applied to a DHCP snooping device, characterized in that The method includes: Intercepting the original offer message sent by the DHCP server to the AP, where the original offer message includes the IP address assigned by the DHCP server to the AP; Filling the position information in the original offer message to obtain a target offer message; Sending the target offer message to the AP.
2. The method according to claim 1, characterized in that, The filling the position information in the original offer message to obtain a target offer message includes: Filling the position information into the Option field of the original offer message.
3. The method according to claim 1 or 2, characterized in that, The position information includes a MAC address.
4. A grouping method for an AP, applied to the AP, characterized in that, The method includes: Sending an IP address acquisition request to the DHCP server; Receiving a target offer message sent by a DHCP snooping device, where the target offer message includes position information and the IP address assigned by the DHCP server to the AP; Sending a tunnel connection request to the AC according to the IP address, where the tunnel connection request includes the position information.
5. The method according to claim 4, wherein The position information is located in the Option field of the target offer message.
6. The method according to claim 4, wherein The tunnel connection request is based on the CAPWAP protocol.
7. The method according to claim 4, wherein The position information includes a MAC address.
8. A grouping method for an AP, applied to an AC, characterized in that, The method includes: Receiving a tunnel connection request sent by the AP, where the tunnel connection request includes position information; Establishing a tunnel with the AP according to the tunnel connection request and dividing the AP into an AP group corresponding to the position information.
9. The method according to claim 8, characterized in that, The tunnel connection request is based on the CAPWAP protocol.
10. The method according to claim 8 or 9, characterized in that, The position information includes a MAC address.
11. A grouping device for an AP, applied to a DHCP snooping device, characterized in that, The device includes: An interception module, configured to intercept the original offer message sent by the DHCP server to the AP, where the original offer message includes the IP address assigned by the DHCP server to the AP; A filling module, configured to fill the position information in the original offer message to obtain a target offer message; A first sending module, configured to send the target offer message to the AP.
12. A grouping device for an AP, applied to the AP, characterized in that, The device includes: A second sending module, configured to send an IP address acquisition request to the DHCP server; A first receiving module, configured to receive a target offer message sent by a DHCP snooping device, where the target offer message includes position information and the IP address assigned by the DHCP server to the AP; A third sending module, configured to send a tunnel connection request to the AC according to the IP address, where the tunnel connection request includes the position information.
13. A grouping device for an AP, applied to an AC, characterized in that, The device includes: A second receiving module, configured to receive a tunnel connection request sent by the AP, where the tunnel connection request includes position information; An establishment module, configured to establish a tunnel with the AP according to the tunnel connection request and divide the AP into an AP group corresponding to the position information.
14. An electronic device, including: A processor; A memory for storing processor-executable instructions; Wherein, the processor is configured to execute the grouping method of the AP according to any one of claims 1 to 10.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the packet method of the AP according to any one of claims 1 to 10.