CN104410727B - Address distribution method, client, server and address allocation system - Google Patents
Address distribution method, client, server and address allocation system Download PDFInfo
- Publication number
- CN104410727B CN104410727B CN201410669722.6A CN201410669722A CN104410727B CN 104410727 B CN104410727 B CN 104410727B CN 201410669722 A CN201410669722 A CN 201410669722A CN 104410727 B CN104410727 B CN 104410727B
- Authority
- CN
- China
- Prior art keywords
- address
- client
- configuration protocol
- host configuration
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 90
- 238000012790 confirmation Methods 0.000 claims abstract description 29
- 238000001514 detection method Methods 0.000 claims abstract description 26
- 230000005540 biological transmission Effects 0.000 claims description 15
- 230000000977 initiatory effect Effects 0.000 claims description 7
- 238000012423 maintenance Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 235000008331 Pinus X rigitaeda Nutrition 0.000 description 1
- 235000011613 Pinus brutia Nutrition 0.000 description 1
- 241000018646 Pinus brutia Species 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5046—Resolving address allocation conflicts; Testing of addresses
Abstract
The invention discloses a kind of address distribution method, client, server and address allocation system.A kind of address distribution method, including:Client receives the IP address feedback message that dynamic host configuration protocol DHCP server is sent, and the IP address feedback message includes the IP address that the Dynamic Host Configuration Protocol server is client distribution;The client carries out address conflict detection to the IP address;If the IP address clashes, the client is sent to the Dynamic Host Configuration Protocol server and refuses message politely, and new IP address application process is initiated to the Dynamic Host Configuration Protocol server;If the IP address does not clash, the client sends confirmation message to the Dynamic Host Configuration Protocol server.The present invention, the IP address distributed Dynamic Host Configuration Protocol server by client carry out address conflict detection, so as to avoid client caused by IP address repeats can not bearer service technical problem.
Description
Technical field
The present invention relates to the communication technology, more particularly to a kind of address distribution method, client, server and address distribution system
System.
Background technology
DHCP (Dynamic Host Configuration Protocol, DHCP) is LAN
Procotol, using client/server (Client/Server, abbreviation CS) framework, Dynamic Host Configuration Protocol server is mainly used in as client
End distribution IP address.
As shown in figure 1, in the prior art, Dynamic Host Configuration Protocol server is that client distribution IP address process is as follows:Step 101,
Client sends application IP addresses message;Step 102, the Dynamic Host Configuration Protocol server distribution IP address for receiving the application IP addresses message, and
The IP address is sent to client;After step 103, client receive the IP address, confirmation message is returned.
However, due to using the method for above-mentioned steps 101 to step 103 to distribute IP address in the prior art, often lead
Cause client can not bearer service the problem of.
The content of the invention
The present invention provides a kind of address distribution method, client, server and address allocation system, to overcome prior art
In IP address repeat caused by client can not bearer service technical problem.
The present invention provides a kind of address distribution method, including:
Client receives the IP address feedback message that dynamic host configuration protocol DHCP server is sent, and the IP address is anti-
Presenting message includes the IP address that the Dynamic Host Configuration Protocol server is client distribution;
The client carries out address conflict detection to the IP address;
If the IP address clashes, the client sends to the Dynamic Host Configuration Protocol server and refuses message politely, and to institute
State Dynamic Host Configuration Protocol server and initiate new IP address application process;
If the IP address does not clash, the client sends confirmation message to the Dynamic Host Configuration Protocol server.
Further, it is described that new IP address application process is initiated to the Dynamic Host Configuration Protocol server, specifically include:
The client initiates new IP address application process to the Dynamic Host Configuration Protocol server after the silence period.
Further, the IP address feedback message, in addition to:Use the rental period;
Methods described, in addition to:
When the client reaches the use rental period to the usage time of the IP address, the client continues to make
With the IP address, also, the client initiates new IP address application process to the Dynamic Host Configuration Protocol server.
Further, after the client initiates new IP address application process to the Dynamic Host Configuration Protocol server, in addition to:
If by the very first time, the client does not receive the IP address that the Dynamic Host Configuration Protocol server is sent, then the visitor
IP address application process is initiated to the Dynamic Host Configuration Protocol server in family end again;
If the second time after the very first time, the client does not receive the IP that the Dynamic Host Configuration Protocol server is sent
Address, then the client is again to Dynamic Host Configuration Protocol server initiation IP address application process;
Wherein, second time is more than the very first time.
The present invention also provides a kind of address distribution method, including:
Dynamic host configuration protocol DHCP server distributes IP address according to that can distribute IP address list for client, and leads to
Cross IP address feedback message and the IP address of distribution is sent to the client, so that the client is carried out to the IP address
Address conflict detects;
Receive the client transmission refuses message politely, determines that the IP address is not used in the client;
Or
The confirmation message that the client is sent is received, determines that the client uses the IP address.
Further, the IP address feedback message, in addition to:Use the rental period;
Wherein, it is described to use the rental period, for making the client reach the use to the usage time of the IP address
During the rental period, the client is continuing with the IP address, also, the client initiates new IP to the Dynamic Host Configuration Protocol server
Application IP addresses process.
Further, the dynamic host configuration protocol DHCP server divides according to that can distribute IP address list for client
With IP address, specifically include:
The Dynamic Host Configuration Protocol server is that the client distributes IP according to that can distribute IP address list and address conflict list
Address;
Wherein, the address conflict list includes the IP address used.
Further, after the confirmation message that the dhcp client receives that the client is sent, in addition to:
The Dynamic Host Configuration Protocol server safeguards the address conflict list according to the confirmation message.
Further, the IP address list that distributes can distribute IP address list including at least two sons;
Methods described, in addition to:
After the Dynamic Host Configuration Protocol server is restarted, the Dynamic Host Configuration Protocol server can distribute IP according to different from the son before restarting
Address list is that the client distributes IP address.
The present invention also provides a kind of client, including:
Receiving module, it is described for receiving the IP address feedback message of dynamic host configuration protocol DHCP server transmission
IP address feedback message includes the IP address that the Dynamic Host Configuration Protocol server is client distribution;
Collision detection module, for carrying out address conflict detection to the IP address;
Sending module, for when the IP address clashes, being sent to the Dynamic Host Configuration Protocol server and refusing message politely, and to
The Dynamic Host Configuration Protocol server initiates new IP address application process, or, for when the IP address does not clash, to described
Dynamic Host Configuration Protocol server sends confirmation message.
Further, the sending module, is specifically used for:
After the silence period, new IP address application process is initiated to the Dynamic Host Configuration Protocol server.
Further, the IP address feedback message, in addition to:Use the rental period;
The sending module, is additionally operable to:
When the usage time to the IP address reaches the use rental period, end is continuing with the IP address, also,
New IP address application process is initiated to the Dynamic Host Configuration Protocol server.
Further, the sending module, is specifically used for:
After new IP address application process is initiated to the Dynamic Host Configuration Protocol server, if by the very first time, institute is not received
The IP address of Dynamic Host Configuration Protocol server transmission is stated, then initiates IP address application process to the Dynamic Host Configuration Protocol server again;If by first
The second time after time, the IP address that the Dynamic Host Configuration Protocol server is sent is not received, then again to the Dynamic Host Configuration Protocol server
Initiate IP address application process;
Wherein, second time is more than the very first time.
The present invention also provides a kind of dynamic host configuration protocol DHCP server, including:
Distribute module, for being that client distributes IP address according to IP address list can be distributed;
Message transmission module, for the IP address of distribution to be sent into the client by IP address feedback message, with
The client is set to carry out address conflict detection to the IP address;
Message reception module, refuse message politely for receive that the client sends, determine that institute is not used in the client
IP address is stated, or, the confirmation message sent for receiving the client, determine that the client uses the IP address.
Further, the IP address feedback message, in addition to:Use the rental period;
Wherein, it is described to use the rental period, for making the client reach the use to the usage time of the IP address
During the rental period, the client is continuing with the IP address, also, the client is initiated newly to the message reception module
IP address application process.
Further, the distribute module, is specifically used for:
It is that the client distributes IP address according to IP address list and address conflict list can be distributed;
Wherein, the address conflict list includes the IP address used.
Further, in addition to:Maintenance module;
The maintenance module, after the confirmation message sent for receiving the client, tieed up according to the confirmation message
Protect the address conflict list.
Further, the IP address list that distributes can distribute IP address list including at least two sons;
The distribute module, is additionally operable to;
It is that the client distributes IP address to restart rear basis to be different from the son before restarting to distribute IP address list.
The present invention also provides a kind of address allocation system, including:
Client any one of as described above and as described above any one of DHCP
Dynamic Host Configuration Protocol server.
The solution have the advantages that:The IP address distributed by client Dynamic Host Configuration Protocol server carries out address conflict inspection
Survey, can determine whether the IP address of Dynamic Host Configuration Protocol server distribution is occupied, so as to avoid by IP address repeats institute
Caused client can not bearer service technical problem.
Brief description of the drawings
Fig. 1 is the flow chart of prior art address distribution method;
Fig. 2 is the flow chart of address distribution method embodiment one of the present invention;
Fig. 3 is the flow chart of address distribution method embodiment two of the present invention;
Fig. 4 is the flow chart of address distribution method embodiment three of the present invention;
Fig. 5 is the structural representation of client embodiment of the present invention;
Fig. 6 is the structural representation of server example one of the present invention;
Fig. 7 is the structural representation of server example two of the present invention;
Fig. 8 is the schematic diagram of address allocation system embodiment of the present invention.
Embodiment
Fig. 2 is the flow chart that the present invention is address distribution method embodiment one.As shown in Fig. 2 the method for the present embodiment can
With including:
Step 201, client receive the IP address feedback message that dynamic host configuration protocol DHCP server is sent, described
IP address feedback message includes the IP address that the Dynamic Host Configuration Protocol server is client distribution.
Specifically, the executive agent of the present embodiment is client.Wherein, client can be the home network of bearer service
The intelligent terminal of pass, IPTV set top box and any bearer service after IP address is obtained.
More specifically, before step 201 is performed, client can be handed over by any prior art and Dynamic Host Configuration Protocol server
Mutually, so that Dynamic Host Configuration Protocol server, which is client, distributes IP address, here is omitted.
In the present embodiment, the IP address of distribution is sent to client by Dynamic Host Configuration Protocol server by IP address feedback message.
Correspondingly, client executing receives the operation of IP address feedback message., can be from after client receives IP address feedback message
The IP address of Dynamic Host Configuration Protocol server distribution is obtained in the IP address feedback message.
It should be noted that:IP address feedback message can be any message of the prior art, and the present embodiment contrasts not
It is construed as limiting.
Step 202, the client carry out address conflict detection to the IP address.
Specifically, after client obtains IP address in secondary IP address feedback message, row address also is entered to the IP address
Collision detection, it is whether occupied to detect the IP address.Applicant in this case has found by a large amount of and repeatedly experiment:Due to
The reason such as the system failure or assault, the IP address by Dynamic Host Configuration Protocol server distribution may be caused occupied, at this
In the case of kind, client can not use the IP address to carry out service bearer.This is also to cause to occur in existing address allocation procedure
Client can not bearer service reason.
More specifically, after the IP address that client is distributed Dynamic Host Configuration Protocol server carries out address conflict detection, however, it is determined that
IP address clashes then execution step 203, however, it is determined that IP address does not clash then execution step 204.
If step 203, the IP address clash, the client sends to refuse politely to the Dynamic Host Configuration Protocol server to disappear
Breath, and new IP address application process is initiated to the Dynamic Host Configuration Protocol server.
Specifically, it is determined that Dynamic Host Configuration Protocol server distribution the IP address clash after, client to Dynamic Host Configuration Protocol server send out
Send and refuse message politely, to notify the Dynamic Host Configuration Protocol server IP address occupied.Client also initiates new IP to Dynamic Host Configuration Protocol server
Application IP addresses process, so that Dynamic Host Configuration Protocol server distributes new IP address.It will be understood by those skilled in the art that:DHCP service
After device is assigned with new IP address, client still needs to carry out address conflict detection to newly assigned IP address.
It should be noted that:It can be any message of the prior art to refuse message politely, for example, DECLINE messages etc., this
Embodiment is not construed as limiting to this.
Preferably, client is sent to Dynamic Host Configuration Protocol server refuse message politely after, by one section of silence period, then to DHCP service
Device initiates new IP address application process.The length of silence period can be configured according to demand, for example, 5 minutes, half an hour
Deng the present embodiment does not limit the length of silence period.
New IP address application process is initiated after one section of silence period by being limited to, can effectively be prevented to DHCP
The registration message storm impact of server.
It should be noted that the IP address application process initiated again after the silence period, it is also possible to it is unsuccessful application occur
Situation.In this case, client can also initiate IP address application process after one section of silence period again.Wherein,
Silence period once can be longer than, equal or shorter than secondary silence period.
If step 204, the IP address do not clash, the client sends confirmation to the Dynamic Host Configuration Protocol server and disappeared
Breath.
Specifically, after it is determined that the IP address of Dynamic Host Configuration Protocol server distribution do not clash, client is to Dynamic Host Configuration Protocol server
Confirmation message is sent, to notify the Dynamic Host Configuration Protocol server client to use the IP address.
It should be noted that:Confirmation message can be any message of the prior art, and the present embodiment is not construed as limiting to this.
It will be understood by those skilled in the art that:Step 203 and step 204 are performed during client difference.
The present embodiment, the IP address distributed by client Dynamic Host Configuration Protocol server carries out address conflict detection, so as to avoid
Client caused by IP address repeats can not bearer service technical problem.
On the basis of above-described embodiment, further, the IP address feedback message, in addition to:Use the rental period;
Methods described, in addition to:
When the client reaches the use rental period to the usage time of the IP address, the client continues to make
With the IP address, also, the client initiates new IP address application process to the Dynamic Host Configuration Protocol server.
Specifically, Dynamic Host Configuration Protocol server will also be sent to client by IP address feedback message using the rental period, use the rental period
For limiting client to the time workable for the IP address, the usage time of the IP address was reached using the rental period in client
Afterwards, client needs to apply for new IP address again, also, before client determines using new IP address, namely new
IP address application success before, client always using original IP address carry out service bearer, so as to ensure service bearer
Continuity.
By the way that during new IP address is applied for, client is continuing with original IP address, can avoid client
Interruption to service bearer.
On the basis of above-described embodiment, further, the client is with initiating new IP to the Dynamic Host Configuration Protocol server
After the application process of location, in addition to:
If by the very first time, the client does not receive the IP address that the Dynamic Host Configuration Protocol server is sent, then the visitor
IP address application process is initiated to the Dynamic Host Configuration Protocol server in family end again;
If the second time after the very first time, the client does not receive the IP that the Dynamic Host Configuration Protocol server is sent
Address, then the client is again to Dynamic Host Configuration Protocol server initiation IP address application process;
Wherein, second time is more than the very first time.
Specifically, applicant in this case has found by a large amount of and repeatedly experiment:Due to Dynamic Host Configuration Protocol server failure, link failure
Etc. reason, client is likely to result within the very first time after initiating new IP address application process, fails to receive new point
The IP address matched somebody with somebody.Client will be continuing with former IP address and carry out service bearer, initiate new IP address application process again, and
And continue waiting for whether newly assigned IP address can be received in second time longer than the very first time.If in client the second
Interior still not receive newly assigned IP address, then client is continuing with former IP address and carries out service bearer, initiates again
New IP address application process, and continue waiting for whether can receiving in the 3rd time longer than the second time newly assigned
IP address.
It should be noted that:Client can also continue to wait fourth time longer than the 3rd time, longer than the 4th time
The 5th time etc..Wherein, the very first time, the concrete numerical value of the second time can be pre-set or DHCP clothes
Business device is sent to client by IP address feedback message.
Preferably, when it is T to use the rental period, the very first time can be 50%T, and the second time was 87.5%T.
It is distributed it is further preferred that obeying general pine using rental period, the very first time, the second time.
It should be noted that renewed treaty cycle T should averagely keep duration more than or equal to bearer service.During due to first
Between 50%T, the second time 87.5%T, in order to ensure that renewed treaty cycle T >=bearer service averagely keeps duration, so renewed treaty cycle T
The average holding duration of bearer service can be equal to, duration is averagely kept according to business, and independent DHCP service is set by business
Device.
It will be understood by those skilled in the art that:Can not be client e.g. because Dynamic Host Configuration Protocol server breaks down
In the case of distributing IP address, Dynamic Host Configuration Protocol server restarting needs the regular hour, and during this period of time, client is repeatedly sent out
New IP address can not be obtained by playing IP address application process, therefore, in the present embodiment, by extending the stand-by period, can be subtracted
Few client initiates the number of IP address application process, so as to reduce the expense of link.
Fig. 3 is the flow chart of address distribution method embodiment two of the present invention.As shown in figure 3, the method for the present embodiment can be with
Including:
Step 301, dynamic host configuration protocol DHCP server distribute IP according to that can distribute IP address list for client
Address, and the IP address of distribution is sent to by the client by IP address feedback message, so that the client is to described
IP address carries out address conflict detection.
Specifically, the executive agent of the present embodiment is Dynamic Host Configuration Protocol server.
More specifically, can distribute in IP address list, record is the IP address model for being pre-assigned to Dynamic Host Configuration Protocol server
Enclose.Dynamic Host Configuration Protocol server can be distributed in IP address list after the IP address distribution request of client initiation is received from this
An IP address is selected, and the IP address is sent to by client by IP address feedback message.Client is with obtaining the IP
Behind location, address conflict detection can be carried out to the IP address.
What step 302, the reception client were sent refuses message politely, determines that the IP address is not used in the client;
Or the confirmation message that the client is sent is received, determine that the client uses the IP address.
Specifically, client sends to Dynamic Host Configuration Protocol server according to the testing result to the IP address and refuses message or confirmation politely
Message, correspondingly, Dynamic Host Configuration Protocol server, which performs, receives the operation for refusing message or confirmation message politely that the client is sent.
Preferably, Dynamic Host Configuration Protocol server receive client transmission refuse message politely after, Dynamic Host Configuration Protocol server and net can be passed through
The IP address is sent to network management system by the interface between guard system, to inform that the webmaster IP address may be illegally occupied.This
It is because in the event of substantial amounts of IP address conflict event, this, which is indicated that, may receive ARP attacks, and network management system is entered
The keeper of row management, which needs to take appropriate measures, improves the safety of network.
The present embodiment, the IP address distributed by client Dynamic Host Configuration Protocol server carries out address conflict detection, so as to avoid
Client caused by IP address repeats can not bearer service technical problem.
On the basis of above-described embodiment, further, the IP address feedback message, in addition to:Use the rental period;
Wherein, it is described to use the rental period, for making the client reach the use to the usage time of the IP address
During the rental period, the client is continuing with the IP address, also, the client initiates new IP to the Dynamic Host Configuration Protocol server
Application IP addresses process.
Specifically, Dynamic Host Configuration Protocol server will also be sent to client by IP address feedback message using the rental period, use the rental period
For limiting client to the time workable for the IP address, the usage time of the IP address was reached using the rental period in client
When, client needs to apply for new IP address again, and before client determines using new IP address, client is always
Original IP address carries out service bearer.
By the way that during new IP address is applied for, client is continuing with original IP address, can avoid client
Interruption to service bearer.
On the basis of above-described embodiment, further, the dynamic host configuration protocol DHCP server is according to can divide
It is that client distributes IP address with IP address list, specifically includes:
The Dynamic Host Configuration Protocol server is that the client distributes IP according to that can distribute IP address list and address conflict list
Address;
Wherein, the address conflict list includes the IP address used.
Specifically, first, Dynamic Host Configuration Protocol server is from that can distribute one IP address of selection in IP address list, then, DHCP clothes
Business device traversal address conflict list, checks that the IP address whether there is in address conflict list, if the IP address is present in ground
In the conflict list of location, then show that the IP address is used by other clients, then Dynamic Host Configuration Protocol server is again from can distributing IP
An IP address is chosen in the list of location again, again continues to travel through address conflict list.Until the IP address that Dynamic Host Configuration Protocol server is chosen
It is not present in address conflict list, and the IP address is handed down to client.
On the basis of above-described embodiment, further, receive what the client was sent in the Dynamic Host Configuration Protocol server
After confirmation message, in addition to:
The Dynamic Host Configuration Protocol server safeguards the address conflict list according to the confirmation message.
Specifically, after the confirmation message that Dynamic Host Configuration Protocol server receives client transmission, the IP of the client will be distributed to
Address is added in address conflict list, to show that the IP address is used, other clients can not be reallocated to, to keep away
Exempt from the IP address conflict of distribution.
On the basis of above-described embodiment, further, the IP address list that distributes can divide including at least two sons
With IP address list;
Methods described, in addition to:
After the Dynamic Host Configuration Protocol server is restarted, the Dynamic Host Configuration Protocol server can distribute IP according to different from the son before restarting
Address list is that the client distributes IP address.
Specifically, can distribute IP address list and be divided at least two sons can distribute IP address list, be taken in DHCP
Business device is due to after breaking down and restarting, and from that can be distributed in IP address list different from the son before restarting, to choose IP address be client
End distribution IP address.
IP address list can be distributed including at least two sons by the way that IP address list can be distributed, and is thought highly of in DHCP service
IP address list can be distributed different from the son before restarting by being used after opening distributes IP address for client, can further avoid distributing
IP address conflict to client.
Fig. 4 is the flow chart of address distribution method embodiment three of the present invention.As shown in figure 4, the method for the present embodiment can be with
Including:
Step 401, Dynamic Host Configuration Protocol server according to can distribute IP address list, address conflict list is that client distributes IP
Location.
Specifically, the present embodiment describes the present embodiment by way of client interacts with Dynamic Host Configuration Protocol server.
More specifically, client can use any prior art to initiate IP address application to Dynamic Host Configuration Protocol server, and DHCP exists
After receiving the IP address application that client is initiated, historically there is can distribute IP address section to distribute IP address list and note
The address conflict list for being loaded with the IP address used distributes IP address for client.
Step 402, Dynamic Host Configuration Protocol server send IP address feedback message.
Specifically, the IP address of distribution is sent to client, IP address by Dynamic Host Configuration Protocol server by IP address feedback message
Also including the use of the rental period in feedback message.It is used to represent that client reaches using rent the usage time of the IP address using the rental period
, it is necessary to apply for new IP address again after phase.
It should be noted that:Dynamic Host Configuration Protocol server can also will use the rental period simultaneously by including IP using the IP address
The IP address feedback message of address is sent to client.Dynamic Host Configuration Protocol server can also client confirm use the IP address after,
Sent again to client and use the rental period.The present embodiment is not construed as limiting to this.
Step 403, client carry out address conflict detection to the IP address received.
Specifically, after client receives Dynamic Host Configuration Protocol server transmission IP address feedback message, secondary IP address feedback message
The middle IP address for obtaining distribution, and address conflict detection is carried out to the IP address.
If step 404, not clashing, client sends confirmation message to Dynamic Host Configuration Protocol server.
Specifically, step 404 is identical with step 204, and here is omitted.
More specifically, if determining that the IP address clashes after detection, client sends to Dynamic Host Configuration Protocol server and refused politely
Message, detailed process is with reference to step 203, and here is omitted.Wherein, the step is not shown in FIG. 4.
Step 405, Dynamic Host Configuration Protocol server safeguard address conflict list.
Specifically, after Dynamic Host Configuration Protocol server receives the determination message of client transmission, by the IP distributed for the client
Add in address conflict list location.
Preferably, Dynamic Host Configuration Protocol server, will also be to client mac address after the confirmation message of client transmission is received
And the IP address of distribution is bound, to confirm the legitimacy of client.It is and right after the legitimacy of client is confirmed
Confirm client mac address, the IP address distributed and be associated storage using the corresponding relation of rental period three.Also, again
After having performed the legitimacy for confirming client, also response message is sent to client.
Step 406, when client is reached using the rental period using the time of IP address, client to Dynamic Host Configuration Protocol server initiate
IP address application process.
Specifically, for client it is determined that before using newly assigned IP address, client uses original IP address always.
If step 407, within the very first time, client does not receive newly assigned IP address, then client it is secondary initiate it is new
IP address application process.
Specifically, due to reasons such as Dynamic Host Configuration Protocol server failure, link failures, it is likely to result in client and is initiating new IP
Newly assigned IP address can not be obtained in a period of time after application IP addresses.In this case, new IP is initiated in client
After application IP addresses process, the very first time is waited, if not receiving newly assigned IP address after the very first time, client is sent out again
Play new IP address application process.
If step 408, in the second time after the very first time, client does not receive newly assigned IP address, then client
New IP address application process is initiated again in end.
Specifically, client after step 407, continued waiting for for the second time, if still not received within the second time
To newly assigned IP address, then client initiates new IP address application process again.Wherein, the second time compared the very first time
It is long.
It should be noted that:The very first time and the second time can be by Dynamic Host Configuration Protocol server in IP address application process
It is handed down in storage medium that is client or being pre-stored in client.
It should be noted that:IP address application process is initiated in the case of usual two kinds of client.The first is in client
Initiate, initiated when being client start after being expired using the rental period of end for second.In the first scenario, client has
Old IP address, namely useful life exceed using the rental period IP address, client successfully application arrive new IP address before,
Service bearer still is carried out using old IP address, so as to ensure the continuity of service bearer, it specifically applies for new IP address
Detailed process with reference to the present embodiment.
The present embodiment, the IP address distributed by client Dynamic Host Configuration Protocol server carries out address conflict detection, so as to avoid
Client caused by IP address repeats can not bearer service technical problem.
Fig. 5 is the structural representation of client embodiment of the present invention.As shown in figure 5, client includes:Receiving module 501,
Collision detection module 502 and sending module 503.
Wherein, receiving module 501, the IP address feedback for receiving the transmission of dynamic host configuration protocol DHCP server disappear
Breath, the IP address feedback message include the IP address that the Dynamic Host Configuration Protocol server is client distribution.
Collision detection module 502, for carrying out address conflict detection to the IP address.
Sending module 503, for when the IP address clashes, being sent to the Dynamic Host Configuration Protocol server and refusing message politely,
And new IP address application process is initiated to the Dynamic Host Configuration Protocol server, or, for when the IP address does not clash, to
The Dynamic Host Configuration Protocol server sends confirmation message.
The client of the present embodiment, can be used for perform Fig. 2 shown in embodiment of the method technical scheme, its realization principle and
Technique effect is similar, and here is omitted.
On the basis of above-described embodiment, further, the sending module 503, it is specifically used for:
After the silence period, new IP address application process is initiated to the Dynamic Host Configuration Protocol server.
On the basis of above-described embodiment, further, the IP address feedback message, in addition to:Use the rental period;
The sending module 503, is additionally operable to:
When the usage time to the IP address reaches the use rental period, end is continuing with the IP address, also,
New IP address application process is initiated to the Dynamic Host Configuration Protocol server.
On the basis of above-described embodiment, further, the sending module 503, it is specifically used for:
After new IP address application process is initiated to the Dynamic Host Configuration Protocol server, if by the very first time, institute is not received
The IP address of Dynamic Host Configuration Protocol server transmission is stated, then initiates IP address application process to the Dynamic Host Configuration Protocol server again;If by first
The second time after time, the IP address that the Dynamic Host Configuration Protocol server is sent is not received, then again to the Dynamic Host Configuration Protocol server
Initiate IP address application process;
Wherein, second time is more than the very first time.
Fig. 6 is the structural representation of server example one of the present invention.As shown in fig. 6, Dynamic Host Configuration Protocol server, including:Distribution
Module 601, message transmission module 602 and message reception module 603.
Wherein, distribute module 601, for being that client distributes IP address according to IP address list can be distributed;
Message transmission module 602, for the IP address of distribution to be sent into the client by IP address feedback message,
So that the client carries out address conflict detection to the IP address;
Message reception module 603, refuse message politely for receive that the client sends, determine that the client is not used
The IP address, or, the confirmation message sent for receiving the client, determine the client using the IP
Location.
The client of the present embodiment, can be used for perform Fig. 3 shown in embodiment of the method technical scheme, its realization principle and
Technique effect is similar, and here is omitted.
On the basis of above-described embodiment, further, the IP address feedback message, in addition to:Use the rental period;
Wherein, it is described to use the rental period, for making the client reach the use to the usage time of the IP address
During the rental period, the client is continuing with the IP address, also, the client is initiated newly to the message reception module
IP address application process.
On the basis of above-described embodiment, further, the distribute module 601, it is specifically used for:
According to can distribute IP address list and address conflict list is assigned as the client distribution IP address;
Wherein, the address conflict list includes the IP address used.
Fig. 7 is the structural representation of server example two of the present invention.As shown in fig. 7, server also includes:Maintenance module
604。
Wherein, maintenance module 604, after the confirmation message sent for receiving the client, disappeared according to the confirmation
Breath safeguards the address conflict list.
On the basis of above-described embodiment, further, the IP address list that distributes can divide including at least two sons
With IP address list;
The distribute module 601, is additionally operable to;
It is that the client distributes IP address to restart rear basis to be different from the son before restarting to distribute IP address list.
Fig. 8 is the schematic diagram of address allocation system embodiment of the present invention.As shown in figure 8, address allocation system includes:As above
State the client 801 in embodiment, the Dynamic Host Configuration Protocol server 802 in such as above-mentioned embodiment.
The address allocation system of the present embodiment, it can be used for the technical scheme for performing embodiment of the method shown in Fig. 2 to Fig. 4,
Its implementing principle and technical effect is similar, and here is omitted.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and
Scope.
Claims (9)
- A kind of 1. address distribution method, it is characterised in that including:Client receives the IP address feedback message that dynamic host configuration protocol DHCP server is sent, and the IP address feedback disappears Breath includes the IP address that the Dynamic Host Configuration Protocol server is client distribution;Wherein, the Dynamic Host Configuration Protocol server is according to can distribute IP Address list and address conflict list are that the client distributes IP address, and the address conflict list includes being made IP address, the IP address list that distributes can distribute IP address list including at least two sons, and which part can distribute IP address list is after the Dynamic Host Configuration Protocol server is restarted, and the Dynamic Host Configuration Protocol server can divide according to different from the son before restarting It is that the client distributes IP address with IP address list;The client carries out address conflict detection to the IP address;If the IP address clashes, the client sends to the Dynamic Host Configuration Protocol server and refuses message politely, and to described Dynamic Host Configuration Protocol server initiates new IP address application process;If the IP address does not clash, the client sends confirmation message to the Dynamic Host Configuration Protocol server.
- 2. according to the method for claim 1, it is characterised in that the IP address feedback message, in addition to:Use the rental period;Methods described, in addition to:When the client reaches the use rental period to the usage time of the IP address, the client is continuing with institute IP address is stated, also, the client initiates new IP address application process to the Dynamic Host Configuration Protocol server.
- A kind of 3. address distribution method, it is characterised in that including:Dynamic host configuration protocol DHCP server divides according to that can distribute IP address list and address conflict list for client The IP address of distribution is sent to the client with IP address, and by IP address feedback message, so that the client pair The IP address carries out address conflict detection;Wherein, the address conflict list includes the IP address used, described IP address list can be distributed can distribute IP address list including at least two sons, and which part can distribute IP address list as in institute State after Dynamic Host Configuration Protocol server restarts, the Dynamic Host Configuration Protocol server can distribute IP address list as institute according to different from the son before restarting State client distribution IP address;Receive the client transmission refuses message politely, determines that the IP address is not used in the client;OrThe confirmation message that the client is sent is received, determines that the client uses the IP address.
- 4. according to the method for claim 3, it is characterised in that the IP address feedback message, in addition to:Use the rental period;Wherein, it is described to use the rental period, use the rental period for making the client reach described to the usage time of the IP address When, the client is continuing with the IP address, also, the client initiates new IP address to the Dynamic Host Configuration Protocol server Application process.
- A kind of 5. client, it is characterised in that including:Receiving module, the IP address feedback message sent for receiving dynamic host configuration protocol DHCP server, the IP Location feedback message includes the IP address that the Dynamic Host Configuration Protocol server is client distribution;Wherein, the Dynamic Host Configuration Protocol server according to It is that the client distributes IP address that IP address list and address conflict list, which can be distributed, and the address conflict list includes The IP address used, the IP address list that distributes can distribute IP address list including at least two sons, its middle part It is after the Dynamic Host Configuration Protocol server is restarted that IP address list can be distributed by, which dividing, and the Dynamic Host Configuration Protocol server is according to different from before restarting Son can distribute IP address list for the client distribute IP address;Collision detection module, for being carried out to the IP address Address conflict detects;Sending module, for when the IP address clashes, sent to the Dynamic Host Configuration Protocol server and refuse message politely, and to described Dynamic Host Configuration Protocol server initiates new IP address application process, or, for when the IP address does not clash, to the DHCP Server sends confirmation message.
- 6. client according to claim 5, it is characterised in that the IP address feedback message, in addition to:Use rent Phase;The sending module, is additionally operable to:When the usage time to the IP address reaches the use rental period, the client is continuing with the IP address, Also, new IP address application process is initiated to the Dynamic Host Configuration Protocol server.
- A kind of 7. dynamic host configuration protocol DHCP server, it is characterised in that including:Distribute module, for being that client distributes IP address according to IP address list and address conflict list can be distributed, wherein, The address conflict list includes the IP address used, and the IP address list that distributes can including at least two sons Distribute IP address list;The distribute module, is additionally operable to;It is that the client distributes IP address to restart rear basis to be different from the son before restarting to distribute IP address list;Message transmission module, for the IP address of distribution to be sent into the client by IP address feedback message, so that institute State client and address conflict detection is carried out to the IP address;Message reception module, refuse message politely for receive that the client sends, determine that the IP is not used in the client Address, or, the confirmation message sent for receiving the client, determine that the client uses the IP address.
- 8. server according to claim 7, it is characterised in that the IP address feedback message, in addition to:Use rent Phase;Wherein, it is described to use the rental period, use the rental period for making the client reach described to the usage time of the IP address When, the client is continuing with the IP address, also, the client is with initiating new IP to the message reception module Location application process.
- A kind of 9. address allocation system, it is characterised in that including:Client and dynamic host configuration protocol DHCP as claimed in claim 7 or 8 clothes as described in claim 5 or 6 Business device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410669722.6A CN104410727B (en) | 2014-11-20 | 2014-11-20 | Address distribution method, client, server and address allocation system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410669722.6A CN104410727B (en) | 2014-11-20 | 2014-11-20 | Address distribution method, client, server and address allocation system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104410727A CN104410727A (en) | 2015-03-11 |
CN104410727B true CN104410727B (en) | 2018-03-23 |
Family
ID=52648322
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410669722.6A Active CN104410727B (en) | 2014-11-20 | 2014-11-20 | Address distribution method, client, server and address allocation system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104410727B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104869665B (en) * | 2015-04-10 | 2018-11-20 | 广东欧珀移动通信有限公司 | Control method, wireless router and the mobile device of network connection |
CN108712513B (en) * | 2018-03-27 | 2021-09-17 | Oppo广东移动通信有限公司 | Network address setting method and device, terminal equipment and storage medium |
CN113067742A (en) * | 2020-01-02 | 2021-07-02 | 中国移动通信有限公司研究院 | IPoE processing method and device and home gateway |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553350A (en) * | 2003-06-06 | 2004-12-08 | 鸿富锦精密工业(深圳)有限公司 | Dynamic master configurating method |
CN1992736A (en) * | 2005-12-30 | 2007-07-04 | 西门子(中国)有限公司 | IP address distribution method and use thereof |
CN101656763A (en) * | 2009-09-11 | 2010-02-24 | 华为技术有限公司 | IP address automatic distribution method, client and server |
CN101674338A (en) * | 2009-10-16 | 2010-03-17 | 福建星网锐捷网络有限公司 | Recovering method of IP address and DHCP server |
CN102244690A (en) * | 2011-07-26 | 2011-11-16 | 福建星网锐捷网络有限公司 | Address allocation method and system of dynamic host configuration protocol (DHCP) as well as client side and servers of same |
CN102281333A (en) * | 2010-06-11 | 2011-12-14 | 中兴通讯股份有限公司 | Method and system for avoiding IP address conflict, DHCP server and DHCP client |
CN102325200A (en) * | 2011-09-22 | 2012-01-18 | 杭州华三通信技术有限公司 | Method for rapidly acquiring IPv6 (Internet Protocol Version 6) address and DHCP (Dynamic Host Configuration Protocol) snooping equipment |
CN102439949A (en) * | 2011-10-17 | 2012-05-02 | 华为技术有限公司 | Method for solving internet protocol address assignment conflict and related device and system |
CN104104744A (en) * | 2014-07-09 | 2014-10-15 | 杭州华三通信技术有限公司 | IP address assignment method and device |
-
2014
- 2014-11-20 CN CN201410669722.6A patent/CN104410727B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553350A (en) * | 2003-06-06 | 2004-12-08 | 鸿富锦精密工业(深圳)有限公司 | Dynamic master configurating method |
CN1992736A (en) * | 2005-12-30 | 2007-07-04 | 西门子(中国)有限公司 | IP address distribution method and use thereof |
CN101656763A (en) * | 2009-09-11 | 2010-02-24 | 华为技术有限公司 | IP address automatic distribution method, client and server |
CN101674338A (en) * | 2009-10-16 | 2010-03-17 | 福建星网锐捷网络有限公司 | Recovering method of IP address and DHCP server |
CN102281333A (en) * | 2010-06-11 | 2011-12-14 | 中兴通讯股份有限公司 | Method and system for avoiding IP address conflict, DHCP server and DHCP client |
CN102244690A (en) * | 2011-07-26 | 2011-11-16 | 福建星网锐捷网络有限公司 | Address allocation method and system of dynamic host configuration protocol (DHCP) as well as client side and servers of same |
CN102325200A (en) * | 2011-09-22 | 2012-01-18 | 杭州华三通信技术有限公司 | Method for rapidly acquiring IPv6 (Internet Protocol Version 6) address and DHCP (Dynamic Host Configuration Protocol) snooping equipment |
CN102439949A (en) * | 2011-10-17 | 2012-05-02 | 华为技术有限公司 | Method for solving internet protocol address assignment conflict and related device and system |
CN104104744A (en) * | 2014-07-09 | 2014-10-15 | 杭州华三通信技术有限公司 | IP address assignment method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104410727A (en) | 2015-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10666661B2 (en) | Authorization processing method and device | |
CN101330531B (en) | Method for processing DHCP address allocation and DHCP relay | |
CN102148830B (en) | Method for controlling flow of authentication server and authentication access device | |
CN101951417B (en) | Method, system and trunk equipment for assigning multiple server addresses | |
CN101771564B (en) | Method, device and system for processing session context | |
CN101453495B (en) | Method, system and equipment for preventing authentication address resolution protocol information loss | |
CN104410727B (en) | Address distribution method, client, server and address allocation system | |
US20120297087A1 (en) | Method And Apparatus For Message Distribution In A Device Management System | |
CN102325202B (en) | Method and equipment for managing customer address table | |
CN104158917A (en) | Method and device for recovering IP (Internet protocol) address of DHCP (dynamic host configuration protocol) client | |
WO2020001045A1 (en) | Address management method and device | |
CN101674338A (en) | Recovering method of IP address and DHCP server | |
WO2008072220A2 (en) | Method and system for restricting a node from communicating with other nodes in a broadcast domain of an ip (internet protocol) network | |
JP6896722B2 (en) | Resource configuration method and equipment | |
CN101621523A (en) | User security access control method as well as device and system thereof | |
CN102238245B (en) | Address allocation method and equipment | |
CN108600407B (en) | IP address allocation method, device, equipment and machine readable storage medium | |
WO2014029110A1 (en) | Method and apparatus for configuring dhcp client | |
CN101582888A (en) | Method for creating neighbor discovery table item and server | |
CN101656724A (en) | Anti-attack method and dynamic host configuration protocol server | |
CN101577723A (en) | Method for preventing neighbor discovery protocol message attack and device | |
CN102882861B (en) | The method of anti-IP address swindle is realized based on parsing DHCP message | |
CN105337766A (en) | Network element automatic discovery method and system based on DHCP | |
CN101682659A (en) | Method and apparatus for verification of dynamic host configuration protocol (dhcp) release message | |
CN115499414A (en) | Address allocation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |