Management methods, apparatus and equipment for Virtual Dynamic Host Configuration Protocol (VDHCP) services
By deploying DHCP management services and shared storage volumes on the container cloud platform, flexible vDHCP service management is achieved, solving the problems of complex and costly management in NFV technology, providing an intuitive configuration management interface, and reducing the error rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHEAST UNIV
- Filing Date
- 2023-10-27
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies for deploying vDHCP services using NFV technology are complex and costly to manage, with inflexible configuration file modifications that are prone to errors, requiring administrators to have a high level of knowledge about DHCP configuration files.
Deploy a DHCP management service and a shared storage volume on the container cloud platform. Initialize the DHCP configuration file template through the DHCP management service, generate the vDHCP service deployment file, update the configuration file when receiving subnet management instructions from the front-end page, and restart the target vDHCP service for configuration.
It reduces network construction costs, facilitates network expansion, allows administrators to intuitively manage DHCP service configuration information, reduces error rates, and lowers the familiarity required with DHCP configuration files.
Smart Images

Figure CN117255020B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a management method, apparatus, and device for Virtual Dynamic Host Configuration Protocol (VDHCP) services. Background Technology
[0002] DHCP (Dynamic Host Configuration Protocol) is a widely used protocol in networks for automatically configuring client networks. Traditional solutions require one or more DHCP servers to be added to the local network, and DHCP configuration files are used to manage the allocation of network parameters to client machines. However, network construction typically requires the purchase of a variety of hardware devices, each positioned at different layers of the network and performing different functions, significantly increasing the cost of network construction.
[0003] To reduce network construction costs and mitigate the constraints of hardware design and development on network development, Network Functions Virtualization (NFV) technology has emerged. By running different modular software on hardware devices, diverse virtual network functions can be implemented on a single hardware device. Therefore, by using NFV technology to run a virtual DHCP (vDHCP) service on a server, the server can act as a DHCP server to manage and allocate network parameters for clients within the network.
[0004] However, deploying vDHCP services using NFV technology requires implementing NFV on the server. The NFV architecture breaks down network hardware into three parts: general-purpose hardware, a virtualization platform, and network element functions. This complex architecture results in high construction costs for NFV deployments. Managing vDHCP services requires interfacing with the MANO (Network Functions Virtualization Management and Orchestration) module, which is inflexible. When the DHCP service configuration file needs modification, such as adding subnet ranges or changing configured subnet DNS, the dhcp.conf file (the DHCP configuration file) needs to be edited, and then the DHCP service restarted. Viewing and modifying DHCP service configuration information is inflexible and error-prone, requiring administrators to have a good understanding of the DHCP configuration file. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for managing Virtual Dynamic Host Configuration Protocol (VDHCP) services, in order to manage VDHCP services.
[0006] According to a first aspect of the present invention, a method for managing a Virtual Dynamic Host Configuration Protocol (VDHCP) service is provided, deployed on a container cloud platform, wherein the container cloud platform deploys a Dynamic Host Configuration Protocol (DHCP) management service, a shared storage volume, and at least one Virtual Dynamic Host Configuration Protocol (vDHCP) service, the method comprising:
[0007] The DHCP management service initializes a preset DHCP configuration file template, generates a vDHCP service deployment file, and writes the initialized DHCP configuration file to a shared storage volume.
[0008] Based on the initialized DHCP configuration file and the vDHCP service deployment file, deploy each of the vDHCP services in the container cloud platform;
[0009] When the DHCP management service receives a subnet management instruction relative to the subnet segment sent by the front-end page, it updates the DHCP configuration file according to the subnet management instruction;
[0010] Restart the target vDHCP service managing the subnet segment to configure it according to the updated DHCP configuration file via the target vDHCP.
[0011] According to a second aspect of the present invention, a management device for a Virtual Dynamic Host Configuration Protocol (VDHCP) service is provided, comprising:
[0012] The initialization module is used to initialize a preset DHCP configuration file template through the DHCP management service, generate a vDHCP service deployment file, and write the initialized DHCP configuration file to the shared storage volume.
[0013] The service deployment module is used to deploy each of the vDHCP services in the container cloud platform based on the initialized DHCP configuration file and the vDHCP service deployment file.
[0014] The file update module is used to update the DHCP configuration file according to the subnet management instruction sent by the front-end page when the DHCP management service receives the subnet management instruction relative to the subnet segment.
[0015] The service restart module is used to restart the target vDHCP service that manages the subnet segment, so that the target vDHCP is configured according to the updated DHCP configuration file.
[0016] According to a third aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the management method of the Virtual Dynamic Host Configuration Protocol service according to any embodiment of the present invention.
[0020] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the management method of the Virtual Dynamic Host Configuration Protocol service as described in any embodiment of the present invention.
[0021] The technical solution of this invention is deployed on a container cloud platform. The container cloud platform deploys a Dynamic Host Configuration Protocol (DHCP) management service, a shared storage volume, and at least one Virtual Dynamic Host Configuration Protocol (vDHCP) service. The DHCP management service initializes a preset DHCP configuration file template, generates a vDHCP service deployment file, and writes the initialized DHCP configuration file to the shared storage volume. Based on the initialized DHCP configuration file and the vDHCP service deployment file, each vDHCP service is deployed within the container cloud platform. When the DHCP management service receives a subnet management command relative to the subnet segment from the front-end page, it updates the DHCP configuration file according to the subnet management command. The target vDHCP service for the managed subnet segment is restarted to configure the target vDHCP service according to the updated DHCP configuration file. By deploying on a container cloud platform, the allocation and management of client network parameters in the network are realized, reducing the cost of network construction. The number of vDHCP service instances can be adjusted when the network scale changes, facilitating network expansion. Administrators can intuitively query and manage DHCP service configuration information, reducing the requirement for administrators to be familiar with DHCP configuration files and reducing the error rate.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a management method for a Virtual Dynamic Host Configuration Protocol (VDHCP) service provided according to Embodiment 1 of the present invention;
[0025] Figure 2 This is an example flowchart of a management method for a Virtual Dynamic Host Configuration Protocol (VDHCP) service provided according to Embodiment 1 of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a management device for a Virtual Dynamic Host Configuration Protocol (VDHCP) service according to Embodiment 2 of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements an embodiment of the present invention. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] Example 1
[0031] Figure 1This is a flowchart of a method for managing a Virtual Dynamic Host Configuration Protocol (VDHCP) service according to Embodiment 1 of the present invention. This embodiment is applicable to the management of virtual DHCP. The method can be executed by a VDHCP service management device, which can be implemented in hardware and / or software. The VDHCP service management device can be configured in an electronic device. The method is deployed on a container cloud platform, which deploys a DHCP management service, a shared storage volume, and at least one vDHCP service.
[0032] like Figure 1 As shown, the method includes:
[0033] S110. Initialize the preset DHCP configuration file template through the DHCP management service, generate the vDHCP service deployment file, and write the initialized DHCP configuration file to the shared storage volume.
[0034] It's important to know that a container cloud platform can be understood as a container orchestration engine. It's a platform that supports automated deployment, large-scale scalability, and containerized application management, such as a container cloud platform.
[0035] In this embodiment, the DHCP management service can be understood as a service that provides an interface to the front end to control vDHCP. The vDHCP service deployment file can be understood as a file used to deploy the vDHCP service. The DHCP configuration file can be understood as a file used to record subnet configuration information so that the vDHCP service is configured according to the DHCP configuration file. The shared storage volume can be understood as a shared storage volume used to store the files generated by vDHCP and the DHCP template files in the container cloud platform.
[0036] Specifically, the deployment environment needs to be prepared first: a container cloud platform cluster, with the nfs-utils tool installed on the cluster server, and a shared storage volume created with the access model set to ReadWriteMany, allowing multiple nodes to mount it, and the corresponding shared volume declaration. Secondly, a DHCP management service needs to be developed to manage the vDHCP service within the container cloud platform, including starting and stopping the vDHCP service, adjusting the number of vDHCP service instances, initializing the dhcp.conf configuration file, and sharing persistent storage files. First, the DHCP management service is granted permissions to operate on the container cloud platform service containers; the DHCP configuration file template is imported and initialized (i.e., the dhcp.conf template file). Based on the parameters included in the DHCP configuration file template, the corresponding network interface card (NIC) subnet information is determined (this NIC subnet information is used to provide a basis for subsequent vDHCP service binding to NIC subnets) and a DHCP configuration file is generated and written to the shared storage volume. Users can set information such as vDHCP service runtime resources, bound NICs, and persistent shared storage volume mount directories in the vDHCP service deployment file to dynamically generate the vDHCP service deployment file.
[0037] S120 deploys various vDHCP services within the container cloud platform based on the initialized DHCP configuration file and vDHCP service deployment file.
[0038] In this embodiment, the vDHCP service deployment file may include information such as vDHCP service runtime resources, bound network interface cards, and persistent shared storage volume mount directories.
[0039] Specifically, the DHCP management service calls container cloud platform commands to deploy the vDHCP service within the container cloud platform based on the initialized DHCP configuration file and vDHCP service deployment file; and calls container cloud platform commands as needed to start and stop the vDHCP service and adjust the number of service running instances.
[0040] S130. When the DHCP management service receives a subnet management instruction relative to the subnet segment from the front-end page, it updates the DHCP configuration file according to the subnet management instruction.
[0041] In this embodiment, the front-end page can be understood as a visual page provided to the user. Specifically, the front-end page displays the DHCP management service subnet configuration information management page and the DHCP management service usage information query page to the user by calling the DHCP management service interface. Usage information can be understood as the allocation status of each IP address or MAC address in the configured subnet segment. A subnet segment can be understood as a network segment used for communication in a computer network configured via vDHCP. Subnet segment management commands can be understood as commands used to manage subnet segments, such as adding, deleting, editing, and viewing.
[0042] Specifically, the front-end page displays the DHCP management service subnet configuration information management page to users. The homepage shows a list of all subnet segment configuration information, displaying fields including subnet segment, subnet mask, start value of dynamically assigned IP address range, end value of dynamically assigned IP address range, DNS server, gateway, and lease time. The front-end page includes an "Add" button; clicking the "Add" button allows users to input subnet segment configuration information, automatically generating subnet segment management commands, and then calling the DHCP management service interface to implement the "Add" function, adding subnet segment configuration information to the DHCP configuration file. A visual interface for editing subnet information is also included. Selecting configured subnet segment information and clicking the "Edit" button automatically generates subnet segment management commands, allowing users to edit the subnet segment configuration information, and then calling the DHCP management service interface to implement the editing function. Selecting configured subnet segment information and clicking the "Delete" button automatically generates subnet segment management commands, and then calling the DHCP management service interface to delete the subnet segment configuration. The DHCP management service uses an information query page that provides MAC address and IP address input fields. Entering a MAC address and clicking "Query" generates a usage information query command, which calls the DHCP management service interface to retrieve and display the IP addresses currently used by clients with that MAC address. Similarly, entering an IP address and clicking "Query" generates a usage information query command, which calls the DHCP management service interface to retrieve and display the MAC addresses of clients currently using that IP address. The DHCP management service receives subnet management commands relative to the subnet segment sent from the front-end page. Based on the management type corresponding to the subnet management command, the DHCP management service can determine the user's business needs (e.g., adding, deleting, editing, or viewing). It then updates the corresponding subnet configuration information based on the configuration information submitted in the subnet management command, resulting in an updated DHCP configuration file.
[0043] S140. Restart the target vDHCP service of the management subnet to configure it according to the updated DHCP profile via the target vDHCP.
[0044] In this embodiment, the target vDHCP service can be understood as the vDHCP service used to manage the subnet segment.
[0045] Specifically, the DHCP management service can call the preset platform instructions in the container cloud platform to restart the target vDHCP service, so that the target vDHCP service can read the updated DHCP configuration file in the shared storage volume and configure the subnet according to the target subnet configuration information therein.
[0046] The technical solution of this invention, deployed on a container cloud platform, includes a Dynamic Host Configuration Protocol (DHCP) management service, a shared storage volume, and at least one Virtual Dynamic Host Configuration Protocol (vDHCP) service. The DHCP management service receives subnet management instructions from the front-end page; determines the corresponding subnet configuration information in the DHCP configuration file of the shared storage volume; updates the subnet configuration information according to the subnet management instructions to obtain the target subnet configuration information; and restarts the target vDHCP service corresponding to the subnet, enabling configuration according to the target subnet configuration information. This container cloud platform deployment method enables the allocation and management of client network parameters, reducing network construction costs and facilitating network expansion. Administrators can intuitively query and manage DHCP service configuration information, reducing the need for familiarity with DHCP configuration files and minimizing error rates.
[0047] Furthermore, based on the above embodiments, the step of updating the DHCP configuration file according to the subnet management command can be further optimized as follows:
[0048] a1. Determine the subnet configuration information corresponding to the subnet in the DHCP configuration file of the shared storage volume.
[0049] In this embodiment, the subnet segment configuration information can be understood as the information required to configure the subnet segment, such as: attributes including subnet segment, subnet mask, start value of dynamically allocated IP range, end value of dynamically allocated IP range, DNS server, gateway, lease time, etc.
[0050] Specifically, the DHCP management service can query the DHCP configuration file in the shared storage volume and determine the corresponding subnet configuration information from it.
[0051] b1. Determine the management type corresponding to the subnet management command.
[0052] In this embodiment, the management type can be understood as the operation type of the subnet segment configuration information.
[0053] Specifically, the DHCP management service can determine the management type corresponding to the subnet management command.
[0054] c1. When the management type is new information, the new configuration information in the subnet management command is written into the DHCP configuration file to obtain the updated DHCP configuration file.
[0055] In this embodiment, the newly added configuration information can be understood as information used to configure new subnet segments.
[0056] Specifically, when the management type is "new information", the new configuration information submitted by the front-end page, which includes attributes such as subnet segment, subnet mask, start value of dynamic IP range, end value of dynamic IP range, DNS server, gateway, and lease time, is defined as a specific Java class. The new configuration information is written into the DHCP configuration file and saved in a preset database. When querying, the configuration information can be queried through the configuration information saved in the database, without the need to parse the DHCP configuration file, thus simplifying the query operation.
[0057] d1. When the management type is to delete information, delete the configuration information in the subnet configuration information that matches the subnet management command to obtain the updated DHCP configuration file.
[0058] Specifically, when the management type is to delete information, the DHCP management service can search for the configuration information of each subnet in the DHCP configuration file, determine the subnet configuration information that matches the subnet management command, delete it, obtain the target subnet configuration information after deletion, and then obtain the updated DHCP configuration file. The corresponding configuration information is then updated in the preset database to ensure that the configuration information in the database is up-to-date.
[0059] e1. When the management type is edit information, update the configuration information in the subnet configuration information that matches the subnet management command to obtain the updated DHCP configuration file.
[0060] Specifically, when the management type is edit information, the DHCP management service can find the configuration information that matches the subnet management command in the configuration information of each subnet in the DHCP configuration file, and update it according to the update content in the subnet management command to obtain the target subnet configuration information, and thus obtain the updated DHCP configuration file. It then updates the file in the preset database.
[0061] The technical solution of this invention deploys a virtual vDHCP service and a DHCP management service on a container cloud platform cluster. Leveraging the cluster management capabilities of the container cloud platform, the availability of the vDHCP service is guaranteed even when some servers fail, ensuring uninterrupted network functionality. Utilizing the container management capabilities of the container cloud platform, the number of vDHCP service instances can be dynamically adjusted, and vDHCP service instances can be started and stopped as needed. The shared storage volumes supported by the container cloud platform enable persistent storage and synchronous sharing of data resources between the vDHCP service and DHCP management service application instances. In this invention, the DHCP management service and the vDHCP service run on the same platform. Through file sharing, the DHCP management service can directly access the vDHCP service configuration file without calling any intermediate management and orchestration interfaces. Furthermore, the vDHCP service and the DHCP management service can be deployed and run together with other cloud-native services on the same container cloud platform cluster without incurring additional costs, reducing network construction costs and complexity.
[0062] As a first optional embodiment of this embodiment, based on the above embodiments, it further includes:
[0063] The DHCP management service obtains the subnet configuration query command sent by the front-end page, queries the subnet configuration information corresponding to the subnet segment, and returns it to the front-end page.
[0064] In this embodiment, the subnet configuration query command can be understood as a command used to query the configuration information of a subnet.
[0065] Specifically, the DHCP management service can obtain the subnet configuration query command sent by the front-end page, query the subnet configuration information corresponding to the subnet segment in the preset database, support conditional filtering and pagination return, without parsing the DHCP configuration file, and finally return the configured subnet information to the front-end page in JSON format.
[0066] In the first optional embodiment of this example, this configuration provides administrators with a business function interface and a visual query and operation page. Administrators can intuitively query and manage DHCP service configuration information, reducing the need for administrators to be familiar with DHCP configuration files and decreasing the error rate.
[0067] As a second optional embodiment of this first embodiment, based on the above embodiment, it further includes:
[0068] The system obtains the usage information query command sent by the front-end page through the DHCP management service, determines the query result corresponding to the usage information query command, and feeds it back to the front-end page.
[0069] In this embodiment, the information query instruction can be understood as an instruction used to query the MAC address or IP address of the subnet segment. The query result can be understood as the determined address information.
[0070] Specifically, the DHCP management service can access the file in the shared storage volume that records address information, query the latest address allocation record corresponding to the usage information query command, determine the allocated address information and lease period, and return the query results to the front-end page.
[0071] Furthermore, the step of determining the query results corresponding to the information query command and feeding them back to the front-end page can be optimized as follows:
[0072] a2. Extract the address to be queried from the usage information query command.
[0073] In this embodiment, the address to be queried can be understood as the address used to determine usage information, such as the client's MAC address or IP address.
[0074] Specifically, the DHCP management service can extract the address to be queried from the usage information query command.
[0075] b2. Determine the latest allocation record and corresponding usage information of the address to be queried in the service lease file of the shared storage volume.
[0076] In this embodiment, the service lease file can be understood as a file used by the vDHCP service to record address allocations and corresponding lease periods and statuses, such as the dhcpd.leases file. The latest allocation record can be understood as the allocated address record. Usage information can be understood as information such as the lease period and status of the allocated addresses.
[0077] Specifically, the DHCP management service can parse the service lease file in the shared storage volume and find the latest allocation record and corresponding usage information for the address to be queried.
[0078] For example, if the information query command is to query the MAC address of a client assigned to a specified IP address, then the address to be queried is the specified IP address. The DHCP management service can access files in the shared storage volume, parse the dhcpd.leases file, view the latest allocation record for that IP address, and use the verified lease period and status (whether the lease has expired) as usage information to determine the client MAC address currently using that IP address.
[0079] c2. Based on the latest allocation records and usage information, determine the query results and send them back to the front-end page.
[0080] Specifically, the DHCP management service can use the latest allocation records and usage information as query results and feed them back to the front-end page that sent the query command.
[0081] In the second optional embodiment of this example, this configuration provides administrators with a business function interface and a visual query and operation page. Administrators can intuitively query and manage DHCP service configuration information, reducing the need for administrators to be familiar with DHCP configuration files and decreasing the error rate.
[0082] As a third optional embodiment of this first embodiment, based on the above embodiments, it further includes:
[0083] The service operation adjustment instructions sent by the front-end page are obtained through the DHCP management service, and the corresponding vDHCP service is adjusted according to the service operation adjustment instructions.
[0084] In this embodiment, the service operation adjustment instruction can be understood as an instruction used to adjust vDHCP. The service operation adjustment instruction may include: starting the vDHCP service, stopping the vDHCP service, and / or adjusting the number of service running instances.
[0085] Specifically, the DHCP management service can obtain service operation adjustment instructions sent by the front-end page, and call the platform instructions preset by the container cloud platform according to the service operation adjustment instructions to start and stop the vDHCP service and adjust the number of service running instances.
[0086] In the third optional embodiment of this example, this configuration eliminates the need to purchase a dedicated DHCP server when building the network. Instead, the vDHCP service can be deployed to manage and allocate client network parameters, reducing network construction costs. Furthermore, the number of vDHCP service instances can be adjusted to accommodate changes in network size, facilitating network expansion.
[0087] For example, to facilitate understanding of this solution, a specific example is provided, demonstrating how to manage the vDHCP service through interaction between a front-end visual page and the DHCP management service in the cloud container platform. Figure 2 This is an example flowchart of a management method for a Virtual Dynamic Host Configuration Protocol (VDHCP) service provided according to Embodiment 1 of the present invention, such as... Figure 2 As shown, the container cloud platform includes: a DHCP management service, multiple vDHCP services, shared storage volumes, and a database. A front-end visual interface provides administrators with corresponding function selections to generate corresponding commands sent to the DHCP management service within the container cloud platform. These commands can include: 1. Subnet management commands, used to query, add, edit, or delete subnet configuration information; 2. Service operation adjustment commands, used to start and stop the vDHCP service and adjust the number of vDHCP service instances; 3. Usage information query commands, used to query the MAC address of a client assigned a specified IP or to query the IP address assigned to a client with a specified MAC address. The DHCP management service can query and modify the corresponding files in the shared storage volume according to these commands. The shared storage volume includes the DHCP configuration file (i.e., the dhcp.conf file) and the service lease file (i.e., the dhcpd.leases file). When the command is a subnet management command, the DHCP management service can query and modify the subnet configuration information in the shared storage volume's DHCP configuration file. When the command is a usage information query command, the DHCP management service can query the service lease file in the shared storage volume's DHCP configuration file. When the command is a service operation adjustment command, the DHCP management service can invoke the corresponding commands of the container cloud platform to control vDHCP. The database (DB) can be used to store the configured subnet information. vDHCP can mount / read / write the contents of the shared storage volume.
[0088] Example 2
[0089] Figure 3 This is a schematic diagram of the structure of a management device for a Virtual Dynamic Host Configuration Protocol (VDHCP) service provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes:
[0090] The initialization module 31 is used to initialize a preset DHCP configuration file template through the DHCP management service, generate a vDHCP service deployment file, and write the initialized DHCP configuration file to the shared storage volume.
[0091] Service deployment module 32 is used to deploy various vDHCP services within the container cloud platform based on the initialized DHCP configuration file and vDHCP service deployment file;
[0092] The file update module 33 is used to update the DHCP configuration file according to the subnet management instruction sent by the front-end page when the DHCP management service receives the subnet management instruction relative to the subnet segment.
[0093] Service restart module 34 is used to restart the target vDHCP service of the management subnet segment so that the target vDHCP service can be configured according to the updated DHCP configuration file.
[0094] The technical solution of this invention is deployed on a container cloud platform. The container cloud platform deploys a Dynamic Host Configuration Protocol (DHCP) management service, a shared storage volume, and at least one Virtual Dynamic Host Configuration Protocol (vDHCP) service. The DHCP management service initializes a preset DHCP configuration file template, generates a vDHCP service deployment file, and writes the initialized DHCP configuration file to the shared storage volume. Based on the initialized DHCP configuration file and the vDHCP service deployment file, each vDHCP service is deployed within the container cloud platform. When the DHCP management service receives a subnet management command relative to the subnet segment from the front-end page, it updates the DHCP configuration file according to the subnet management command. The target vDHCP service for the managed subnet segment is restarted to configure the target vDHCP service according to the updated DHCP configuration file. This container cloud platform deployment method enables the allocation and management of client network parameters, reducing network construction costs and facilitating network expansion. Administrators can intuitively query and manage DHCP service configuration information, reducing the requirement for administrators to be familiar with DHCP configuration files and decreasing the error rate.
[0095] Furthermore, the file update module 33 is specifically used for:
[0096] The subnet configuration information corresponding to the subnet segment is determined in the DHCP configuration file of the shared storage volume;
[0097] Determine the management type corresponding to the subnet segment management command;
[0098] When the management type is new information, the new configuration information in the subnet management instruction is written into the DHCP configuration file to obtain the updated DHCP configuration file;
[0099] When the management type is deletion information, the configuration information in the subnet configuration information that matches the subnet management command is deleted to obtain the updated DHCP configuration file;
[0100] When the management type is edit information, the configuration information in the subnet configuration information that matches the subnet management command is updated to obtain the updated DHCP configuration file.
[0101] Optionally, the device further includes a first query module.
[0102] The first query module is used to obtain the subnet configuration query instruction for the relative subnet segment sent by the front-end page through the DHCP management service, query the subnet configuration information corresponding to the subnet segment and return it to the front-end page.
[0103] Optionally, the device further includes a second query module.
[0104] The second query module is used to obtain the usage information query command sent by the front-end page through the DHCP management service, determine the query result corresponding to the usage information query command, and feed it back to the front-end page.
[0105] Furthermore, the second query module is specifically used for:
[0106] Extract the address to be queried from the usage information query instruction;
[0107] Determine the latest allocation record and corresponding usage information of the address to be queried in the service lease file of the shared storage volume;
[0108] Based on the latest allocation record and the usage information, the query result is determined and fed back to the front-end page.
[0109] Optionally, the device may also include a service adjustment module.
[0110] The service adjustment module is used to obtain service operation adjustment instructions sent by the front-end page through the DHCP management service, and adjust the corresponding vDHCP service according to the service operation adjustment instructions.
[0111] The service operation adjustment instructions include: starting the vDHCP service, stopping the vDHCP service, and / or adjusting the number of service running instances.
[0112] The management device for Virtual Dynamic Host Configuration Protocol (VDHCP) service provided in this embodiment of the invention can execute the management method for VDHCP service provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0113] Example 3
[0114] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0115] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0116] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0117] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as the management methods of the Virtual Dynamic Host Configuration Protocol (VDHCP) service.
[0118] In some embodiments, the management method for the Virtual Dynamic Host Configuration Protocol (VDHCP) service can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the VDHCP service management method described above can be performed. Alternatively, in other embodiments, processor 41 can be configured to perform the VDHCP service management method by any other suitable means (e.g., by means of firmware).
[0119] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0123] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0124] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0125] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0126] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A management method for a Virtual Dynamic Host Configuration Protocol (VDHCP) service, characterized in that, Deployed on a container cloud platform, wherein the container cloud platform deploys a Dynamic Host Configuration Protocol (DHCP) management service, a shared storage volume, and at least one Virtual Dynamic Host Configuration Protocol (vDHCP) service, the method includes: The DHCP management service initializes a preset DHCP configuration file template, generates a vDHCP service deployment file, and writes the initialized DHCP configuration file to a shared storage volume. Based on the initialized DHCP configuration file and the vDHCP service deployment file, deploy each of the vDHCP services in the container cloud platform; When the DHCP management service receives a subnet management instruction relative to the subnet segment sent by the front-end page, it updates the DHCP configuration file according to the subnet management instruction; Restart the target vDHCP service that manages the subnet segment to configure it according to the updated DHCP configuration file; The step of updating the DHCP configuration file according to the subnet segment management command includes: The subnet configuration information corresponding to the subnet segment is determined in the DHCP configuration file of the shared storage volume; Determine the management type corresponding to the subnet segment management command; When the management type is new information, the new configuration information in the subnet management instruction is written into the DHCP configuration file to obtain the updated DHCP configuration file; When the management type is deletion information, the configuration information in the subnet configuration information that matches the subnet management command is deleted to obtain the updated DHCP configuration file; When the management type is edit information, the configuration information in the subnet configuration information that matches the subnet management command is updated to obtain the updated DHCP configuration file.
2. The method according to claim 1, characterized in that, Also includes: The DHCP management service obtains the subnet configuration query command sent by the front-end page, queries the subnet configuration information corresponding to the subnet segment, and returns it to the front-end page.
3. The method according to claim 1, characterized in that, Also includes: The DHCP management service obtains the usage information query command sent by the front-end page, determines the query result corresponding to the usage information query command, and feeds it back to the front-end page.
4. The method according to claim 3, characterized in that, The step of determining the query result corresponding to the usage information query instruction and feeding it back to the front-end page includes: Extract the address to be queried from the usage information query instruction; Determine the latest allocation record and corresponding usage information of the address to be queried in the service lease file of the shared storage volume; Based on the latest allocation record and the usage information, the query result is determined and fed back to the front-end page.
5. The method according to claim 1, characterized in that, Also includes: The service operation adjustment instructions sent by the front-end page are obtained through the DHCP management service, and the corresponding vDHCP service is adjusted according to the service operation adjustment instructions.
6. The method according to claim 5, characterized in that, The service operation adjustment instructions include: starting the vDHCP service, stopping the vDHCP service, and / or adjusting the number of service running instances.
7. A management device for a Virtual Dynamic Host Configuration Protocol (VDHCP) service, characterized in that, include: The initialization module is used to initialize a preset DHCP configuration file template through the DHCP management service, generate a vDHCP service deployment file, and write the initialized DHCP configuration file to the shared storage volume. The service deployment module is used to deploy various vDHCP services within the container cloud platform based on the initialized DHCP configuration file and the vDHCP service deployment file. The file update module is used to update the DHCP configuration file according to the subnet management instruction sent by the front-end page when the DHCP management service receives the subnet management instruction relative to the subnet segment. The service restart module is used to restart the target vDHCP service that manages the subnet segment, so that the target vDHCP service can be configured according to the updated DHCP configuration file. Specifically, the file update module is used for: The subnet configuration information corresponding to the subnet segment is determined in the DHCP configuration file of the shared storage volume; Determine the management type corresponding to the subnet segment management command; When the management type is new information, the new configuration information in the subnet management instruction is written into the DHCP configuration file to obtain the updated DHCP configuration file; When the management type is deletion information, the configuration information in the subnet configuration information that matches the subnet management command is deleted to obtain the updated DHCP configuration file; When the management type is edit information, the configuration information in the subnet configuration information that matches the subnet management command is updated to obtain the updated DHCP configuration file.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the management method of the Virtual Dynamic Host Configuration Protocol service as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the management method of the Virtual Dynamic Host Configuration Protocol service as described in any one of claims 1-6.