CN111669358B - Method and device for processing vrouter network isolation spaces in batch - Google Patents

Method and device for processing vrouter network isolation spaces in batch Download PDF

Info

Publication number
CN111669358B
CN111669358B CN201910177212.XA CN201910177212A CN111669358B CN 111669358 B CN111669358 B CN 111669358B CN 201910177212 A CN201910177212 A CN 201910177212A CN 111669358 B CN111669358 B CN 111669358B
Authority
CN
China
Prior art keywords
target
space
vrouter
file
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910177212.XA
Other languages
Chinese (zh)
Other versions
CN111669358A (en
Inventor
程杜勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Wangsu Co Ltd
Original Assignee
Xiamen Wangsu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Wangsu Co Ltd filed Critical Xiamen Wangsu Co Ltd
Priority to CN201910177212.XA priority Critical patent/CN111669358B/en
Publication of CN111669358A publication Critical patent/CN111669358A/en
Application granted granted Critical
Publication of CN111669358B publication Critical patent/CN111669358B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers

Abstract

The invention discloses a method and a device for processing a vrouter network isolation space in batch, wherein the method comprises the following steps: receiving a space management instruction carrying a file indication identifier of a target configuration file through a vrouter controller, and inputting the space management instruction into a vrouter process; reading the target configuration file according to the file indication identifier through the vrouter process, and determining a target user state isolation space; and carrying out batch processing on tenant resources of the target user-state isolation space through the vrouter process based on the space management instruction and the target configuration file. The invention can save system resources and improve the processing efficiency of the user state isolation space.

Description

Method and device for processing voruter network isolation spaces in batches
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method and a device for processing a vrouter network isolation space in batch.
Background
In the cloud computing technology, an internet service provider can create independent network isolation spaces for a plurality of tenants in one network device through a network isolation technology, store data of each tenant in the corresponding network isolation space, and provide network services for different tenants through different network isolation spaces.
A Virtual Router (vrouter) is an important component for implementing functions such as address translation, flow control, and packet forwarding in a network isolation technology. For vrouter, a network isolation method based on a Linux kernel exists at present, and the method can respectively create network isolation spaces for each tenant in the Linux kernel and provide routing services for different tenants through different network isolation spaces. Meanwhile, a vrouter process for management can be set for each network isolation space, and when a certain network isolation space needs to be managed, the network isolation space can be managed through the vrouter process corresponding to the network isolation space.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
when a plurality of network isolation spaces need to be managed, a plurality of vrouter processes need to be operated simultaneously, so that a large amount of system resources are consumed, system resource waste is further caused, and the processing efficiency is low.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for batch processing of vrouter network isolation spaces. The technical scheme is as follows:
in a first aspect, a method for batch processing of vrouter network isolation spaces is provided, the method comprising:
receiving a space management instruction carrying a file indication identifier of a target configuration file through a vrouter controller, and inputting the space management instruction into a vrouter process;
reading the target configuration file according to the file indication identifier through the vrouter process, and determining a target user state isolation space;
and carrying out batch processing on tenant resources of the target user-state isolation space through the vrouter process based on the space management instruction and the target configuration file.
Optionally, the file indication identifier is all file names of the target configuration file;
the reading the target configuration file according to the file indication identifier through the vrouter process and determining a target user state isolation space includes:
reading all the target configuration files according to all the file names of the target configuration files through the vrouter process;
and determining all target user state isolation spaces through the vrouter process according to the space identifiers in all the target configuration files.
Optionally, before receiving, by the vrouter controller, the space management instruction that carries the file indication identifier of the target configuration file, the method further includes:
receiving a directory creation instruction carrying all file names and target directory identifiers of the target configuration files, creating a target directory based on the target directory identifiers, and adding all the target configuration files to the target directory based on all the file names.
Optionally, the file indication identifier is the target directory identifier;
the reading the target configuration file according to the file indication identifier through the vrouter process and determining a target user state isolation space includes:
reading all the target configuration files under the target directory according to the target directory identification through the vrouter process;
and determining all target user state isolation spaces through the vrouter process according to the space identifiers in all the target configuration files.
Optionally, the performing, by the vrouter process, batch processing on tenant resources of the target user-state isolation space based on the space management instruction and the target configuration file includes:
and when the space management instruction is a space adding instruction, creating target user state isolation spaces in batch based on the space adding instruction through the vrouter process, and setting tenant resources recorded by the target configuration file to the corresponding target user state isolation spaces.
Optionally, the performing, by the vrouter process, batch processing on tenant resources of the target user-state isolation space based on the space management instruction and the target configuration file includes:
and when the space management instruction is a space deletion instruction, deleting the tenant resources of the target user-state isolation space and the target user-state isolation space through the vrouter process based on the space deletion instruction and the target configuration file.
Optionally, the performing, by the vrouter process, batch processing on tenant resources of the target user-state isolation space based on the space management instruction and the target configuration file includes:
when the space management instruction is a space reloading instruction, acquiring a loaded configuration file and the target configuration file corresponding to the target user-state isolation space through the vrouter process based on the space reloading instruction;
comparing the loaded configuration file corresponding to the target user state isolation space with the target configuration file through the vrouter process;
reloading tenant resources of the target user-state isolation space based on the target configuration file if the file contents of the loaded configuration file and the target configuration file are different.
In a second aspect, an apparatus for batch processing a vrouter network isolation space is provided, where the apparatus runs a vrouter controller and a vrouter process, and where:
the vrouter controller is used for receiving a space management instruction carrying a file indication identifier of a target configuration file and inputting the space management instruction into the vrouter process;
and the vrouter process is used for reading the target configuration file according to the file indication identifier, determining a target user-state isolation space, and performing batch processing on tenant resources of the target user-state isolation space based on the space management instruction and the target configuration file.
Optionally, the file indication identifier is all file names of the target configuration file;
the vrouter process is specifically configured to:
reading all the target configuration files according to all the file names of the target configuration files;
and determining all target user state isolation spaces according to the space identifiers in all the target configuration files.
Optionally, the apparatus further includes a directory creation process, configured to:
receiving a directory creation instruction carrying all file names and target directory identifiers of the target configuration files, creating a target directory based on the target directory identifiers, and adding all the target configuration files to the target directory based on all the file names.
Optionally, the file indication identifier is the target directory identifier;
the vrouter process is specifically configured to:
reading all the target configuration files under the target directory according to the target directory identification;
and determining all target user state isolation spaces according to the space identifiers in all the target configuration files.
Optionally, the vrouter process is specifically configured to:
and when the space management instruction is a space adding instruction, creating target user state isolation spaces in batch based on the space adding instruction, and setting tenant resources recorded by the target configuration file to the corresponding target user state isolation spaces.
Optionally, the vrouter process is specifically configured to:
and when the space management instruction is a space deletion instruction, deleting the target user-state isolation space and the tenant resources of the target user-state isolation space based on the space deletion instruction and the target configuration file.
Optionally, the vrouter process is specifically configured to:
when the space management instruction is a space overloading instruction, acquiring a loaded configuration file and a target configuration file corresponding to the target user state isolation space based on the space overloading instruction;
comparing the loaded configuration file corresponding to the target user state isolation space with the target configuration file;
reloading tenant resources of the target user-state isolation space based on the target configuration file if the file contents of the loaded configuration file and the target configuration file are different.
In a third aspect, there is provided a network device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the method for batch processing of vrouter network isolated space according to the first aspect.
In a fourth aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method of batching vrouter network isolated spaces according to the first aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a space management instruction carrying a file indication identifier of a target configuration file is received through a vrouter controller, and the space management instruction is input into a vrouter process; reading a target configuration file according to the file indication identifier through a vrouter process, and determining a target user state isolation space; and carrying out batch processing on tenant resources of the target user-state isolation space through a vrouter process based on the space management instruction and the target configuration file. Therefore, when the file indication marks carried by the space management instruction point to a plurality of target user-state isolation spaces, the network device can execute the space management instruction through a single vrouter process, and batch processing of all tenant resources of the target user-state isolation spaces pointed by the space management instruction is achieved, so that system resources can be effectively saved, and processing efficiency of the tenant resources of the user-state isolation spaces can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for batch processing vrouter network isolation spaces according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for processing a vrouter network isolation space in batch according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for batch processing of vrouter network isolation spaces according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for processing a vrouter network isolation space in batch, which can be applied to network equipment provided with a virtual router (vrouter) in a cloud computing system, wherein the network equipment can be a server or other equipment provided with operating systems such as Linux and the like, the network equipment is provided with a user mode protocol stack based on DPDK or other technologies, and data message transmission between internal networks and between the internal networks and the public networks in the cloud computing system can be realized through the virtual router based on the user mode protocol stack. Further, the network device may be provided with a vrouter process based on a user mode protocol stack, and a vrouter controller in communication with the vrouter process. The vrouter controller can send a space management instruction to the vrouter process, and the vrouter process can perform batch processing on tenant resources of all target user-state isolation spaces pointed by the space management instruction based on the space management instruction. The network device may include a processor, a memory, and a transceiver, where the processor may be configured to perform the method for batch processing of the vrouter network isolation space in the following process, the memory may be configured to store data required and generated in the following process, and the transceiver may be configured to receive and transmit related data in the following process.
Step 101: and receiving a space management instruction carrying a file indication identifier of the target configuration file through the vrouter controller, and inputting the space management instruction into the vrouter process.
In implementation, an internet service provider may create a separate user-state isolation space for each tenant based on a user-state protocol stack on the same network device through a network isolation technology, and provide relatively independent network services for different tenants through the user-state isolation space. Specifically, the internet service provider may allocate isolation space resources such as port information, ip addresses, routing table entries, address translation rules, flow control rules, vpn resource information, dynamic routing information, and the like to the user-mode isolation space of each tenant, and record the allocation result in the form of a configuration file. Therefore, when the network device starts the vrouter process, network isolation can be performed inside the vrouter process, that is, the multiple configuration files are loaded to the memory, resource information in the configuration files is analyzed, multiple user-state isolation spaces based on the vrouter are created based on the user-state protocol stack, and tenant resources are set for each user-state isolation space according to the configuration files.
When the user-mode isolation space based on the vrouter needs to be processed in batch, a technician of the internet service provider may process configuration files (which may be referred to as target configuration files) corresponding to all user-mode isolation spaces that need to be processed. Then, a technician of the internet service provider may input a space management instruction at the network device, where the space management instruction may carry a file indication identifier for indicating all the target configuration files. The network device may receive the space management instruction through the vrouter controller and input the space management instruction into the vrouter process. The space management command can be a space adding command, a space deleting command and a space reloading command.
Optionally, before the network device receives the space management instruction through the vrouter controller, the following processing may be performed: receiving a directory creation instruction carrying all file names of the target configuration files and target directory identifiers, creating a target directory based on the target directory identifiers, and adding all the target configuration files to the target directory based on all the file names.
In implementation, the internet service provider may store all the target configuration files in a file directory, so as to process tenant resources of the user-mode isolation space based on the target configuration files. Specifically, a technician of the internet service provider may input a directory creation instruction on the network device, and add all file names and target directory identifiers of the target configuration files to the directory creation instruction, so that the network device may receive the directory creation instruction, may read the file names and the target directory identifiers of all the target configuration files carried in the directory creation instruction, create a directory (which may be referred to as a target directory) based on the directory creation instruction, set the target directory identifiers as directory names of the target directory, and add all the target configuration files to the target directory.
Step 102: and reading the target configuration file according to the file indication identifier through the vrouter process, and determining a target user state isolation space.
In implementation, after the network device inputs the space management instruction into the vrouter process through the vrouter controller, the network device may obtain the file indication identifier carried in the space management instruction through the vrouter process, then may read all target configuration files corresponding to the file indication identifier through the vrouter process, and determine a user-state isolation space (which may be referred to as a target user-state isolation space) corresponding to the file indication identifier. It should be noted that each configuration file corresponds to one user-state isolation space, and the target configuration file may be one or more, and correspondingly, the target user-state isolation space may also be one or more.
Optionally, the file indicator may be a file name of a specific target configuration file, and accordingly, the processing in step 102 may be as follows: reading all target configuration files according to all file names of the target configuration files through a vrouter process; and determining all target user state isolation spaces through the vrouter process according to the space identifiers in all the target configuration files.
In implementation, the file indication identifier carried in the space management instruction received by the network device through the vrouter controller may point to one target user-state isolation space or may point to multiple target user-state isolation spaces. Specifically, when the space management instruction points to a target user-state isolation space, the file indication identifier only carries a file name of one configuration file. When the space management instruction points to a plurality of target user-mode isolation spaces, the file indication identifier may carry file names of a plurality of configuration files. Then, the network device may read the target configuration files corresponding to all the file names through the vrouter process. Furthermore, each configuration file may also record a unique space identifier of its corresponding user-state isolation space, and the space identifier may be used to distinguish different user-state isolation spaces. Therefore, after the network device reads the target configuration file, the space identifiers recorded in all the target configuration files can be obtained, and the corresponding target user state isolation space is determined according to all the space identifiers.
Optionally, the file indication identifier may also be a target directory identifier, and correspondingly, the processing in step 102 may also be as follows: reading all target configuration files under the target directory according to the target directory identification through a vrouter process; and determining all target user state isolation spaces through the vrouter process according to the space identifiers in all target configuration files.
In implementation, the space management instruction received by the network device through the vrouter control end may carry a target directory identifier. Therefore, after the network device inputs the space management instruction into the vrouter process through the vrouter control end, the network device can obtain the target directory identifier carried by the space management instruction through the vrouter process, determine the target directory corresponding to the target directory identifier, and further read all the target configuration files in the target directory. Furthermore, each configuration file may also record a unique space identifier of the user-state isolation space corresponding to the configuration file, and the space identifier may be used to distinguish different user-state isolation spaces. Therefore, after the network device reads the target configuration file, the space identifiers recorded in all the target configuration files can be obtained, and the corresponding target user state isolation space is determined according to all the space identifiers.
Step 103: and carrying out batch processing on tenant resources of the target user-state isolation space through a vrouter process based on the space management instruction and the target configuration file.
In implementation, after determining the target user-state isolation space, the network device may perform batch processing on tenant resources of all target user-state isolation spaces through the vrouter process based on the space management instruction and all read target configuration files corresponding to the file indication identifiers.
Optionally, the network device may create a new target user-state isolation space through a vrouter process, and accordingly, the processing in step 103 may be as follows: and when the space management instruction is a space newly-increased instruction, creating target user-state isolation spaces in batches through a vrouter process based on the space newly-increased instruction, and setting tenant resources recorded by the target configuration file to the corresponding target user-state isolation spaces.
In implementation, when the space management instruction is a space addition instruction, the network device may create, through the single vrouter process, a new target user-state isolation space based on the space addition instruction, set a unique space name for each added target user-state isolation space, and set tenant resources recorded in each target configuration file to the target user-state isolation space corresponding to each target configuration file. The space name may be a space identifier recorded in a target configuration file corresponding to the target user-state isolation space, or may be a name set by a user in a customized manner based on the space identifier recorded in the target configuration file, and used for distinguishing different target user-state isolation spaces. Specifically, for example, if the space addition instruction is "3 user-state isolation spaces are respectively created based on configuration files with file names nm1, nm2, and nm 3", the network device may create 3 user-state isolation spaces based on the space addition instruction through the single vrouter process. Then, the network device may obtain, through the single vrouter process, the space identifiers recorded in the configuration files with file names nm1, nm2, and nm3, and if the space identifiers are A, B, C, the space identifiers may be set as the space identifiers of the corresponding user-mode isolation spaces, respectively, or different space identifiers may also be set for each target user-mode isolation space in sequence, for example, the space identifiers may be set to nm1-A, nm2-A, nm3-a, so that each space identifier corresponds to one target configuration file and one target user-mode isolation space, that is, each target configuration file corresponds to one target user-mode isolation space. Then, the network device may read, through the single vrouter process, the tenant resources of the target profile records with the file names nm1, nm2, and nm3, and set the tenant resources of the read target profile records into corresponding target user-state isolation spaces, respectively.
Optionally, the network device may delete an existing target user-state isolation space through the vrouter process, and correspondingly, the processing in step 103 may be as follows: and when the space management instruction is a space deletion instruction, deleting tenant resources of the target user-state isolation space and the target user-state isolation space through the vrouter process based on the space deletion instruction and the target configuration file.
Optionally, when the user-state isolation space needs to be reloaded, the network device may determine, through the vrouter process, whether a space reloading instruction needs to be executed based on the specific content of the target configuration file, and correspondingly, the processing in step 103 may further be as follows: when the space management instruction is a space overloading instruction, acquiring a loaded configuration file and a target configuration file corresponding to a target user state isolation space through a vrouter process based on the space overloading instruction; comparing the loaded configuration file corresponding to the target user mode isolation space with the target configuration file through a vrouter process; and if the file contents of the loaded configuration file and the target configuration file are different, reloading the tenant resources of the target user-state isolation space based on the target configuration file.
In implementation, when the space management instruction is a space reload instruction, the network device may determine, through the single vrouter process, whether the target user-state isolation space needs to be reloaded according to the target configuration file according to the loaded configuration file corresponding to the target user-state isolation space and the specific file content of the target configuration file. Specifically, after the network device modifies the configuration file of a certain target user-mode isolation space through the vrouter process, the loaded configuration file before modification may be retained and the modified target configuration file may be stored. Therefore, after the network device receives the space reloading instruction of the target user-state isolation space through the vrouter controller and inputs the space reloading instruction into the vrouter process, the network device can determine and read the loaded configuration file and the target configuration file corresponding to each target user-state isolation space through the vrouter process according to the file indication identifier carried by the space reloading instruction. Then, the network device may compare the file contents of the loaded configuration file and the target configuration file corresponding to each target user-state isolation space through the vrouter process to determine whether there is a difference between the file contents of the loaded configuration file and the target configuration file, and if there is a difference, the network device may reload tenant resources of the corresponding target user-state isolation space based on the target configuration file through the vrouter process, otherwise, reloading is not required.
In the embodiment of the invention, a space management instruction carrying a file indication identifier of a target configuration file is received through a vrouter controller, and the space management instruction is input into a vrouter process; reading a target configuration file according to the file indication identifier through a vrouter process, and determining a target user state isolation space; and carrying out batch processing on tenant resources of the target user-state isolation space through a vrouter process based on the space management instruction and the target configuration file. Therefore, when the file indication identifier carried by the space management instruction points to a plurality of target user state isolation spaces, the network device can execute the space management instruction through a single vrouter process, so that all tenant resources of the target user state isolation spaces pointed by the space management instruction can be processed in batch, and further, not only can system resources be effectively saved, but also the processing efficiency of the tenant resources of the user state isolation spaces can be effectively improved.
Based on the same technical concept, an embodiment of the present invention further provides a device for batch processing of a vrouter network isolation space, as shown in fig. 2, where the device runs a vrouter controller and a vrouter process, where:
the vrouter controller is used for receiving a space management instruction carrying a file indication identifier of a target configuration file and inputting the space management instruction into the vrouter process;
and the vrouter process is used for reading the target configuration file according to the file indication identifier, determining a target user state isolation space, and performing batch processing on tenant resources of the target user state isolation space based on the space management instruction and the target configuration file.
Optionally, the file indication identifier is all file names of the target configuration file;
the vrouter process is specifically configured to:
reading all the target configuration files according to all the file names of the target configuration files;
and determining all target user state isolation spaces according to the space identifiers in all the target configuration files.
Optionally, as shown in fig. 3, the apparatus further includes a catalog creation process, configured to:
receiving a directory creation instruction carrying all file names and target directory identifiers of the target configuration files, creating a target directory based on the target directory identifiers, and adding all the target configuration files to the target directory based on all the file names.
Optionally, the file indication identifier is the target directory identifier;
the vrouter process is specifically configured to:
reading all the target configuration files under the target directory according to the target directory identification;
and determining all target user state isolation spaces according to the space identifiers in all the target configuration files.
Optionally, the vrouter process is specifically configured to:
and when the space management instruction is a space adding instruction, creating target user state isolation spaces in batch based on the space adding instruction, and setting tenant resources recorded by the target configuration file to the corresponding target user state isolation spaces.
Optionally, the vrouter process is specifically configured to:
and when the space management instruction is a space deletion instruction, deleting the tenant resources of the target user-state isolation space and the target user-state isolation space based on the space deletion instruction and the target configuration file.
Optionally, the vrouter process is specifically configured to:
when the space management instruction is a space overloading instruction, acquiring a loaded configuration file and a target configuration file corresponding to the target user state isolation space based on the space overloading instruction;
comparing the loaded configuration file corresponding to the target user state isolation space with the target configuration file;
reloading tenant resources of the target user-state isolation space based on the target configuration file if the file contents of the loaded configuration file and the target configuration file are different.
It should be noted that: the device for processing the vrouter network isolation space in batch provided by the above embodiment is only illustrated by the division of each functional module, and in practical application, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the device for processing the vrouter network isolation space in batches provided by the above embodiment and the method embodiment for processing the vrouter network isolation space in batches belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Fig. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention. Such network devices 400, which may vary considerably due to configuration or performance, may include one or more central processors 422 (e.g., one or more processors) and memory 432, one or more storage media 430 (e.g., one or more mass storage devices) storing application programs 442 or data 444. Wherein the memory 432 and storage medium 430 may be transient or persistent storage. The program stored on the storage medium 430 may include one or more modules (not shown), each of which may include a sequence of instructions operating on the network device 400. Still further, central processor 422 may be configured to communicate with storage medium 430 to execute a sequence of instruction operations in storage medium 430 on network device 400.
The network device 400 may also include one or more power supplies 426, one or more wired or wireless network interfaces 450, one or more input-output interfaces 458, one or more keyboards 456, and/or one or more operating systems 441, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like.
Network device 400 may include memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the above-described batch processing of the vrouter network isolation space.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (16)

1. A method of batch processing a vrouter network isolation space, the method comprising:
receiving a space management instruction carrying a file indication identifier of a target configuration file through a vrouter controller, and inputting the space management instruction into a vrouter process, wherein the target configuration file is a configuration file corresponding to all user-state isolation spaces needing to be processed, and the file indication identifier is used for indicating all the target configuration files;
reading all the target configuration files according to the file indication marks through the vrouter process, and determining all target user state isolation spaces;
and performing batch processing on all tenant resources of the target user-state isolation space through the vrouter process based on the space management instruction and all the target configuration files.
2. The method of claim 1, wherein the file indication identifies all file names of the target configuration file;
the reading the target configuration file according to the file indication identifier through the vrouter process and determining a target user state isolation space includes:
reading all the target configuration files according to all the file names of the target configuration files through the vrouter process;
and determining all target user state isolation spaces through the vrouter process according to the space identifiers in all the target configuration files.
3. The method according to claim 1, wherein before receiving, by the vrouter controller, the space management instruction carrying the file indication identifier of the target configuration file, the method further comprises:
receiving a directory creation instruction carrying all file names of the target configuration files and target directory identifiers, creating a target directory based on the target directory identifiers, and adding all the target configuration files to the target directory based on all the file names.
4. The method of claim 3, wherein the file indication identifier is the target directory identifier;
the reading the target configuration file according to the file indication identifier through the vrouter process and determining a target user state isolation space includes:
reading all the target configuration files under the target directory according to the target directory identification through the vrouter process;
and determining all target user state isolation spaces through the vrouter process according to the space identifiers in all the target configuration files.
5. The method according to claim 1, wherein the batching, by the vrouter process, tenant resources of the target user-state isolation space based on the space management instruction and the target configuration file comprises:
and when the space management instruction is a space adding instruction, creating target user state isolation spaces in batch based on the space adding instruction through the vrouter process, and setting tenant resources recorded by the target configuration file to the corresponding target user state isolation spaces.
6. The method of claim 1, wherein the batch processing of tenant resources of the target user-state isolation space based on the space management instructions and the target configuration file by the vrouter process comprises:
and when the space management instruction is a space deletion instruction, deleting the tenant resources of the target user-state isolation space and the target user-state isolation space through the vrouter process based on the space deletion instruction and the target configuration file.
7. The method of claim 4, wherein the batch processing of tenant resources of the target user-state isolation space based on the space management instructions and the target configuration file by the vrouter process comprises:
when the space management instruction is a space reloading instruction, acquiring a loaded configuration file and the target configuration file corresponding to the target user-state isolation space through the vrouter process based on the space reloading instruction;
comparing the loaded configuration file corresponding to the target user state isolation space with the target configuration file through the vrouter process;
reloading tenant resources of the target user-state isolation space based on the target configuration file if the file contents of the loaded configuration file and the target configuration file are different.
8. An apparatus for batch processing of a vrouter network isolation space, wherein the apparatus runs a vrouter controller and a vrouter process, wherein:
the vrouter controller is configured to receive a space management instruction carrying a file indication identifier of a target configuration file, and input the space management instruction into the vrouter process, where the target configuration file is a configuration file corresponding to all user-state isolation spaces to be processed, and the file indication identifier is used to indicate all the target configuration files;
and the vrouter process is used for reading all the target configuration files according to the file indication identifiers, determining all the target user-state isolation spaces, and performing batch processing on tenant resources of all the target user-state isolation spaces based on the space management instruction and all the target configuration files.
9. The apparatus of claim 8, wherein the file indication identifies all file names of the target configuration file;
the vrouter process is specifically configured to:
reading all the target configuration files according to all the file names of the target configuration files;
and determining all target user state isolation spaces according to the space identifiers in all the target configuration files.
10. The apparatus of claim 8, further comprising a catalog creation process for:
receiving a directory creation instruction carrying all file names and target directory identifiers of the target configuration files, creating a target directory based on the target directory identifiers, and adding all the target configuration files to the target directory based on all the file names.
11. The apparatus of claim 10, wherein the file indication identifier is the target directory identifier;
the vrouter process is specifically configured to:
reading all the target configuration files under the target directory according to the target directory identification;
and determining all target user state isolation spaces according to the space identifiers in all the target configuration files.
12. The apparatus of claim 8, wherein the vrouter process is specifically configured to:
and when the space management instruction is a space adding instruction, creating target user state isolation spaces in batch based on the space adding instruction, and setting tenant resources recorded by the target configuration file to the corresponding target user state isolation spaces.
13. The apparatus of claim 8, wherein the vrouter process is specifically configured to:
and when the space management instruction is a space deletion instruction, deleting the target user-state isolation space and the tenant resources of the target user-state isolation space based on the space deletion instruction and the target configuration file.
14. The apparatus of claim 8, wherein the vrouter process is specifically configured to:
when the space management instruction is a space overloading instruction, acquiring a loaded configuration file and a target configuration file corresponding to the target user state isolation space based on the space overloading instruction;
comparing the loaded configuration file corresponding to the target user state isolation space with the target configuration file;
reloading tenant resources of the target user-state isolation space based on the target configuration file if the file contents of the loaded configuration file and the target configuration file are different.
15. A network device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the method of batching vrouter network sequestered space according to any one of claims 1 to 7.
16. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of batching a vrouter network isolation space according to any one of claims 1-7.
CN201910177212.XA 2019-03-08 2019-03-08 Method and device for processing vrouter network isolation spaces in batch Active CN111669358B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910177212.XA CN111669358B (en) 2019-03-08 2019-03-08 Method and device for processing vrouter network isolation spaces in batch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910177212.XA CN111669358B (en) 2019-03-08 2019-03-08 Method and device for processing vrouter network isolation spaces in batch

Publications (2)

Publication Number Publication Date
CN111669358A CN111669358A (en) 2020-09-15
CN111669358B true CN111669358B (en) 2022-08-30

Family

ID=72382229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910177212.XA Active CN111669358B (en) 2019-03-08 2019-03-08 Method and device for processing vrouter network isolation spaces in batch

Country Status (1)

Country Link
CN (1) CN111669358B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434321A (en) * 2020-12-01 2021-03-02 武汉绿色网络信息服务有限责任公司 Data storage method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306360A (en) * 2015-11-12 2016-02-03 迈普通信技术股份有限公司 Method and device for realizing VRRP (Virtual Router Redundancy Protocol) group management
CN105407045A (en) * 2015-10-19 2016-03-16 国家电网公司 Router virtualization method based on safety isolation
CN107967159A (en) * 2017-11-22 2018-04-27 腾讯科技(深圳)有限公司 The method and server of a kind of profileapplied

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102200977B (en) * 2010-03-23 2014-10-29 国际商业机器公司 Method and system for extending database table under multi-tenant environment
US20170279689A1 (en) * 2015-02-27 2017-09-28 Hewlett Packard Enterprise Development Lp Software defined network controller for implementing tenant specific policy

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105407045A (en) * 2015-10-19 2016-03-16 国家电网公司 Router virtualization method based on safety isolation
CN105306360A (en) * 2015-11-12 2016-02-03 迈普通信技术股份有限公司 Method and device for realizing VRRP (Virtual Router Redundancy Protocol) group management
CN107967159A (en) * 2017-11-22 2018-04-27 腾讯科技(深圳)有限公司 The method and server of a kind of profileapplied

Also Published As

Publication number Publication date
CN111669358A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN109343963B (en) Application access method and device for container cluster and related equipment
US8769040B2 (en) Service providing system, a virtual machine server, a service providing method, and a program thereof
US8830870B2 (en) Network adapter hardware state migration discovery in a stateful environment
US9588807B2 (en) Live logical partition migration with stateful offload connections using context extraction and insertion
US8549517B2 (en) Address assignment method, computer, and recording medium having program recorded therein
CN110445886B (en) Method and system for realizing domain name access acceleration
JP2020515987A (en) Intelligent thread management across isolated network stacks
CN109981493B (en) Method and device for configuring virtual machine network
CN110287696B (en) Detection method, device and equipment for rebound shell process
CN108491278B (en) Method and network device for processing service data
CN109857723B (en) Dynamic data migration method based on expandable database cluster and related equipment
CN111787126B (en) Container creation method, server, and storage medium
CN114584526B (en) ARP protocol processing method, system, storage medium and electronic equipment
CN111294293B (en) Network isolation method and device based on user mode protocol stack
CN111669358B (en) Method and device for processing vrouter network isolation spaces in batch
CN112764823A (en) Starting method of NVR (network video recorder) system, host operating system and data communication method
CN108540408B (en) Openstack-based distributed virtual switch management method and system
CN108667750B (en) Virtual resource management method and device
CN111294319A (en) Method and device for realizing OpenVPN network isolation under DPDK framework
CN112491794A (en) Port forwarding method, device and related equipment
CN111669423B (en) Batch processing method and system of network isolation space based on user mode protocol stack
CN115373758A (en) Method for starting runtime instance, runtime namespace system and storage medium
CN111669355B (en) Method for batch processing of nginx network isolation space and nginx server
CN112291212B (en) Static rule management method and device, electronic equipment and storage medium
CN111669356B (en) Method for processing network isolation space in batch in IPsec VPN server and IPsec VPN server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant