VLAN (Virtual Local Area Network) control method and related equipment

By sending VLAN control messages at the data link layer to automatically establish VLAN data links, the problems of poor VLAN control flexibility and high system overhead in existing technologies are solved, and automated VLAN management without manual configuration is achieved.

CN122053288APending Publication Date: 2026-05-15HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN GOKE MICROELECTRONICS CO LTD
Filing Date
2026-03-24
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing VLAN control methods suffer from poor flexibility and high system overhead. In particular, the automatic identification and configuration of VLAN functions require manual configuration and cross-protocol layer interaction, leading to inefficiency.

Method used

By sending VLAN control messages after the physical link is established, a VLAN data link is automatically established. VLAN identification messages and start messages are used to enable automatic identification and joining of target clients, avoiding cross-layer interaction and completing VLAN configuration directly at the data link layer.

Benefits of technology

It simplifies VLAN management operations, improves the flexibility of VLAN control, reduces system processing overhead, and realizes an automated VLAN creation and configuration closed loop that does not require manual configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053288A_ABST
    Figure CN122053288A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Ethernet, and provides a VLAN control method and related equipment, and the method comprises the steps: sending a VLAN control message to automatically establish a VLAN data link with a target client after a physical link with a plurality of clients is established. According to the VLAN control method, the VLAN control flexibility can be improved, and the system overhead can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Ethernet technology, and in particular to a VLAN control method and related equipment. Background Technology

[0002] Ethernet is commonly used in scenarios where a single network cable connects a physical network. The bandwidth of this cable is shared by all devices within the same broadcast domain, lacking logical isolation and making it impossible to create multiple independent logical networks on the physical link. This limits resource utilization, scalability, and security. To achieve single-line multiplexing, Virtual Local Area Networks (VLANs) can be created. VLANs logically divide the network, creating one or more virtual links on the physical link, resulting in high cable utilization and good scalability.

[0003] Features and limitations of existing VLAN automatic identification and control schemes: 1. Link Layer Discovery Protocol (LLDP): Location: Link layer discovery protocol, used for device information announcement and capability discovery.

[0004] Limitations: It is only responsible for discovery and does not configure VLANs. The VLAN function still needs to be implemented in conjunction with manual configuration or other protocols (such as the General VLAN Registration Protocol (GVRP)).

[0005] 2. GVRP: Location: A VLAN registration protocol based on GARP, enabling automatic registration and synchronization of VLAN information between switches.

[0006] Limitations: Primarily applicable to switch networks, requiring widespread GVRP support from devices; does not involve dynamic distribution of port VLAN IDs or client configuration, only automatically creating VLANs on the switch side; complex configuration process, requiring GVRP to be enabled and management policies configured on each switching node.

[0007] 3. Patent documents (e.g., CN116321325A - A management VLAN switching method, device, electronic device and storage medium): Location: Switches its own management VLAN through Dynamic Host Configuration Protocol (DHCP) message exchange; Limitations: It relies on the Internet Protocol (IP) stack and DHCP functionality. Deployment requires ensuring the availability of the network layer and above. If the IP stack is not initialized, DHCP will not work, and the system startup process will be affected. The DHCP protocol operates at the application layer, while VLANs operate at the data link layer. The two are at different Open Systems Interconnection (OSI) layers, and cross-protocol layer interaction increases processing overhead and results in low overall interaction efficiency. The created VLANs are only used for switching their own management VLANs and are not used for business interaction.

[0008] It is evident that current VLAN control methods suffer from poor flexibility and high system overhead. Summary of the Invention

[0009] This application provides a VLAN control method and related equipment, which can solve the problems of poor flexibility and high system overhead in VLAN control.

[0010] In a first aspect, embodiments of this application provide a VLAN control method applied to a server, the method comprising: After establishing physical links with several clients, a VLAN control message is sent to automatically establish a VLAN data link with the target client, including the target client.

[0011] Optionally, VLAN control messages include VLAN identification messages and VLAN activation messages; Sending VLAN control messages to automatically establish a VLAN data link with the target client includes: Broadcast VLAN identification messages to identify the target client from among several clients based on the VLAN identification messages; Create the target VLAN; Send a VLAN start message corresponding to the target VLAN to the target client so that the target client can join the target VLAN according to the VLAN start message.

[0012] Optionally, the target client can be identified from several clients based on the VLAN identification message, including: Receive VLAN identification success messages returned by at least some clients after they have completed the verification based on the VLAN identification message and the verification is successful; The client that sends the VLAN identification success message will be identified as the target client.

[0013] Optionally, the VLAN identification message includes a target type field, which indicates that the corresponding client supports VLAN auto-control. The client verification is successful when the client's protocol type matches the target type field and the VLAN identification message also includes a VLAN identification message. The VLAN identification message is used to indicate that the candidate link between the server and the client supports automatic VLAN control.

[0014] Optionally, the VLAN startup message includes a VLAN startup message and an identifier for the target VLAN. The VLAN startup message is used to notify the target VLAN that it has been started. Send a VLAN startup message corresponding to the target VLAN to the target client, so that the target client joins the target VLAN according to the VLAN startup message, including: Send a VLAN startup message corresponding to the target VLAN to the target client, so that the target client can join the target VLAN after receiving the VLAN startup message from the VLAN startup message and according to the identifier.

[0015] This application provides a VLAN control method applied to a target client, which includes several clients that have established physical links with a server. The method includes: Upon receiving a VLAN control message from the server, a VLAN data link is automatically established between the server and the VLAN control message.

[0016] Optionally, VLAN control messages include VLAN identification messages and VLAN activation messages; Upon receiving a VLAN control message from the server, an automatic VLAN data link is established between the server and the VLAN control message, including: Upon receiving a VLAN identification message from the server, the VLAN identification message is verified. Upon successful verification, a VLAN identification success message is sent to the server to receive the VLAN startup message sent by the server after receiving the VLAN identification success message. The VLAN startup message is used to indicate that the server has created the target VLAN. Join the target VLAN based on the VLAN startup message.

[0017] Optionally, the VLAN identification message includes a target type field, which indicates that the corresponding client supports VLAN auto-control. The target client's protocol type matches the target type field; Verification of VLAN identification messages includes: The verification passes when the VLAN identification message includes a VLAN identification message, which indicates that the candidate link between the server and the client supports automatic VLAN control.

[0018] Secondly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the VLAN control method described above.

[0019] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned VLAN control method.

[0020] The above-mentioned solution in this application has the following beneficial effects: In the embodiments of this application, after establishing a physical link with several clients, a VLAN control message is sent to automatically establish a VLAN data link with the target client. When the target client, which exists among several clients, receives the VLAN control message sent by the server, it automatically establishes a VLAN data link with the server based on the VLAN control message. The automatic establishment of the VLAN data link with the target client directly by sending a VLAN control message after establishing the physical link greatly simplifies management operations, eliminates the need for manual configuration, and automatically establishes VLANs at the data link layer. This single-layer operation improves the flexibility of VLAN control and reduces system processing overhead across protocol layers.

[0021] Other beneficial effects of this application will be described in detail in the following detailed description section. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating a VLAN control method applied to a server according to an embodiment of this application; Figure 2 A flowchart illustrating a VLAN control method applied to a target server according to an embodiment of this application; Figure 3 This is a schematic diagram of an Ethernet scenario provided in an embodiment of this application; Figure 4 This is a schematic diagram of an Ethernet scenario two provided in an embodiment of this application; Figure 5A schematic diagram of a VLAN scenario provided in an embodiment of this application; Figure 6 A schematic diagram of VLAN scenario two provided in an embodiment of this application; Figure 7 This is a schematic flowchart illustrating a specific step in the VLAN control method provided in an embodiment of this application. Figure 8 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0024] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0025] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0026] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0027] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0028] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0029] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0030] To address the issues of poor flexibility and high system overhead in existing VLAN control methods, this application provides a VLAN control method. This method automatically establishes a VLAN data link with a target client by sending a VLAN control message after a physical link is established with several clients. When the target client receives the VLAN control message from the server, it automatically establishes a VLAN data link with the server based on the VLAN control message. The automatic establishment of the VLAN data link with the target client directly through sending a VLAN control message after the physical link is established greatly simplifies management operations, eliminates the need for manual configuration, and automatically establishes VLANs at the data link layer. This single-layer approach improves the flexibility of VLAN control and reduces system processing overhead across protocol layers.

