Virtual local area network distribution method and system based on open WIFI network, and medium
By passing authentication and association requests between the wireless switching module and the wireless control module, dynamically allocating the target VLAN to handle the DHCP request of the terminal device, the problem of spectrum resource competition in a multi-SSID environment is solved, and network stability and data transmission efficiency are improved .
Patent Information
- Application Number
- CN202411625714.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-14
AI Technical Summary
In a multi-SSID environment, competition occurs between multiple SSIDs due to the sharing of limited wireless spectrum resources, reducing network stability and data transmission efficiency.
The wireless switching module receives the authentication request and association request of the terminal device, forwards it to the wireless control module, acquires the target VLAN in the VLAN data set according to the association request, and generates an association response, and creates a target interface to process the DHCP request with the target VLAN tag.
The competition for spectrum resources between multiple SSIDs is avoided, and network communication stability and data transmission efficiency are improved.
Smart Images

Figure CN119450448A_ABST
Abstract
Description
Technical Field
[0001] The present application generally relates to the field of wireless communication technology, and specifically to a virtual local area network allocation method, system and medium based on an open WIFI network. Background Art
[0002] With the rapid development of information and communication technology, especially the popularization of mobile communications, the Internet, cloud computing, and the Internet of Things, the demand for various business services from terminal devices (such as mobile phones, computers, and Internet of Things devices) is growing.
[0003] In specific environments, such as enterprises, schools, or commercial places, network administrators usually allow terminal devices to access designated services through virtual local area network (VLAN) division or MAC (Media Access Control Address) address restrictions. For example, each wireless network is configured with a unique SSID (Service Set Identifier). Network administrators will assign different VLANs through different SSIDs to identify and connect terminal devices to specific wireless networks, thereby limiting the access rights of terminal devices. However, there are many SSIDs in wireless networks, and the identification process is cumbersome when terminal devices access. In addition, in a multi-SSID environment, multiple SSIDs compete with each other due to the sharing of limited wireless spectrum resources, thereby reducing the stability of the network and the efficiency of data transmission. Therefore, we propose a virtual local area network allocation method, system, and medium based on an open WIFI network to solve the above problems. Summary of the invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a virtual local area network allocation method, system and medium based on an open WIFI network that reduces performance loss and is easy to implement.
[0005] In a first aspect, the present application provides a virtual local area network allocation method based on an open WIFI network, which is applied to a wireless switching module and includes the following steps: receiving an authentication request sent by a first terminal, and verifying the identity information of the first terminal according to the authentication request; the authentication request is generated when the first terminal recognizes the SSID identifier; the authentication request carries the identity information of the first terminal; When the identity information of the first terminal is verified to be passed, obtaining an association request sent by the first terminal and forwarding it to the wireless control module; the association request carries the MAC address of the first terminal; receiving a target VLAN and an association response sent by the wireless control module; the target VLAN is obtained by the wireless control module in a VLAN data set according to the association request; the association response includes information allowing the first terminal to access; the VLAN data set includes a plurality of VLANs; A target interface is created according to the target VLAN, and the association response is fed back to the first terminal; the target interface is used to receive a DHCP request with a target VLAN tag sent by the first terminal.
[0006] According to the technical solution provided in the embodiment of the present application, the following steps are also included: When a DHCP request with a target VLAN tag sent by the first terminal is received, the target VLAN to which the current DHCP request belongs is determined and stored according to the target VLAN tag, and the current DHCP request is transmitted to the corresponding target interface for processing.
[0007] According to the technical solution provided in the embodiment of the present application, before receiving the authentication request sent by the first terminal, the following steps are also included: A broadcast signal is transmitted periodically; the broadcast signal includes an SSID identifier.
[0008] In a second aspect, the present application provides a virtual local area network allocation method based on an open WIFI network, which is applied to a wireless control module and includes the following steps: receiving an association request forwarded by a wireless switching module; the association request is sent by a first terminal to the wireless switching module; the association request carries access information of the first terminal; The target VLAN corresponding to the association request is obtained in the VLAN data set, and an association response is generated; the target VLAN and the association response are sent to the wireless switching module; the association response includes information allowing the first terminal to access; the VLAN data set includes multiple VLANs.
[0009] According to the technical solution provided in the embodiment of the present application, obtaining the target VLAN corresponding to the association request in the VLAN data set specifically includes the following steps: identifying, according to the MAC address in the association request, a plurality of assignable VLANs in the VLAN data set corresponding to the first terminal; A VLAN with the least number of corresponding total terminals in the assignable VLANs is selected and marked as a target VLAN.
[0010] According to the technical solution provided in the embodiment of the present application, the following steps are also included: When the number of terminal devices corresponding to the VLAN in the VLAN data set is equal to a preset threshold, the terminal device information corresponding to the VLAN is cleared.
[0011] In a third aspect, the present application provides a virtual local area network allocation method based on an open WIFI network, which is applied to a first terminal and includes the following steps: When the SSID identifier in the broadcast signal transmitted by the wireless switching module is identified, an authentication request is sent to the wireless switching module; the authentication request carries the identity information of the first terminal; When receiving the result that the wireless switching module verifies the identity information as passed, sending an association request to the wireless switching module; the association request carries the access information of the first terminal; Receive the association response forwarded by the wireless switching module, and send a DHCP request with a target VLAN tag to the wireless switching module; the association response is sent to the wireless switching module by the wireless control module; the association response includes information allowing the first terminal to access.
[0012] In a fourth aspect, the present application provides a virtual local area network allocation system based on an open WIFI network, which is used to implement the above-mentioned virtual local area network allocation method based on an open WIFI network, and the system includes: a first terminal connected in communication, a wireless switching module and a wireless control module; The first terminal is configured to send an authentication request to the wireless switching module when identifying the SSID identifier in the broadcast signal transmitted by the wireless switching module; the authentication request carries the identity information of the first terminal; The wireless switching module is used to receive an authentication request sent by the first terminal, and verify the identity information of the first terminal according to the authentication request; The first terminal is further configured to send an association request to the wireless switching module when receiving a signal from the wireless switching module that the identity information has been verified; the association request carries the access information of the first terminal; The wireless switching module is further used to obtain the association request sent by the first terminal and forward it to the wireless control module; The wireless control module is used to obtain a target VLAN corresponding to the association request in the VLAN data set and generate an association response; send the target VLAN and the association response to the wireless switching module; the VLAN data set includes a plurality of VLANs; The wireless switching module is further used to create a target interface according to the target VLAN and feed back the association response to the first terminal; The wireless switching module is further configured to determine the target VLAN to which the current DHCP request belongs according to the target VLAN tag when receiving the DHCP request with the target VLAN tag sent by the first terminal, and transmit the current DHCP request to the corresponding target interface for processing.
[0013] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the virtual local area network allocation method based on an open WIFI network as described above are implemented.
[0014] It can be seen from the above technical solution that the present application has at least the following beneficial effects: The present application provides a virtual local area network allocation method based on an open WIFI network, in which a wireless switching module receives an authentication request issued by a first terminal, and verifies the identity information of the first terminal according to the authentication request; the authentication request is generated when the first terminal recognizes an SSID identifier, and the authentication request carries the identity information of the first terminal; when the wireless switching module verifies that the identity information of the first terminal is passed, an association request issued by the first terminal is obtained and forwarded to a wireless control module; the association request carries the MAC address of the first terminal; a target VLAN and an association response issued by the wireless control module are received; the target VLAN is obtained by the wireless control module in a VLAN data set according to the association request; the association response includes information allowing the first terminal to access; the VLAN data set includes multiple VLANs; the wireless switching module creates a target interface according to the target VLAN, and feeds back the association response to the first terminal; the target interface is used to receive a DHCP request with a target VLAN tag issued by the first terminal.
[0015] Compared with the traditional virtual LAN allocation method, the present method utilizes a wireless control module to receive an association request forwarded by a wireless switching module, obtains a target VLAN in a VLAN data set based on the association request, generates an association response, and forwards the association response to the first terminal via the wireless switching module, so that a DHCP request with a target VLAN tag issued by the first terminal is received and processed by the target interface; it avoids competition caused by multiple SSIDs sharing limited wireless spectrum resources, and improves network communication stability and data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects and advantages of the present application will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings.
[0017] Figure 1 The present invention is a flow chart of a virtual local area network allocation method based on an open WIFI network.
[0018] Figure 2 This is a structural diagram of the virtual LAN allocation system based on the open WIFI network.
[0019] Numbers in the figure: 1, first terminal; 2, wireless switching module; 3, wireless control module. DETAILED DESCRIPTION
[0020] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0021] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0022] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given: Network managers use different SSIDs to set different wireless network names to distinguish different wireless networks. For example, multiple wireless networks (SSIDs) are deployed in a large office building for different departments or different purposes (such as employee networks, guest networks, Internet of Things (IOT) device networks, etc.). If these wireless networks (SSIDs) do not have reasonable channel planning, or if there are too many terminal devices, it will lead to competition for wireless channel resources, thereby reducing network stability and data transmission efficiency.
[0023] In addition, terminal devices usually save multiple known wireless networks (SSIDs). When automatically switching SSIDs, users cannot fully control or intervene in the switching process. For example, the device may automatically switch to another network when the signal is weak or the connection is unstable, or there is no clear priority setting when switching, resulting in frequent disconnection and connection of the device, affecting the user experience.
[0024] In addition, without using the 802.1X network authentication protocol, the network cannot dynamically assign different VLANs (virtual local area networks) based on the identity of the terminal device (such as device type, user identity, etc.). At this time, the network administrator can only configure fixed VLANs, that is, all terminal devices connected to the wireless switch may be in the same VLAN, and different VLANs cannot be assigned based on device type or other conditions. In short, in non-802.1X authentication scenarios, network devices cannot automatically identify and assign specific VLANs to each terminal through the authentication mechanism.
[0025] In view of this, the present application provides a virtual local area network allocation method based on an open WIFI network, in which a wireless switching module receives an authentication request issued by a first terminal, and verifies the identity information of the first terminal according to the authentication request; the authentication request is generated when the first terminal recognizes the SSID identifier, and the authentication request carries the identity information of the first terminal; when the wireless switching module verifies that the identity information of the first terminal is passed, an association request issued by the first terminal is obtained and forwarded to the wireless control module; the association request carries the MAC address of the first terminal; a target VLAN and an association response issued by the wireless control module are received; the target VLAN is obtained by the wireless control module in a VLAN data set according to the association request; the association response includes information allowing the first terminal to access; the VLAN data set includes multiple VLANs; the wireless switching module creates a target interface according to the target VLAN, and feeds back the association response to the first terminal; the target interface is used to receive a DHCP request with a target VLAN tag issued by the first terminal; competition due to multiple SSIDs sharing limited wireless spectrum resources is avoided, thereby improving network communication stability and data transmission efficiency.
[0026] In order to make the technical solution of the present application clearer and easier to understand, the virtual local area network allocation method based on an open WIFI network provided by the embodiment of the present application is introduced below in conjunction with the accompanying drawings. Figure 1 As shown in the figure, this figure is a flow chart of a virtual local area network allocation method based on an open WIFI network provided in an embodiment of the present application, and the method includes the following steps: S100: When the first terminal identifies the SSID identifier in the broadcast signal transmitted by the wireless switching module, the first terminal sends an authentication request to the wireless switching module.
[0027] It should be noted that the type of the first terminal is, for example, a mobile phone, a computer, an IoT device, etc. The type of the wireless switching module is, for example, an AP (Access Point), which is a wireless switch in a wireless network and a bridge between a wireless network and a wired network. Specifically, the AP can provide a mutual access function between wireless devices and a wired LAN, so that wireless devices can communicate with each other within the signal coverage range.
[0028] The authentication request carries the identity information of the first terminal, such as the user name and password of the first terminal, OTP (one-time password), biometric authentication (such as fingerprint, facial recognition), etc. The SSID identifier is used to indicate the name of a wireless network.
[0029] For example, the wireless switching module periodically transmits a broadcast signal, which contains the SSID identifier that matches the current wireless switching module. The first terminal can collect broadcast signals emitted by surrounding access points (APs) by monitoring the broadcast signals on the radio frequency band (such as 2.4GHz or 5GHz). After the user selects the AP to connect to through the first terminal, it sends an authentication request to the selected AP.
[0030] S200: When the first terminal receives the identity verification information from the wireless switching module and it is confirmed that the identity verification is successful, the first terminal sends an association request to the wireless switching module.
[0031] It should be noted that when the first terminal receives the identity verification information of the wireless switching module, it means that the first terminal and the selected wireless switching module have established a connection and can communicate data; after the identity verification is passed, the first terminal can send an association request to the wireless switching module. The association request carries the MAC address of the first terminal, which is a hardware address assigned to the first terminal for network communication.
[0032] If the wireless switching module fails to verify the identity information, it means that the identity information of the first terminal is used fraudulently or incorrectly, and the first terminal and the wireless switching module cannot establish a data communication connection. The identity information verification ensures that the first terminal and the wireless switching module can be connected safely and stably.
[0033] S300: The wireless switching module forwards the association request sent by the first terminal to the wireless control module.
[0034] It should be noted that the type of the wireless control module is, for example, a wireless controller (Access Controller, AC), which is responsible for centrally managing and controlling the configuration, data traffic, identity authentication, security, and network performance of multiple APs to optimize network operation and maintenance.
[0035] S400: The wireless control module obtains the target VLAN corresponding to the association request in the VLAN data set, and generates an association response; and sends the target VLAN and the association response to the wireless switching module.
[0036] It should be noted that the VLAN data set includes multiple VLANs; the VLAN data set is stored in the register of the wireless control module, as shown in Table 1, "VLAN1", "VLAN2", etc. in Table 1 are used to represent different VLANs, and "#001", "#002", etc. in Table 1 are used to represent different first terminals.
[0037] Among them, the standard requirement for the wireless control module to search for the corresponding target VLAN for the first terminal in the VLAN data set is: the VLAN with the least total number of terminals in the VLAN data set is used as the target VLAN, or, when the total number of terminals corresponding to each VLAN in the VLAN data set is the same, the first VLAN, i.e., VLAN1, is selected as the final target VLAN.
[0038] Table 1 VLAN data collection
[0039] Furthermore, the method further comprises the following steps: When the number of terminal devices corresponding to a VLAN in the VLAN data set is equal to a preset threshold, the terminal device information corresponding to the VLAN is cleared; here, the preset threshold can be set according to the actual situation. By regularly clearing the terminal information corresponding to the VLAN stored in the VLAN data set, network security and the stability of the operation of the wireless control module are guaranteed.
[0040] In addition, since the VLAN data set is cleaned up regularly, when matching VLAN for the first terminal, if the name of the current first terminal is stored in the VLAN data set, the corresponding VLAN is the target VLAN. If it does not exist in the VLAN data set, the target VLAN is matched for the first terminal according to the aforementioned rules.
[0041] S500. The wireless switching module creates a target interface according to the target VLAN.
[0042] It should be noted that the wireless switching module creates a target interface based on the target VLAN. This target interface is a bridge interface, one end of which is an SSID interface and the other end is an eth.vlan interface. The SSID interface connects the network traffic between the AP and the first terminal. For example, the first terminal is connected to the specified SSID through an open WIFI network; the eth.vlan interface is responsible for receiving or sending data traffic with VLAN tags.
[0043] In addition, a traffic redirection rule is created for the first terminal and the target interface, that is, a rule is created to guide the network traffic of the first terminal to the designated target interface for forwarding and processing.
[0044] S600: The wireless switching module feeds back an association response to the first terminal.
[0045] It should be noted that the association response includes information allowing the first terminal to access.
[0046] S700: The first terminal sends a DHCP request with a target VLAN tag to the wireless switching module.
[0047] It should be noted that DHCP (Dynamic Host Configuration Protocol) is a protocol used to automatically assign IP addresses and other network configuration parameters to terminal devices (such as computers, printers, smart phones, etc.) in an IP network; it simplifies the configuration process of network devices and eliminates the need to manually configure a static IP address for each device.
[0048] The purpose of the first terminal device sending a DHCP request to the wireless switching module is to obtain an IP address and other necessary network configurations on the network.
[0049] In an enterprise or restricted network environment, when the first terminal successfully connects to the AP and passes the identity authentication, the network management system will allocate the terminal traffic to a specific VLAN (virtual local area network) according to the policy and identify the traffic with the target VLAN tag. By setting the target VLAN tag, it can ensure that the traffic between different VLANs is isolated to prevent interference or unnecessary access between different types of terminal devices. In addition, by allocating traffic to different VLANs, it is possible to control which terminals or users can access which resources, thereby improving network security.
[0050] Compared with the traditional virtual LAN allocation method, the present method utilizes a wireless control module to receive an association request forwarded by a wireless switching module, obtains a target VLAN in a VLAN data set based on the association request, generates an association response, and forwards the association response to the first terminal via the wireless switching module, so that a DHCP request with a target VLAN tag issued by the first terminal is received and processed by the target interface; it avoids competition caused by multiple SSIDs sharing limited wireless spectrum resources, and improves network communication stability and data transmission efficiency.
[0051] The present application also provides a virtual local area network allocation system based on an open WIFI network, which is used to implement the above-mentioned virtual local area network allocation method based on an open WIFI network, such as Figure 2 As shown, the system includes: a first terminal connected in communication, a wireless switching module and a wireless control module; The first terminal 1 is used to send an authentication request to the wireless switching module 2 when the SSID identifier in the broadcast signal transmitted by the wireless switching module 2 is identified; the authentication request carries the identity information of the first terminal 1; The wireless switching module 2 is used to receive the authentication request sent by the first terminal 1 and verify the identity information of the first terminal 1 according to the authentication request; The first terminal 1 is further configured to send an association request to the wireless switching module 2 when receiving the identity verification information from the wireless switching module 2, wherein the association request carries the access information of the first terminal 1; The wireless switching module 2 is further used to obtain the association request sent by the first terminal 1 and forward it to the wireless control module 3; The wireless control module 3 is used to obtain the target VLAN corresponding to the association request in the VLAN data set and generate an association response; send the target VLAN and the association response to the wireless switching module 2; the VLAN data set includes multiple VLANs; The wireless switching module 2 is further used to create a target interface according to the target VLAN and feed back an association response to the first terminal 1; The wireless switching module 2 is also used to determine the target VLAN to which the current DHCP request belongs according to the target VLAN tag when receiving the DHCP request with the target VLAN tag sent by the first terminal 1, and transmit the current DHCP request to the corresponding target interface for processing.
[0052] The present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the virtual local area network allocation method based on an open WIFI network as described in the above embodiment.
[0053] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. A virtual local area network allocation method based on an open WIFI network, applied to a wireless switching module, characterized in that: The following steps are involved: receiving an authentication request sent by a first terminal, and verifying the identity information of the first terminal according to the authentication request; the authentication request is generated when the first terminal recognizes the SSID identifier; the authentication request carries the identity information of the first terminal; When the identity information of the first terminal is verified to be passed, obtaining an association request sent by the first terminal and forwarding it to the wireless control module; the association request carries the MAC address of the first terminal; receiving a target VLAN and an association response sent by the wireless control module; the target VLAN is obtained by the wireless control module in a VLAN data set according to the association request; the association response includes information allowing the first terminal to access; the VLAN data set includes a plurality of VLANs; A target interface is created according to the target VLAN, and the association response is fed back to the first terminal; the target interface is used to receive a DHCP request with a target VLAN tag sent by the first terminal.
2. A virtual local area network allocation method based on an open WIFI network according to claim 1, characterized in that: The following steps are also included: When a DHCP request with a target VLAN tag sent by the first terminal is received, the target VLAN to which the current DHCP request belongs is determined and stored according to the target VLAN tag, and the current DHCP request is transmitted to the corresponding target interface for processing.
3. A virtual local area network allocation method based on an open WIFI network according to claim 1, characterized in that: Before receiving the authentication request sent by the first terminal, the method further includes the following steps: A broadcast signal is transmitted periodically; the broadcast signal includes an SSID identifier.
4. A virtual local area network allocation method based on an open WIFI network, applied to a wireless control module, characterized in that: The following steps are involved: receiving an association request forwarded by a wireless switching module; the association request is sent by a first terminal to the wireless switching module; the association request carries access information of the first terminal; The target VLAN corresponding to the association request is obtained in the VLAN data set, and an association response is generated; the target VLAN and the association response are sent to the wireless switching module; the association response includes information allowing the first terminal to access; the VLAN data set includes multiple VLANs.
5. A method for allocating a virtual local area network based on an open WIFI network according to claim 4, characterized in that: Obtaining a target VLAN corresponding to the association request in the VLAN data set specifically includes the following steps: identifying, according to the MAC address in the association request, a plurality of assignable VLANs in the VLAN data set corresponding to the first terminal; A VLAN with the least number of corresponding total terminals in the assignable VLANs is selected and marked as a target VLAN.
6. A method for allocating a virtual local area network based on an open WIFI network according to claim 5, characterized in that: The following steps are also included: When the number of terminal devices corresponding to the VLAN in the VLAN data set is equal to a preset threshold, the terminal device information corresponding to the VLAN is cleared.
7. A virtual local area network allocation method based on an open WIFI network, applied to a first terminal, characterized in that: The following steps are involved: When an SSID identifier in a broadcast signal transmitted by the wireless switching module is identified, an authentication request is sent to the wireless switching module; The authentication request carries the identity information of the first terminal; When receiving the result that the wireless switching module verifies the identity information as passed, sending an association request to the wireless switching module; the association request carries the access information of the first terminal; Receive the association response forwarded by the wireless switching module, and send a DHCP request with a target VLAN tag to the wireless switching module; the association response is sent to the wireless switching module by the wireless control module; the association response includes information allowing the first terminal to access.
8. A virtual local area network allocation system based on an open WIFI network, used to implement the virtual local area network allocation method based on an open WIFI network as described in any one of claims 1 to 7, characterized in that: The system comprises: a first terminal in communication connection, a wireless switching module and a wireless control module; The first terminal is configured to send an authentication request to the wireless switching module when identifying the SSID identifier in the broadcast signal transmitted by the wireless switching module; the authentication request carries the identity information of the first terminal; The wireless switching module is used to receive an authentication request sent by the first terminal, and verify the identity information of the first terminal according to the authentication request; The first terminal is further configured to send an association request to the wireless switching module when receiving a signal from the wireless switching module that the identity information has been verified; the association request carries the MAC address of the first terminal; The wireless switching module is further used to obtain the association request sent by the first terminal and forward it to the wireless control module; The wireless control module is used to obtain a target VLAN corresponding to the association request in the VLAN data set and generate an association response; send the target VLAN and the association response to the wireless switching module; the VLAN data set includes a plurality of VLANs; The wireless switching module is further used to create a target interface according to the target VLAN and feed back the association response to the first terminal; The wireless switching module is further configured to determine the target VLAN to which the current DHCP request belongs according to the target VLAN tag when receiving the DHCP request with the target VLAN tag sent by the first terminal, and transmit the current DHCP request to the corresponding target interface for processing.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for allocating a virtual local area network based on an open WIFI network as claimed in any one of claims 1 to 7 are implemented.