CN117675764A - Network resource management method, device, network equipment and storage medium - Google Patents

Network resource management method, device, network equipment and storage medium Download PDF

Info

Publication number
CN117675764A
CN117675764A CN202211024257.1A CN202211024257A CN117675764A CN 117675764 A CN117675764 A CN 117675764A CN 202211024257 A CN202211024257 A CN 202211024257A CN 117675764 A CN117675764 A CN 117675764A
Authority
CN
China
Prior art keywords
resource
network address
network
message
lease
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211024257.1A
Other languages
Chinese (zh)
Inventor
刘鹏
牛承光
王国强
陈子龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211024257.1A priority Critical patent/CN117675764A/en
Publication of CN117675764A publication Critical patent/CN117675764A/en
Pending legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The application discloses a network resource management method, a device, network equipment and a storage medium, and belongs to the technical field of communication. In the embodiment of the present application, the network device serving as the DHCP server may send a resource status query message to the DHCP client using the network resource according to the allocated network address resource, and release the lease corresponding to the network address resource according to the resource release message returned by the DHCP client. Through the technical scheme, the DHCP server side actively initiates the inquiry to the state of the allocated network address resource, so that the network address resource which is not used by the DHCP client side can be recovered in time, and the utilization efficiency of the network resource is effectively improved.

Description

