Method and apparatus for implementing cross-VLAN wake-up of a terminal based on a virtual machine controller

By creating a virtual machine in a cloud server and configuring a VLAN, and using the virtual machine to pass wake-up commands, the hardware cost and cumbersome deployment problems of terminal wake-up in different VLAN environments are solved, and simple and efficient cross-VLAN wake-up is achieved.

CN116132202BActive Publication Date: 2025-07-18WUHAN OPENKER COMPUTING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211558875.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2025-07-18
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

In different VLAN network environments in school computer rooms, the prior art requires the deployment of physical proxy controllers in each VLAN environment, resulting in high hardware costs and cumbersome deployment.

Method used

By creating a virtual machine in a cloud server, establishing the first and second virtual machine network cards in the virtual machine, configuring VLANs and writing ubuntu images, using the virtual machine to pass a wake-up command to the terminal of the corresponding VLAN, achieving cross-VLAN wake-up.

Benefits of technology

Save hardware costs, simplify the deployment process, and realize the wake-up function across VLANs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116132202B_ABST
    Figure CN116132202B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for realizing cross-VLAN wake-up of terminals based on a virtual machine controller, which relates to the technical field of desktop cloud. The method includes creating a virtual machine in a cloud server and establishing a first virtual machine network card and a second virtual machine network card in the created virtual machine; allocating the IP of the first virtual machine network card to the subnet corresponding to the network card of the cloud server management network IP, and allocating the IP of the second virtual machine network card to the subnet corresponding to the empty network card in the cloud server, where the empty network card is connected to the trunk port of a switch; configuring all VLANs to the virtual machine and writing the configured VLANs into the ubuntu image of the virtual machine; passing the wake-up command sent by the cloud server to the trunk port through the virtual machine to send the wake-up command to the terminals in the corresponding VLANs, so as to realize cross-VLAN wake-up of terminals. The deployment of the present invention is simple and greatly saves costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of desktop cloud, and particularly relates to a method and device for realizing cross-VLAN wake-up of terminals based on a virtual machine controller. Background Art

[0002] When applying desktop cloud to school computer rooms, due to the complex school environment network and a large number of school terminal users, different classes and different classrooms are in different VLAN (Virtual Local Area Network) environments, and the network environments of different VLANs cannot communicate directly.

[0003] To solve the communication problem of different VLAN network environments, the current approach is: when implementing the terminal wake-up function, a physical proxy controller is installed in each VLAN environment. The controller can communicate with the main control, and then forward the instructions of the main control to the terminal. The communication problem in different VLAN network environments is solved by installing a physical proxy controller in each VLAN environment. However, for a multi-VLAN environment, this solution will result in too high deployment hardware costs and a more cumbersome deployment method. Summary of the Invention

[0004] Aiming at the defects existing in the prior art, the purpose of the present invention is to provide a method and device for realizing cross-VLAN wake-up of terminals based on a virtual machine controller, which is simple to deploy and greatly saves costs.

[0005] To achieve the above purpose, a method for realizing cross-VLAN wake-up of terminals based on a virtual machine controller provided by the present invention specifically includes the following steps:

[0006] Create a virtual machine in the cloud server, and establish a first virtual machine network card and a second virtual machine network card in the created virtual machine;

[0007] Assign the IP of the first virtual machine network card to the subnet corresponding to the network card of the cloud server management network IP, and assign the IP of the second virtual machine network card to the subnet corresponding to the empty network card in the cloud server, where the empty network card is connected to the trunk port of the switch;

[0008] Configure all VLANs to the virtual machine, and write the configured VLAN into the ubuntu image of the virtual machine;

[0009] Pass the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, and realize cross-VLAN wake-up of the terminal.

[0010] Based on the above technical solution, creating a virtual machine in the cloud server and establishing a first virtual machine network card and a second virtual machine network card in the created virtual machine, the specific steps include:

[0011] Create a virtual machine of ubuntu in the cloud server, and establish 2 virtual machine network cards in the desktop of the created virtual machine, namely the first virtual machine network card and the second virtual machine network card.

[0012] Based on the above technical solution, there are at least two physical network cards in the cloud server. One of the physical network cards in the cloud server is used as the management network of the cloud server, and the other physical network card is an empty network card, and this physical network card can access all VLANs.

[0013] Based on the above technical solution, writing the configured VLAN into the ubuntu image of the virtual machine, the specific steps include:

