CN102299932A - Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server - Google Patents

Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server Download PDF

Info

Publication number
CN102299932A
CN102299932A CN2011102841578A CN201110284157A CN102299932A CN 102299932 A CN102299932 A CN 102299932A CN 2011102841578 A CN2011102841578 A CN 2011102841578A CN 201110284157 A CN201110284157 A CN 201110284157A CN 102299932 A CN102299932 A CN 102299932A
Authority
CN
China
Prior art keywords
server
dhcp
message
lease
dynamic host
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.)
Granted
Application number
CN2011102841578A
Other languages
Chinese (zh)
Other versions
CN102299932B (en
Inventor
许豫飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201110284157.8A priority Critical patent/CN102299932B/en
Publication of CN102299932A publication Critical patent/CN102299932A/en
Application granted granted Critical
Publication of CN102299932B publication Critical patent/CN102299932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a backup method for a dynamic host configuration protocol (DHCP) server. The method comprises the following steps of: recording the IP addresses of more than one other DHCP server, and marking the other recorded DHCP servers as trusted servers; when a DHCP DISCOVER message transmitted by a DHCP client is received, allocating an IP address to the DHCP client, and recording the allocated IP address as a temporary lease; when a DHCP REQUEST message transmitted by the DCHP client is received, judging whether the DHCP server or the trusted server is a server corresponding to a server ID (Identity) in the DHCP REQUEST message, recording the temporary lease as a valid lease if the DHCP server is the server corresponding to the server ID, and deleting the temporary lease and recording the IP address allocated to the DHCP client by using the trusted server as a valid lease if the trusted server is the server corresponding to the server ID; and otherwise, deleting the corresponding temporary lease. The invention further discloses a DHCP server. Due to the adoption of the backup method for the HDCP server and the DHCP server, the backup of more than two DHCP servers can be realized without establishing any backup link.

Description

A kind of Dynamic Host Configuration Protocol server backup method and Dynamic Host Configuration Protocol server
Technical field
The present invention relates to DHCP (DHCP) technology, particularly a kind of Dynamic Host Configuration Protocol server backup method and Dynamic Host Configuration Protocol server.
Background technology
DHCP adopts the client/server communication pattern, to Dynamic Host Configuration Protocol server the configuration application is proposed by dhcp client, Dynamic Host Configuration Protocol server is returned as the corresponding configuration informations such as Internet Protocol (IP) address that dhcp client distributes, to realize the dynamic-configuration of information such as IP address, specifically can be referring to the workflow diagram that dynamically obtains the IP address approach shown in Figure 1.As shown in Figure 1, this flow process comprises:
Step 101:DHCP client finds that with DHCP (DISCOVER) message sends to Dynamic Host Configuration Protocol server with broadcast mode.
After step 102:DHCP server receives DHCP DISCOVER message, select an IP address according to the order of priority of IP address assignment, and provide (OFFER) message to send to client by DHCP the IP address of selecting.
Step 103:DHCP client is asked (REQUEST) message in the mode of broadcasting to Dynamic Host Configuration Protocol server transmission DHCP after receiving DHCP OFFER message, comprising Dynamic Host Configuration Protocol server in this DHCP REQUEST message is the IP address that dhcp client is selected.
Need to prove, in this step, send DHCP OFFER message, be dhcp client when receiving a plurality of DHCP OFFER message to dhcp client as many Dynamic Host Configuration Protocol server, the DHCP OFFER message that dhcp client selects one of them server to send.
Step 104: after having been selected the Dynamic Host Configuration Protocol server of DHCP OFFER message to receive DHCP REQUEST message by dhcp client, give this dhcp client if confirm the IP address assignment that to select in the step 102, then return DHCP affirmative acknowledgement (ACK) message to dhcp client; Otherwise, return DHCP negative response (NACK) message to dhcp client.
Need to prove, when dhcp client is received DHCP ACK message, the IP address that will use Dynamic Host Configuration Protocol server to select for this dhcp client; Otherwise this dhcp client need return execution in step 101, to obtain the IP address again.
Also it should be noted that, after dhcp client gets access to the IP address, IP address lease writing time that Dynamic Host Configuration Protocol server need be applied for for each dhcp client, after lease time expires, renew a contract to Dynamic Host Configuration Protocol server by sending DHCP renewed treaty message by dhcp client, if renew a contract successfully, dhcp client can continue to use this IP address; Dhcp client was not renewed a contract when the failure or lease expired if renew a contract, the corresponding lease of Dynamic Host Configuration Protocol server deletion, and allow to give other dhcp clients with this IP address assignment.
Step 105:DHCP client is used the IP address after the end, sends DHCP with mode of unicast to Dynamic Host Configuration Protocol server and discharges (RELEASE) message, uses for other dhcp clients so that Dynamic Host Configuration Protocol server reclaims this resource.
So far, promptly finished the existing whole workflow of dynamically obtaining the IP address approach, this flow process is mainly used in networking schematic diagram as shown in Figure 2, promptly comprises in the networking of a DFCP server and the dhcp client more than two.
Yet when this Dynamic Host Configuration Protocol server fault in the network, whole network all will bear the risk that hinders for some reason and cause Network to be interrupted, and for this reason, has mainly adopted two-node cluster hot backup structure as shown in Figure 3 at present.As shown in Figure 3, between Dynamic Host Configuration Protocol server A and Dynamic Host Configuration Protocol server B, set up backup link, by the business on the backup link backup opposite end Dynamic Host Configuration Protocol server of setting up, thus, when a Dynamic Host Configuration Protocol server fault, business datum also can be passed through from the opposite end Dynamic Host Configuration Protocol server, thereby has avoided the interruption of Network to a great extent.
By above-mentioned analysis as can be seen, adopt two-node cluster hot backup can avoid because the interruption of the Network that the Dynamic Host Configuration Protocol server fault is brought, yet, on the one hand, need set up backup link when adopting two-node cluster hot backup, and backup link depends on the system hot standby technology, is inapplicable for not possessing the hot network that is equipped with technology; On the other hand, two-node cluster hot backup can only be backed up between two Dynamic Host Configuration Protocol server, also is inapplicable for the network more than two Dynamic Host Configuration Protocol server.
Summary of the invention
In view of this, the invention provides a kind of Dynamic Host Configuration Protocol server backup method, can realize the backup of two above Dynamic Host Configuration Protocol server, and need not to set up backup link.
The present invention also provides a kind of Dynamic Host Configuration Protocol server, can realize the backup of two above Dynamic Host Configuration Protocol server, and need not to set up backup link.
In order to achieve the above object, the technical scheme of the present invention's proposition is:
A kind of dynamic host configuration protocol DHCP server backup method, this method comprises:
The Internet Protocol IP address of more than one other Dynamic Host Configuration Protocol server of record, and other Dynamic Host Configuration Protocol server that will write down is as trust server;
When the DHCP that receives the dhcp client transmission finds the DISCOVER message, be this dhcp client distributing IP address, and described IP address allocated is recorded as preliminary rental agreement;
When receiving the DHCP request REQUEST message of dhcp client transmission, judge that whether self or trust server be the server identity sign Server ID corresponding server in the DHCP REQUEST message, if self, preliminary rental agreement is recorded as effective lease, if trust server, delete preliminary rental agreement, and this trust server is recorded as effective lease for the dhcp client IP address allocated; Otherwise, the preliminary rental agreement that deletion is corresponding.
This method further comprises:
When the DHCP that receives the dhcp client transmission detects the DECLINE message, judge self whether to be Server ID corresponding server in the DHCP DECLINE message, if, effective lease that deletion is corresponding, and the IP address in the effective lease that will delete is recorded as conflict IP address; Otherwise, effective lease that deletion is corresponding;
This method further comprises:
When receiving DHCP that dhcp client sends when discharging the RELEASE message, judge self whether to be Server ID corresponding server in the DHCP RELEASE message, if effective lease that deletion is corresponding sends to trust server with this message; Otherwise, effective lease that deletion is corresponding.
This method further comprises:
When receiving the DHCP renewed treaty message that dhcp client sends, judge self whether to be Server ID corresponding server in the DHCP renewed treaty message, if, upgrade corresponding effective lease, simultaneously this message is sent to trust server; Otherwise, upgrade corresponding effective lease.
Add fashionablely as new trust server, this method further comprises:
Receive the lease batch synchronization request that this trust server sends, give this trust server in batches synchronously described lease.
Described lease batch synchronization request and described lease all pass through the DHCP message in batches synchronously and send.
A kind of dynamic host configuration protocol DHCP server, this Dynamic Host Configuration Protocol server comprises: duplicated record unit, preliminary rental agreement record cell and preliminary rental agreement processing unit, wherein,
Described duplicated record unit is used to write down the Internet Protocol IP address of more than one other Dynamic Host Configuration Protocol server, and other Dynamic Host Configuration Protocol server that will write down is as trust server;
Described preliminary rental agreement record cell is used for being this dhcp client distributing IP address, and described IP address allocated being recorded as preliminary rental agreement when the DHCP that receives the dhcp client transmission finds the DISCOVER message;
Described preliminary rental agreement processing unit, be used for when receiving the DHCP request REQUEST message of dhcp client transmission, judge that whether self or trust server in the duplicated record unit be the server identity sign Server ID corresponding server in the DHCPREQUEST message, if self, the preliminary rental agreement of described preliminary rental agreement recording unit records is recorded as effective lease, if trust server, delete the preliminary rental agreement of described preliminary rental agreement recording unit records, and this trust server is recorded as effective lease for the dhcp client IP address allocated; Otherwise, delete the preliminary rental agreement of described preliminary rental agreement recording unit records.
This Dynamic Host Configuration Protocol server also comprises first effective lease delete cells, be used for when the DHCP that receives the dhcp client transmission detects the DECLINE message, judge self whether to be Server ID corresponding server in the DHCP DECLINE message in the described duplicated record unit, if, delete effective lease of described preliminary rental agreement processing unit correspondence, and the IP address in the effective lease that will delete is recorded as conflict IP address; Otherwise, delete effective lease of described preliminary rental agreement processing unit correspondence.
This Dynamic Host Configuration Protocol server also comprises second effective lease delete cells, be used for when the DHCP that receives the dhcp client transmission discharges the RELEASE message, judge self whether to be Server ID corresponding server in the DHCP RELEASE message in the described duplicated record unit, if, delete effective lease of described preliminary rental agreement processing unit correspondence, this message is sent to backup server; Otherwise, delete effective lease of described preliminary rental agreement processing unit correspondence.
This Dynamic Host Configuration Protocol server also comprises effective lease updating block, be used for when receiving the DHCP renewed treaty message of dhcp client transmission, judge self whether to be Server ID corresponding server in the DHCP renewed treaty message in the described duplicated record unit, if, upgrade effective lease of described preliminary rental agreement processing unit correspondence, simultaneously this message is sent to backup server; Otherwise, upgrade effective lease of described preliminary rental agreement processing unit correspondence.
This Dynamic Host Configuration Protocol server also comprises in batches lock unit of lease, is used for adding as new trust server fashionable, receives lease that this trust server sends synchronization request in batches, gives this trust server in batches synchronously with described lease.
In sum, Dynamic Host Configuration Protocol server backup method of the present invention and Dynamic Host Configuration Protocol server, be that more than one other Dynamic Host Configuration Protocol server by having write down in advance the IP address in a server is a trust server, when server receives DHCP DISCOVER message, be this dhcp client distributing IP address, and described IP address allocated is recorded as preliminary rental agreement, and when receiving the DHCPREQUEST message, can determine according to the ID of Server ID in this message and prior specified server preliminary rental agreement is recorded as effective lease or this preliminary rental agreement of deletion.Because the present invention has specified more than one trust server in a server, and can carry out correct processing to lease according to the ID of server and the relation of the Server ID in the DHCP message, therefore, when one of them server takes place when unusual, other trust server is because the lease of this unusual server-assignment of record, also just can continue as client service, and can not give the IP address of client distribution conflict, thereby not only realized the backup of two above Dynamic Host Configuration Protocol server, and need not between server, to set up backup link.
Description of drawings
Fig. 1 is the existing workflow diagram that dynamically obtains the IP address approach by DHCP;
Fig. 2 is the networking schematic diagram of existing non-two-node cluster hot backup;
Fig. 3 is the networking schematic diagram of existing two-node cluster hot backup;
Fig. 4 is the workflow diagram of Dynamic Host Configuration Protocol server backup method of the present invention;
Fig. 5 is the structural representation of Dynamic Host Configuration Protocol server of the present invention.
Embodiment
In order to solve the technical problem that the present invention proposes, the specific implementation of scheme of the present invention comprises:
The IP address of more than one other Dynamic Host Configuration Protocol server of record, and other Dynamic Host Configuration Protocol server that will write down is as trust server; When receiving the DHCP DISCOVER message of dhcp client transmission, be this dhcp client distributing IP address, and described IP address allocated is recorded as preliminary rental agreement; When receiving the DHCP REQUEST message of dhcp client transmission, judge that whether self or trust server be the Server ID corresponding server in the DHCP REQUEST message, if self, preliminary rental agreement is recorded as effective lease, if trust server, delete preliminary rental agreement, and this trust server is recorded as effective lease for the dhcp client IP address allocated; Otherwise, the preliminary rental agreement that deletion is corresponding.
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the accompanying drawings and the specific embodiments.
Fig. 4 is the workflow diagram of Dynamic Host Configuration Protocol server backup method of the present invention.As shown in Figure 4, this flow process comprises:
Step 401: the Internet Protocol IP address of more than one other Dynamic Host Configuration Protocol server of record, and other Dynamic Host Configuration Protocol server that will write down is as trust server.
Need to prove, in the present embodiment, need a Dynamic Host Configuration Protocol server in the network that more than one other Dynamic Host Configuration Protocol server is appointed as trust server, and this operating between server is mutual, suppose that it is trust server that Dynamic Host Configuration Protocol server A has specified Dynamic Host Configuration Protocol server B, C, D, then also to have specified Dynamic Host Configuration Protocol server A, C, D be trust server to Dynamic Host Configuration Protocol server B, it is trust server that Dynamic Host Configuration Protocol server C has also specified Dynamic Host Configuration Protocol server A, B, D, and it is trust server that Dynamic Host Configuration Protocol server D has also specified Dynamic Host Configuration Protocol server A, B, C.
Step 402:DHCP client sends the DHCPDISCOVER message with broadcast mode to Dynamic Host Configuration Protocol server, to seek Dynamic Host Configuration Protocol server.
After step 403:DHCP server is received DHCP DISCOVER message, will will be recorded as preliminary rental agreement for this client IP address allocated for after the client IP address allocated sends to client by the DHCPOFFER message.
In this step, described preliminary rental agreement comprises the MAC Address of client and is this client IP address allocated.
Be client records behind the preliminary rental agreement, when follow-up when receiving the DHCP message that dhcp client sends, can be according to the Dynamic Host Configuration Protocol server of the ID correspondence in the DHCP message, determine preliminary rental agreement is recorded as effective lease or deletion preliminary rental agreement, specifically can be referring to step 404-413, below introduce respectively:
After step 404:DHCP client is received DHCP OFFER message, send DHCP REQUEST message to Dynamic Host Configuration Protocol server in the mode of broadcasting.
Step 405: the Dynamic Host Configuration Protocol server that receives DHCP REQUEST message has three kinds of processing modes: when from as the Server ID corresponding server in the DHCP REQUEST message time, preliminary rental agreement is recorded as effective lease; When certain trust server in self is Server ID corresponding server in the DHCP REQUEST message, the deletion preliminary rental agreement, and be that client IP address allocated (also being the Request IP in the corresponding DHCP REQUEST message) is recorded as effective lease with this trust server; Otherwise, the preliminary rental agreement of deletion message correspondence.
Owing in a server, write down the lease of trust server, therefore, when one of them server generation was unusual, other trust server can be according to the lease of the unusual server that writes down, continue as client service, and IP address that can distribution conflict.
The Dynamic Host Configuration Protocol server of the ID correspondence in the step 406:DHCP REQUEST message sends DHCP ACK message to dhcp client.
Step 407: after receiving DHCP ACK message, whether dhcp client sends the ARP(Address Resolution Protocol) message to other dhcp client, available with the IP address of resolving in effective lease.
Step 408: after the feedback of receiving the ARP message, send DHCP to Dynamic Host Configuration Protocol server and detect (DECLINE) message.
Need to prove,, illustrate that the IP address in this effective lease is used by other dhcp client if dhcp client is received the feedback of ARP message.
Step 409: when receiving DHCP DECLINE message: when from the time as the Server ID corresponding server in the DHCP DECLINE message, effective lease of deletion message correspondence, and the IP address in the effective lease that will delete is recorded as conflict IP address; When certain trust server in self is Server ID corresponding server in the DHCP DECLINE message, effective lease of deletion message correspondence; Otherwise Dynamic Host Configuration Protocol server is left intact.
Need to prove, when Dynamic Host Configuration Protocol server is received DHCP DECLINE message, be illustrated as dhcp client IP address allocated occupied (conflicting with having for other dhcp client IP address allocated), therefore, needing be dhcp client distributing IP address again.
Step 410: when dhcp client does not re-use IP address in effective lease, send DHCP to Dynamic Host Configuration Protocol server and discharge (RELEASE) message.
Step 411: when receiving DHCP RELEASE message: when from as the Server ID corresponding server in the DHCP RELEASE message time, effective lease of deletion message correspondence sends to backup server with this message simultaneously; When certain trust server in self is Server ID corresponding server in the DHCP RELEASE message, effective lease of deletion message correspondence.
Because DHCP RELEASE message is a unicast message, therefore, when Dynamic Host Configuration Protocol server from as the Server ID corresponding server in the DHCP RELEASE message time, in the time of the effective lease of deletion message correspondence, also need this message is transmitted to the trust server of self.
Step 412: when dhcp client also continues to use IP address in effective lease, send DHCP renewed treaty message to Dynamic Host Configuration Protocol server.
Step 413: when receiving DHCP renewed treaty message: when from the time, upgrade effective lease of message correspondence, simultaneously this message is sent to backup server as the Server ID corresponding server in the DHCP renewed treaty message; When certain trust server in self is Server ID corresponding server in the DHCP renewed treaty message, upgrade effective lease of message correspondence.
The same with the DHCP RELEASE message in the step 411, DHCP renewed treaty message also is a unicast message, therefore, when Dynamic Host Configuration Protocol server from as the Server ID corresponding server in the DHCP RELEASE message time, also need this message is transmitted to backup server.
So far, promptly finished the whole workflow of Dynamic Host Configuration Protocol server backup method of the present invention.
Need to prove, in the present embodiment, when Dynamic Host Configuration Protocol server is restarted or have new Dynamic Host Configuration Protocol server to add trust server, also need the lease of all trust server is carried out synchronously, promptly, be specifically as follows by restarting server or initiate server to one of them server requests lease:
1) by increasing new DHCP message, asking lease (BINDREQUEST) message in batches as DHCP, to the server requests lease; 2) in existing message, increase new option, to be used for to Dynamic Host Configuration Protocol server request lease.In the reality, in the server or initiate trust server that also can adopt other modes that lease is synchronized to restart, specifically realize being as the criterion with reality.
Also it should be noted that, when reality realizes, real lease is synchronous by TFTP or FTP synchronously, be specially: Dynamic Host Configuration Protocol server is recorded in lease in the local file, when receiving the lease synchronization request, its own IP address and file name (comprising the path, place) are passed through the DHCP response feedback to the request server in the Dynamic Host Configuration Protocol server; Request server is initiated TFTP or FTP acquisition request lease file according to these information, obtains the lease that writes down in the successfully back resolution file and is recorded in this locality.
Based on said method, Fig. 5 has provided the structure of Dynamic Host Configuration Protocol server of the present invention.As shown in Figure 5, this Dynamic Host Configuration Protocol server comprises duplicated record unit 51, preliminary rental agreement record cell 52 and preliminary rental agreement processing unit 53, wherein,
Described duplicated record unit 51 is used to write down the IP address of more than one other Dynamic Host Configuration Protocol server, and other Dynamic Host Configuration Protocol server that will write down is as trust server.
Described preliminary rental agreement record cell 52 is used for being this dhcp client distributing IP address, and described IP address allocated being recorded as preliminary rental agreement when the DHCP that receives the dhcp client transmission finds the DISCOVER message.
Described preliminary rental agreement processing unit 53, be used for when receiving the DHCP request REQUEST message of dhcp client transmission, judge that whether self or trust server in the duplicated record unit 51 be the Server ID corresponding server in the DHCP REQUEST message, if self, the preliminary rental agreement of described preliminary rental agreement record cell 52 records is recorded as effective lease, if trust server, delete the preliminary rental agreement of described preliminary rental agreement record cell 52 records, and this trust server is recorded as effective lease for the dhcp client IP address allocated; Otherwise, delete the preliminary rental agreement that described preliminary rental agreement record cell 52 writes down.
Further, this backup server also comprises first effective lease delete cells 54, be used for when receiving the DHCP DECLINE message of dhcp client transmission, judge self whether to be Server ID corresponding server in the DHCP DECLINE message in the described duplicated record unit 51, if, delete effective lease of described preliminary rental agreement processing unit 53 correspondences, and the IP address in the effective lease that will delete is recorded as conflict IP address; Otherwise, delete effective lease of described preliminary rental agreement processing unit 53 correspondences.
This backup server also comprises second effective lease delete cells 55, be used for when receiving the DHCP RELEASE message of dhcp client transmission, judge self whether to be Server ID corresponding server in the DHCP RELEASE message in the described duplicated record unit 51, if, delete effective lease of described preliminary rental agreement processing unit 53 correspondences, this message is sent to backup server; Otherwise, delete effective lease of described preliminary rental agreement processing unit 53 correspondences.
This backup server also comprises effective lease updating block 56, be used for when receiving the DHCP renewed treaty message of dhcp client transmission, judge self whether to be Server ID corresponding server in the DHCP renewed treaty message in the described duplicated record unit 51, if, upgrade effective lease of described preliminary rental agreement processing unit 53 correspondences, simultaneously this message is sent to backup server; Otherwise, upgrade effective lease of described preliminary rental agreement processing unit 53 correspondences.
This backup server also comprises in batches lock unit 57 of lease, is used for adding as new trust server fashionable, receives lease that this trust server sends synchronization request in batches, gives this trust server in batches synchronously with described lease.
Wherein, described lease batch synchronization request and described lease all pass through the transmission of DHCP message in batches synchronously.
So far, promptly obtained Dynamic Host Configuration Protocol server of the present invention.The concrete workflow of the described Dynamic Host Configuration Protocol server of Fig. 5 can repeat no more here referring to Fig. 4.
Below illustrate the process that Dynamic Host Configuration Protocol server backup when unusual takes place Dynamic Host Configuration Protocol server of the present invention: suppose to have in the network server a and server b, can distribute address 1~10:
When not having back mechanism, server a has distributed address 1~3,4~10 are recorded as unappropriated address, server b has distributed address 7~10, and address 1~6 is recorded as unallocated address, at this moment, if server a is unusual, have only server b to work, may occur two kinds of mistakes so: can fail when 1, the client of address 1~3 is renewed a contract, client needs applied address again; 2, server b may attempt address 1~3 to distribute, and distributing can failure.
When adopting multi-computer back-up of the present invention, server a and b can recording addresses 1~3 and 7~10th, distributed lease, thereby, also just avoided the appearance of above-mentioned two problems, successfully realized backup.
In a word, Dynamic Host Configuration Protocol server backup method of the present invention and Dynamic Host Configuration Protocol server, be that more than one other Dynamic Host Configuration Protocol server by having write down in advance the IP address in a server is a trust server, when server receives DHCP DISCOVER message, be this dhcp client distributing IP address, and described IP address allocated is recorded as preliminary rental agreement, and when receiving the DHCPREQUEST message, can determine according to the ID of Server ID in this message and prior specified server preliminary rental agreement is recorded as effective lease or this preliminary rental agreement of deletion.Because the present invention has specified more than one trust server in a server, and can carry out correct processing to lease according to the ID of server and the relation of the Server ID in the DHCP message, therefore, when one of them server takes place when unusual, other trust server is because the lease of this unusual server-assignment of record, also just can continue as client service, and can not give the IP address of client distribution conflict, thereby not only realized the backup of two above Dynamic Host Configuration Protocol server, and need not between server, to set up backup link.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (11)

