IP address allocation method, device and equipment for edge computing scene

By filling in the loopback address and gateway address in the IP address allocation method of DHCP relay device and IPAM server in the edge computing network architecture, the problem of probability failure of IP address allocation in the dual-uplink DHCP relay device network architecture is solved, and accurate IP address allocation and precise positioning of network topology is achieved.

CN119697160APending Publication Date: 2025-03-25BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411897333.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the network architecture of dual uplink DHCP relay devices, there is a problem of probabilistic failure when allocating IP addresses through existing methods.

Method used

After receiving the DHCP discovery message sent by the edge server, the DHCP relay device fills its loopback address and gateway address into the message, and sends the processed message to the IPAM server. The IPAM server assigns the target IP address to the edge server according to the gateway address, and sends DHCP messages to the DHCP relay device according to the loopback address.

Benefits of technology

By ensuring that DHCP provides packets accurately routed to the DHCP relay device corresponding to the loopback address, the probabilistic failure problem during IP address allocation is solved, and the precise positioning of network topology and intelligent allocation of dynamic IP addresses are realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697160A_ABST
    Figure CN119697160A_ABST
Patent Text Reader

Abstract

The invention provides an edge computing scene-oriented IP address allocation method, device and equipment, and relates to the field of cloud computing, in particular to the technical fields of edge computing, data centers, servers and the like. The method comprises the following steps: a DHCP (Dynamic Host Configuration Protocol) relay device receives a DHCP discovery message sent by an edge server, fills a loopback address and a gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message, and sends the processed message to an IPAM (Internet Protocol Access Module) server; the IPAM server allocates a target IP address to the edge server according to the gateway address in the processed message, and sends a DHCP providing message containing the target IP address to the DHCP relay device according to the loopback address in the processed message; and the DHCP relay device sends the DHCP providing message to the edge server. According to the invention, accurate positioning of the network topology and intelligent allocation of the dynamic IP addresses can be realized, and the probabilistic failure problem of IP address allocation is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to technical fields such as edge computing, data centers, and servers in the field of cloud computing, and in particular to an IP address allocation method, device, and equipment for edge computing scenarios. Background Art

[0002] In the edge computing network architecture, IP addresses are usually allocated and managed for all edge servers through a centralized Internet Protocol (IP) address management (IPAM) server. The edge servers that apply for IP addresses are scattered in the computer rooms of each edge computing node, and the IPAM server is located in the centralized central cloud. The edge servers and IPAM servers interact through the public network.

[0003] Currently, when dynamic IP address allocation is performed across the Layer 2 network through an IPAM server, it relies on the Dynamic Host Configuration Protocol (DHCP) relay mechanism. The GIADDR field in the DHCP message is usually filled with the gateway address of the DHCP relay device to mark the source of the DHCP message, so that the IPAM server can allocate IP addresses to edge servers based on the gateway address of the DHCP relay device. However, for a network architecture with dual upstream DHCP relay devices, there is a probabilistic failure problem when allocating IP addresses in the above manner. Summary of the invention

[0004] The present disclosure provides an IP address allocation method, apparatus and device for accurately allocating IP addresses for edge computing scenarios.

[0005] According to a first aspect of the present disclosure, an IP address allocation method for edge computing scenarios is provided, which is applied to a DHCP relay device in an edge computing network architecture. The IP address allocation method includes: receiving a DHCP discovery message sent by an edge server; filling the loopback address and gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message; sending the processed message to an IPAM server to obtain a DHCP offer message sent by the IPAM server, the IPAM server being used to allocate a target IP address to the edge server according to the gateway address, and sending a DHCP offer message according to the loopback address, the DHCP offer message including the target IP address; sending the DHCP offer message to the edge server.

[0006] According to a second aspect of the present disclosure, an IP address allocation method for edge computing scenarios is provided, which is applied to an IPAM server in an edge computing network architecture. The IP address allocation method includes: receiving a DHCP discover message sent by a DHCP relay device, where the DHCP discover message is a processed message obtained by filling the loopback address and gateway address of the DHCP relay device into the DHCP discover message sent by the edge server after the DHCP relay device receives the DHCP discover message sent by the edge server; allocating a target IP address to the edge server according to the gateway address; sending a DHCP offer message to the DHCP relay device according to the loopback address, where the DHCP offer message includes the target IP address, and the DHCP relay device is used to send the DHCP offer message to the edge server.

[0007] According to a third aspect of the present disclosure, an IP address allocation device for edge computing scenarios is provided, which is applied to a DHCP relay device in an edge computing network architecture. The IP address allocation device includes: a receiving unit, which is used to receive a DHCP discovery message sent by an edge server; a filling unit, which is used to fill the loopback address and gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message; a first sending unit, which is used to send the processed message to an IPAM server to obtain a DHCP offer message sent by the IPAM server, the IPAM server is used to allocate a target IP address to the edge server according to the gateway address, and send a DHCP offer message according to the loopback address, the DHCP offer message including the target IP address; a second sending unit, which is used to send a DHCP offer message to the edge server.

[0008] According to a fourth aspect of the present disclosure, an IP address allocation device for edge computing scenarios is provided, which is applied to an IPAM server in an edge computing network architecture, and the IP address allocation device includes: a receiving unit, which is used to receive a DHCP discovery message sent by a DHCP relay device, wherein the DHCP discovery message is a processed message obtained by filling the loopback address and the gateway address of the DHCP relay device into the DHCP discovery message sent by the edge server after the DHCP relay device receives the DHCP discovery message sent by the edge server; an allocation unit, which is used to allocate a target IP address to the edge server according to the gateway address; and a sending unit, which is used to send a DHCP offer message to the DHCP relay device according to the loopback address, wherein the DHCP offer message includes the target IP address, and the DHCP relay device is used to send the DHCP offer message to the edge server.

[0009] According to a fifth aspect of the present disclosure, an edge computing network architecture is provided, including: a DHCP relay device and an IPAM server; the DHCP relay device is used to execute the IP address allocation method for edge computing scenarios as described in the first aspect of the present disclosure; the IPAM server is used to execute the IP address allocation method for edge computing scenarios as described in the second aspect of the present disclosure.

[0010] According to the sixth aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the IP address allocation method for edge computing scenarios described in the first aspect or the second aspect.

[0011] According to a seventh aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the IP address allocation method for edge computing scenarios described in the first aspect or the second aspect.