[0031] The following is an exemplary description of the VLAN control method applied to the server provided in this application.

[0032] like Figure 1 As shown, the VLAN control method applied to the server provided in this application includes the following steps: Step 11: After establishing physical links with several clients, send VLAN control messages to automatically establish VLAN data links with the target clients, including the target clients.

[0033] The aforementioned servers are devices such as switches and routers, while the aforementioned clients are terminal devices such as computers, printers, televisions, and set-top boxes. When a VLAN connection is established between the server and the client through a relay device, the relay device can act as both a server and a client.

[0034] The target client mentioned above is a client that supports automatic VLAN control to automatically join the target VLAN.

[0035] It should be noted that, since the above VLAN control scheme only requires the exchange of VLAN control messages at the data link layer, operating at the same layer as the VLAN and without cross-layer interaction, it is more efficient; it requires no application layer or network layer intervention, thus possessing higher compatibility and scenario adaptability; and it has network availability from startup, unaffected by upper-layer services such as DHCP. Therefore, the entire scheme provides a pattern recognition and automatic control method that operates independently at the data link layer.

[0036] Compared to GVRP and LLDP technologies, which are primarily designed for switch networks and require unified enabling and policy configuration across multiple nodes, this solution deeply integrates protocol interaction with the VLAN configuration process, achieving automated VLAN configuration for discovery or registration mechanisms. It eliminates the need for complex manual configuration across multiple nodes, reducing management overhead, saving manpower, and improving availability and deployment efficiency. It is adaptable to servers, embedded devices, and terminals, enabling more universal dynamic VLAN configuration capabilities.

[0037] Overall, it solves the problems of poor flexibility and high system overhead in existing VLAN control technologies, and can improve the flexibility of VLAN control and reduce the system processing overhead across protocol layers.

[0038] The aforementioned VLAN control messages include VLAN identification messages and VLAN activation messages.

[0039] The VLAN identification message may include a target type field, which indicates that the corresponding client supports VLAN auto-control.

[0040] A VLAN startup message can include a VLAN startup message and the identifier of the target VLAN (such as a VLAN ID). The VLAN startup message is used to notify the target VLAN that it has been started.

[0041] The specific implementation process of the above steps may include: after the server starts, listening for network port enable messages. If the network port is enabled, it means that the physical link has been successfully established, and the VLAN creation process can be started.

[0042] In some examples, the VLAN switch status can also be set. After the physical link is successfully established, the VLAN switch status is read. If it is enabled, the VLAN creation process is started.

[0043] Please refer to the following: Figure 7 The steps described above for sending VLAN control messages to automatically establish a VLAN data link with the target client specifically include: The first step is to broadcast a VLAN identification message to identify the target client from among several clients based on the VLAN identification message.

[0044] Specifically, during the VLAN creation process, VLAN identification messages can be broadcast repeatedly for several seconds, such as 50-60 seconds. If a client receives a VLAN identification message, and at least some of these clients successfully verify the message, they can reply with a VLAN identification success message to the server. In other words, the server can receive VLAN identification success messages returned by at least some clients after successful verification based on the VLAN identification message; thus, the client that sent the VLAN identification success message is identified as the target client.

[0045] It should be noted that the target type field included in the VLAN identification message can distinguish whether the corresponding client supports VLAN auto-control. If the client's protocol type matches the target type field, the client is considered to support VLAN auto-control; otherwise, the client is considered not to support VLAN auto-control.

[0046] For example, the fields included in the VLAN identification message, VLAN startup message, VLAN identification success message, and VLAN startup success message of this application are shown in Table 1: Table 1

[0047] In order to distinguish it from traditional Ethernet packets, avoid affecting the normal function of Ethernet, and avoid the already assigned protocol type, this embodiment of the application adopts the extended Ethernet frame type 0xAAAA as the frame type of the VLAN control message.

[0048] The frame type is the aforementioned target type field, which can be filled with a value like 0xAAAA in the Type field of all VLAN control messages / Ethernet frames. Of course, in other examples, the Ethernet frame type can also be other forms, as long as it is different from the frame type in traditional Ethernet messages.

[0049] It is understandable that devices that support this solution will match and identify the target type field and receive this type of message. Subsequently, they can parse the control message and VLAN ID in the Data field and perform corresponding processing to achieve automatic VLAN control. Devices that do not support this function will ignore this type of message and cannot achieve automatic VLAN control with the help of this solution, but can ensure that normal network communication is not interfered with.

[0050] In this embodiment, setting the target type field and extending the control message does not affect the original Ethernet communication, while enabling automatic VLAN control for some clients.

[0051] Therefore, if the protocol type of at least some clients matches the target type field, it means that these clients can recognize the VLAN identification message and can directly verify the message, or verify the message in combination with the current state of the client.

[0052] For example, when a client starts up, it can record its initial state as STATUS_INIT. After successfully establishing a physical link with the server, it can listen for VLAN identification packets. If the target type field matches, the client supports automatic control and can identify and accept this type of packet. Furthermore, while the current state machine is still in STATUS_INIT, the VLAN identification packets can be verified.

[0053] Specifically, when the client's protocol type matches the target type field, and the VLAN identification message also includes a VLAN identification message, the client verification is successful, wherein the VLAN identification message is used to indicate that the candidate link between the server and the client supports automatic VLAN control.

[0054] The aforementioned VLAN identification message (CMD_VLAN) is used for link VLAN identification and can indicate that the link supports VLAN creation.

[0055] If the message verification is successful, the client's state can then transition to STATUS_VLAN_READY, and the client can return a VLAN identification success message to the server. The server can receive the VLAN identification success message and identify the client that sent the VLAN identification success message as the target client.

[0056] For example, the VLAN identification success message received by the server can carry a VLAN identification success message (CMD_VLAN_READY), which indicates that the client's VLAN identification is complete and it can be joined to the VLAN. At this point, the server can proceed to the second step.

[0057] The second step is to create the target VLAN.

[0058] The third step is to send a VLAN startup message corresponding to the target VLAN to the target client, so that the target client can join the target VLAN according to the VLAN startup message.

[0059] For example, after receiving a VLAN identification success message, the server can record the target client information and create the target VLAN. Then, it can send a VLAN start message to the client in a cyclic unicast, carrying the VLAN ID in the message.

[0060] It should be noted that the VLAN startup message (CMD_VLAN_START) and the identifier of the target VLAN carried in the VLAN startup message are mainly used to notify the client to join the specified target VLAN.

[0061] For example, the server can use its own functions to set the target VLAN number and then bind a specific port to that VLAN to create the target VLAN.

[0062] Specifically, a VLAN startup message corresponding to the target VLAN is sent to the target client, so that the target client can join the target VLAN according to the identifier after receiving the VLAN startup message from the VLAN startup message.

[0063] In some embodiments of this application, after joining the target VLAN, the target client can send a VLAN startup success message to the server (this message indicates that the target client has joined the target VLAN). After receiving the VLAN startup success message, the server stops sending VLAN identification messages. Subsequently, the target client and the server can perform different service interactions through physical links and VLANs.

[0064] Alternatively, if the client receives a VLAN start message and its current state is STATUS_VLAN_READY, it can create a sub-interface and add it to the specified target VLAN based on the identifier (VLAN ID) carried in the message.

[0065] The client can now switch its state to STATUS_VLAN_STARTED and can also reply with a VLAN startup success message.

[0066] This solution carries parameters such as the target VLAN identifier in the VLAN startup message, enabling VLAN startup notification and configuration distribution to be completed in a single interaction. Through protocol and message settings and handshake interaction, it automatically completes VLAN establishment, configuration, and status synchronization, not only discovering / registering VLANs but also directly configuring and starting them, forming a configuration closed loop and greatly simplifying management operations.

[0067] It should also be emphasized that the above embodiments mainly describe the interaction process between the client and server in Ethernet single-line multiplexing mode recognition and automatic control mode. When a relay device is present, the relay device simultaneously functions as both a server and a client. After the relay device, acting as a client, establishes a target VLAN with the server, it then, acting as a server, notifies the client to establish the target VLAN in the same way. This process can be referred to the aforementioned embodiments and will not be elaborated upon here.

[0068] The VLAN control method for target clients provided in this application will be described exemplarily below.

[0069] like Figure 2 As shown, the VLAN control method for target clients provided in this application includes the following steps: Step 21: Upon receiving a VLAN control message from the server, automatically establish a VLAN data link with the server based on the VLAN control message.

[0070] The target client includes several clients that have established a physical link with the server.

[0071] In some embodiments of this application, the step of automatically establishing a VLAN data link with the server based on the VLAN control message when the server sends a VLAN control message specifically includes: The first step is to verify the VLAN identification message when the VLAN identification message is received from the server.

[0072] The VLAN identification message includes a target type field, which indicates that the corresponding client supports VLAN auto-control, and the protocol type of the target client matches the target type field.

[0073] Specifically, the verification passes when the VLAN identification message includes a VLAN identification message, where the VLAN identification message is used to indicate that the candidate link between the server and the client supports automatic VLAN control.

[0074] The second step is to send a VLAN identification success message to the server when the verification is successful, so as to receive the VLAN startup message sent by the server after receiving the VLAN identification success message. The VLAN startup message is used to indicate to the server that the target VLAN has been created.

[0075] For example, if verification fails, no response message is sent to the server. If the protocol type does not match, devices that do not support this function will ignore that type of message, ensuring normal network communication is not interfered with.

[0076] The third step is to join the target VLAN based on the VLAN startup message.

[0077] For example, after receiving the VLAN startup message, the target client creates a sub-interface and joins the target VLAN based on the identifier of the target VLAN carried in the message.

[0078] After the target client joins the target VLAN, it can reply to the server with a VLAN startup success message to indicate that it has successfully joined the target VLAN. The target client and server can then interact with each other for different services via physical links and VLANs.

[0079] The above-described interaction process between the target client and the server can also be referenced from the corresponding server-side interaction process, which will not be elaborated here.

[0080] The method of this application will be illustrated below with a specific example.

[0081] Common use cases of Ethernet include Figure 3 As shown, this includes a server and a client, which are connected via Ethernet. Another common use case is... Figure 4 As shown, the network includes a server, a client, and a relay. The server and the relay, as well as the relay and the client, are connected via Ethernet. In both scenarios, a single network cable connects to a physical network, and the bandwidth of the same network cable is shared by all devices in the same broadcast domain. There is a lack of logical isolation, making it impossible to divide the physical link into multiple independent logical networks.

[0082] To achieve single-line multiplexing, VLANs can be created. Common VLAN use cases include... Figure 5 As shown, the server and client are connected via Ethernet and VLAN. Another common use case is... Figure 6 As shown, the server and the relay, as well as the relay and the client, are connected via Ethernet and VLAN.

[0083] The specific process of the method in this application is as follows: Figure 7 As shown, both the server and client start and listen for network interface enablement. After establishing a physical link, the server determines whether VLAN needs to be enabled after enabling the network interface. If so, it sends a VLAN identification message, and the client listens for VLAN identification messages after enabling the network interface.

[0084] Upon receiving a VLAN identification message, the server performs verification. If the verification passes, a VLAN identification success message is returned. The server creates the VLAN and sends a VLAN startup message. The client accesses the VLAN based on this message and replies with a VLAN startup success message. The VLAN is then automatically established.

[0085] It is worth mentioning that after the physical link is established, the VLAN data link between the user and the target client can be automatically established by sending VLAN control messages. This greatly simplifies the management operation, eliminates the need for manual configuration, and automatically establishes VLANs at the data link layer. It only operates at a single layer, improving the flexibility of VLAN control and reducing the system processing overhead across protocol layers.

[0086] Furthermore, the method of this application has the following advantages: 1. Integrated design of protocol and architecture: It achieves an automated closed loop for dynamic VLAN creation and configuration, eliminating the need for manual configuration and saving manpower.

[0087] 2. Automatic identification and control of Layer 2 VLANs without relying on upper-layer protocols: By defining control messages through extended protocols, VLAN function identification and control are completed at Layer 2. This solution does not require intervention from the application layer or network layer, has no cross-layer interaction, and has higher deployment efficiency.

[0088] 3. VLAN control messages carrying control information and VLAN ID parameters: The VLAN ID parameter is carried in the VLAN startup message, enabling VLAN startup notification and configuration distribution to be completed in a single interaction.