Network resource management method, device, network equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and apparatus for managing network resources, a network device, and a storage medium.
Background
In networks that communicate based on the internet protocol (internet protocol, IP), it is necessary to assign IP addresses to devices that connect to the network. The dynamic host configuration protocol (dynamic host configuration protocol, DHCP) is a network management protocol, and in a network to which DHCP is applied, a DHCP client (DHCP client) requests network address resources from a DHCP server (DHCP server), and the DHCP server dynamically allocates network address resources including an IP address to the DHCP client, so that the DHCP client can perform networking based on the allocated network address resources.
In the process of dynamically managing network address resources based on DHCP, since an (or a segment of) IP address can only be allocated to one DHCP client for use, a lease mechanism is generally used to ensure reasonable allocation of IP addresses. The lease mechanism refers to: the DHCP server allocates the IP address to the DHCP client in a certain lease (which is equivalent to the use time of the IP address); before the lease expires, the DHCP client can renew lease by sending a renewing lease message to the DHCP server so as to prolong the service time of the IP address; if the lease expires and the DHCP server does not receive the renewing lease message of the DHCP client, the DHCP server recovers the IP address, that is, resets the IP address to an allocable state.
However, in the current lease mechanism, if the equipment is restarted, the link fails or the message transmission fails, it is difficult to agree on the use state of the network address resource in time between the DHCP client and the DHCP server, so that the utilization efficiency of the network resource is greatly affected.
Disclosure of Invention
The application provides a network resource management method, a device, network equipment and a storage medium, which can effectively improve the utilization efficiency of network resources. The technical scheme is as follows:
In a first aspect, a network resource management method is provided, applied to a network device, where the network device sets a protocol DHCP server for a dynamic host, and the method includes:
based on the network address resource allocated by the network device, sending a resource status query message to a DHCP client using the network address resource, wherein the resource status query message is used for determining whether the DHCP client renews renting the network address resource;
and in response to receiving a resource release message of the DHCP client for the network address resource, releasing a lease of the network address resource, wherein the lease indicates the use permission of the network address resource.
Through the technical scheme, the DHCP server side actively initiates the inquiry to the state of the allocated network address resource, so that the network address resource which is not used by the DHCP client side can be recovered in time, and the utilization efficiency of the network resource is effectively improved.
In one possible implementation manner, the sending, based on the allocated network address resource of the network device, a resource status query message to the DHCP client using the network address resource includes:
and sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network device in response to the network device recovering from the failure.
By adopting the technical scheme, the network equipment actively transmits the resource status query message after fault recovery, and can timely determine whether the DHCP client releases the network address resource, thereby effectively avoiding the condition that the network address resource cannot be timely recovered due to the fault of the DHCP server and improving the utilization efficiency of the network resource.
In one possible implementation manner, the sending, based on the allocated network address resource of the network device, a resource status query message to the DHCP client using the network address resource includes:
and sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network device at intervals of a first time length, wherein the first time length is smaller than a first lease of the network address resource for the DHCP client.
According to the technical scheme, the network equipment periodically and actively transmits the resource status query message in the lease period, so that whether the DHCP client releases the network address resource can be timely determined, the situation that the network address resource cannot be timely recovered due to the problem of a transmission link is effectively avoided, and the utilization efficiency of the network resource is improved.
In one possible implementation manner, the sending, at intervals of a first time period, a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network device includes:
acquiring the used duration of the network address resource by the DHCP client at intervals of a first duration;
if the used time period exceeds the inquiry interval and the resource lease message for the network address resource is not received, sending a resource status inquiry message to the DHCP client based on the network address indicated by the network address resource, wherein the inquiry interval is determined based on the first lease period and an error threshold value, and the error threshold value indicates a time difference corresponding to network transmission delay.
By the technical scheme, the influence possibly caused by network delay on message transmission is fully considered, and the redundant resource status inquiry message is prevented from being sent under the condition that the DHCP client side sends a resource renting message or a resource releasing message, so that the system overhead is effectively reduced.
In one possible implementation manner, after the sending, at every first time interval, a resource status query packet to a DHCP client that uses the network address resource based on the network address resource that has been allocated by the network device, the method further includes:
If the resource release message or the resource lease message aiming at the network address resource is not received within the target duration of waiting for response after the resource status query message is sent, determining a target retransmission interval and target retransmission times based on the target duration;
and retransmitting the resource status query message based on the target retransmission interval and the target retransmission times.
By adopting the technical scheme, the conflict caused by the contention of a plurality of nodes in the network system to the transmission channel can be avoided, and the efficiency of recovering the network address resource is further improved.
In one possible embodiment, the method further comprises:
and in response to receiving a resource re-lease message of the DHCP client for the network address resource, prolonging the lease of the DHCP client for the network address resource, wherein the resource re-lease message is used for requesting to continuously lease the network address resource.
In one possible embodiment, the method further comprises:
responding to the received re-lease inquiry message of the DHCP client for the network address resource, and replying a response message, wherein the response message indicates that the network equipment normally provides the re-lease service of the network resource;
and responding to the received resource re-lease message of the DHCP client for the network address resource, and returning a re-lease response message to the DHCP client based on the allocation state of the network address resource, wherein the re-lease response message indicates the re-lease result of the DHCP client for the network address resource.
In one possible implementation manner, the returning of the lease renewing response message to the DHCP client based on the allocation status of the network address resource includes any one of the following:
returning a refusal response message to the DHCP client under the condition that the network address resource is allocated to other DHCP clients, wherein the refusal response message indicates that the DHCP client fails to renew lease the network address resource;
and under the condition that the network address resources are not allocated to other DHCP clients, returning a confirmation response message to the DHCP client, wherein the confirmation response message indicates that the DHCP client renews renting the network address resources successfully.
Through the technical scheme, the DHCP server side actively initiates the inquiry to the state of the allocated network address resource, so that the network address resource which is not used by the DHCP client side can be recovered in time, and the utilization efficiency of the network resource is effectively improved. In addition, aiming at the conditions that the DHCP server fails, the transmission link is problematic and the like, whether the DHCP client rents the network address resources or not can be timely determined by actively sending a resource status query message, so that the renting period of the DHCP client needing to be rented is timely prolonged, and the utilization efficiency of the network resources is improved from multiple aspects.
In a second aspect, there is provided a network resource management method, the method comprising:
responding to the recovery of the DHCP client from the fault, and based on the network address resource used by the DHCP client, sending a lease renewing inquiry message to the network equipment corresponding to the network address resource, wherein the lease renewing inquiry message is used for determining whether the network equipment normally provides the lease renewing service of the network resource or not, and the network equipment sets a protocol DHCP server for a dynamic host;
responding to the response message for the lease renewing inquiry message, and sending a resource lease renewing message to the network equipment, wherein the resource lease renewing message is used for requesting to continue leasing the network address resource;
and updating the use state of the network address resource in response to the lease renewing response message returned by the network equipment.
According to the embodiment of the application, the DHCP client actively transmits the lease inquiry message to reconstruct effective communication with the network equipment, so that the needed network address resources can be leased in time, or the lease of the network address resources which are not needed any more can be released in time.
In one possible implementation manner, the updating the usage status of the network address resource in response to the lease renewal response message returned by the network device includes:
And updating the lease of the network address resource in response to a confirmation response message of the network equipment for the network address resource, wherein the confirmation response message indicates that the DHCP client terminal renews the lease of the network address resource successfully.
In one possible implementation manner, the updating the usage status of the network address resource in response to the lease renewal response message returned by the network device includes:
and responding to a refusal response message of the network equipment aiming at the network address resource, updating the network address resource into an unavailable state, and sending a resource lease request to any network equipment configured as a DHCP server side, wherein the refusal response message indicates that the DHCP client side fails to renew lease of the network address resource, and the resource lease request is used for leasing a new network address resource.
Through the technical scheme, aiming at the condition that the DHCP client fails, the DHCP client can actively initiate inquiry aiming at the state of the required network address resource, so that the DHCP server can be helped to timely recycle the network address resource which is not used by the DHCP client, address conflict among a plurality of DHCP clients can be avoided, and the utilization efficiency of the network resource is effectively improved.
In one possible embodiment, the method further comprises any one of the following:
in response to receiving a resource status query message for a network address resource within a first lease for the network address resource, sending a resource release message for the network address resource without using the network address resource;
in response to receiving a resource status query message for a network address resource within a first lease for the network address resource, a resource renewal message for the network address resource is sent with the network address resource being used.
By the technical scheme, under the condition that the DHCP server actively inquires the state of the allocated network address resources, the DHCP client can help the DHCP server to timely recycle the unused network address resources, and the utilization efficiency of the network resources is effectively improved.
In a third aspect, there is provided a network resource management apparatus comprising a plurality of functional modules for performing corresponding steps in the network resource management method as provided in the first aspect.
In a fourth aspect, there is provided a network resource management device comprising a plurality of functional modules for performing corresponding steps in the network resource management method as provided in the second aspect.
In a fifth aspect, there is provided a network device comprising a processor and a memory for storing at least one piece of program code loaded by the processor and performing the network resource management method as provided in the first or second aspect.
In a sixth aspect, a computer readable storage medium is provided for storing at least one piece of program code for performing the network resource management method as provided in the first or second aspect.
In a seventh aspect, there is provided a computer program product for, when run on a computer, causing the computer to perform the network resource management method as provided in the first or second aspect.
Drawings
Fig. 1 is a schematic diagram of a network system according to an embodiment of the present application;
FIG. 2 is a block diagram of another network system according to an embodiment of the present application;
fig. 3 is a schematic hardware structure of a network device according to an embodiment of the present application;
fig. 4 is a flow chart of a network resource management method according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating interaction based on a resource status query message according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating interaction based on a resource status query message according to an embodiment of the present application;
fig. 7 is a flowchart of a network resource management method according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating interaction based on a resource status query message according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a network resource management device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a network resource management device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before introducing the technical solutions provided by the embodiments of the present application, the following describes key terms related to the present application.
The dynamic host configuration protocol (dynamic host configuration protocol, DHCP) is a network management protocol for centrally managing and configuring IP addresses of network devices. The DHCP adopts a Client/Server communication mode, a DHCP Client (DHCP Client) submits a configuration application to a DHCP Server (DHCP Server), and the DHCP Server dynamically allocates network address resources such as IP addresses and the like for the DHCP Client on the network so that the DHCP Client can carry out networking communication.
Lease refers to the lifetime set by the DHCP server for the IP address assigned to the DHCP client.
DHCP relay (DHCP relay), also known as a DHCP relay agent, is used to implement the functions of handling and forwarding DHCP messages between different subnets and physical segments.
Broadband network gateway (broadband network gateway, BNG) is used to implement network bearer functions: the BNG device is used for connecting the user equipment and the BNG device so that the user can surf the Internet; and is also used for realizing the control function: and the authentication, charging and management functions of user access are realized by matching with the authentication system, the charging system, the client management system and the service policy control system.
Broadband remote access server (broadband remote access server, BRAS) is an implementation form of BNG devices, and BRAS is a new type of access gateway (gateway) for broadband network applications. BRAS is typically deployed at an edge layer of a backbone network of a broadband access network for providing basic access means and management functions of the broadband access network. The BRAS is used for providing broadband access service and realizing convergence and forwarding of various services, can meet the requirements of different users on transmission capacity and bandwidth utilization rate, and is core equipment of broadband user access network. Among them, broadband is a transmission standard satisfying a certain bandwidth (i.e., data transmission speed), and in digital communication, broadband generally means a bandwidth of 64 kilobits per second (kbit/s) or more.
Digital subscriber line access multiplexer (digital subscriber line access multiplexer, DSLAM): DSLAMs are office-end devices of various digital subscriber line DSL systems, belonging to the last mile access device (the last mile), for accommodating DSL lines from subscribers, and implementing convergence and separation of traffic by compositing or separating bit streams from upstream and downstream channels.
The remote authentication dial-in user service (remote authentication dial in user service, RADIUS) includes authentication, authorization, and information logging functions between the client and the network service.
The network system to which the technical scheme provided in the embodiment of the present application is applied is described next.
Fig. 1 is a block diagram of a network system provided in an embodiment of the present application, referring to fig. 1, the network system 100 includes at least one DHCP client 101 and a network device 102, and the network resource management method provided in the embodiment of the present application can be applied to the network system 100.
In the embodiment of the present application, dynamic management of network address resources is performed based on DHCP in the network system 100.
In some embodiments, the network device 102 can act as a BRAS to provide network address resources for each DHCP client 101 for accessing the network. Illustratively, the network device 102 can be configured as a DHCP server, assigning IP addresses to the plurality of DHCP clients 101. In some embodiments, the network device 102 can be configured as a DHCP server that assigns an IP address to a terminal device requesting access to the network through the DSLAM.
In this embodiment of the present application, the network device 102 may send, to the DHCP client 101 using the network address resource, a resource status query message based on the allocated network address resource, where the resource status query message is used to determine whether the DHCP client 101 renews the network address resource; based on this, the network device 102 can perform an extension process on the lease period of the DHCP client 101 for the network address resource in response to receiving the resource renewal message of the DHCP client 101, where the resource renewal message is used to request to continue to lease the network address resource.
In other embodiments, the network device 102 can act as a DHCP relay for connecting to a DHCP server (i.e., DHCP server-side device) or RADIUS server. For ease of understanding, the present application provides an architecture diagram of another network system, referring to fig. 2, where multiple hosts 201 (devices where DHCP clients are located) in the network system 200 access a network device 204 for providing BRAS services through a DSLAM device 202 and a metropolitan area network platform 203, and the network device 204 can serve as a DHCP relay agent and connect to a DHCP server 205, so as to provide a function of accessing a network for each client host 201. In some embodiments, the metropolitan area network platform 203 provides network connection services based on a convergence layer or core layer of the mobile bearer network.
In some embodiments, the network device 102 may be implemented as a switch, router, gateway, or the like, depending on the network hierarchy in which the network device is operating, which is not limited in this application.
In this embodiment of the present application, the network accessed by the client may be based on the fourth version of the internet protocol (internet protocol version, ipv 4), may be based on the sixth version of the internet protocol (internet protocol version, ipv 6), and may be based on other communication protocols, which is not limited in this application.
In some embodiments, the DHCP client 101 refers to a terminal supporting DHCP functions or software running in the terminal supporting DHCP functions. Terminals are also called intelligent terminals or mobile intelligent terminals, and refer to devices with rich man-machine interaction modes, internet access capability, various operating systems and strong processing capability, such as personal computers (personal computer, PCs). In some embodiments, the types of mobile smart terminals include, but are not limited to, smartphones, tablet computers, car terminals, palm game consoles, and the like.
Wherein the at least one DHCP client 101 and the network device 102 are communicatively connected by a wired network or a wireless network. In some embodiments, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the internet, but can be any network including, but not limited to, a local area network (local area network, LAN), metropolitan area network (metropolitan area network, MAN), wide area network (wide area network, WAN), mobile, wired or wireless network, private network, or any combination of virtual private networks. In some embodiments, point-to-point (P2P) communication is implemented between at least one DHCP client 101 and the network device 102 based on a remote invocation protocol (remote procedure call protocol, RPC). In some embodiments, techniques and/or formats including hypertext markup language (hyper text markup language, HTML), extensible markup language (extensible markup language, XML), etc. are used between at least one DHCP client 101 and the network device 102 to represent data exchanged over a network. In addition, all or some of the links can be encrypted using conventional encryption techniques such as secure socket layer (secure socket layer, SSL), transport layer security (transport layer security, TLS), virtual private network (virtual private network, VPN), internet protocol security (internet protocol security, IPsec), and the like. In other embodiments, custom and/or dedicated data communication techniques can also be used in place of or in addition to the data communication techniques described above.
The following describes a hardware structure of a network device according to an embodiment of the present application.
Referring to fig. 3, fig. 3 is a schematic hardware structure of a network device according to an embodiment of the present application.
Wherein the network device 300 comprises at least one processor 301, a communication bus 302, a memory 303, and at least one physical interface 304.
The processor 301 may be a general purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor or may be one or more integrated circuits for implementing the aspects of the present application, such as application-specific integrated circuits (ASIC), programmable logic devices (programmable logic device, PLD) or a combination thereof. The PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), general-purpose array logic (generic array logic, GAL), or any combination thereof.
Communication bus 302 is used to transfer information between the above-described components. Communication bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The Memory 303 may be, but is not limited to, a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a random access Memory (random access Memory, RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (electrically erasable programmable read-only Memory, EEPROM), a compact disc read-only Memory (compact disc read-only Memory) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 303 may be stand alone and be coupled to the processor 301 via the communication bus 302. Memory 303 may also be integrated with processor 301.
The physical interface 304 uses any transceiver-like device for communicating with other devices or communication networks. Physical interface 304 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an ethernet interface. The ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface, a combination thereof, or the like. Physical interface 304 is also referred to as a physical port. In some embodiments, processor 301 may include one or more CPUs, such as CPU0 and CPU1 shown in fig. 3.
In some embodiments, network device 300 may include multiple processors, such as processor 301 and processor 305 shown in fig. 3. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In some embodiments, network device 300 may also include output devices and input devices. The output device communicates with the processor 301 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a Cathode Ray Tube (CRT) display device, or a projector (projector), or the like. The input device(s) are in communication with the processor 301 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, a sensing device, or the like.
In some embodiments, the memory 303 is configured to store program codes 310 for executing the embodiments of the present application, and the processor 301 may execute the program codes 310 stored in the memory 303 to implement the corresponding functions. That is, the network device 300 may cooperate with implementing the network resource management method provided by the method embodiment described below through the processor 301 and the program code 310 in the memory 303.
The network device 300 of the embodiments of the present application may be implemented as a network device or DHCP client referred to herein, and the processor 301, the physical interface 304, etc. in the network device 300 may implement the functions and/or the various steps and methods implemented possessed by the network device or DHCP client in the various embodiments provided herein.
The process of dynamically managing network address resources based on lease between DHCP server and DHCP client is first described.
Taking the example that the network address resource comprises an IP address, the DHCP server side is used for managing the available IP address in the network, responding to the request of the DHCP client side, distributing the IP address for the DHCP client side, and ensuring the dynamic distribution of the IP address by setting a certain lease period; before the lease expires, the DHCP client may send a resource renewal message to the DHCP server to extend the use time of the IP address; before the lease expires, the DHCP client may also send a resource release message to the DHCP server to cancel the lease for the IP address, where the DHCP server receives the resource release message and recovers the IP address to allocate the IP address to other DHCP clients; if the DHCP server does not receive the resource renewing message of the DHCP client until the lease expires, the DHCP server may retrieve the IP address to assign the IP address to other DHCP clients.
In the above process, if any one of the DHCP client and the DHCP server fails or the transmission link in the network system fails, the resource release message sent by the DHCP client to the DHCP server is not normally received, resulting in the residual IP address on the DHCP server, that is, the IP address that should be released is still in the renting state. In this case, the DHCP server can only wait for the lease to expire and then release the remaining IP address, and during this period, the IP address cannot be used effectively, so that the network resource utilization efficiency is low.
In view of the foregoing, the present application provides a network resource management method, which can effectively solve the above-mentioned problems.
Next, based on the above description of the network system, taking an interaction process between a network device and a client in the network system as an example, a network resource management method provided in an embodiment of the present application is described in detail, and fig. 4 is a schematic flow chart of a network resource management method provided in an embodiment of the present application, where the method can be applied to the above network system, and the method includes the following steps 401 to 403.
401. The network device sends a resource status query message to the DHCP client using the network address resource based on the network address resource allocated by the network device, where the resource status query message is used to determine whether the DHCP client renews the network address resource.
In the embodiment of the application, the network address resource includes an IP address. In some embodiments, the IP address is that of a public network (wide area network) through which the DHCP client can directly access the internet.
In other embodiments, the network address resource includes a segment of IP addresses that can be allocated for use by multiple hosts (e.g., terminals at which DHCP clients are located), in which case the DHCP clients can utilize all or part of the network address resource. Illustratively, the IP address is a private network (local area network) IP address, which is a secondary IP address allocated by the network device under a public network IP address, to which each DHCP client in the local area network can be allocated, so that the internet is accessed through the public network IP address in a unified manner through aggregation and forwarding of the network device. In other embodiments, the IP address includes a network number and a host number, the network number indicating the network in which the host is located; the host number is the unique identification of the host in the network. Taking the IP address format defined by IPv4 as an example, the network system 100 may be a lan system that accesses the internet based on a public network IP address "192.168.0.0", and the network device divides the "192.168.0.0" into a plurality of IP address segments (e.g., 192.168.32.0) based on a subnet mask "255.255.0.0", each of which is capable of providing IP addresses within the lan to a plurality of hosts. The subnet mask may be dynamically adjusted according to the subnet division requirement, which is not limited in this application.
In the embodiment of the present application, the resource status query packet carries the IP address used by the DHCP client. In other embodiments, the resource status query message further carries information such as a gateway address and a domain name server address of the DHCP client, so as to implement a message transmission across network segments (which need to undergo a gateway forwarding process, a domain name resolution process, and the like).
In some embodiments, the resource status query message can be sent in the form of a forced update (forcenew) message, which is a DHCP extension message defined by memo 3202 (requests for comment, RFC 3203), that can be used to bring the DHCP client into a renewing state to initiate renewing for the network address resource.
In the embodiment of the application, the network device can send the resource status query message under various conditions, so as to timely release the network address resource aiming at various conditions which possibly affect the resource utilization efficiency. Next, the following cases 1 and 2 will be described as examples.
And 1, recovering the DHCP server from the fault.
In some embodiments, the network device may restart the device, restart the operating system, or reload the DHCP service to achieve the purpose of recovering from the failure, during which the network device cannot normally receive the resource release message or the resource lease message sent by each DHCP client in the network system. Based on the above, the network device actively transmits the resource status query message to the DHCP client, so that the actual condition of the DHCP client on the network address resource can be kept consistent in time. The resource renewing message is used for requesting to resume renting the network address resource.
In some embodiments, a network device sends a resource status query message to a DHCP client that uses network address resources based on the network address resources that the network device has allocated in response to the network device recovering from a failure.
In some embodiments, the network device, in response to recovering from the failure, reads a resource lease table maintained by the network device, the resource lease table being used to record network address resources that the network device has allocated, lease periods for the network address resources, and information about DHCP clients that use the network address resources. The network device can determine the allocated network address resource based on the entry in the resource lease table in the allocated state, so as to send a resource state query message to the DHCP client based on the network address resource.
By adopting the technical scheme, the network equipment actively transmits the resource status query message after fault recovery, and can timely determine whether the DHCP client releases the network address resource, thereby effectively avoiding the condition that the network address resource cannot be timely recovered due to the fault of the DHCP server and improving the utilization efficiency of the network resource.
And 2, periodically detecting the DHCP server side.
In some embodiments, a transmission link in the network system may fail, so that the network device cannot receive a resource release message or a resource lease message sent by each DHCP client in the network system. Based on this, the network address resource can be recovered as soon as possible by causing the network device to periodically and actively send a resource status query message to the DHCP client during the lease.
In some embodiments, the network device sends a resource status query message to a DHCP client that uses the network address resource based on the network address resource that the network device has allocated every first time period that is less than a first lease period of the network address resource for the DHCP client. Wherein network address resources can be recovered as soon as possible by periodically querying during lease.
In some embodiments, the network device can determine whether to send the resource status query message based on the used time period of the DHCP client for the network address resource. In this example, the network device obtains the used duration of the network address resource by the DHCP client every first duration. Alternatively, the network device can obtain the used duration of the network address resource by reading a resource lease table. Based on this, if the used time period exceeds the query interval and the network device does not receive the resource lease message for the network address resource, the network device sends a resource status query message to the DHCP client based on the network address indicated by the network address resource, for example, the network device uses the IP address indicated by the network address resource as a target address of the resource status query message.
In some embodiments, the query interval is determined based on the first lease and an error threshold that indicates a time difference corresponding to a network transmission delay. In some embodiments, the query interval is the sum of one-half the duration of the first lease and the error threshold. In some embodiments, the network device can determine whether to send the resource status query message according to the following formula (1) for each first duration.
In formula (1), sendforenew is an identifier for indicating whether to send a resource status query message, where Y indicates to send; n indicates not to send; usedtime is the length of time used; t (T) 1 Based on the first lease determination, the T 1 A first lease that may be one-half or seven-eighth, as not limited in this application; the delta is an error threshold; based on the formula (1), the query interval is: t (T) 1 +δ。
In some embodiments, the error threshold may be dynamically adjusted according to a network transmission delay in the network system, for example, the error threshold may be correspondingly reduced in a case where the network transmission delay is smaller in the network system, and the error threshold may be correspondingly increased in a case where the network transmission delay is larger in the network system.
By the technical scheme, the influence possibly caused by network delay on message transmission is fully considered, and the redundant resource status inquiry message is prevented from being sent under the condition that the DHCP client side sends a resource renting message or a resource releasing message, so that the system overhead is effectively reduced.
According to the technical scheme, the network equipment periodically and actively transmits the resource status query message in the lease period, so that whether the DHCP client releases the network address resource can be timely determined, the situation that the network address resource cannot be timely recovered due to the problem of a transmission link is effectively avoided, and the utilization efficiency of the network resource is improved.
In other embodiments, to further improve the efficiency of recovering network address resources, the network device retransmits the resource status query message. In an exemplary embodiment, in a target duration of waiting for a response after sending the resource status query message, if the network device does not receive the resource release message or the resource lease message for the network address resource, the network device determines a target retransmission interval and a target retransmission number based on the target duration of waiting for the response. And then resends the resource status query message based on the target retransmission interval and the target retransmission times. In some embodiments, if contention of multiple nodes in the network system for the transmission channel causes a collision, the network device may not receive a resource release message or a resource lease message for the network address resource, and for this case, the network device may calculate the number of times the resource status query message is retransmitted next (i.e. the target retransmission number) and the time interval between retransmissions (i.e. the target retransmission interval) through an exponential backoff algorithm, so as to avoid occurrence of the collision as much as possible. In some embodiments, the target retransmission interval between the last retransmission and the next retransmission increases exponentially.
402. The DHCP client receives the resource status query message and sends a resource release message for the network address resource under the condition that the network address resource is not used.
In some embodiments, the DHCP client receives the resource status query message and may send a resource release message for the IP address according to the IP address indicated by the resource status query message without using the IP address. In other embodiments, the DHCP client may send a resource release message for a portion of the IP addresses in the IP address field indicated by the resource status query message, which is not limited in this application.
In some embodiments, the resource release message is a DHCP release message.
In other embodiments, the DHCP client receives the resource status query message and, in the event that the network address resource is being used, sends a resource renew message (renew) for the network address resource.
In some embodiments, for case 2 above, the DHCP client is capable of sending a resource renewal message for a network address resource if the network address resource is being used in response to receiving a resource status query message for the network address resource within a first lease for the network address resource.
In some embodiments, the resource renewing message may be a bulk renewing message (bulk renewing message) that is used to renew all or part of the network address resources used by the DHCP client, for example, all or part of the IP network segments used by the DHCP client.
403. The network device releases a lease of the network address resource in response to receiving a resource release message of the DHCP client for the network address resource, the lease indicating a right to use the network address resource.
In some embodiments, the network device responds to the resource release message, queries an entry corresponding to the network address resource in a resource lease table, and deletes the configuration parameter related to the DHCP client in the entry to complete the release process of the lease. Wherein the network address resource can be reset to an unassigned state by deleting configuration parameters associated with the DHCP client, thereby freely assigning the network address resource to other DHCP clients. The configuration parameter related to the DHCP client may include a physical address of the DHCP client, which is not limited in this application.
In some embodiments, the above-mentioned process of releasing the lease of the network address resource corresponds to releasing the IP address remaining in the DHCP server, which is also called aging the remaining IP address.
In some embodiments, the network device performs an extension process on the lease of the DHCP client for the network address resource in response to receiving the resource renewal message of the DHCP client.
For easy understanding, the present application provides a schematic diagram of interaction based on a resource status query message according to the above case 1, referring to fig. 5, the DHCP server (network device) sends a resource status query message acknowledgement to the DHCP client in response to recovering from a failure, where the DHCP client sends a batch renewal message bulk for its required network address resource under the condition that the network address resource is being used, so as to instruct the DHCP server to totally renew its required network address resource, and the DHCP server returns a response message ack to the DHCP client in response to receiving the batch renewal message bulk, prolonging the lease period of its required network address resource, and releasing the network address resource that is no longer used by the DHCP client, that is, aging the residual network address resource.
For ease of understanding, the present application provides a schematic diagram for interaction based on resource status query messages in case 2 above, see fig. 6. As shown in fig. 6 (a), the DHCP server (network device) periodically sends a resource status query message forenew to the DHCP client, and the DHCP client sends a resource renewing message renew for the network address resource required by the DHCP client in the case that the network address resource is being used, and the DHCP server responds to receiving the batch renewing message renew to extend the lease of the network address resource required by the DHCP client and returns a response message ack to the DHCP client. As shown in fig. 6 (b), the DHCP server (network device) periodically sends a resource status query message to the DHCP client, and the DHCP client sends a resource release message release for the network address resource without using the network address resource, and in response to receiving the resource release message release, the DHCP server releases the lease of the network address resource and returns a response message ack to the DHCP client.
Through the technical scheme, the DHCP server side actively initiates the inquiry to the state of the allocated network address resource, so that the network address resource which is not used by the DHCP client side can be recovered in time, and the utilization efficiency of the network resource is effectively improved. In addition, aiming at the conditions that the DHCP server fails, the transmission link is problematic and the like, whether the DHCP client rents the network address resources or not can be timely determined by actively sending a resource status query message, so that the renting period of the DHCP client needing to be rented is timely prolonged, and the utilization efficiency of the network resources is improved from multiple aspects.
The embodiment provided in fig. 4 introduces the network resource management method provided in the embodiment of the application for the case that the DHCP server fails. In other embodiments, the network resource management method provided in the embodiments of the present application can also be implemented for the case that the DHCP client fails. Fig. 7 is a flowchart of a network resource management method according to an embodiment of the present application, referring to fig. 7, the method includes the following steps 701 to 705.
701. The DHCP client responds to recovery from the fault, based on the network address resource used by the DHCP client, a lease renewing inquiry message is sent to the network equipment corresponding to the network address resource, the lease renewing inquiry message is used for determining whether the network equipment normally provides the lease renewing service of the network resource, and the network equipment is configured as a DHCP server.
The description of the network address resource is referred to step 401, and will not be described herein.
In some embodiments, the DHCP client may recover from the failure by restarting the device, restarting the operating system, or reloading the DHCP service. Since effective communication is not carried out between the DHCP client and the network equipment during the period, after the DHCP client recovers from the fault, the situation that the lease of the network resource required by the DHCP client is released on the network equipment side can occur, so that the network address resource is distributed to other DHCP clients, and address conflict is caused; it may also occur that the DHCP client has released its leased network address resource, but the lease for that network address resource has not yet been released in the network device, resulting in the network address resource remaining.
According to the embodiment of the application, the DHCP client actively transmits the lease inquiry message to reconstruct effective communication with the network equipment, so that the needed network address resources can be leased in time, or the lease of the network address resources which are not needed any more can be released in time.
In some embodiments, the renewing inquiry message may be a message carrying a renewing control message (bulkrenew request), where the renewing control message is used to determine whether the network device normally provides a batch renewing service for the network resource, so that when receiving a response message for the renewing inquiry message, the renewing inquiry message is sent to the network device, so as to save link overhead in the system.
702. The network device responds to the received re-lease query message of the DHCP client for the network address resource, and replies a response message, wherein the response message indicates the network device to normally provide the re-lease service of the network resource.
703. And the DHCP client side responds to receiving the response message aiming at the lease renewing inquiry message and sends a resource renewing message to the network equipment, wherein the resource renewing message is used for requesting to renew leasing the network address resource.
In some embodiments, the resource renewing message may be a bulk renewing message (bulk renewing message) that is used to renew all or part of the network address resources used by the DHCP client, for example, all or part of the IP network segments used by the DHCP client.
704. The network equipment responds to the received resource renewing message of the DHCP client for the network address resource, and returns a renewing response message to the DHCP client based on the allocation state of the network address resource, wherein the renewing response message indicates the renewing result of the DHCP client for the network address resource.
In some embodiments, the resource renewal message carries a renewal duration for the network address resource.
In some embodiments, the network device determines the allocation status of the network address resource by querying an entry corresponding to the network address resource in a resource lease table based on the resource lease message. For example, if the physical address of the DHCP client recorded in the entry of the network address resource is inconsistent with the physical address indicated by the resource lease message, the network device determines that the network address resource has been allocated to another DHCP client; if the physical address of the DHCP client recorded in the entry of the network address resource is consistent with the physical address indicated by the resource lease message or is not the default address, the network device determines that the network address resource is not allocated to other DHCP clients.
In some embodiments, the network device returns a reject response message to the DHCP client indicating that the DHCP client failed to renew lease for the network address resource in the event that the network address resource has been allocated to the other DHCP client.
In other embodiments, the network device returns an acknowledgement response message to the DHCP client indicating that the DHCP client has successfully leased the network address resource if the network address resource is not allocated to other DHCP clients. In some embodiments, the network device updates the table entry of the network address resource in the resource lease table based on the lease duration carried by the resource lease message, so as to complete the lease process of the network address resource.
In some embodiments, the resource renewing message is a bulk renewing message (bulk renewing) indicating renewing of a portion of the network address resource. In this example, the network device updates the entry of the partial network address resource in the resource lease table based on the lease duration carried by the resource lease renewing message, in the case that the partial network address resource is not allocated to other DHCP clients, so as to complete the lease renewing process for the partial network address resource. Accordingly, the network device updates the entry of the partial network address resource that is not leased by the DHCP client in the resource lease table, so as to timely release the lease corresponding to the partial network address resource that is not leased, that is, age the remaining partial network address resource (refer to step 403).
705. And the DHCP client responds to the lease renewing response message returned by the network equipment to update the use state of the network address resource.
In some embodiments, the DHCP client updates the lease for the network address resource in response to an acknowledgment response message for the network address resource by the network device indicating that the DHCP client leases the network address resource successfully. In some embodiments, the acknowledgment response message carries a latest lease for the network address resource. Illustratively, the DHCP client updates the lease for the network address resource in the local DHCP configuration parameters.
In other embodiments, the DHCP client updates the network address resource to an unavailable state in response to a reject response message by the network device for the network address resource, the reject response message indicating that the DHCP client failed to renew lease for the network address resource. Illustratively, the DHCP client deletes the network address resource (e.g., IP address) in the local DHCP configuration parameters. Based on this, the DHCP client sends a resource lease request to any network device in the network system configured as a DHCP server for leasing a new network address resource.
For easy understanding, the present application provides a schematic diagram of interaction based on a resource status query message, referring to fig. 8, the DHCP client sends a renewing query message (bulkrenew request) to the network device (DHCP server) in response to recovering from a failure, where the network device replies with a reply message ack in case of normally providing a renewing service of a network resource; the DHCP client receives the response message ack and sends a batch lease renewing message bulk aiming at the network address resource required by the DHCP client so as to indicate the DHCP server to renew the network address resource required by the DHCP server in a full amount; the network device returns a renewing response message to the DHCP client, which may be an ACK (acknowledgement response message) or a NAK (negative acknowledgement response message), based on which the network device releases network address resources that are no longer used by the client according to the DHCP client, that is, ages the remaining network address resources.
Through the technical scheme, aiming at the condition that the DHCP client fails, the DHCP client can actively initiate inquiry aiming at the state of the required network address resource, so that the DHCP server can be helped to timely recycle the network address resource which is not used by the DHCP client, address conflict among a plurality of DHCP clients can be avoided, and the utilization efficiency of the network resource is effectively improved.
Fig. 9 is a schematic structural diagram of a network resource management device according to an embodiment of the present application. Referring to fig. 9, the network resource management device is applied to a network device, and the network device sets a protocol DHCP server for a dynamic host, and the device includes:
a query module 901, configured to send, based on the network address resource allocated by the network device, a resource status query message to a DHCP client that uses the network address resource, where the resource status query message is used to determine whether the DHCP client renews the network address resource;
a releasing module 902, configured to release, in response to receiving a resource release message of the DHCP client for the network address resource, a lease of the network address resource, where the lease indicates a right to use the network address resource.
In one possible implementation, the query module 901 is configured to:
and sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network device in response to the network device recovering from the failure.
In one possible implementation, the query module 901 is configured to:
and sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network device at intervals of a first time length, wherein the first time length is smaller than a first lease of the network address resource for the DHCP client.
In one possible implementation, the query module 901 is configured to:
acquiring the used duration of the network address resource by the DHCP client at intervals of a first duration;
if the used time period exceeds the inquiry interval and the resource lease message for the network address resource is not received, sending a resource status inquiry message to the DHCP client based on the network address indicated by the network address resource, wherein the inquiry interval is determined based on the first lease period and an error threshold value, and the error threshold value indicates a time difference corresponding to network transmission delay.
In one possible embodiment, the apparatus further comprises:
the retransmission module is used for determining a target retransmission interval and target retransmission times based on the target duration if the resource release message or the resource lease message aiming at the network address resource is not received within the target duration of waiting for response after the resource status query message is sent; and retransmitting the resource status query message based on the target retransmission interval and the target retransmission times.
In one possible embodiment, the apparatus further comprises:
and the first lease renewing module is used for responding to the received resource lease renewing message of the DHCP client for the network address resource, prolonging the lease of the DHCP client for the network address resource, and requesting to continue leasing the network address resource.
In one possible embodiment, the apparatus further comprises:
the response module is used for responding to the received re-lease inquiry message of the DHCP client side for the network address resource and replying a response message, wherein the response message indicates the network equipment to normally provide the re-lease service of the network resource;
and the second lease renewing module is used for responding to the received resource lease renewing message of the DHCP client for the network address resource, returning a lease renewing response message to the DHCP client based on the allocation state of the network address resource, wherein the lease renewing response message indicates the lease renewing result of the DHCP client for the network address resource.
In one possible implementation manner, the second renting module is configured to perform any one of the following:
returning a refusal response message to the DHCP client under the condition that the network address resource is allocated to other DHCP clients, wherein the refusal response message indicates that the DHCP client fails to renew lease the network address resource;
and under the condition that the network address resources are not allocated to other DHCP clients, returning a confirmation response message to the DHCP client, wherein the confirmation response message indicates that the DHCP client renews renting the network address resources successfully.
Through the technical scheme, the DHCP server side actively initiates the inquiry to the state of the allocated network address resource, so that the network address resource which is not used by the DHCP client side can be recovered in time, and the utilization efficiency of the network resource is effectively improved. In addition, aiming at the conditions that the DHCP server fails, the transmission link is problematic and the like, whether the DHCP client rents the network address resources or not can be timely determined by actively sending a resource status query message, so that the renting period of the DHCP client needing to be rented is timely prolonged, and the utilization efficiency of the network resources is improved from multiple aspects.
It should be noted that, when implementing the related functions, the network resource management device provided in the foregoing embodiment is only exemplified by the division of the foregoing functional modules, and in practical application, the foregoing functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to implement all or part of the functions described above. In addition, the network resource management device and the network resource management method embodiment provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not repeated herein.
Fig. 10 is a schematic structural diagram of a network resource management device according to an embodiment of the present application. Referring to fig. 10, the network resource management device includes:
a query module 1001, configured to respond to a DHCP client recovering from a failure, and send a lease renewal query message to a network device corresponding to a network address resource based on the network address resource used by the DHCP client, where the lease renewal query message is used to determine whether the network device normally provides a lease renewal service of the network resource, and the network device sets a protocol DHCP server for a dynamic host;
a renewing module 1002, configured to send a resource renewing message to the network device in response to receiving a response message for the renewing query message, where the resource renewing message is used to request to resume renting the network address resource;
and the updating module 1003 is configured to update a usage status of the network address resource in response to the lease renewal response message returned by the network device.
In one possible implementation, the updating module 1003 is configured to:
and updating the lease of the network address resource in response to a confirmation response message of the network equipment for the network address resource, wherein the confirmation response message indicates that the DHCP client terminal renews the lease of the network address resource successfully.
In one possible implementation, the updating module 1003 is configured to:
and responding to a refusal response message of the network equipment aiming at the network address resource, updating the network address resource into an unavailable state, and sending a resource lease request to any network equipment configured as a DHCP server side, wherein the refusal response message indicates that the DHCP client side fails to renew lease of the network address resource, and the resource lease request is used for leasing a new network address resource.
In one possible embodiment, the apparatus further comprises:
a release module, configured to send a resource release message for a network address resource if the network address resource is not used in response to receiving a resource status query message for the network address resource in a first lease period for the network address resource;
the renewing module 1002 is further configured to send, in response to receiving a resource status query message for a network address resource within a first lease period for the network address resource, a resource renewing message for the network address resource if the network address resource is being used.
Through the technical scheme, aiming at the condition that the DHCP client fails, the DHCP client can actively initiate inquiry aiming at the state of the required network address resource, so that the DHCP server can be helped to timely recycle the network address resource which is not used by the DHCP client, address conflict among a plurality of DHCP clients can be avoided, and the utilization efficiency of the network resource is effectively improved.
Further, under the condition that the DHCP server actively inquires the state of the allocated network address resources, the DHCP client can help the DHCP server to timely recycle the unused network address resources, and the utilization efficiency of the network resources is effectively improved.
It should be noted that, when implementing the related functions, the network resource management device provided in the foregoing embodiment is only exemplified by the division of the foregoing functional modules, and in practical application, the foregoing functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to implement all or part of the functions described above. In addition, the network resource management device and the network resource management method embodiment provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not repeated herein.
It should be noted that, information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals referred to in this application are all authorized by the user or are fully authorized by the parties, and the collection, use, and processing of relevant data is required to comply with relevant laws and regulations and standards of relevant countries and regions. For example, the IP addresses referred to in this application are all obtained with sufficient authorization.
The terms "first," "second," and the like in this application are used to distinguish between identical or similar items that have substantially the same function and function, and it should be understood that there is no logical or chronological dependency between the "first," "second," and "nth" terms, nor is it limited to the number or order of execution. It will be further understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element. For example, the first time period may be referred to as a second time period, and similarly, the second time period may be referred to as a first time period, without departing from the scope of the various examples described above. The first duration and the second duration may both be durations, and in some cases may be separate and distinct durations.
The term "at least one" in this application means one or more, the term "plurality" in this application means two or more, for example, a plurality of clients means two or more clients.
The foregoing description is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions are all covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a program product. The program product includes one or more program instructions. When loaded and executed on a network device, produces, in whole or in part, a flow or function in accordance with embodiments of the present application.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the above storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (27)

1. The network resource management method is characterized by being applied to network equipment, wherein the network equipment sets a protocol DHCP server for a dynamic host, and the method comprises the following steps:
based on the network address resource allocated by the network device, sending a resource status query message to a DHCP client using the network address resource, wherein the resource status query message is used for determining whether the DHCP client rents the network address resource;
and in response to receiving a resource release message of the DHCP client for the network address resource, releasing a lease of the network address resource, wherein the lease indicates the use permission of the network address resource.
2. The method according to claim 1, wherein said sending a resource status query message to a DHCP client using said network address resource based on said network address resource to which said network device has been assigned, comprises:
and in response to the network equipment recovering from the fault, sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network equipment.
3. The method according to claim 1 or 2, wherein said sending a resource status query message to a DHCP client using said network address resource based on said network address resource to which said network device has been allocated, comprises:
And sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network device at intervals of a first duration, wherein the first duration is smaller than a first lease of the network address resource for the DHCP client.
4. A method according to claim 3, wherein said sending, at intervals of a first time period, a resource status query message to a DHCP client using the network address resource based on the network address resource to which the network device has been allocated, comprises:
acquiring the used duration of the network address resource by the DHCP client at intervals of a first duration;
and if the used time period exceeds the inquiry interval and the resource lease message aiming at the network address resource is not received, sending a resource state inquiry message to the DHCP client based on the network address indicated by the network address resource, wherein the inquiry interval is determined based on the first lease period and an error threshold value, and the error threshold value indicates a time difference corresponding to network transmission delay.
5. The method according to claim 3 or 4, wherein, after the sending, based on the network address resource allocated by the network device, the resource status query message to the DHCP client using the network address resource every first time period, the method further comprises:
If the resource release message or the resource lease message aiming at the network address resource is not received within the target duration of waiting for response after the resource status query message is sent, determining a target retransmission interval and target retransmission times based on the target duration;
and retransmitting the resource state query message based on the target retransmission interval and the target retransmission times.
6. The method according to any one of claims 1 to 5, further comprising:
and in response to receiving a resource re-lease message of the DHCP client for the network address resource, carrying out extension processing on the lease of the DHCP client for the network address resource, wherein the resource re-lease message is used for requesting to continuously lease the network address resource.
7. The method according to any one of claims 1 to 6, further comprising:
responding to receiving a renewing inquiry message of the DHCP client side for the network address resource, and replying a response message, wherein the response message indicates that the network equipment normally provides renewing service of the network resource;
and responding to the received resource renewing message of the DHCP client for the network address resource, and returning a renewing response message to the DHCP client based on the allocation state of the network address resource, wherein the renewing response message indicates the renewing result of the DHCP client for the network address resource.
8. The method according to claim 7, wherein the returning a lease renewing response message to the DHCP client based on the allocation status of the network address resource includes any one of the following:
returning a refusal response message to the DHCP client under the condition that the network address resource is allocated to other DHCP clients, wherein the refusal response message indicates that the DHCP client fails to renew the network address resource;
and under the condition that the network address resources are not allocated to other DHCP clients, returning a confirmation response message to the DHCP clients, wherein the confirmation response message indicates that the DHCP clients renew leasing the network address resources successfully.
9. A method of network resource management, the method comprising:
responding to the recovery of a DHCP client from a fault, based on network address resources used by the DHCP client, sending a lease renewing inquiry message to network equipment corresponding to the network address resources, wherein the lease renewing inquiry message is used for determining whether the network equipment normally provides lease renewing service of the network resources or not, and the network equipment sets a protocol DHCP server for a dynamic host;
Responding to the response message of the re-lease inquiry message, and sending a resource re-lease message to the network equipment, wherein the resource re-lease message is used for requesting to continuously lease the network address resource;
and updating the use state of the network address resource in response to the lease renewing response message returned by the network equipment.
10. The method according to claim 9, wherein the updating the usage status of the network address resource in response to the lease renewing response message returned from the network device includes:
and updating the lease of the network address resource in response to a confirmation response message of the network equipment for the network address resource, wherein the confirmation response message indicates that the DHCP client side renews the lease of the network address resource successfully.
11. The method according to claim 9 or 10, wherein updating the usage status of the network address resource in response to the lease renewing response message returned by the network device comprises:
and responding to a refusal response message of the network equipment aiming at the network address resource, updating the network address resource into an unusable state, and sending a resource lease request to any network equipment configured as a DHCP server, wherein the refusal response message indicates that the DHCP client fails to renew the network address resource, and the resource lease request is used for leasing a new network address resource.
12. The method according to any one of claims 9 to 11, further comprising any one of the following:
in response to receiving a resource status query message for a network address resource within a first lease for the network address resource, sending a resource release message for the network address resource without using the network address resource;
in response to receiving a resource status query message for a network address resource within a first lease for the network address resource, a resource renewal message for the network address resource is sent while the network address resource is being used.
13. A network resource management device, which is applied to a network device, wherein the network device sets a protocol DHCP server for a dynamic host, and the device comprises:
the inquiry module is used for sending a resource status inquiry message to a DHCP client side using the network address resource based on the network address resource allocated by the network equipment, wherein the resource status inquiry message is used for determining whether the DHCP client side rents the network address resource;
and the release module is used for responding to the received resource release message of the DHCP client for the network address resource and releasing the lease of the network address resource, wherein the lease indicates the use authority of the network address resource.
14. The apparatus of claim 13, wherein the query module is configured to:
and in response to the network equipment recovering from the fault, sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network equipment.
15. The apparatus according to claim 13 or 14, wherein the query module is configured to:
and sending a resource status query message to a DHCP client using the network address resource based on the network address resource allocated by the network device at intervals of a first duration, wherein the first duration is smaller than a first lease of the network address resource for the DHCP client.
16. The apparatus of claim 15, wherein the query module is configured to:
acquiring the used duration of the network address resource by the DHCP client at intervals of a first duration;
and if the used time period exceeds the inquiry interval and the resource lease message aiming at the network address resource is not received, sending a resource state inquiry message to the DHCP client based on the network address indicated by the network address resource, wherein the inquiry interval is determined based on the first lease period and an error threshold value, and the error threshold value indicates a time difference corresponding to network transmission delay.
17. The apparatus according to claim 15 or 16, characterized in that the apparatus further comprises:
a retransmission module, configured to determine, within a target duration of waiting for a response after sending the resource status query message, a target retransmission interval and a target retransmission number based on the target duration if the resource release message or the resource lease message for the network address resource is not received; and retransmitting the resource state query message based on the target retransmission interval and the target retransmission times.
18. The apparatus according to any one of claims 13 to 17, further comprising:
the first lease renewing module is used for responding to the received resource lease renewing message of the DHCP client for the network address resource, and the resource lease renewing message is used for requesting to continue leasing the network address resource.
19. The apparatus according to any one of claims 13 to 18, further comprising:
the response module is used for responding to the received re-lease inquiry message of the DHCP client side for the network address resource and replying a response message, wherein the response message indicates the network equipment to normally provide the re-lease service of the network resource;
And the second lease renewing module is used for responding to the received resource lease renewing message of the DHCP client for the network address resource, returning a lease renewing response message to the DHCP client based on the allocation state of the network address resource, wherein the lease renewing response message indicates the lease renewing result of the DHCP client for the network address resource.
20. The apparatus of claim 19, wherein the second renewal module is configured to perform any of:
returning a refusal response message to the DHCP client under the condition that the network address resource is allocated to other DHCP clients, wherein the refusal response message indicates that the DHCP client fails to renew the network address resource;
and under the condition that the network address resources are not allocated to other DHCP clients, returning a confirmation response message to the DHCP clients, wherein the confirmation response message indicates that the DHCP clients renew leasing the network address resources successfully.
21. A network resource management device, the device comprising:
the inquiry module is used for responding to the recovery of the DHCP client from the fault, sending a lease renewing inquiry message to the network equipment corresponding to the network address resource based on the network address resource used by the DHCP client, wherein the lease renewing inquiry message is used for determining whether the network equipment normally provides the lease renewing service of the network resource or not, and the network equipment sets a protocol DHCP server for a dynamic host;
The renewing module is used for responding to the received response message aiming at the renewing inquiry message and sending a resource renewing message to the network equipment, wherein the resource renewing message is used for requesting to continue renting the network address resource;
and the updating module is used for responding to the lease renewing response message returned by the network equipment and updating the use state of the network address resource.
22. The apparatus of claim 21, wherein the update module is configured to:
and updating the lease of the network address resource in response to a confirmation response message of the network equipment for the network address resource, wherein the confirmation response message indicates that the DHCP client side renews the lease of the network address resource successfully.
23. The apparatus according to claim 21 or 22, wherein the updating module is configured to:
and responding to a refusal response message of the network equipment aiming at the network address resource, updating the network address resource into an unusable state, and sending a resource lease request to any network equipment configured as a DHCP server, wherein the refusal response message indicates that the DHCP client fails to renew the network address resource, and the resource lease request is used for leasing a new network address resource.
24. The apparatus according to any one of claims 21 to 23, further comprising:
a release module, configured to send a resource release message for a network address resource if the network address resource is not used, in response to receiving a resource status query message for the network address resource in a first lease period for the network address resource;
the renewing module is further configured to send a resource renewing message for a network address resource if the network address resource is being used, in response to receiving a resource status query message for the network address resource within a first lease period for the network address resource.
25. A network device comprising a processor and a memory for storing at least one piece of program code, the at least one piece of program code being loaded by the processor and performing the network resource management method of any one of claims 1 to 8 or the network resource management method of any one of claims 9 to 12.
26. A computer readable storage medium storing at least one piece of program code for performing the network resource management method of any one of claims 1 to 8 or the network resource management method of any one of claims 9 to 12.
27. A computer program product, characterized in that the computer program product, when run on a computer, causes the computer to perform the network resource management method of any one of claims 1 to 8 or the network resource management method of any one of claims 9 to 12.
CN202211024257.1A 2022-08-24 2022-08-24 Network resource management method, device, network equipment and storage medium Pending CN117675764A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211024257.1A CN117675764A (en) 2022-08-24 2022-08-24 Network resource management method, device, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211024257.1A CN117675764A (en) 2022-08-24 2022-08-24 Network resource management method, device, network equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117675764A true CN117675764A (en) 2024-03-08

Family

ID=90081273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211024257.1A Pending CN117675764A (en) 2022-08-24 2022-08-24 Network resource management method, device, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117675764A (en)

Similar Documents

Publication Publication Date Title
US6957276B1 (en) System and method of assigning and reclaiming static addresses through the dynamic host configuration protocol
JP3488347B2 (en) Automatic address distribution system and address distribution server
US8230067B2 (en) DHCP proxy in a subscriber environment
EP3264731B1 (en) Method, relay agent, and system for acquiring internet protocol address in network
US7577146B2 (en) Network element modifying the DHCP lease timer
EP3664420B1 (en) Managing address spaces across network elements
US20050235000A1 (en) Aaa server system for efficient control and address assignment
EP3644556B1 (en) Alias management method and device
US11251981B2 (en) Communication method and apparatus
EP2939401B1 (en) Method for guaranteeing service continuity in a telecommunication network and system thereof
WO2018103665A1 (en) L2tp-based device management method, apparatus and system
US10419392B2 (en) Method, device and system for implementing address sharing
WO2022052496A1 (en) Address reservation method, network device, and system
WO2019154017A1 (en) Multipath establishing method and apparatus
CN117675764A (en) Network resource management method, device, network equipment and storage medium
EP4216510A1 (en) Method for acquiring address, apparatus and system
CN115174528A (en) Equipment address control method, device and system
CN111064819B (en) Address backup method and device
CN113821334A (en) Method, device and system for configuring edge side equipment
CN111045830A (en) Multi-cluster uniform resource distribution system and method
WO2023279992A1 (en) Message processing method, apparatus and system, and computer-readable storage medium
CN105830408B (en) Allocation of resources during a split brain situation
WO2020119791A1 (en) Method and device for releasing network segment
CN108156002B (en) Information processing method, device and system
CN108882224B (en) User identity information distribution method and access service router

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication