CN101355594A - Method for detecting address conflict when distributing IP address - Google Patents

Method for detecting address conflict when distributing IP address Download PDF

Info

Publication number
CN101355594A
CN101355594A CNA2008102155552A CN200810215555A CN101355594A CN 101355594 A CN101355594 A CN 101355594A CN A2008102155552 A CNA2008102155552 A CN A2008102155552A CN 200810215555 A CN200810215555 A CN 200810215555A CN 101355594 A CN101355594 A CN 101355594A
Authority
CN
China
Prior art keywords
address
user side
icmp
addresses
assignable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008102155552A
Other languages
Chinese (zh)
Inventor
胡伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNA2008102155552A priority Critical patent/CN101355594A/en
Publication of CN101355594A publication Critical patent/CN101355594A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method for detecting the conflict of addresses when IP addresses are distributed, which comprises the following steps: a server receives an IP address request message sent by a user terminal; if distributable IP addresses exist in an address pool, one of the distributable IP addresses is selected for carrying out Ping operation; and if no internetwork control information protocol responses, the selected IP address is replied to the user terminal, thereby completing the address application of the user terminal. The technical proposal is adopted to reduce the transmission of a dynamic distribution protocol message for a host in the network in order that the user terminal can obtain the corresponding usable address once, improve the distribution efficiency and reduce the occurrence of the conflict when the IP addresses are distributed.

Description

The detection method of address conflict during a kind of distributing IP address
Technical field
The present invention relates to the communications field, the detection method of address conflict when being specifically related to a kind of distributing IP address.
Background technology
DHCP (dynamic host allocation protocol) is a DHCP, mainly finish a cover agreement of the IP address assignment task on the present network, this cover agreement is SERVER (server)/CLIENT (user side) pattern, undertaken alternately by Client active and Server, thereby obtain the IP address configuration information relevant with some, DHCP SERVER is exactly a kind of server of being responsible for the distributing IP address and issuing some configuration informations.From the agreement of DHCP, Server is in a kind of passive status, and all actions substantially all are to be triggered by Client to finish.Be illustrated in figure 1 as the basic reciprocal process of prior art DHCP,
Step 101:Client sends DHCP Discover (IP address discovery) message to SERVER;
Step 102: when not with the IP address of this user side binding, and address pool is when existing assignable IP address, SERVER sends DHCP Offer (the IP address provides) message to Client, comprising the IP address that can offer this Client;
Step 103:Client sends DHCP request (request) message to SERVER;
Step 104:SERVER sends DHCP ACK (affirmation) message to Client;
Step 105:Client sends free arp request.
For this dynamic distribution address, can solve address allocation problem easily, thereby go to dispose one by one without the keeper, but owing to all have use in dynamic assignment and two kinds of method networks of static configuration, thereby keep away the phenomenon that address conflict unavoidably occurs, the method that solves address conflict concerning DHCP is used Client to send free arp usually and is detected, after Client receives the Ack message, can initiatively send arp request about the address of application, if someone responds this request, will illustrate there has been this address in the network that Client will initiate application then again by the Decline message to Server report conflict like this.
Detection for this address conflict, initiative on Client, is still applied for can not sending arp behind the address owing to a lot of Client having occurred at present, thereby is not detected address conflict fully, will cause network problem to a great extent, but Server does not know anything but.
Summary of the invention
The detection method of address conflict when the technical problem to be solved in the present invention provides a kind of distributing IP address, the appearance that has conflicted when having reduced IP address assignment has improved allocative efficiency.
In order to address the above problem, the detection method of address conflict when the invention provides a kind of distributing IP address, comprise: after server is received the IP Address requests message that user side sends, if have assignable IP address in the address pool, then therefrom select one to carry out the Ping operation, if there is not the ICMP icmp echo, this IP address that then will select replies to user side, finishes the application IP addresses of described user side.
Further, after described server is received the IP Address requests message that user side sends, judging whether earlier to have the IP address of binding with described user side, is then will reply to user side with the IP address of described user side binding, finishes the application IP addresses of described user side.
Further, if there is not the IP address of binding, and there is assignable IP address in the address pool with described user side, then judge whether to carry out the Ping operation, if do not need, then select an assignable IP address to reply to user side, finish the application IP addresses of described user side.
Further, carry out receiving icmp echo after the Ping operation, then collision table is put in the IP address of described selection, and then judge whether there is assignable IP address in the address pool as if server.
Further, describedly judging whether to carry out the Ping method of operating and be, if the ICMP quantity that is provided with is 0, then do not need to carry out the Ping operation, is not that 0 needs carries out the Ping operation.
Further, describedly carry out Ping operation and be meant, send icmp packet according to described ICMP quantity, and the assignable IP address promptly selected of the destination address of described icmp packet, the number of times that sends described icmp packet equals described ICMP quantity.
Further, after having selected assignable IP address to reply to described user side, set up the binding relationship of described IP address and user side.
In sum, the detection method of address conflict when the invention provides a kind of distributing IP address has reduced the transmission of DHCP message in network, makes user side once just can access corresponding operable address, improved allocative efficiency, the appearance that has conflicted when having reduced IP address assignment.
Description of drawings
Fig. 1 obtains the schematic diagram of IP address alternately for Client in the prior art and Server;
Fig. 2 is the flow chart that the inventive method Client and Server obtain the IP address alternately.
Embodiment
The detection method of address conflict when the invention provides a kind of distributing IP address, initiatively carrying out address conflict by DHCPSERVER when distributing the address detects, use the Ping agreement to finish testing process, SERVER obtains the address from address pool when, at first the Ping action is carried out in this address, if do not respond, illustrate and do not use this address user end in the network, be and distribute the address, if there is Ping to respond, illustrate that this address is the conflict address, directly this address is put into the conflict address table then, get the address again and redistribute.Will make the transmission of DHCP message in network reduce like this, make user side once just can access corresponding operable address, improve allocative efficiency, reduce the appearance of address conflict more.
The detection method of address conflict when present embodiment provides a kind of distributing IP address, concrete control flow such as Fig. 2 are as showing:
Step 201:Client sends DHCP Discover message to SERVER;
Step 202:SERVER receives DHCP Discover message, judges whether to exist the address with this user side binding, is execution in step 203 then, otherwise execution in step 204;
Step 203: reply DHCP Offer message according to the IP address in the binding relationship to Client, wherein carry the IP address of binding, also need to upgrade and bind release time with this user side; And after receiving the DHCP Request message that Client sends, reply DHCP Ack, thereby finish the application IP addresses of user side to it.
Whether step 204:SERVER check to exist in the address pool and can distribute the address, is execution in step 205 then, otherwise execution in step 208;
After judging existence in this step and can distributing the address, can also judge whether to carry out the Ping operation, judge promptly whether ICMP (ICMP) quantity that is provided with is 0, be then not need to carry out the Ping operation, directly select an assignable address to reply to Client, and set up the binding relationship of this IP address and user side, finish the application IP addresses of user side; If the ICMP quantity that is provided with is not 0, then execution in step 205.
ICMP quantity can be to be provided with as required, and it is set to not be 0 natural number if need carry out collision detection to the IP address, and then it is set to 0 if do not need that collision detection is carried out in the IP address, and ICMP quantity promptly sends the quantity of icmp packet.
Step 205: but select a distributing IP address in the address pool to carry out the Ping operation, promptly send icmp packet according to ICMP quantity, the assignable IP address that the destination address of this message is promptly selected, the number of times that sends icmp packet equals ICMP quantity, as ICMP quantity is 2 icmp packets of transmission in 2 o'clock, having judged whether icmp echo, is execution in step 206 then, otherwise execution in step 207;
Step 206: this IP address conflict of selecting is described, puts it into collision table, return step 204;
Step 207: do not conflict in this IP address that selection is described, replys DHCP Offer message to Client, wherein carries this IP address of selection, and set up the binding relationship of this IP address and user side; After receiving the DHCP Request message that Client sends, reply DHCP Ack, thereby finish the application IP addresses of user side to it.
Step 208: illustrating does not have to distribute the address, not to the Client return information.
Need to prove, if there is a large amount of conflict addresses in the network, also can occur a period of time so in the user side applied address can't apply for the address, but owing to there is the mechanism of recurring demand in the DHCP agreement, does not therefore influence for obtaining available address.

Claims (7)

1, the detection method of address conflict during a kind of distributing IP address, comprise: after server is received the IP Address requests message that user side sends, if have assignable IP address in the address pool, then therefrom select one to carry out the Ping operation, if there is not the ICMP icmp echo, this IP address that then will select replies to user side, finishes the application IP addresses of described user side.
2, the method for claim 1 is characterized in that:
After described server is received the IP Address requests message that user side sends, judging whether to exist the IP address with described user side binding earlier, is then will reply to user side with the IP address of described user side binding, finishes the application IP addresses of described user side.
3, method as claimed in claim 2 is characterized in that:
If do not have the IP address of binding, and have assignable IP address in the address pool with described user side, then judge whether to carry out the Ping operation, if do not need, then select an assignable IP address to reply to user side, finish the application IP addresses of described user side.
4, the method for claim 1 is characterized in that:
If server carries out receiving icmp echo after the Ping operation, then collision table is put in the IP address of described selection, and then judge whether there is assignable IP address in the address pool.
5, method as claimed in claim 3 is characterized in that:
Describedly judging whether to carry out the Ping method of operating and be, if the ICMP quantity that is provided with is 0, then do not need to carry out the Ping operation, is not that 0 needs carries out the Ping operation.
6, method as claimed in claim 5 is characterized in that:
Describedly carry out Ping operation and be meant, send icmp packet according to described ICMP quantity, and the assignable IP address promptly selected of the destination address of described icmp packet, the number of times that sends described icmp packet equals described ICMP quantity.
7, method as claimed in claim 3 is characterized in that:
After having selected assignable IP address to reply to described user side, set up the binding relationship of described IP address and user side.
CNA2008102155552A 2008-09-09 2008-09-09 Method for detecting address conflict when distributing IP address Pending CN101355594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008102155552A CN101355594A (en) 2008-09-09 2008-09-09 Method for detecting address conflict when distributing IP address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008102155552A CN101355594A (en) 2008-09-09 2008-09-09 Method for detecting address conflict when distributing IP address

Publications (1)

Publication Number Publication Date
CN101355594A true CN101355594A (en) 2009-01-28

Family

ID=40308182

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008102155552A Pending CN101355594A (en) 2008-09-09 2008-09-09 Method for detecting address conflict when distributing IP address

Country Status (1)

Country Link
CN (1) CN101355594A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025797A (en) * 2010-11-30 2011-04-20 北京星网锐捷网络技术有限公司 Address prefix processing method, device, system and network equipment
WO2011150883A2 (en) * 2011-06-23 2011-12-08 华为终端有限公司 Method and device for terminal batch upgrading
CN102571996A (en) * 2010-12-13 2012-07-11 联想(北京)有限公司 IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN102624937A (en) * 2011-01-28 2012-08-01 华为技术有限公司 Method, equipment and system for IP address configuration
CN102984295A (en) * 2012-12-07 2013-03-20 中兴通讯股份有限公司 Mobile terminal and address allocation method thereof
CN103442041A (en) * 2013-08-14 2013-12-11 深圳市同洲电子股份有限公司 Method, device and system for upgrading firmware of embedded device
CN104301449A (en) * 2014-10-08 2015-01-21 杭州华三通信技术有限公司 Method and device for modifying IP address
CN106453677A (en) * 2016-09-23 2017-02-22 杭州华三通信技术有限公司 Address allocation method and apparatus
CN106899456A (en) * 2017-03-14 2017-06-27 深圳市友华通信技术有限公司 A kind of link detecting and the implementation method repaired
CN112261173A (en) * 2020-10-20 2021-01-22 四川天邑康和通信股份有限公司 DHCP server allocation address conflict detection method relating to convergence gateway
CN112637377A (en) * 2020-12-17 2021-04-09 上海云轴信息科技有限公司 Method and equipment for detecting IP address conflict
CN112866431A (en) * 2021-01-19 2021-05-28 北京自如信息科技有限公司 IP address allocation method and device and computer equipment
CN114500632A (en) * 2022-01-24 2022-05-13 重庆奥普泰通信技术有限公司 Communication method and communication device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553350A (en) * 2003-06-06 2004-12-08 鸿富锦精密工业(深圳)有限公司 Dynamic master configurating method
CN1770778A (en) * 2004-11-03 2006-05-10 上海乐金广电电子有限公司 Automatic IP address setting method for television box

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553350A (en) * 2003-06-06 2004-12-08 鸿富锦精密工业(深圳)有限公司 Dynamic master configurating method
CN1770778A (en) * 2004-11-03 2006-05-10 上海乐金广电电子有限公司 Automatic IP address setting method for television box

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025797A (en) * 2010-11-30 2011-04-20 北京星网锐捷网络技术有限公司 Address prefix processing method, device, system and network equipment
CN102571996A (en) * 2010-12-13 2012-07-11 联想(北京)有限公司 IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN102571996B (en) * 2010-12-13 2014-11-05 联想(北京)有限公司 IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN102624937B (en) * 2011-01-28 2015-09-09 华为技术有限公司 IP address configuration method, Apparatus and system
CN102624937A (en) * 2011-01-28 2012-08-01 华为技术有限公司 Method, equipment and system for IP address configuration
WO2011150883A2 (en) * 2011-06-23 2011-12-08 华为终端有限公司 Method and device for terminal batch upgrading
WO2011150883A3 (en) * 2011-06-23 2012-05-24 华为终端有限公司 Method and device for terminal batch upgrading
CN102984295A (en) * 2012-12-07 2013-03-20 中兴通讯股份有限公司 Mobile terminal and address allocation method thereof
CN103442041A (en) * 2013-08-14 2013-12-11 深圳市同洲电子股份有限公司 Method, device and system for upgrading firmware of embedded device
CN104301449A (en) * 2014-10-08 2015-01-21 杭州华三通信技术有限公司 Method and device for modifying IP address
CN106453677A (en) * 2016-09-23 2017-02-22 杭州华三通信技术有限公司 Address allocation method and apparatus
CN106453677B (en) * 2016-09-23 2020-01-24 新华三技术有限公司 Address allocation method and device
CN106899456A (en) * 2017-03-14 2017-06-27 深圳市友华通信技术有限公司 A kind of link detecting and the implementation method repaired
CN112261173A (en) * 2020-10-20 2021-01-22 四川天邑康和通信股份有限公司 DHCP server allocation address conflict detection method relating to convergence gateway
CN112637377A (en) * 2020-12-17 2021-04-09 上海云轴信息科技有限公司 Method and equipment for detecting IP address conflict
CN112637377B (en) * 2020-12-17 2023-10-10 上海云轴信息科技有限公司 Method and equipment for detecting IP address conflict
CN112866431A (en) * 2021-01-19 2021-05-28 北京自如信息科技有限公司 IP address allocation method and device and computer equipment
CN114500632A (en) * 2022-01-24 2022-05-13 重庆奥普泰通信技术有限公司 Communication method and communication device

Similar Documents

Publication Publication Date Title
CN101355594A (en) Method for detecting address conflict when distributing IP address
CN101355474B (en) Method and equipment for requesting and distributing connection point address
CN101951417B (en) Method, system and trunk equipment for assigning multiple server addresses
CN100527752C (en) DHCP address allocation method
CN100536438C (en) Method for testing DHCPv6 service and client
CN101741702B (en) Method and device for limiting broadcast of ARP request
CN102761499B (en) Gateway and method for preventing same from being attacked
CN1889572B (en) Internet protocol address distributing method and dynamic main machine configuration protocol relay
CN109151009B (en) CDN node distribution method and system based on MEC
CN101465756B (en) Method and device for making automatic avoidance of illegal DHCP service and DHCP server
CN104104744A (en) IP address assignment method and device
CN101883158A (en) Method and client for acquiring VLAN (Virtual Local Area Network) IDs (Identifiers) and network protocol addresses
KR101139836B1 (en) Method and system for two-phase mechanism for discovering web services based management service
CN102752413B (en) Dynamic Host Configuration Protocol server system of selection and the network equipment
CN101188514A (en) Method, device and system for automatically discovering network element device
CN106101171B (en) Server connection method and device
CN101873320A (en) Client information verification method based on DHCPv6 relay and device thereof
CN103795581A (en) Address processing method and address processing device
CN106412146B (en) The method and apparatus that a kind of dhcp client updates IP
CN103327130B (en) Method, terminal and system that MAC Address is multiplexed
CN102025797A (en) Address prefix processing method, device, system and network equipment
US20120137010A1 (en) Providing server identification to a client
CN102801716A (en) DHCP (Dynamic Host Configuration Protocol) anti-attacking method and device
CN108667957B (en) IP address allocation method, first electronic device and first server
JP5818362B2 (en) Network system, network management device, network management program, and network management method

Legal Events

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

Application publication date: 20090128