[0012] According to an eighth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, the computer program being stored in a readable storage medium, at least one processor of an electronic device being able to read the computer program from the readable storage medium, the at least one processor executing the computer program so that the electronic device executes the IP address allocation method for edge computing scenarios described in the first aspect or the second aspect.

[0013] The technology disclosed in the present invention solves the problem of probabilistic failure in allocating IP addresses in the current manner for a network architecture with dual uplink DHCP relay devices. In the present invention, after receiving a DHCP discovery message sent by an edge server, the DHCP relay device fills the loopback address and gateway address of the DHCP relay device into the DHCP discovery message, obtains a processed message, and sends the processed message to the IPAM server; thereby, the IPAM server allocates a target IP address to the edge server according to the gateway address, and sends a DHCP offer message to the DHCP relay device according to the loopback address, the DHCP offer message including the target IP address; the DHCP relay device sends a DHCP offer message to the edge server. Since the loopback address of the DHCP relay device is unique, it can ensure that the IPAM server accurately routes the DHCP offer message to the DHCP relay device corresponding to the loopback address, so that the edge server accurately obtains the target IP address, realizes the precise positioning of the network topology and the intelligent allocation of dynamic IP addresses, avoids the problem of probabilistic failure in the allocation of IP addresses, and facilitates seamless integration with existing network devices and protocols while ensuring that the basic specifications of the original DHCP protocol remain unchanged.

[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0016] Figure 1 It is a schematic diagram of an IP address allocation method provided by the related art;

[0017] Figure 2 It is a schematic diagram of an application scenario to which the IP address allocation method for edge computing scenarios disclosed in the present invention is applicable;

[0018] Figure 3 is a schematic diagram according to a first embodiment of the present disclosure;

[0019] Figure 4 is a schematic diagram according to a second embodiment of the present disclosure;

[0020] Figure 5 is a schematic diagram according to a third embodiment of the present disclosure;

[0021] Figure 6 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0022] Figure 7 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0023] Figure 8 is a schematic diagram according to a sixth embodiment of the present disclosure;

[0024] Fig. 9 is a schematic diagram according to a seventh embodiment of the present disclosure;

[0025] Fig.10 is a schematic diagram according to an eighth embodiment of the present disclosure;

[0026] Fig.11 FIG. 1 is a schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION

[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0028] The present invention discloses an IP address allocation method, device and equipment for edge computing scenarios, which are applied to technical fields such as edge computing, data centers and servers in the field of cloud computing to achieve the purpose of accurately allocating IP addresses.

[0029] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0030] First, some technical terms involved in this disclosure are explained:

[0031] IP Address Management (IPAM) is a comprehensive IP address management system used for IP address pool management and automated IP allocation and recycling.

[0032] Dynamic Host Configuration Protocol (DHCP) is a network protocol used to automatically apply for IP addresses and other network configuration parameters such as virtual local area networks (VLANs) for devices such as server network cards. It relies on the existence and management of IPAM.

[0033] DHCP relay is a function of a network device (usually a router or switch) that is used to forward DHCP messages across the Layer 2 network between different subnets.

[0034] The dual uplink network architecture is a network connection mode that uses two DHCP relay devices (such as switches) to provide two independent links to connect network devices to improve network reliability and performance.

[0035] Gateway IP address (GIADDR), in the DHCP protocol, GIADDR is the IP address of the relay agent, specifically the gateway address of the DHCP relay device, which is used to identify the network device that forwards DHCP requests.

[0036] The DHCP relay agent information option (Option 82) is an extended option in the DHCP protocol. It can be freely extended and configured and is added to the DHCP discovery message by the DHCP relay agent (DHCP relay device).

[0037] In the edge computing network architecture, in order to solve the network management problem of a large number of edge computing edge nodes (i.e. edge servers), IP allocation and management are usually performed for all edge servers through a centralized IPAM server. The edge servers that apply for IP addresses are scattered in the computer rooms of each edge computing node, and the IPAM server is located on the centralized central cloud. The edge servers and IPAM servers interact through the public network.

[0038] At present, when dynamic IP address allocation is performed across the Layer 2 network through an IPAM server, the DHCP Relay mechanism is relied upon. Among them, the GIADDR field in the DHCP message is usually filled with the gateway address of the DHCP relay device to mark the source of the DHCP message. The relay of the DHCP message must be forwarded to the IPAM server through the upstream DHCP relay device (such as a switch), so that the IPAM server can allocate an IP address to the edge server based on the gateway address of the DHCP relay device. However, for the network architecture with dual upstream DHCP relay devices, in order to achieve high availability, the gateway addresses of the DHCP relay devices in the dual upstream network architecture are usually the same, resulting in the IPAM server being unable to accurately locate the target DHCP relay device when replying to the DHCP provision message. Therefore, there is a problem of probabilistic failure in allocating IP addresses through the above method, which leads to the risk of IP address allocation failure. This problem seriously restricts the reliability and flexibility of modern network infrastructure.

[0039] For example, Figure 1 FIG. 1 is a schematic diagram of an IP address allocation method provided by related technologies. Figure 1As shown, in the edge computing network architecture, taking the DHCP relay device as the first switch and the second switch as an example, the first switch and the second switch are a dual uplink network architecture, the first switch is connected to the first network card (eth0) of the edge server, and the second switch is connected to the second network card (eth1) of the edge server. The IP address allocation method provided by the related technology may include:

[0040] S101. When the edge server is started, the DHCP client on the first network card (eth0) of the edge server sends a DHCP discovery message in a broadcast manner.

[0041] Correspondingly, the first switch connected to the edge server receives the DHCP discovery message sent by the edge server.

[0042] S102. The first switch fills the gateway address of the first switch into the GIADDR field of the DHCP discovery message, and relays the DHCP discovery message filled with the gateway address of the first switch to the IPAM server located in the cloud center through the gateway via the public network.

[0043] Correspondingly, the IPAM server receives the DHCP discovery message.

[0044] It can be understood that the gateway address of the first switch is the same as the gateway address of the second switch, for example, both are: xxx1.

[0045] S103, the IPAM server parses the received DHCP discovery message, allocates a target IP address to the edge server according to the gateway address, and sends a DHCP offer message according to the gateway address, wherein the DHCP offer message includes the target IP address.

