CN101202767A - Method and device for hiring IP address - Google Patents

Method and device for hiring IP address Download PDF

Info

Publication number
CN101202767A
CN101202767A CNA2006100646796A CN200610064679A CN101202767A CN 101202767 A CN101202767 A CN 101202767A CN A2006100646796 A CNA2006100646796 A CN A2006100646796A CN 200610064679 A CN200610064679 A CN 200610064679A CN 101202767 A CN101202767 A CN 101202767A
Authority
CN
China
Prior art keywords
address
dynamic host
configuration protocol
host configuration
request
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
CNA2006100646796A
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.)
Shenzhen Coship Electronics Co Ltd
Original Assignee
Shenzhen Coship Electronics 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 Shenzhen Coship Electronics Co Ltd filed Critical Shenzhen Coship Electronics Co Ltd
Priority to CNA2006100646796A priority Critical patent/CN101202767A/en
Publication of CN101202767A publication Critical patent/CN101202767A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention is applicable to the field of network communication and provides an IP address lease method and a device thereof. The method includes the following steps of transmitting a lease renewal request to a DHCP server to ask for continuously leasing the currently used IP address when the using period of the currently used IP address reaches to a half of the lease period; setting a timeout for the DHCP server to response the lease renewal request and the timeout is not longer than the left time of the leasing period of the currently used IP address; within the timeout, judging whether the right to continuously use the currently used IP address is available according to a lease renewal response returned by the DHCP server, if yes, the lease renewal period of the currently used IP address is updated, if not, the DHCP service is asked for distributing a new IP address. The invention can lead a DHCP client to be still effectively accessed into the network under the situation that the leasing period provided by the DHCP server is very short.

Description

A kind of IP address lease method and device
Technical field
The invention belongs to network communication field, relate in particular to a kind of IP address lease method and device.
Background technology
Any subscriber computer that is connected on the internet all needs configuration of the Internet protocol (Internet Protocol, IP) the IP address of the IP address of address, subnet mask, default router and name server.The server that participates in network insertion at present in the broadband network is DHCP (DynamicHost Configuration Protocol, Dynamic Host Configuration Protocol server DHCP) of employing standard.When user terminal carries out network insertion, at first initiate dhcp process to Dynamic Host Configuration Protocol server by user terminal, carry out alternately with Dynamic Host Configuration Protocol server, Dynamic Host Configuration Protocol server uses the client server mode, need IP address user terminal just to find message to the Dynamic Host Configuration Protocol server broadcast transmission when starting, at this moment this user terminal just becomes the DHCP client computer.
Dynamic Host Configuration Protocol server is at first searched the network configuration information of this DHCP client computer in its database, if find the network configuration information of this DHCP client computer, then return the information that is found; If do not find the network configuration information of this DHCP client computer, then take out an IP address assignment in the secondary IP address pond and give this DHCP client computer.The IP address that Dynamic Host Configuration Protocol server is distributed to the DHCP client computer is interim, so the DHCP client computer can only use this IP address that is assigned in a period of time, and the DHCP agreement claims to be during this period of time lease period.If the DHCP client computer does not need to use this IP address, then need to send a request message that discharges this IP address to Dynamic Host Configuration Protocol server.If the DHCP client computer after lease period finishes, needs to continue to use this IP address, then need to re-rent request message to the Dynamic Host Configuration Protocol server transmission, require to re-rent this IP address.
The length of Dynamic Host Configuration Protocol server decision lease period, alternative lease period was from 1 second to 136 years.Under the very short situation of the lease period that Dynamic Host Configuration Protocol server provides, as lease period is seconds or tens of seconds, if network outage, then Dynamic Host Configuration Protocol server might not receive the request message of re-renting of DHCP client computer transmission, Dynamic Host Configuration Protocol server can discharge the authority that the DHCP client computer is provided by this IP address that provides voluntarily, perhaps Dynamic Host Configuration Protocol server receives the request message of re-renting of DHCP client computer transmission, but do not allow the DHCP client computer to continue to use this IP address that provides, send a not confirmation message, because the relation that network interrupts, the DHCP client computer does not receive this message.Under above two kinds of situations, the DHCP client computer is thought can continue to use this IP address, but this IP address is invalid, thereby causes effectively access network of DHCP client computer.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of IP address lease method, and to solve under the very short situation of the lease period that Dynamic Host Configuration Protocol server provides, the DHCP client computer is difficult to the problem of access network effectively.
The embodiment of the invention is achieved in that a kind of IP address lease method, and described method comprises the steps:
Half in operating period of the IP address of current use to its lease period sends the request of re-renting to Dynamic Host Configuration Protocol server, and the IP address of current use is re-rented in request;
Be provided with and wait for the described time-out time of re-renting request of dhcp server response, described time-out time is no more than the remaining time of the IP address lease phase of current use;
In described time-out time, re-rent the IP address that response judges whether to have the right to continue to use current use according to what Dynamic Host Configuration Protocol server returned, be the lease period of then upgrading the IP address of current use, otherwise distribute new IP address to the Dynamic Host Configuration Protocol server request.
Another purpose of the embodiment of the invention is to provide a kind of IP address lease device, and described device comprises:
Re-rent request module, be used for the half to its lease period in operating period of the IP address of current use, send the request of re-renting to Dynamic Host Configuration Protocol server, the IP address of current use is re-rented in request;
Overtime configuration module is used to be provided with and waits for the described time-out time of re-renting request of dhcp server response, and described time-out time is no more than the remaining time of the IP address lease phase of current use; And
IP address update module, be used in described time-out time, re-rent the IP address that response judges whether to have the right to continue to use current use according to what Dynamic Host Configuration Protocol server returned, be the lease period of then upgrading the IP address of current use, otherwise distribute new IP address to the Dynamic Host Configuration Protocol server request.
In embodiments of the present invention, operating period is to a half of its lease period, the DHCP client computer is initiated the request of re-renting to Dynamic Host Configuration Protocol server, request continues to rent the IP address of current use, if in the time-out time that is provided with, obtain the mandate of Dynamic Host Configuration Protocol server, then continue to use the IP address of current use, if Dynamic Host Configuration Protocol server forbids that the DHCP client computer continues to use the IP address of current use, then the DHCP client computer is distributed new IP address to the Dynamic Host Configuration Protocol server request again, can so that the DHCP client computer under the very short situation of the lease period that Dynamic Host Configuration Protocol server provides, access network effectively still.
Description of drawings
The realization flow figure of the IP address lease method that Fig. 1 provides for the embodiment of the invention;
The structure chart of the IP address lease device that Fig. 2 provides for the embodiment of the invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.
In the embodiment of the invention, half in the operating period to its lease period, the DHCP client computer is initiated the request of re-renting to Dynamic Host Configuration Protocol server, request continues to rent the IP address of current use, if in the time-out time that is provided with, obtain the Dynamic Host Configuration Protocol server mandate continue to use current use the IP address re-rent response, the IP address of then continuing to use current use; If do not obtain the response of re-renting of Dynamic Host Configuration Protocol server, perhaps receive Dynamic Host Configuration Protocol server forbid continuing using current use the IP address re-rent response, then distribute new IP address to the Dynamic Host Configuration Protocol server request again.
Fig. 1 shows the realization flow of the IP address lease method that the embodiment of the invention provides, and details are as follows:
In step S101, after the start, the DHCP client computer is utilized Dynamic Host Configuration Protocol server IP address allocated access network.
In step S102, the half in operating period of the IP address of current use to its lease period sends to Dynamic Host Configuration Protocol server and to re-rent request message, and request continues to rent the IP address of current use.
Re-rent IP address information that request message includes opcode information, type of hardware, hardware length, jumping figure information, Transaction Identifier (ID), second number information, the IP address that keeps position information, Dynamic Host Configuration Protocol server name information, Dynamic Host Configuration Protocol server, client, client's hardware address IP address information, gateway ip address information, client's hardware address (MAC Address), boot files name information and IP address lease phase information etc.
In step S103, time-out time is set, in time-out time, wait for to receive the response message of re-renting that Dynamic Host Configuration Protocol server returns.
Dynamic Host Configuration Protocol server returns re-rents the information that response message includes the information of authorizing the IP address of continuing to use current use or forbids continuing using the IP address of current use.
Obviously, the time-out time that is provided with of DHCP client computer can not surpass remaining time of lease period of the IP address of current use.
In step S104, in time-out time, judge whether to receive the response message of re-renting that Dynamic Host Configuration Protocol server returns, be execution in step S105 then, otherwise execution in step S108.
In step S105, re-rent the IP address that response message judges whether to have the right to continue to use current use according to what Dynamic Host Configuration Protocol server returned, be execution in step S106 then, otherwise execution in step S108.
In step S106, upgrade the state information of lease period timer and IP address.
In step S107, send the IP address to Dynamic Host Configuration Protocol server and discharge request message, request discharges the IP address of current use.
In step S108, send lease request message to Dynamic Host Configuration Protocol server again, new IP address is rented in request.
As one embodiment of the present of invention, in step S105, when do not receive in time-out time that Dynamic Host Configuration Protocol server returns re-rent response message the time, also direct execution in step S108, send lease request message to Dynamic Host Configuration Protocol server, new IP address is rented in request, after Dynamic Host Configuration Protocol server is received this lease request message, discharge the IP address of the current use of DHCP client computer, and then distribute new IP address to it.
Fig. 2 shows the structure of the IP address lease device that the embodiment of the invention provides, and the half in operating period of the IP address of current use to its lease period is re-rented request module 21 and sent the request of re-renting to Dynamic Host Configuration Protocol server, and the IP address of current use is re-rented in request.
Overtime configuration module 22 is provided with the wait dhcp server response, and this re-rents the time-out time of request, and this time-out time is no more than the remaining time of the IP address lease phase of current use.
In this time-out time, IP address update module 23 according to Dynamic Host Configuration Protocol server return re-rent the response judge whether to have the right to continue to use current use the IP address, be the lease period of then upgrading the IP address of current use, otherwise distribute new IP address to the Dynamic Host Configuration Protocol server request.
Wherein, re-rent response receiver module 231 and in this time-out time, receive the response of re-renting that Dynamic Host Configuration Protocol server returns.
When re-rent mandate that response receiver module 231 receives that Dynamic Host Configuration Protocol server returns continue to use current use the IP address re-rent response the time, lease period update module 232 is upgraded the lease period of the IP address of current use.
When re-rent that response receiver module 231 do not receive in this time-out time that Dynamic Host Configuration Protocol server returns re-rent response the time, the IP address discharges request module 233 and sends the release request of IP address to Dynamic Host Configuration Protocol server, request discharges the IP address of current use, and IP Address requests module 234 is distributed new IP address to the Dynamic Host Configuration Protocol server request then.
As one embodiment of the present of invention, when re-rent that response receiver module 231 do not receive in this time-out time that Dynamic Host Configuration Protocol server returns re-rent response the time, IP Address requests module 234 can directly send lease request to Dynamic Host Configuration Protocol server, and request distributes new IP address.
Re-rent response receiver module 231 receive the IP address that bans use of current use that Dynamic Host Configuration Protocol server returns re-rent response the time, IP Address requests module 234 sends lease request to Dynamic Host Configuration Protocol server, request distributes new IP address.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. an IP address lease method is characterized in that described method comprises the steps:
Half in operating period of the IP address of current use to its lease period sends the request of re-renting to Dynamic Host Configuration Protocol server, and the IP address of current use is re-rented in request;
Be provided with and wait for the described time-out time of re-renting request of dhcp server response, described time-out time is no more than the remaining time of the IP address lease phase of current use;
In described time-out time, re-rent the IP address that response judges whether to have the right to continue to use current use according to what Dynamic Host Configuration Protocol server returned, be the lease period of then upgrading the IP address of current use, otherwise distribute new IP address to the Dynamic Host Configuration Protocol server request.
2. IP address lease method as claimed in claim 1 is characterized in that, and is described in described time-out time, and the response of returning according to Dynamic Host Configuration Protocol server of re-renting judges whether to have the right to continue to use the step of the IP address of current use to be specially:
2.1 in the time-out time that is provided with, the response of re-renting that judges whether to receive Dynamic Host Configuration Protocol server is an execution in step 2.2 then, otherwise execution in step 2.4;
2.2 judge whether to authorize the IP address of continuing to use current use, be execution in step 2.3 then, otherwise execution in step 2.4;
2.3 upgrade the lease period of the IP address of current use;
2.4 send lease request to Dynamic Host Configuration Protocol server, request distributes new IP address.
3. IP address lease method as claimed in claim 1 is characterized in that, and is described in described time-out time, and the response of returning according to Dynamic Host Configuration Protocol server of re-renting judges whether to have the right to continue to use the step of the IP address of current use to be specially:
3.1 in the time-out time that is provided with, the response of re-renting that judges whether to receive Dynamic Host Configuration Protocol server is an execution in step 3.2 then, otherwise execution in step 3.4;
3.2 judge whether to authorize the IP address of continuing to use current use, be execution in step 3.3 then, otherwise execution in step 3.5;
3.3 upgrade the lease period of the IP address of current use;
Discharge request 3.4 send the IP address to Dynamic Host Configuration Protocol server, request discharges the IP address of current use;
3.5 send lease request to Dynamic Host Configuration Protocol server, request distributes new IP address.
4. IP address lease device is characterized in that described device comprises:
Re-rent request module, be used for the half to its lease period in operating period of the IP address of current use, send the request of re-renting to Dynamic Host Configuration Protocol server, the IP address of current use is re-rented in request;
Overtime configuration module is used to be provided with and waits for the described time-out time of re-renting request of dhcp server response, and described time-out time is no more than the remaining time of the IP address lease phase of current use; And
IP address update module, be used in described time-out time, re-rent the IP address that response judges whether to have the right to continue to use current use according to what Dynamic Host Configuration Protocol server returned, be the lease period of then upgrading the IP address of current use, otherwise distribute new IP address to the Dynamic Host Configuration Protocol server request.
5. IP address lease device as claimed in claim 4 is characterized in that, described IP address update module comprises:
Re-rent the response receiver module, be used in described time-out time, receive the response of re-renting that Dynamic Host Configuration Protocol server returns;
The lease period update module, be used for described re-rent mandate that the response receiver module receives that Dynamic Host Configuration Protocol server returns continue to use current use the IP address re-rent response the time, upgrade the lease period of the IP address of current use;
IP Address requests module, be used for when re-renting the response of re-renting that the response receiver module does not receive that Dynamic Host Configuration Protocol server returns, perhaps receive the IP address that bans use of current use that Dynamic Host Configuration Protocol server returns re-rent response the time, send lease request to Dynamic Host Configuration Protocol server, request distributes new IP address.
6. IP address lease device as claimed in claim 5 is characterized in that, described IP address update module further comprises:
The IP address discharges request module, be used for when re-rent that the response receiver module do not receive in described time-out time that Dynamic Host Configuration Protocol server returns re-rent response the time, send the IP address to Dynamic Host Configuration Protocol server and discharge request, the IP address of the current use of request release.
CNA2006100646796A 2006-12-29 2006-12-29 Method and device for hiring IP address Pending CN101202767A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006100646796A CN101202767A (en) 2006-12-29 2006-12-29 Method and device for hiring IP address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006100646796A CN101202767A (en) 2006-12-29 2006-12-29 Method and device for hiring IP address

Publications (1)

Publication Number Publication Date
CN101202767A true CN101202767A (en) 2008-06-18

Family

ID=39517722

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006100646796A Pending CN101202767A (en) 2006-12-29 2006-12-29 Method and device for hiring IP address

Country Status (1)

Country Link
CN (1) CN101202767A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011140954A1 (en) * 2010-05-13 2011-11-17 华为技术有限公司 Method and device for obtaining remote ip address
CN102523316A (en) * 2011-12-23 2012-06-27 杭州华三通信技术有限公司 Address distribution method and address distribution device
CN105813056A (en) * 2016-05-06 2016-07-27 广东欧珀移动通信有限公司 Network access method and terminal
CN106302853A (en) * 2016-08-11 2017-01-04 青岛海信宽带多媒体技术有限公司 A kind of method carrying out network configuration and terminal thereof
CN106713522A (en) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 Wireless fidelity (Wi-Fi) connection method and mobile terminal
CN106780812A (en) * 2016-12-13 2017-05-31 分享下(北京)科技有限公司 A kind of Work attendance method that record is rented based on ip
CN108337333A (en) * 2018-03-23 2018-07-27 普联技术有限公司 IP address management method, management equipment, Network Personal Video Recorder and storage medium
CN108566669A (en) * 2017-12-07 2018-09-21 惠州Tcl移动通信有限公司 A kind of method of terminal intelligent power saving, terminal and the device with store function
CN113067742A (en) * 2020-01-02 2021-07-02 ***通信有限公司研究院 IPoE processing method and device and home gateway

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9503418B2 (en) 2010-05-13 2016-11-22 Huawei Technologies Co., Ltd. Method and apparatus for obtaining remote IP address
WO2011140954A1 (en) * 2010-05-13 2011-11-17 华为技术有限公司 Method and device for obtaining remote ip address
CN102523316A (en) * 2011-12-23 2012-06-27 杭州华三通信技术有限公司 Address distribution method and address distribution device
CN105813056A (en) * 2016-05-06 2016-07-27 广东欧珀移动通信有限公司 Network access method and terminal
CN106302853B (en) * 2016-08-11 2019-09-17 青岛海信宽带多媒体技术有限公司 A kind of method and its terminal carrying out network configuration
CN106302853A (en) * 2016-08-11 2017-01-04 青岛海信宽带多媒体技术有限公司 A kind of method carrying out network configuration and terminal thereof
CN106713522A (en) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 Wireless fidelity (Wi-Fi) connection method and mobile terminal
WO2018103400A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Wireless fidelity wifi connection method and related product
CN106713522B (en) * 2016-12-07 2020-01-14 Oppo广东移动通信有限公司 Wireless fidelity Wi-Fi connection method and mobile terminal
CN106780812A (en) * 2016-12-13 2017-05-31 分享下(北京)科技有限公司 A kind of Work attendance method that record is rented based on ip
CN108566669A (en) * 2017-12-07 2018-09-21 惠州Tcl移动通信有限公司 A kind of method of terminal intelligent power saving, terminal and the device with store function
CN108566669B (en) * 2017-12-07 2021-05-04 惠州Tcl移动通信有限公司 Intelligent power saving method for terminal, terminal and device with storage function
CN108337333A (en) * 2018-03-23 2018-07-27 普联技术有限公司 IP address management method, management equipment, Network Personal Video Recorder and storage medium
CN108337333B (en) * 2018-03-23 2021-10-15 普联技术有限公司 IP address management method, management device, network video recorder and storage medium
CN113067742A (en) * 2020-01-02 2021-07-02 ***通信有限公司研究院 IPoE processing method and device and home gateway

Similar Documents

Publication Publication Date Title
CN101202767A (en) Method and device for hiring IP address
KR101481443B1 (en) A method for management device in a communication network and a system thereof
US20020106985A1 (en) Multicast service providing system, multicast service providing method, information distributor, radio terminal, and radio base station
CN101578832B (en) For the apparatus and method to wireless device transfer system state information change
WO2001097483A3 (en) Dynamic ip address allocation system and method
JPH11308273A (en) Mobile computer device, device and method for mobile computer management and communication control method
CN1937632A (en) Address distributing method for broadband wireless access system
KR101504173B1 (en) Charging Method and Apparatus of WiFi Roaming Based on AC-AP Association
US20070033621A1 (en) Increasing the number of supported devices on a DOCSIS interface
CN103312708A (en) Lease file based IP (internet protocol) setting method and system
CN100450114C (en) Automatic configuration method and system for digital household terminal
CN101729324B (en) Resource configuration method and household base station configuration server
CN101150598A (en) Method for CDMA system to allocate fixing IP address for users
US20050185625A1 (en) Address dynamic assignment system, relay apparatus, address management apparatus, location manager and address dynamic assignment method
CN1770779B (en) Method and system for managing IP address assigned to mobile station
CN101442800B (en) Method, system and terminal for discharging terminal business
CN101552723A (en) Method, system and device for obtaining IP address of ANDSF entity
CN101207608B (en) Method for accessing to wide band network
CN101304406B (en) Method for managing conversation connection as well as apparatus and system
KR100880884B1 (en) Method and apparatus for detecting duplicate IP address
CN101267373B (en) A method, device and system for terminal to be online again
US20090059840A1 (en) Wireless communication system and method for managing service flow identifier in the same
WO2005006791A1 (en) Method and system for de-registering a broadcast/multicast service in a high-rate packet data system
KR20020094974A (en) Method of transmitting packet data, and system for the same
KR20070014719A (en) System and method for providing service automatic activation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20080618