[0014] When the virtual machine is powered on, write the configured VLAN into the virtual machine;

[0015] The virtual machine calls the linux command and the vconfig command to write the configured VLAN into the ubuntu image.

[0016] Based on the above technical solution, passing the wake-up command sent by the cloud server to the trunk port through the virtual machine to send the wake-up command to the terminal where the corresponding VLAN is located, so as to realize cross-VLAN wake-up of the terminal, the specific steps include:

[0017] When the virtual machine is in the powered-on state and the cloud server triggers the wake-up function, send the wake-up command to the virtual machine;

[0018] The virtual machine receives the virtual machine and sends the wake-up command to the trunk port to send the wake-up command to the terminal where the corresponding VLAN is located, so as to realize cross-VLAN wake-up of the terminal.

[0019] An apparatus for realizing cross-VLAN wake-up of a terminal based on a virtual machine controller provided by the present invention includes:

[0020] A creation module, which is used to create a virtual machine in the cloud server and establish a first virtual machine network card and a second virtual machine network card in the created virtual machine;

[0021] An allocation module, which is used to allocate the IP of the first virtual machine network card to the subnet corresponding to the network card of the cloud server management network IP, and allocate the IP of the second virtual machine network card to the subnet corresponding to the empty network card in the cloud server, and the empty network card is connected to the trunk port of the switch;

[0022] A configuration module, which is used to configure all VLANs to virtual machines and write the configured VLANs into the ubuntu image of the virtual machines;

[0023] A wake-up module, which is used to transfer the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminals where the corresponding VLANs are located, realizing cross-VLAN wake-up of terminals.

[0024] Based on the above technical solution, creating a virtual machine in the cloud server and establishing a first virtual machine network card and a second virtual machine network card in the created virtual machine, the specific process includes:

[0025] Create an ubuntu virtual machine in the cloud server and establish 2 virtual machine network cards in the desktop of the created virtual machine, namely the first virtual machine network card and the second virtual machine network card.

[0026] Based on the above technical solution, there are at least two physical network cards in the cloud server. One of the physical network cards in the cloud server is used as the management network of the cloud server, and the other physical network card is an empty network card, and this physical network card can access all VLANs.

[0027] Based on the above technical solution, the process of writing the configured VLANs into the ubuntu image of the virtual machine specifically includes:

[0028] When the virtual machine boots up, write the configured VLANs into the virtual machine;

[0029] The virtual machine calls the linux command and the vconfig command to write the configured VLANs into the ubuntu image.

[0030] Based on the above technical solution, the process of transferring the wake-up command sent by the cloud server to the trunk port through the virtual machine to send the wake-up command to the terminals where the corresponding VLANs are located, realizing cross-VLAN wake-up of terminals, specifically includes:

[0031] When the virtual machine is in the boot state and the cloud server triggers the wake-up function, send the wake-up command to the virtual machine;

[0032] The virtual machine receives the virtual machine and sends the wake-up command to the trunk port to send the wake-up command to the terminals where the corresponding VLANs are located, realizing cross-VLAN wake-up of terminals.

[0033] Compared with the prior art, the advantages of the present invention are as follows: Cross-VLAN wake-up is achieved by using virtual machines. Compared with the previous method of deploying a box in each classroom with the same VLAN to forward VLAN broadcast packets, the present invention can save the hardware cost of the box. At the same time, compared with another method of creating many virtual machines, each virtual machine corresponding to a VLAN and assigned to different classrooms, the present invention only requires one virtual machine, with simple deployment and great cost savings. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0035] Figure 1 It is a flowchart of a method for realizing cross-VLAN wake-up of terminals based on a virtual machine controller in an embodiment of the present invention. DETAILED IMPLEMENTATION MANNER

[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application.

[0037] The present invention provides a method for realizing cross-VLAN wake-up of terminals based on a virtual machine controller, which completes the forwarding of broadcast wake-up packets under the VDI (Virtual Desktop Infrastructure) architecture OpensStack (a platform for building and managing private and public clouds using virtual resource pools) ML2 (a framework that can manage multiple Layer 2 technologies simultaneously) network architecture, and realizes waking up all terminals in different VLAN environments in all classrooms with one virtual machine, mainly solving the problem that currently, cross-VLAN wake-up requires installing a proxy controller in the classrooms of the specified network to be responsible for sending relevant wake-up commands. The present invention can support the realization of the cross-VLAN wake-up function in the virtual machine mode, reducing project costs. That is, it does not rely on the support of a hardware controller, uses a virtual machine to complete the functions of the hardware controller, and can also solve the communication problem between the same physical network server and clients in different VLANs.

[0038] See Figure 1 As shown, a method for realizing cross-VLAN wake-up of terminals based on a virtual machine controller provided by an embodiment of the present invention is used to solve the problem of a cloud server sending a wake-up command across a VLAN to wake up a virtual machine, and specifically includes the following steps:

[0039] S1: Create a virtual machine in the cloud server, and establish a first virtual machine network card and a second virtual machine network card in the created virtual machine;

[0040] In the present invention, creating a virtual machine in the cloud server and establishing a first virtual machine network card and a second virtual machine network card in the created virtual machine, the specific steps include: creating a virtual machine of ubuntu (a Linux operating system mainly for desktop applications) in the cloud server, and establishing 2 virtual machine network cards in the desktop of the created virtual machine, namely the first virtual machine network card and the second virtual machine network card.

[0041] S2: Assign the IP (Internet Protocol) of the first virtual machine network card to the subnet corresponding to the network card of the cloud server management network IP, and assign the IP of the second virtual machine network card to the subnet corresponding to the empty network card in the cloud server, and the empty network card is connected to the trunk port of the switch;

[0042] It should be noted that the virtual machine runs in the cloud server. There are two virtual network cards in the virtual machine. There are at least two physical network cards in the cloud server. One of the physical network cards in the cloud server is the network card used as the management network of the cloud server, which is used to access the server and perform the function of web control, and is called the management network. Another physical network card in the cloud server is an empty network card. No IP is assigned to this network card. A subnet is assigned to this network card, and the second virtual machine network card needs to use the subnet in this empty network card. Based on the virtual switch, subnets are assigned to the network cards, and the assignment method is similar to that of a real physical switch.

[0043] For the method of the present invention, when implemented, it is necessary to exclusively occupy a physical network card, and this physical network card needs to be connected to the trunk port and can access the VLAN network of all classrooms. And this physical network card can be connected to the TRUNK port of the cross-physical network and supports cross-physical network wake-up support. The trunk port can allow data packets of multiple VLANs to pass through and is generally used to connect other switches.

[0044] At the same time, when the present invention is implemented, it is necessary to know the ID, IP, and subnet mask of each VLAN of the switch used in the deployment environment. All physical switches are set with a trunk port to allow all VLANs to pass through. There is an empty physical network card left in the cloud server, which is not used for management network and mirroring, and is used to connect to the trunk port on the switch.

[0045] S3: Configure all VLANs to the virtual machine, and write the configured VLAN into the ubuntu image of the virtual machine;

[0046] In the present invention, writing the configured VLAN into the ubuntu image of the virtual machine, the specific steps include:

[0047] S301: When the virtual machine is powered on, write the configured VLAN into the virtual machine;

[0048] S302: The virtual machine invokes the linux command (a command for managing the Linux system) and the vconfig command (a VLAN configuration command) to write the configured VLAN into the ubuntu image.

[0049] That is, configure the VLANs of all classrooms in the virtual machine, and the VLAN should be the same VLAN as the network segment where the terminal is located.

[0050] S4: Pass the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, and realize cross-VLAN wake-up of the terminal.

[0051] In the present invention, the wake-up command sent by the cloud server is passed to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, and realize cross-VLAN wake-up of the terminal. The specific steps include:

[0052] S401: When the virtual machine is in the powered-on state and the cloud server triggers the wake-up function, send the wake-up command to the virtual machine;

[0053] S402: The virtual machine receives the virtual machine and sends the wake-up command to the trunk port, so as to send the wake-up command to the terminal where the corresponding VLAN is located, that is, send the wake-up command to the terminal in the corresponding VLAN, and realize cross-VLAN wake-up of the terminal. The entire cross-VLAN wake-up command can be forwarded through a powered-on virtual machine, and the deployment is simple and convenient.

[0054] In a possible implementation manner, if it is necessary to realize cross-VLAN wake-up of the terminal without using a physical network card, then the network card corresponding to the network card for managing the network needs to be set as a trunk, and the default VLAN of the trunk is set to implement the function of the ACCESS port. In this way, the function can be realized by using the network card for managing the network, and there is no need to exclusively occupy a physical network card. However, the prerequisite is that if the network card for managing the network is an ACCESS port, it must be changed to a trunk port, and the default VLANTAG (used to configure the virtual local area network tag) is modified, so that the physical VLAN communication of the management network will not be affected.

[0055] The following explains some terms in the present invention.

[0056] Regarding the definition of network physical isolation: The link layer and network layer between two networks cannot communicate directly at any time. Based on physical isolation, relevant constraints and rules are defined to ensure the security strength of the network.

[0057] Definition of network logical isolation: Generally, two or several sets of networks share a set of network devices. Configuration is performed on the network devices so that each network cannot access each other. A switch that supports VLANs can use VLAN tags to keep predefined ports in their respective broadcast domains, thereby establishing multiple logical separated networks.

[0058] For trunk ports, after setting multiple VLANs for a VLAN trunk, it is desired to transmit multiple VLANs through one port. Trunk is a technology based on the second layer (Data Link Layer) of the OSI model. For Access ports, an Access - type port can only belong to one VLAN and is generally used for ports connecting to computers.

[0059] Data sources that a trunk port can accept and forward: A pair of trunk ports connected by twisted - pair cables or two trunk ports on the same switch can transmit data packets (with or without VLAN information) intact from one end to the other.

[0060] Data sources that an Access port can accept and forward: (1) Data packets without VLAN information from a PC; (2) Data packets without VLAN information that are tagged with a VLAN at one Access port, forwarded within the switch to an Access port of the same VLAN, and then have the tag removed; (3) Data packets sent from an Access port without VLAN information, which can be accepted by a PC or an Access port.

[0061] For virtualized flat networks, a flat network is a network without tags, which requires the physical network card of the host to be directly connected to the Linux Bridge. This means that each flat network will exclusively occupy a physical network card. For virtualized VLAN networks, a VLAN Network is a network with tags.

[0062] The method for realizing cross - VLAN wake - up of terminals based on a virtual machine controller in the embodiments of the present invention realizes cross - VLAN wake - up by using virtual machines. Compared with the previous method of deploying a box in each classroom with the same VLAN to forward VLAN broadcast packets, the present invention can save the hardware cost of the box. At the same time, compared with another method of creating many virtual machines, with each virtual machine corresponding to a VLAN and being assigned to different classrooms, the present invention only requires one virtual machine, which is simple to deploy and greatly saves costs.

[0063] An apparatus for realizing cross - VLAN wake - up of terminals based on a virtual machine controller provided in the embodiments of the present invention includes a creation module, an allocation module, a configuration module, and a wake - up module.

[0064] A creation module is used to create a virtual machine in a cloud server, and establish a first virtual machine network card and a second virtual machine network card in the created virtual machine; an allocation module is used to allocate the IP of the first virtual machine network card to the subnet corresponding to the network card of the cloud server management network IP, and allocate the IP of the second virtual machine network card to the subnet corresponding to the empty network card in the cloud server, where the empty network card is connected to the trunk port of the switch; a configuration module is used to configure all VLANs to the virtual machine and write the configured VLANs into the ubuntu image of the virtual machine; a wake-up module is used to transmit the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, realizing cross-VLAN wake-up of the terminal.

[0065] In the present invention, a virtual machine is created in a cloud server, and a first virtual machine network card and a second virtual machine network card are established in the created virtual machine. The specific process includes: creating an ubuntu virtual machine in the cloud server, and establishing 2 virtual machine network cards on the desktop of the created virtual machine, namely the first virtual machine network card and the second virtual machine network card.

[0066] In the present invention, the physical network card is located in the cloud server, and the physical network card can access all VLANs.

[0067] In the present invention, writing the configured VLANs into the ubuntu image of the virtual machine, the specific process includes:

[0068] When the virtual machine is powered on, write the configured VLANs into the virtual machine;

[0069] The virtual machine calls the linux command and the vconfig command to write the configured VLANs into the ubuntu image.

[0070] In the present invention, transmitting the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, realizing cross-VLAN wake-up of the terminal. The specific process includes:

[0071] When the virtual machine is in the powered-on state and the cloud server triggers the wake-up function, send the wake-up command to the virtual machine;

[0072] The virtual machine receives the virtual machine and sends a wake-up command to the trunk port, so as to send the wake-up command to the terminal where the corresponding VLAN is located, realizing cross-VLAN wake-up of the terminal.

[0073] The above are only specific embodiments of the present application, which enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.

[0074] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.

Claims

1. A method for realizing cross-VLAN wake-up of terminals based on a virtual machine controller, characterized in that The specific steps include: Create a virtual machine in the cloud server, and establish a first virtual machine network card and a second virtual machine network card in the created virtual machine; Assign the IP of the first virtual machine network card to the subnet corresponding to the network card of the cloud server management network IP, and assign the IP of the second virtual machine network card to the subnet corresponding to the empty network card in the cloud server, where the empty network card is connected to the trunk port of the switch; Configure all VLANs to the virtual machine, and write the configured VLAN into the ubuntu image of the virtual machine; Pass the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, and realize cross-VLAN wake-up of the terminal.

2. The method for realizing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 1, wherein, The step of creating a virtual machine in the cloud server and establishing a first virtual machine network card and a second virtual machine network card in the created virtual machine specifically includes: Create an ubuntu virtual machine in the cloud server, and establish 2 virtual machine network cards on the desktop of the created virtual machine, namely the first virtual machine network card and the second virtual machine network card.

3. The method for realizing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 1, wherein: There are at least two physical network cards in the cloud server. One of the physical network cards in the cloud server is used as the network card for the cloud server management network, and the other physical network card is an empty network card, and this physical network card can access all VLANs.

4. The method for implementing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 1, wherein The step of writing the configured VLAN into the ubuntu image of the virtual machine specifically includes: When the virtual machine is powered on, write the configured VLAN into the virtual machine; The virtual machine calls the linux command and the vconfig command to write the configured VLAN into the ubuntu image.

5. The method for realizing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 1, wherein The step of passing the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, and realize cross-VLAN wake-up of the terminal specifically includes: When the virtual machine is in the powered-on state and the cloud server triggers the wake-up function, send the wake-up command to the virtual machine; The virtual machine receives the virtual machine and sends the wake-up command to the trunk port, so as to send the wake-up command to the terminal where the corresponding VLAN is located, and realize cross-VLAN wake-up of the terminal.

6. A device for implementing cross-VLAN wake-up of terminals based on a virtual machine controller, characterized in that, Including: A creation module, which is used to create a virtual machine in the cloud server and establish a first virtual machine network card and a second virtual machine network card in the created virtual machine; An allocation module, which is used to assign the IP of the first virtual machine network card to the subnet corresponding to the network card of the cloud server management network IP, and assign the IP of the second virtual machine network card to the subnet corresponding to the empty network card in the cloud server, where the empty network card is connected to the trunk port of the switch; A configuration module, which is used to configure all VLANs to the virtual machine and write the configured VLAN into the ubuntu image of the virtual machine; A wake-up module, which is used to pass the wake-up command sent by the cloud server to the trunk port through the virtual machine, so as to send the wake-up command to the terminal where the corresponding VLAN is located, and realize cross-VLAN wake-up of the terminal.

7. The device for implementing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 6, wherein The specific process of creating a virtual machine in the cloud server and establishing a first virtual machine network card and a second virtual machine network card in the created virtual machine includes: Create a virtual machine of ubuntu in the cloud server, and create two virtual machine network cards on the desktop of the created virtual machine, namely the first virtual machine network card and the second virtual machine network card.

8. The device for realizing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 6, wherein: There are at least two physical network cards in the cloud server. One of the physical network cards in the cloud server is used as the management network of the cloud server, and the other physical network card is an empty network card, and this physical network card can access all VLANs.

9. The device for implementing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 6, wherein The process of writing the configured VLAN into the ubuntu image of the virtual machine specifically includes: When the virtual machine boots up, write the configured VLAN into the virtual machine; The virtual machine calls the linux command and the vconfig command to write the configured VLAN into the ubuntu image.

10. The apparatus for implementing cross-VLAN wake-up of a terminal based on a virtual machine controller according to claim 6, wherein The process of passing the wake-up command sent by the cloud server to the trunk port through the virtual machine to send the wake-up command to the terminal where the corresponding VLAN is located to achieve cross-VLAN wake-up of the terminal specifically includes: When the virtual machine is in the powered-on state and the cloud server triggers the wake-up function, send the wake-up command to the virtual machine; The virtual machine receives the virtual machine and sends the wake-up command to the trunk port to send the wake-up command to the terminal where the corresponding VLAN is located to achieve cross-VLAN wake-up of the terminal.

Citation Information

Patent Citations

  • Server system installation method and device, system, storage medium and equipment

    CN107229492A

  • Real equipment rapid access system and method for network target range scene arrangement

    CN112202624A