[0046] Since the gateway address of the first switch is the same as the gateway address of the second switch, the first switch may receive the DHCP offer message, or the second switch may receive the DHCP offer message, resulting in the DHCP offer message being probabilistically successfully sent to the first switch, and then the edge server probabilistically successfully obtains the target IP address.

[0047] refer to Figure 1 , in a single uplink physical network architecture, Figure 1 There is no probabilistic failure problem when allocating IP addresses in the process. However, in order to pursue network link redundancy and service reliability, a dual-uplink switch network architecture is usually used. Since the gateway addresses of the dual-uplink switches are the same, when the IPAM server replies to the gateway address with a DHCP offer message, the DHCP offer message cannot determine which dual-uplink switch to reply to, resulting in a probabilistic failure problem in IP address allocation.

[0048] In order to solve the above problems, the present disclosure provides an IP address allocation method for edge computing scenarios. After receiving the DHCP discovery message sent by the edge server, the DHCP relay device fills the loopback address and gateway address of the DHCP relay device into the DHCP discovery message, so that the IPAM server allocates the target IP address to the edge server according to the gateway address in the DHCP discovery message, and sends a DHCP offer message containing the target IP address to the DHCP relay device according to the loopback address in the DHCP discovery message. Since the loopback address of the DHCP relay device is unique, the IPAM server can accurately route the DHCP offer message to the DHCP relay device corresponding to the loopback address, so that the edge server accurately obtains the target IP address, which can avoid the problem of probabilistic failure when allocating IP addresses.

[0049] It can be seen that the IP address allocation method for edge computing scenarios provided by the present disclosure is aimed at the dual-uplink network architecture of the edge node (edge ​​server) in the edge computing scenario, providing an efficient network resource management solution for enterprise data centers and cloud computing infrastructure, and realizing accurate positioning of network topology and intelligent allocation of dynamic IP addresses. Among them, combined with the dynamic network environment, it can realize automatic identification of subnets and topologies, accurate allocation of IP addresses, and rapid adaptation to complex network scenarios, providing efficient network resource management support for edge computing scenarios, and is suitable for the construction and operation and maintenance of complex network environments in enterprise data centers, cloud computing infrastructure and edge computing scenarios.

[0050] Figure 2 It is a schematic diagram of an application scenario applicable to the IP address allocation method for edge computing scenarios disclosed in the present invention. The application scenario may include: an edge server, a first DHCP relay device connected to the first network card of the edge server, a second DHCP relay device connected to the second network card of the edge server, and an IPAM server. After receiving the DHCP discovery message sent by the DHCP client on the first network card of the edge server, the first DHCP relay device fills the loopback address and gateway address of the first DHCP relay device into the DHCP discovery message, so that the IPAM server allocates a target IP address to the edge server according to the gateway address in the DHCP discovery message, and sends a DHCP offer message containing the target IP address to the first DHCP relay device according to the loopback address in the DHCP discovery message; the first DHCP relay device sends a DHCP offer message to the edge server, and the edge server obtains the target IP address from the DHCP offer message.

[0051] It should be noted that Figure 2 This is only a schematic diagram of an application scenario provided by the embodiment of the present disclosure. Figure 2 does not limit the equipment included in Figure 2 The positional relationship between the devices is limited.

[0052] The following specific embodiments are used to describe in detail the technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0053] Figure 3 Schematic diagram of the first embodiment of the present disclosure. Figure 3 As shown, the IP address allocation method for edge computing scenarios provided by the first embodiment of the present disclosure is applied to DHCP relay devices and IPAM servers in edge computing network architecture. The IP address allocation method for edge computing scenarios provided by the first embodiment of the present disclosure includes:

[0054] S301: A DHCP relay device receives a DHCP discovery message sent by an edge server.

[0055] In the disclosed embodiment, the DHCP relay device is, for example, a switch or a router. Exemplarily, in an edge computing network architecture, the edge server sends a DHCP discovery (DISCOVER) message, for example, in a broadcast manner. A DHCP relay device that is connected to the edge server in communication can receive a DHCP discovery message sent by the edge server. The DHCP discovery message, for example, carries information such as a media access control (MAC) address of a network card of the edge server.

[0056] S302: The DHCP relay device fills the loopback address and gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message.

[0057] It can be understood that the loopback address of each DHCP relay device is unique. Therefore, different DHCP relay devices can be distinguished by the loopback address to ensure that the DHCP response message (such as the DHCP offer message) can be accurately routed to the DHCP relay device corresponding to the loopback address. Exemplarily, the DHCP relay device can fill the loopback address of the DHCP relay device into the gateway IP address (GIADDR) field of the DHCP discover message; the DHCP relay device can fill the gateway address of the DHCP relay device into the DHCP relay agent information option (Option 82) of the DHCP discover message, thereby obtaining a processed message, which is the processed DHCP discover message.

[0058] S303. The DHCP relay device sends the processed message to the IPAM server to obtain a DHCP provision message sent by the IPAM server.

[0059] Correspondingly, the IPAM server receives the DHCP discovery message (ie, the processed message) sent by the DHCP relay device.

[0060] Exemplarily, after obtaining the processed message (ie, the processed DHCP discovery message), the DHCP relay device sends the processed message to the IPAM server to obtain a DHCP offer (OFFER) message sent by the IPAM server.

[0061] S304. The IPAM server allocates a target IP address to the edge server according to the gateway address.

[0062] Exemplarily, referring to the example of step S302, after receiving the DHCP discovery message (i.e., the processed message) sent by the DHCP relay device, the IPAM server can parse the Option 82 option of the DHCP discovery message to obtain the gateway address of the DHCP relay device, thereby allocating a target IP address to the edge server based on the gateway address.

[0063] S305. The IPAM server sends a DHCP offer message to the DHCP relay device according to the loopback address, and the DHCP offer message includes the target IP address.

[0064] Correspondingly, the DHCP relay device receives the DHCP offer message sent by the IPAM server.

[0065] Exemplarily, referring to the example of step S302, after receiving the DHCP discovery message (i.e., the processed message) sent by the DHCP relay device, the IPAM server can parse the GIADDR field of the DHCP discovery message to obtain the loopback address of the DHCP relay device. According to the protocol specification of DHCP Relay, the DHCP offer message will be replied to the address specified in the GIADDR field, and the loopback address of the DHCP relay device is unique. Therefore, a DHCP offer message can be sent to the DHCP relay device corresponding to the loopback address, so as to correctly route the DHCP offer message to the DHCP relay device that sent the DHCP discovery message. Among them, the DHCP offer message includes the target IP address assigned to the edge server, and can also include information such as the mask address, gateway address, and timeliness of the target IP address.

[0066] S306: The DHCP relay device sends a DHCP offer message to the edge server.

[0067] Correspondingly, the edge server receives the DHCP offer message sent by the DHCP relay device.

[0068] In this step, after receiving the DHCP offer message sent by the IPAM server, the DHCP relay device sends the DHCP offer message to the edge server. Correspondingly, the edge server receives the DHCP offer message sent by the DHCP relay device, parses the DHCP offer message, and obtains the target IP address.

[0069] In the disclosed embodiment, after receiving the DHCP discovery message sent by the edge server, the DHCP relay device fills the loopback address and gateway address of the DHCP relay device into the DHCP discovery message, obtains a processed message, and sends the processed message to the IPAM server; thereby, the IPAM server allocates a target IP address to the edge server according to the gateway address, and sends a DHCP offer message to the DHCP relay device according to the loopback address, and the DHCP offer message includes the target IP address; the DHCP relay device sends the DHCP offer message to the edge server. Since the loopback address of the DHCP relay device is unique, it can ensure that the IPAM server accurately routes the DHCP offer message to the DHCP relay device corresponding to the loopback address, so that the edge server accurately obtains the target IP address, realizes the precise positioning of the network topology and the intelligent allocation of dynamic IP addresses, avoids the problem of probabilistic failure when allocating IP addresses, and facilitates seamless integration with existing network devices and protocols while ensuring that the basic specifications of the original DHCP protocol remain unchanged.

[0070] Figure 4 Schematic diagram of the second embodiment of the present disclosure. Based on the above embodiment, the present disclosure further describes the IP address allocation method for edge computing scenarios. Figure 4 As shown, the IP address allocation method for edge computing scenarios provided by the second embodiment of the present disclosure may include:

[0071] S401: A DHCP relay device receives a DHCP discovery message sent by an edge server.

[0072] The implementation principle and technical effect of S401 can be referred to the above Figure 3 The embodiment of step S301 is not described in detail.

[0073] In the disclosed embodiment, Figure 3 The step S302 may further include the following step S402:

[0074] S402: The DHCP relay device fills the loopback address of the DHCP relay device into the gateway IP address field of the DHCP discover message, and fills the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discover message to obtain a processed message.

[0075] Exemplarily, after receiving the DHCP discovery message sent by the edge server, the DHCP relay device fills the loopback address of the DHCP relay device into the GIADDR field of the DHCP discovery message, and fills the gateway address of the DHCP relay device into the Option82 option of the DHCP discovery message to obtain a processed message. It can be understood that the embodiment of the present disclosure replaces the gateway address of the DHCP relay device in the current related technology with the loopback address of the DHCP relay device, and fills it into the DHCP discovery message as a unique GIADDR identifier to ensure the accurate routing of the DHCP OFFER message; and extends the OPTION82 option in the DHCP protocol, embeds more network topology information, carries the gateway address of the DHCP relay device in the OPTION82 option, and uses the gateway address for the allocation of IP addresses. Under the condition of ensuring that the basic specifications of the original DHCP protocol remain unchanged, the additional information transmission of the subnet is realized by extending the OPTION82 option, which is convenient for seamless integration with existing network devices and protocols.

[0076] Optionally, filling the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discover message may include: filling the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discover message according to a preset protocol format.

[0077] Exemplarily, the information and format of the OPTION82 option can be pre-agreed between the DHCP relay device and the IPAM server, so that the gateway address of the DHCP relay device can be filled into the OPTION82 option of the DHCP discovery message according to the preset protocol format, thereby facilitating the IPAM server to parse the OPTION82 option according to the preset protocol format to obtain the gateway address.

[0078] S403. The DHCP relay device sends the processed message to the IPAM server to obtain a DHCP provision message sent by the IPAM server.

[0079] Correspondingly, the IPAM server receives the DHCP discovery message (ie, the processed message) sent by the DHCP relay device.

[0080] The implementation principle and technical effect of S403 can be referred to the above Figure 3Optionally, in the DHCP discovery message received by the IPAM server, the loopback address is filled in the gateway IP address field of the DHCP discovery message, and the gateway address is filled in the DHCP relay agent information option of the DHCP discovery message.

[0081] It can be understood that when the DHCP relay device sends a DHCP discovery message to the IPAM server, it fills the loopback address of the DHCP relay device into the gateway IP address field of the DHCP discovery message, and fills the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discovery message. Therefore, in the DHCP discovery message received by the IPAM server, the loopback address is filled in the gateway IP address field of the DHCP discovery message, and the gateway address is filled in the DHCP relay agent information option of the DHCP discovery message.

[0082] In the disclosed embodiment, Figure 3 The step S304 may further include the following three steps S404 to S406:

[0083] S404. The IPAM server parses the DHCP relay agent information option according to a preset protocol format to obtain a gateway address.

[0084] Exemplarily, the preset protocol format is the information and format of the OPTION82 option pre-agreed between the DHCP relay device and the IPAM server. Therefore, the IPAM server can parse the DHCP relay agent information option according to the preset protocol format to obtain the gateway address. It can be understood that after receiving the DHCP discovery message (i.e., the processed message) sent by the DHCP relay device, the IPAM server no longer relies on the traditional GIADDR field in the DHCP discovery message to locate the subnet and allocate the IP address, but parses the content in the DHCP OPTION82 option according to the agreed preset protocol format, and extracts the gateway address of the subnet of the IPAM server. Based on the key field of the gateway address, the IPAM server can complete the allocation of IP addresses at the central end.

[0085] S405. The IPAM server queries the subnet gateway address in the IPAM server according to the gateway address, and determines the target subnet corresponding to the gateway address.

[0086] Exemplarily, the IPAM server matches the gateway address of the DHCP relay device with all subnet gateway addresses in the IPAM server, and can determine the target subnet corresponding to the gateway address of the DHCP relay device.

[0087] S406. The IPAM server allocates a target IP address to the edge server according to the target subnet.

[0088] Exemplarily, assuming that the gateway address of the DHCP relay device is "100.10.1.1", the network segment of the target subnet corresponding to the gateway address is: from "100.10.1.100" to "100.10.1.200", then the target IP address can be allocated to the edge server from this network segment, and the allocated target IP address is, for example, "100.10.1.101".

[0089] S407. The IPAM server sends a DHCP offer message to the DHCP relay device according to the loopback address, and the DHCP offer message includes the target IP address.

[0090] Correspondingly, the DHCP relay device receives the DHCP offer message sent by the IPAM server.

[0091] The implementation principle and technical effect of S407 can be referred to the above Figure 3 The embodiment of step S305 is not described in detail.

[0092] S408: The DHCP relay device sends a DHCP offer message to the edge server.

[0093] Correspondingly, the edge server receives the DHCP offer message sent by the DHCP relay device.

[0094] The implementation principle and technical effect of S408 can be referred to the above Figure 3 The embodiment of step S306 is not described in detail.

[0095] S409: The DHCP relay device receives a DHCP request message sent by the edge server, where the DHCP request message carries a target IP address.

[0096] In this step, after receiving the DHCP offer message sent by the DHCP relay device, the edge server parses the DHCP offer message to obtain the target IP address. After determining to use the target IP address, the edge server sends a DHCP request (REQUEST) message to the DHCP relay device, and the DHCP request message carries the target IP address.

[0097] S410, the DHCP relay device fills the loopback address of the DHCP relay device into the DHCP request message, obtains the processed DHCP request message, sends the processed DHCP request message to the IPAM server to obtain the DHCP confirmation message sent by the IPAM server, and the processed DHCP request message carries the target IP address and the loopback address of the DHCP relay device.

[0098] Correspondingly, the IPAM server receives the DHCP request message sent by the DHCP relay device.

[0099] Exemplarily, after receiving the DHCP request message sent by the edge server, the DHCP relay device fills the loopback address of the DHCP relay device into the gateway IP address (GIADDR) field of the DHCP request message to ensure the accurate routing of the DHCP confirmation message. The DHCP relay device sends a DHCP request message to the IPAM server, and the DHCP request message carries the target IP address and the loopback address of the DHCP relay device.

[0100] S411. The IPAM server confirms that the target IP address is allocated to the edge server according to the DHCP request message sent by the DHCP relay device.

[0101] Exemplarily, after receiving the DHCP request message sent by the DHCP relay device, the IPAM server can confirm the allocation of the target IP address to the edge server, for example, by updating the usage status of the target IP address.

[0102] S412. The IPAM server sends a DHCP confirmation message according to the loopback address.

[0103] Correspondingly, the DHCP relay device receives the DHCP confirmation message sent by the IPAM server.

[0104] In this step, after confirming that the target IP address is assigned to the edge server, the IPAM server sends a DHCP confirmation message according to the loopback address.

[0105] S413: The DHCP relay device sends a DHCP confirmation message to the edge server, where the DHCP confirmation message is used to instruct the edge server to confirm the use of the target IP address.

[0106] Correspondingly, the edge server receives the DHCP confirmation message sent by the DHCP relay device.

[0107] In this step, after receiving the DHCP confirmation message sent by the IPAM server, the DHCP relay device sends a DHCP confirmation message to the edge server. After receiving the DHCP confirmation message, the edge server confirms to use the target IP address.

[0108] In the disclosed embodiment, after receiving the DHCP discover message sent by the edge server, the DHCP relay device fills the loopback address of the DHCP relay device into the gateway IP address field of the DHCP discover message, and fills the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discover message, and sends the processed DHCP discover message to the IPAM server; thereby, the IPAM server allocates a target IP address to the edge server according to the gateway address, and sends a DHCP offer message to the DHCP relay device according to the loopback address, and the DHCP offer message includes the target IP address; the DHCP relay device sends the DHCP offer message to the edge server; and then based on the target IP address and the loopback address in the gateway IP address field, the interaction of the DHCP request message and the DHCP confirmation message is completed. Among them, since the loopback address of the DHCP relay device is unique, it can ensure that the IPAM server can accurately route the DHCP response message to the DHCP relay device corresponding to the loopback address, so that the edge server can accurately obtain the target IP address and avoid the probabilistic failure problem when allocating IP addresses; the gateway address of the DHCP relay device is filled in the DHCP relay agent information option as the basis for the IPAM server to identify the edge server (edge ​​node) and remote IP address allocation, which can eliminate the dependence on the traditional gateway IP address field and enhance the flexibility of DHCP; while ensuring that the basic specifications of the original DHCP protocol remain unchanged, by extending the DHCP relay agent information option, additional information transmission of the subnet can be realized, which is convenient for seamless integration with existing network equipment and protocols, and has good scalability and compatibility.

[0109] Figure 5 is a schematic diagram according to the third embodiment of the present disclosure. Figure 5 As shown, the IP address allocation method for edge computing scenarios provided by the third embodiment of the present disclosure is applied to a DHCP relay device in an edge computing network architecture. The IP address allocation method for edge computing scenarios provided by the third embodiment of the present disclosure includes:

[0110] S501: Receive a DHCP discovery message sent by an edge server.

[0111] In the disclosed embodiment, the DHCP relay device is, for example, a switch or a router. Exemplarily, in an edge computing network architecture, the edge server sends a DHCP discovery (DISCOVER) message, for example, in a broadcast manner. A DHCP relay device connected to the edge server receives a DHCP discovery message sent by the edge server. The DHCP discovery message carries, for example, information such as the MAC address of the network card of the edge server.

[0112] S502: Fill the loopback address and gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message.

[0113] Exemplarily, the loopback address of the DHCP relay device can be filled into the gateway IP address (GIADDR) field of the DHCP discover message, and the gateway address of the DHCP relay device can be filled into the DHCP relay agent information option (Option82) of the DHCP discover message, thereby obtaining a processed message, which is a processed DHCP discover message.

[0114] S503. Send the processed message to the IPAM server to obtain a DHCP offer message sent by the IPAM server. The IPAM server is used to allocate a target IP address to the edge server according to the gateway address, and send a DHCP offer message according to the loopback address. The DHCP offer message includes the target IP address.

[0115] It can be understood that the gateway address is used to assign a target IP address to the edge server, and the loopback address is used to send a DHCP response message, such as the DHCP offer message in this step.

[0116] S504: Send a DHCP offer message to the edge server.

[0117] In the disclosed embodiment, after receiving the DHCP discovery message sent by the edge server, the loopback address and gateway address of the DHCP relay device are filled into the DHCP discovery message to obtain a processed message, and the processed message is sent to the IPAM server, so that the IPAM server allocates a target IP address to the edge server according to the gateway address, and sends a DHCP offer message according to the loopback address. The DHCP offer message includes the target IP address, and the DHCP relay device sends the DHCP offer message to the edge server. Since the loopback address of the DHCP relay device is unique, it can ensure that the IPAM server accurately routes the DHCP offer message to the DHCP relay device corresponding to the loopback address, so that the edge server accurately obtains the target IP address, avoiding the problem of probabilistic failure when allocating IP addresses.

[0118] Figure 6 is a schematic diagram according to the fourth embodiment of the present disclosure. Figure 6 As shown, the IP address allocation method for edge computing scenarios provided by the fourth embodiment of the present disclosure is applied to an IPAM server in an edge computing network architecture. The IP address allocation method for edge computing scenarios provided by the fourth embodiment of the present disclosure includes:

[0119] S601. Receive a DHCP discover message sent by a DHCP relay device. The DHCP discover message is a processed message obtained by filling the loopback address and gateway address of the DHCP relay device into the DHCP discover message sent by the edge server after receiving the DHCP discover message sent by the edge server.

[0120] S602: Allocate a target IP address to the edge server according to the gateway address.

[0121] Exemplarily, after receiving a DHCP discover message (ie, a processed message) sent by a DHCP relay device, the DHCP discover message may be parsed to obtain a gateway address of the DHCP relay device, thereby allocating a target IP address to the edge server according to the gateway address.

[0122] S603: Send a DHCP offer message to the DHCP relay device according to the loopback address, where the DHCP offer message includes a target IP address, and the DHCP relay device is used to send the DHCP offer message to the edge server.

[0123] Exemplarily, after receiving the DHCP discovery message (i.e., the processed message) sent by the DHCP relay device, the IPAM server can parse the GIADDR field of the DHCP discovery message to obtain the loopback address of the DHCP relay device, and then send a DHCP offer message to the DHCP relay device according to the loopback address. The DHCP offer message includes the target IP address, which in turn enables the DHCP relay device to send a DHCP offer message to the edge server. The edge server parses the DHCP offer message to obtain the target IP address.

[0124] In the embodiment of the present disclosure, after receiving the DHCP discovery message sent by the DHCP relay device, the target IP address is allocated to the edge server according to the gateway address, and a DHCP offer message is sent to the DHCP relay device according to the loopback address. The DHCP offer message includes the target IP address, and the DHCP relay device is used to send the DHCP offer message to the edge server. Since the loopback address of the DHCP relay device is unique, it is possible to ensure that the DHCP offer message is accurately routed to the DHCP relay device corresponding to the loopback address, so that the DHCP relay device sends the DHCP offer message to the edge server, so that the edge server accurately obtains the target IP address, avoiding the problem of probabilistic failure when allocating IP addresses.

[0125] Based on the above embodiments, Figure 7 is a schematic diagram according to the fifth embodiment of the present disclosure. Figure 7 As shown, the IP address allocation method for edge computing scenarios provided by the embodiment of the present disclosure is applied to Figure 1In the edge computing network architecture shown. The IP address allocation method for edge computing scenarios provided in the fifth embodiment of the present disclosure may include:

[0126] S701: When the edge server is started, the DHCP client on the first network card (eth0) of the edge server sends a DHCP discovery message in a broadcast manner.

[0127] Correspondingly, the first switch connected to the edge server receives the DHCP discovery message sent by the edge server.

[0128] S702. The first switch fills the loopback address of the first switch into the GIADDR field of the DHCP discovery message, and fills the gateway address of the first switch into the Option 82 option of the DHCP discovery message to obtain a processed message; and relays the processed message to the IPAM server located in the cloud center through the gateway via the public network.

[0129] Accordingly, the IPAM server receives the processed message.

[0130] The loopback address of the first switch is, for example, yyy2, and the loopback address of the second switch is, for example, yyy3. The loopback address of each switch is unique. The gateway address of the first switch and the gateway address of the second switch are, for example, both xxx1.

[0131] S703, the IPAM server parses the processed DHCP discovery message (ie, the processed message), allocates a target IP address to the edge server according to the gateway address, and sends a DHCP offer message to the first switch according to the loopback address, wherein the DHCP offer message includes the target IP address.

[0132] Correspondingly, the first switch receives the DHCP offer message sent by the IPAM server, and sends the DHCP offer message to the edge server (not shown in the figure). The edge server receives the DHCP offer message sent by the first switch, thereby obtaining the target IP address.

[0133] and Figure 1Compared with the related technologies shown in the figure, the embodiment of the present disclosure replaces the gateway address of the switch in the current related technology with the loopback address of the switch, and fills it into the DHCP discovery message as a unique GIADDR identifier to ensure the accurate routing of the DHCP provided message; and extends the OPTION82 option in the DHCP protocol, embeds more network topology information, carries the gateway address of the switch in the OPTION82 option, and uses the gateway address for IP address allocation. While ensuring that the basic specifications of the original DHCP protocol remain unchanged, the additional information transmission of the subnet is realized by extending the OPTION82 option, which facilitates seamless integration with existing network devices and protocols.

[0134] Based on the above embodiments, it can be understood that the IP address allocation method for edge computing scenarios provided by the embodiments of the present disclosure can solve the limitations of the existing DHCP allocation mechanism based on the GIADDR field, especially in applications that require accurate routing of DHCP messages and support for complex subnet allocation scenarios, and provides a more efficient and reliable solution for IP address allocation across DHCP relay devices (such as switches).

[0135] Figure 8 Schematic diagram of the sixth embodiment of the present disclosure, applied to a dynamic host configuration protocol DHCP relay device in an edge computing network architecture. Figure 8 As shown, the IP address allocation device 800 for edge computing scenarios provided by the sixth embodiment of the present disclosure includes: a receiving unit 801, a filling unit 802, a first sending unit 803 and a second sending unit 804. Among them:

[0136] The receiving unit 801 is configured to receive a DHCP discovery message sent by an edge server.

[0137] The filling unit 802 is used to fill the loopback address and gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message.

[0138] The first sending unit 803 is used to send the processed message to the IPAM server to obtain a DHCP offer message sent by the IPAM server. The IPAM server is used to allocate a target IP address to the edge server according to the gateway address and send a DHCP offer message according to the loopback address. The DHCP offer message includes the target IP address.

[0139] The second sending unit 804 is configured to send a DHCP offer message to the edge server.

[0140] In some embodiments, the filling unit 802 includes: a filling module (not shown in the figure), which is used to fill the loopback address of the DHCP relay device into the gateway IP address field of the DHCP discovery message, and fill the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discovery message to obtain a processed message.

[0141] In some embodiments, the filling module includes: a filling submodule (not shown in the figure), which is used to fill the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discovery message according to a preset protocol format.

[0142] In some embodiments, the IP address allocation device 800 for edge computing scenarios also includes a processing unit (not shown in the figure), which is used to: after the second sending unit 804 sends a DHCP offer message to the edge server, receive a DHCP request message sent by the edge server, the DHCP request message carries a target IP address; fill the loopback address into the DHCP request message to obtain a processed DHCP request message; send the processed DHCP request message to the IPAM server to obtain a DHCP confirmation message sent by the IPAM server, the processed DHCP request message carries the target IP address and the loopback address; the IPAM server is used to confirm that the target IP address is allocated to the edge server according to the processed DHCP request message, and send a DHCP confirmation message according to the loopback address; send a DHCP confirmation message to the edge server, the DHCP confirmation message is used to indicate that the edge server confirms the use of the target IP address.

[0143] Figure 8 The provided IP address allocation device for edge computing scenarios can be used to execute the solution of the DHCP relay device in any of the above method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0144] Fig. 9 Schematic diagram of the seventh embodiment of the present disclosure, applied to an IPAM server in an edge computing network architecture. Fig. 9 As shown, the IP address allocation device 900 for edge computing scenarios provided by the seventh embodiment of the present disclosure includes: a receiving unit 901, an allocation unit 902 and a sending unit 903. Among them:

[0145] The receiving unit 901 is used to receive a DHCP discover message sent by a DHCP relay device. The DHCP discover message is a processed message obtained by filling the loopback address and gateway address of the DHCP relay device into the DHCP discover message sent by the edge server after the DHCP relay device receives the DHCP discover message sent by the edge server.

[0146] The allocating unit 902 is configured to allocate a target IP address to the edge server according to the gateway address.

[0147] The sending unit 903 is used to send a DHCP offer message to the DHCP relay device according to the loopback address, the DHCP offer message includes a target IP address, and the DHCP relay device is used to send the DHCP offer message to the edge server.

[0148] In some embodiments, the loopback address is filled in the gateway IP address field of the DHCP discover message sent by the DHCP relay device, and the gateway address is filled in the DHCP relay agent information option of the DHCP discover message sent by the DHCP relay device.

[0149] In some embodiments, the allocation unit 902 includes: a parsing module (not shown in the figure), which is used to parse the DHCP relay agent information option according to a preset protocol format to obtain a gateway address; and an allocation module (not shown in the figure), which is used to allocate a target IP address to the edge server according to the gateway address.

[0150] In some embodiments, the allocation module includes: a determination submodule (not shown in the figure), which is used to query the subnet gateway address in the IPAM server according to the gateway address, and determine the target subnet corresponding to the gateway address; an allocation submodule (not shown in the figure), which is used to allocate a target IP address to the edge server according to the target subnet.

[0151] In some embodiments, the IP address allocation device 900 for edge computing scenarios also includes a processing unit (not shown in the figure), which is used to: after the sending unit 903 sends a DHCP offer message to the DHCP relay device according to the loopback address, receive a DHCP request message sent by the DHCP relay device, the DHCP request message is a processed DHCP request message obtained by filling the loopback address into the DHCP request message sent by the edge server after the DHCP relay device receives the DHCP request message sent by the edge server, and the processed DHCP request message carries the target IP address and the loopback address; according to the DHCP request message sent by the DHCP relay device, confirm that the target IP address is allocated to the edge server; send a DHCP confirmation message according to the loopback address, the DHCP relay device is used to send a DHCP confirmation message to the edge server, and the DHCP confirmation message is used to instruct the edge server to confirm the use of the target IP address.

[0152] Fig. 9 The provided IP address allocation device for edge computing scenarios can be used to execute the IPAM server solution in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.

[0153] Fig.10is a schematic diagram according to the eighth embodiment of the present disclosure. Fig.10 As shown, the edge computing network architecture 1000 provided in the eighth embodiment of the present disclosure includes: a DHCP relay device 1001 and an IPAM server 1002, and the DHCP relay device 1001 and the IPAM server 1002 are in communication connection. Among them, the DHCP relay device 1001 can adopt Figure 8 The structure of the device embodiment, which can be executed accordingly Figure 3 , Figure 4 , Figure 5 or Figure 7 The technical solution of the embodiment has similar implementation principles and technical effects, which will not be described here. Fig. 9 The structure of the device embodiment, which can be executed accordingly Figure 3 , Figure 4 , Figure 6 or Figure 7 The technical solutions of the embodiments have similar implementation principles and technical effects, which will not be described in detail here.

[0154] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the solution provided by any of the above embodiments.

[0155] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute a solution provided by any of the above embodiments.

[0156] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0157] Fig.111 is a schematic block diagram of an example electronic device 1100 that can be used to implement an embodiment of the present disclosure. 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 assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0158] like Fig.11 As shown, the electronic device 1100 includes a computing unit 1101, which can store data stored in a read-only memory (ROM) ( Fig.11 A computer program in ROM 1102 is loaded from storage unit 1108 to random access memory (RAM) ( Fig.11 The computer programs in the RAM 1103 are used to perform various appropriate actions and processes. The RAM 1103 may also store various programs and data required for the operation of the electronic device 1100. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. The input / output (I / O) interface ( Fig.11 The I / O interface 1105 is also connected to the bus 1104 .

[0159] Multiple components in the electronic device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 11011, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the electronic device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0160] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above, such as an IP address allocation method for edge computing scenarios. For example, in some embodiments, an IP address allocation method for edge computing scenarios may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the IP address allocation method for edge computing scenarios described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the IP address allocation method for edge computing scenarios in any other appropriate manner (e.g., by means of firmware).

[0161] 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 parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0162] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0163] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0164] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).

[0165] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

[0166] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0167] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0168] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, fusions, sub-fusions 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 the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. An IP address allocation method for edge computing scenarios, applied to a dynamic host configuration protocol DHCP relay device in an edge computing network architecture, the IP address allocation method comprising: Receive DHCP discovery message sent by edge server; Filling the loopback address and gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message; Sending the processed message to an IP address management (IPAM) server to obtain a DHCP offer message sent by the IPAM server, wherein the IPAM server is used to allocate a target IP address to the edge server according to the gateway address and send a DHCP offer message according to the loopback address, wherein the DHCP offer message includes the target IP address; Send the DHCP offer message to the edge server.

2. The IP address allocation method according to claim 1, wherein: The step of filling the loopback address and the gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message includes: The loopback address of the DHCP relay device is filled into the gateway IP address field of the DHCP discover message, and the gateway address of the DHCP relay device is filled into the DHCP relay agent information option of the DHCP discover message to obtain a processed message.

3. The IP address allocation method according to claim 2, wherein: The step of filling the gateway address of the DHCP relay device into the DHCP relay agent information option of the DHCP discovery message includes: The gateway address of the DHCP relay device is filled into the DHCP relay agent information option of the DHCP discovery message according to a preset protocol format.

4. The IP address allocation method according to any one of claims 1 to 3, wherein: After sending the DHCP offer message to the edge server, the method further includes: Receiving a DHCP request message sent by the edge server, wherein the DHCP request message carries the target IP address; Filling the loopback address into the DHCP request message to obtain a processed DHCP request message; Sending the processed DHCP request message to the IPAM server to obtain a DHCP confirmation message sent by the IPAM server, wherein the processed DHCP request message carries the target IP address and the loopback address; the IPAM server is used to confirm that the target IP address is allocated to the edge server according to the processed DHCP request message, and send a DHCP confirmation message according to the loopback address; The DHCP confirmation message is sent to the edge server, where the DHCP confirmation message is used to instruct the edge server to confirm the use of the target IP address.

5. An IP address allocation method for edge computing scenarios, applied to an IP address management IPAM server in an edge computing network architecture, the IP address allocation method comprising: Receiving a DHCP discovery message sent by a DHCP relay device, wherein the DHCP discovery message is a processed message obtained by filling the loopback address and the gateway address of the DHCP relay device into the DHCP discovery message sent by the edge server after the DHCP relay device receives the DHCP discovery message sent by the edge server; Allocate a target IP address to the edge server according to the gateway address; A DHCP offer message is sent to the DHCP relay device according to the loopback address, wherein the DHCP offer message includes the target IP address, and the DHCP relay device is used to send the DHCP offer message to the edge server.

6. The IP address allocation method according to claim 5, wherein: The loopback address is filled in the gateway IP address field of the DHCP discover message sent by the DHCP relay device, and the gateway address is filled in the DHCP relay agent information option of the DHCP discover message sent by the DHCP relay device.

7. The IP address allocation method according to claim 6, wherein: The allocating a target IP address to the edge server according to the gateway address includes: Parsing the DHCP relay agent information option according to a preset protocol format to obtain the gateway address; A target IP address is allocated to the edge server according to the gateway address.

8. The IP address allocation method according to claim 7, wherein: The allocating a target IP address to the edge server according to the gateway address includes: Query the subnet gateway address in the IPAM server according to the gateway address, and determine the target subnet corresponding to the gateway address; A target IP address is allocated to the edge server according to the target subnet.

9. The IP address allocation method according to any one of claims 5 to 8, wherein: After sending the DHCP offer message to the DHCP relay device according to the loopback address, the method further includes: receiving a DHCP request message sent by the DHCP relay device, wherein the DHCP request message is a processed DHCP request message obtained by the DHCP relay device filling the loopback address into the DHCP request message sent by the edge server after receiving the DHCP request message sent by the edge server, and the processed DHCP request message carries the target IP address and the loopback address; Confirming, according to the DHCP request message sent by the DHCP relay device, that the target IP address is allocated to the edge server; A DHCP confirmation message is sent according to the loopback address, and the DHCP relay device is used to send the DHCP confirmation message to the edge server, and the DHCP confirmation message is used to instruct the edge server to confirm the use of the target IP address.

10. An IP address allocation device for edge computing scenarios, applied to a dynamic host configuration protocol DHCP relay device in an edge computing network architecture, the IP address allocation device comprising: A receiving unit, configured to receive a DHCP discovery message sent by an edge server; A filling unit, used to fill the loopback address and gateway address of the DHCP relay device into the DHCP discovery message to obtain a processed message; A first sending unit, configured to send the processed message to an IP address management (IPAM) server to obtain a DHCP offer message sent by the IPAM server, wherein the IPAM server is configured to allocate a target IP address to the edge server according to the gateway address and send a DHCP offer message according to the loopback address, wherein the DHCP offer message includes the target IP address; The second sending unit is configured to send the DHCP offer message to the edge server.

11. An IP address allocation device for edge computing scenarios, applied to an IP address management IPAM server in an edge computing network architecture, the IP address allocation device comprising: a receiving unit, configured to receive a DHCP discovery message sent by a DHCP relay device, wherein the DHCP discovery message is a processed message obtained by filling the loopback address and the gateway address of the DHCP relay device into the DHCP discovery message sent by the edge server after the DHCP relay device receives the DHCP discovery message sent by the edge server; an allocating unit, configured to allocate a target IP address to the edge server according to the gateway address; The sending unit is configured to send a DHCP offer message to the DHCP relay device according to the loopback address, wherein the DHCP offer message includes the target IP address, and the DHCP relay device is configured to send the DHCP offer message to the edge server.

12. An edge computing network architecture, comprising: Dynamic Host Configuration Protocol DHCP relay device and IP address management IPAM server; The DHCP relay device is used to execute the IP address allocation method for edge computing scenarios according to any one of claims 1 to 4; The IPAM server is used to execute the IP address allocation method for edge computing scenarios as described in any one of claims 5 to 9.

13. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the IP address allocation method for edge computing scenarios according to any one of claims 1 to 9.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the IP address allocation method for edge computing scenarios according to any one of claims 1 to 9.

15. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the IP address allocation method for edge computing scenarios according to any one of claims 1 to 9.