1. dynamic host configuration protocol DHCP server backup method is characterized in that this method comprises:
The Internet Protocol IP address of more than one other Dynamic Host Configuration Protocol server of record, and other Dynamic Host Configuration Protocol server that will write down is as trust server;
When the DHCP that receives the dhcp client transmission finds the DISCOVER message, be this dhcp client distributing IP address, and described IP address allocated is recorded as preliminary rental agreement;
When receiving the DHCP request REQUEST message of dhcp client transmission, judge that whether self or trust server be the server identity sign Server ID corresponding server in the DHCP REQUEST message, if self, preliminary rental agreement is recorded as effective lease, if trust server, delete preliminary rental agreement, and this trust server is recorded as effective lease for the dhcp client IP address allocated; Otherwise, the preliminary rental agreement that deletion is corresponding.
2. method according to claim 1 is characterized in that, this method further comprises:
When the DHCP that receives the dhcp client transmission detects the DECLINE message, judge self whether to be Server ID corresponding server in the DHCP DECLINE message, if, effective lease that deletion is corresponding, and the IP address in the effective lease that will delete is recorded as conflict IP address; Otherwise, effective lease that deletion is corresponding.
3. method according to claim 1 is characterized in that, this method further comprises:
When receiving DHCP that dhcp client sends when discharging the RELEASE message, judge self whether to be Server ID corresponding server in the DHCP RELEASE message, if effective lease that deletion is corresponding sends to trust server with this message; Otherwise, effective lease that deletion is corresponding.
4. method according to claim 1 is characterized in that, this method further comprises:
When receiving the DHCP renewed treaty message that dhcp client sends, judge self whether to be Server ID corresponding server in the DHCP renewed treaty message, if, upgrade corresponding effective lease, simultaneously this message is sent to trust server; Otherwise, upgrade corresponding effective lease.
5. method according to claim 1 is characterized in that, adds fashionablely as new trust server, and this method further comprises:
Receive the lease batch synchronization request that this trust server sends, give this trust server in batches synchronously described lease.
6. method according to claim 5 is characterized in that, described lease batch synchronization request and described lease all pass through the DHCP message in batches synchronously and send.
7. a dynamic host configuration protocol DHCP server is characterized in that, this Dynamic Host Configuration Protocol server comprises: duplicated record unit, preliminary rental agreement record cell and preliminary rental agreement processing unit, wherein,
Described duplicated record unit is used to write down the Internet Protocol IP address of more than one other Dynamic Host Configuration Protocol server, and other Dynamic Host Configuration Protocol server that will write down is as trust server;
Described preliminary rental agreement record cell is used for being this dhcp client distributing IP address, and described IP address allocated being recorded as preliminary rental agreement when the DHCP that receives the dhcp client transmission finds the DISCOVER message;
Described preliminary rental agreement processing unit, be used for when receiving the DHCP request REQUEST message of dhcp client transmission, judge that whether self or trust server in the duplicated record unit be the server identity sign Server ID corresponding server in the DHCPREQUEST message, if self, the preliminary rental agreement of described preliminary rental agreement recording unit records is recorded as effective lease, if trust server, delete the preliminary rental agreement of described preliminary rental agreement recording unit records, and this trust server is recorded as effective lease for the dhcp client IP address allocated; Otherwise, delete the preliminary rental agreement of described preliminary rental agreement recording unit records.
8. Dynamic Host Configuration Protocol server according to claim 7, it is characterized in that, this Dynamic Host Configuration Protocol server also comprises first effective lease delete cells, be used for when the DHCP that receives the dhcp client transmission detects the DECLINE message, judge self whether to be Server ID corresponding server in the DHCP DECLINE message in the described duplicated record unit, if, delete effective lease of described preliminary rental agreement processing unit correspondence, and the IP address in the effective lease that will delete is recorded as conflict IP address; Otherwise, delete effective lease of described preliminary rental agreement processing unit correspondence.
9. Dynamic Host Configuration Protocol server according to claim 7, it is characterized in that, this Dynamic Host Configuration Protocol server also comprises second effective lease delete cells, be used for when the DHCP that receives the dhcp client transmission discharges the RELEASE message, judge self whether to be Server ID corresponding server in the DHCP RELEASE message in the described duplicated record unit, if, delete effective lease of described preliminary rental agreement processing unit correspondence, this message is sent to backup server; Otherwise, delete effective lease of described preliminary rental agreement processing unit correspondence.
10. Dynamic Host Configuration Protocol server according to claim 7, it is characterized in that, this Dynamic Host Configuration Protocol server also comprises effective lease updating block, be used for when receiving the DHCP renewed treaty message of dhcp client transmission, judge self whether to be Server ID corresponding server in the DHCP renewed treaty message in the described duplicated record unit, if, upgrade effective lease of described preliminary rental agreement processing unit correspondence, simultaneously this message is sent to backup server; Otherwise, upgrade effective lease of described preliminary rental agreement processing unit correspondence.
11. Dynamic Host Configuration Protocol server according to claim 7, it is characterized in that, this Dynamic Host Configuration Protocol server also comprises lease lock unit in batches, be used for adding fashionable as new trust server, receive the lease batch synchronization request that this trust server sends, give this trust server in batches synchronously described lease.
CN201110284157.8A 2011-09-22 2011-09-22 Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server Active CN102299932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110284157.8A CN102299932B (en) 2011-09-22 2011-09-22 Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110284157.8A CN102299932B (en) 2011-09-22 2011-09-22 Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server

Publications (2)

Publication Number Publication Date
CN102299932A true CN102299932A (en) 2011-12-28
CN102299932B CN102299932B (en) 2015-03-18

Family

ID=45360107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110284157.8A Active CN102299932B (en) 2011-09-22 2011-09-22 Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server

Country Status (1)

Country Link
CN (1) CN102299932B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580921A (en) * 2013-11-08 2014-02-12 深圳市共进电子股份有限公司 Automatic network equipment upgrading method and automatic network equipment upgrading system
CN106878478A (en) * 2016-12-13 2017-06-20 新华三技术有限公司 Address distribution method and device
CN107707689A (en) * 2017-10-31 2018-02-16 迈普通信技术股份有限公司 A kind of DHCP message processing method, Dynamic Host Configuration Protocol server and gateway device
CN109150745A (en) * 2018-10-26 2019-01-04 新华三信息安全技术有限公司 A kind of message processing method and device
CN110062063A (en) * 2019-05-30 2019-07-26 中磊电子(苏州)有限公司 Network address controller device and method
CN110417929A (en) * 2018-04-27 2019-11-05 慧与发展有限责任合伙企业 The high availability DHCP service provided by running Dynamic Host Configuration Protocol server in block chain network
CN110620694A (en) * 2019-09-27 2019-12-27 新华三信息安全技术有限公司 Client online recovery method and device, electronic equipment and storage medium
CN111478879A (en) * 2020-02-29 2020-07-31 新华三信息安全技术有限公司 DHCP (dynamic host configuration protocol) continuation method and device, electronic equipment and machine-readable storage medium
CN112889305A (en) * 2019-01-17 2021-06-01 慧与发展有限责任合伙企业 Short term lease allocation for network address conflict reduction in DHCP failover deployments
CN115460176A (en) * 2022-09-29 2022-12-09 苏州浪潮智能科技有限公司 Invalid address recovery method, device, equipment and medium for DHCP server

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1921496A (en) * 2005-08-24 2007-02-28 中兴通讯股份有限公司 Method for DHCP client terminal to identifying DHCP server
US7200678B1 (en) * 2002-09-04 2007-04-03 Cisco Technology, Inc. Selecting network address offered by a plurality of servers based on server identification information
CN101090309A (en) * 2007-07-18 2007-12-19 杭州华三通信技术有限公司 Method for implementing DHCP service redundant and DHCP server
CN101330531A (en) * 2008-07-31 2008-12-24 杭州华三通信技术有限公司 Method for processing DHCP address allocation and DHCP relay
US20090132550A1 (en) * 2005-07-28 2009-05-21 International Business Machines Corporation Implementing service requests from a common database in a multiple dhcp server environment
CN101729559A (en) * 2009-12-03 2010-06-09 中兴通讯股份有限公司 Method and system for realizing backup of DHCP server
CN101909285A (en) * 2009-06-03 2010-12-08 中兴通讯股份有限公司 Method and device for transmission self-configuration of self-organizing network
CN101951417A (en) * 2010-09-21 2011-01-19 北京星网锐捷网络技术有限公司 Method, system and trunk equipment for assigning multiple server addresses

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7200678B1 (en) * 2002-09-04 2007-04-03 Cisco Technology, Inc. Selecting network address offered by a plurality of servers based on server identification information
US20090132550A1 (en) * 2005-07-28 2009-05-21 International Business Machines Corporation Implementing service requests from a common database in a multiple dhcp server environment
CN1921496A (en) * 2005-08-24 2007-02-28 中兴通讯股份有限公司 Method for DHCP client terminal to identifying DHCP server
CN101090309A (en) * 2007-07-18 2007-12-19 杭州华三通信技术有限公司 Method for implementing DHCP service redundant and DHCP server
CN101330531A (en) * 2008-07-31 2008-12-24 杭州华三通信技术有限公司 Method for processing DHCP address allocation and DHCP relay
CN101909285A (en) * 2009-06-03 2010-12-08 中兴通讯股份有限公司 Method and device for transmission self-configuration of self-organizing network
CN101729559A (en) * 2009-12-03 2010-06-09 中兴通讯股份有限公司 Method and system for realizing backup of DHCP server
CN101951417A (en) * 2010-09-21 2011-01-19 北京星网锐捷网络技术有限公司 Method, system and trunk equipment for assigning multiple server addresses

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580921A (en) * 2013-11-08 2014-02-12 深圳市共进电子股份有限公司 Automatic network equipment upgrading method and automatic network equipment upgrading system
CN106878478A (en) * 2016-12-13 2017-06-20 新华三技术有限公司 Address distribution method and device
CN107707689A (en) * 2017-10-31 2018-02-16 迈普通信技术股份有限公司 A kind of DHCP message processing method, Dynamic Host Configuration Protocol server and gateway device
CN110417929B (en) * 2018-04-27 2022-04-15 慧与发展有限责任合伙企业 High availability DHCP service provided by running a DHCP server on a blockchain network
CN110417929A (en) * 2018-04-27 2019-11-05 慧与发展有限责任合伙企业 The high availability DHCP service provided by running Dynamic Host Configuration Protocol server in block chain network
CN109150745A (en) * 2018-10-26 2019-01-04 新华三信息安全技术有限公司 A kind of message processing method and device
CN109150745B (en) * 2018-10-26 2022-06-21 新华三信息安全技术有限公司 Message processing method and device
CN112889305B (en) * 2019-01-17 2023-11-17 慧与发展有限责任合伙企业 Short-term lease allocation for network address conflict reduction in DHCP failover deployments
CN112889305A (en) * 2019-01-17 2021-06-01 慧与发展有限责任合伙企业 Short term lease allocation for network address conflict reduction in DHCP failover deployments
CN110062063A (en) * 2019-05-30 2019-07-26 中磊电子(苏州)有限公司 Network address controller device and method
CN110620694B (en) * 2019-09-27 2022-07-12 新华三信息安全技术有限公司 Client online recovery method and device, electronic equipment and storage medium
CN110620694A (en) * 2019-09-27 2019-12-27 新华三信息安全技术有限公司 Client online recovery method and device, electronic equipment and storage medium
CN111478879B (en) * 2020-02-29 2022-05-24 新华三信息安全技术有限公司 DHCP (dynamic host configuration protocol) continuation method and device, electronic equipment and machine-readable storage medium
CN111478879A (en) * 2020-02-29 2020-07-31 新华三信息安全技术有限公司 DHCP (dynamic host configuration protocol) continuation method and device, electronic equipment and machine-readable storage medium
CN115460176A (en) * 2022-09-29 2022-12-09 苏州浪潮智能科技有限公司 Invalid address recovery method, device, equipment and medium for DHCP server
CN115460176B (en) * 2022-09-29 2023-10-03 苏州浪潮智能科技有限公司 Method, device, equipment and medium for recovering invalid address of DHCP server

Also Published As

Publication number Publication date
CN102299932B (en) 2015-03-18

Similar Documents

Publication Publication Date Title
CN102299932B (en) Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server
CN101330531B (en) Method for processing DHCP address allocation and DHCP relay
US7680876B1 (en) Highly available domain name system
TWI469607B (en) Cloud server for managing hostnames and ip addresses, and management method for the cloud server
CN102025798B (en) Address allocation processing method, device and system
US7680956B2 (en) Communicating additional information in a DNS update response by requesting deletion of a specific record
EP3562091B1 (en) Highly available dhcp service by running dhcp servers on a blockchain network
US20040006712A1 (en) Method for preventing IP address cheating in dynamic address allocation
CN102075591A (en) Method, device and system for acquiring media access control address
CN103534994A (en) Method, device and system for realizing communication after virtual machine migration
CN101188514A (en) Method, device and system for automatically discovering network element device
JP3948278B2 (en) Setting information allocation method for external network connection
CN105245629A (en) DHCP-based host communication method and device
CN105979202B (en) Data transmission method and device
CN111131445B (en) DHCP cluster scheduling method and DHCP cluster system
WO2015192583A1 (en) Internet protocol (ip) address allocation method and apparatus, server and terminal
CN100505614C (en) System backup and recovery method, and backup and recovery server
CN107547674B (en) Address allocation method and device
CN113347282A (en) IP address distribution and duplicate checking method and system for satellite internet
CN102523316B (en) A kind of address distribution method and equipment
CN110022383B (en) Address management method and system
CN115499414A (en) Address allocation method and device
CN112615944B (en) Method and system for master-slave synchronization of distributed DNS (Domain name System)
CN102377830A (en) IP (Internet Protocol) address configuration method
CN104158694A (en) Hot standby method and device for DHCPv6 (Dynamic Host Configuration Protocol for IPv6) server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20230620

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right