[0089] 4. End-to-end VLAN establishment process: It defines a complete protocol interaction of identification → activation → confirmation, ensuring a closed loop for automatic VLAN configuration.

[0090] like Figure 8 As shown, an embodiment of this application provides a terminal device, wherein the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 8 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 executes the computer program D102 to implement the steps in any of the above method embodiments.

[0091] Specifically, when the processor D100 executes the computer program D102, it automatically establishes a VLAN data link with the target client by sending a VLAN control message after establishing a physical link with several clients.

[0092] Furthermore, when the processor D100 executes the computer program D102, it can also automatically establish a VLAN data link with the server based on the VLAN control message it receives from the server.

[0093] After establishing a physical link, the VLAN data link between the user and the target client is automatically established by sending VLAN control messages. This greatly simplifies management operations, eliminates the need for manual configuration, and automatically establishes VLANs at the data link layer. It operates only at a single layer, improving the flexibility of VLAN control and reducing system processing overhead across protocol layers.

[0094] The processor D100 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0095] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.

[0096] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0097] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0098] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to the VLAN control method device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0099] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0100] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0101] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A VLAN control method, characterized in that, Applied to the server side, the method includes: After establishing physical links with several clients, a VLAN control message is sent to automatically establish a VLAN data link with the target client, including the target client.

2. The method according to claim 1, characterized in that, The VLAN control message includes a VLAN identification message and a VLAN activation message; The sending of VLAN control messages to automatically establish a VLAN data link with the target client includes: Broadcast the VLAN identification message to identify the target client from among the plurality of clients based on the VLAN identification message; Create the target VLAN; Send a VLAN startup message corresponding to the target VLAN to the target client so that the target client joins the target VLAN according to the VLAN startup message.

3. The method according to claim 2, characterized in that, The step of identifying the target client from among the plurality of clients based on the VLAN identification message includes: Receive a VLAN identification success message returned by at least some of the clients after they have completed the verification based on the VLAN identification message and the verification is successful; The client that sends the VLAN identification success message is identified as the target client.

4. The method according to claim 3, characterized in that, The VLAN identification message includes a target type field, which indicates that the corresponding client supports automatic VLAN control. The client verification is successful when the client's protocol type matches the target type field and the VLAN identification message also includes a VLAN identification message, wherein the VLAN identification message is used to indicate that the candidate link between the server and the client supports automatic VLAN control.

5. The method according to any one of claims 2 to 4, characterized in that, The VLAN startup message includes a VLAN startup message and the identifier of the target VLAN. The VLAN startup message is used to notify the target VLAN that it has been started. Sending a VLAN startup message corresponding to the target VLAN to the target client, so that the target client joins the target VLAN according to the VLAN startup message, includes: Send a VLAN startup message corresponding to the target VLAN to the target client, so that the target client can join the target VLAN according to the identifier after receiving the VLAN startup message from the VLAN startup message.

6. A VLAN control method, characterized in that, Applied to a target client, the target client comprising several clients that have established a physical link with the server, the method includes: Upon receiving a VLAN control message from the server, a VLAN data link is automatically established between the server and the VLAN control message.

7. The VLAN control method according to claim 6, characterized in that, The VLAN control message includes a VLAN identification message and a VLAN activation message; The step of automatically establishing a VLAN data link with the server based on the VLAN control message upon receiving it includes: Upon receiving a VLAN identification message from the server, the VLAN identification message is verified. Upon successful verification, a VLAN identification success message is sent to the server to receive a VLAN startup message sent by the server after receiving the VLAN identification success message. The VLAN startup message is used to indicate that the server has created the target VLAN. Join the target VLAN based on the VLAN startup message.

8. The VLAN control method according to claim 7, characterized in that, The VLAN identification message includes a target type field, which indicates that the corresponding client supports automatic VLAN control. The protocol type of the target client matches the target type field; The verification of the VLAN identification message includes: The verification passes when the VLAN identification message includes a VLAN identification message, wherein the VLAN identification message is used to indicate that the candidate link between the server and the client supports automatic VLAN control.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the VLAN control method as described in any one of claims 1 to 8.

10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the VLAN control method as described in any one of claims 1 to 8.