CN112261173A - DHCP server allocation address conflict detection method relating to convergence gateway - Google Patents
DHCP server allocation address conflict detection method relating to convergence gateway Download PDFInfo
- Publication number
- CN112261173A CN112261173A CN202011126837.2A CN202011126837A CN112261173A CN 112261173 A CN112261173 A CN 112261173A CN 202011126837 A CN202011126837 A CN 202011126837A CN 112261173 A CN112261173 A CN 112261173A
- Authority
- CN
- China
- Prior art keywords
- address
- message
- request
- dhcp server
- arp
- 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
Links
- 238000001514 detection method Methods 0.000 title claims description 5
- 238000000034 method Methods 0.000 claims abstract description 15
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
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
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a method for detecting the conflict of DHCP server distribution addresses related to a convergence gateway, which relates to the technical field of communication and comprises the following steps: the method comprises the steps that a Pc normally sends a discover message, a lower hanging device Pc sends the discover message to a Dhcp server, the Dhcp server searches an address pool through a mac address of the lower hanging device, finds out an unused address to be allocated to the Pc, correspondingly searches in an arp table according to an ip address to be allocated, if the ip is found to be occupied by other mac addresses, an ip is selected from the address pool again, if the ip is not searched, a corresponding offer message is replied, the Pc receives the offer message and correspondingly replies a request message, the Dhcp server replies a corresponding ack, the Pc directly sends a request message request address, the lower hanging device Pc sends a request address to request an ip address in the upper hanging device, the Dhcp receives the request and correspondingly searches in the arp table according to the carried ip address, if the ip is not searched, the Dhcp replies a corresponding ack message, and the allocation process is ended; and if the ip is found to be occupied by other hanging-down devices, sending a NAK message, sending a discover message by the hanging-down devices, and acquiring the address again.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a method for detecting conflict of DHCP server allocation addresses of a convergence gateway.
Background
In the pon system or lan uplink system provided by the BroadCom chip solution, as well as in the router product, the router works in the routing mode. The device hanging down the system will get ipv4 address by means of Dhcpc.
The system Dhcp server will allocate addresses in order according to the address pool. And sending an arp inquiry message, and waiting for arp reply to judge whether the ip address conflicts.
When a lot of devices are hung, the Dhcp server waits for an arp reply message each time when sending an arp query. Thus, the time for the last next-hanging device to access and acquire the address is very long.
When some intelligent devices in the current market acquire addresses, a discover request occurs for the first time, and the last used ip address can be taken. When the Dhcp server does not reply, the last ip address is used by default. This causes ipv4 address conflict in the system, which affects usage.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for detecting the conflict of the distributed addresses of a DHCP server related to a convergence gateway.
The purpose of the invention is realized by the following technical scheme:
a DHCP server distribution address conflict detection method relating to a convergence gateway comprises the following steps:
s1, judging whether the pc normally sends a discover message or the pc directly sends a request message request address, if the pc normally sends the discover message, executing S2, and if the pc directly sends the request message request address, executing S7;
s2, the down-hanging device pc sends discover message to Dhcp server, and executes S3;
s3, the Dhcp server searches an address pool through the mac address of the lower-hanging device, finds out an unused address to be allocated to the pc, and executes S4;
s4, correspondingly searching in the arp table according to the ip address to be distributed, if the ip is found to be occupied by other mac addresses, selecting an ip in the address pool again, if the ip is not found, replying a corresponding offer message, and executing S5;
s5, the Pc receives the reply requests message corresponding to the offer message and executes S6;
s6, the Dhcp server replies the corresponding ack, and the address allocation is finished;
s7, the down-hanging device pc sends a request to request the inside to take the ip address, and the step S8 is executed;
s8, the Dhcp server receives the request and correspondingly searches in the arp table according to the carried ip address, if the ip address is not searched, the Dhcp server replies a corresponding ack message, and the distribution process is ended; if the ip is found to be occupied by other hanging-down devices, sending a NAK message, and executing S9;
and S9, the downloading device sends a discover message to perform the process of acquiring the address again.
Preferably, the arp table is updated and added.
Preferably, the updating of the arp includes the following:
a gateway RB generates an ARP table entry of a host according to an ARP protocol message sent by the host, wherein the ARP table entry comprises an identification of an access layer RB used for accessing the host;
the gateway RB divides at least one ARP table entry with the same identification of the access layer RB into the same ARP table entry group;
the gateway RB detects whether a route outlet of each access layer RB reached by the gateway RB is changed or not;
when the route outlet corresponding to at least one access layer RB is changed, the gateway RB updates the outlet identification of each ARP table entry in the ARP table entry grouping corresponding to the at least one access layer RB.
Preferably, the addition of the arp table comprises the following contents:
s1, for the ARP table item to be added, calculating the index of the IP address in the ARP table, wherein the ARP table at least comprises an IP sub-table, an MAC sub-table and a port sub-table;
s2, correspondingly endowing the IP address, the MAC address and the port number of the ARP table entry to be added to each sub-table entry at the index positions of the IP sub-table, the MAC sub-table and the port sub-table;
preferably, for the ARP table entry to be added, the index of its IP address in the ARP table is calculated by the HASH algorithm.
The invention has the beneficial effects that:
when the system receives a discover request to allocate the ip, the invention firstly searches the lower arp table, searches whether the ip address is occupied by other lower-hanging equipment, if so, allocates the ip to the equipment again, and if some intelligent equipment directly sends a request message request address. We will also look up the corresponding arp table first. And if the address is occupied, sending a NAK message, and obtaining the address by sending a discover message again, otherwise, sending an ACK. And acquiring a normal address, and avoiding causing ipv4 address conflict and influencing use.
Drawings
FIG. 1 is a schematic diagram of a pc sending discover messages normally according to the present invention;
fig. 2 is a schematic diagram of a pc directly sending a request message request address in the present invention.
Detailed Description
The technical solutions of the present invention are further described in detail below with reference to the accompanying drawings, but the scope of the present invention is not limited to the following.
A DHCP server distribution address conflict detection method relating to a convergence gateway comprises the following steps:
s1, judging whether the pc normally sends a discover message or the pc directly sends a request message request address, if the pc normally sends the discover message, executing S2, and if the pc directly sends the request message request address, executing S7;
s2, the down-hanging device pc sends discover message to Dhcp server, and executes S3;
s3, the Dhcp server searches an address pool through the mac address of the lower-hanging device, finds out an unused address to be allocated to the pc, and executes S4;
s4, correspondingly searching in the arp table according to the ip address to be distributed, if the ip is found to be occupied by other mac addresses, selecting an ip in the address pool again, if the ip is not found, replying a corresponding offer message, and executing S5;
s5, the Pc receives the reply requests message corresponding to the offer message and executes S6;
s6, the Dhcp server replies the corresponding ack, and the address allocation is finished;
s7, the down-hanging device pc sends a request to request the inside to take the ip address, and the step S8 is executed;
s8, the Dhcp server receives the request and correspondingly searches in the arp table according to the carried ip address, if the ip address is not searched, the Dhcp server replies a corresponding ack message, and the distribution process is ended; if the ip is found to be occupied by other hanging-down devices, sending a NAK message, and executing S9;
and S9, the downloading device sends a discover message to perform the process of acquiring the address again.
Wherein, the arp table is updated and added, and the arp update comprises the following contents:
a gateway RB generates an ARP table entry of a host according to an ARP protocol message sent by the host, wherein the ARP table entry comprises an identification of an access layer RB used for accessing the host;
the gateway RB divides at least one ARP table entry with the same identification of the access layer RB into the same ARP table entry group;
the gateway RB detects whether a route outlet of each access layer RB reached by the gateway RB is changed or not;
when the route outlet corresponding to at least one access layer RB is changed, the gateway RB updates the outlet identification of each ARP table entry in the ARP table entry grouping corresponding to the at least one access layer RB.
The addition of the arp table comprises the following contents:
s1, for the ARP table item to be added, calculating the index of the IP address in the ARP table, wherein the ARP table at least comprises an IP sub-table, an MAC sub-table and a port sub-table;
s2, correspondingly endowing the IP address, the MAC address and the port number of the ARP table entry to be added to each sub-table entry at the index positions of the IP sub-table, the MAC sub-table and the port sub-table;
and calculating the index of the IP address of the ARP table entry to be added in the ARP table by using a HASH algorithm.
The foregoing is merely a preferred embodiment of the invention, it being understood that the embodiments described are part of the invention, and not all of it. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The invention is not intended to be limited to the forms disclosed herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (5)
1. A DHCP server distribution address conflict detection method related to a convergence gateway is characterized by comprising the following steps:
s1, judging whether the pc normally sends a discover message or the pc directly sends a request message request address, if the pc normally sends the discover message, executing S2, and if the pc directly sends the request message request address, executing S7;
s2, the down-hanging device pc sends discover message to Dhcp server, and executes S3;
s3, the Dhcp server searches an address pool through the mac address of the lower-hanging device, finds out an unused address to be allocated to the pc, and executes S4;
s4, correspondingly searching in the arp table according to the ip address to be distributed, if the ip is found to be occupied by other mac addresses, selecting an ip in the address pool again, if the ip is not found, replying a corresponding offer message, and executing S5;
s5, the Pc receives the reply requests message corresponding to the offer message and executes S6;
s6, the Dhcp server replies the corresponding ack, and the address allocation is finished;
s7, the down-hanging device pc sends a request to request the inside to take the ip address, and the step S8 is executed;
s8, the Dhcp server receives the request and correspondingly searches in the arp table according to the carried ip address, if the ip address is not searched, the Dhcp server replies a corresponding ack message, and the distribution process is ended; if the ip is found to be occupied by other hanging-down devices, sending a NAK message, and executing S9;
and S9, the downloading device sends a discover message to perform the process of acquiring the address again.
2. The method for detecting the conflict of the DHCP server assigned addresses related to the converged gateway, according to claim 1, wherein the arp table is updated and added.
3. The method of claim 2, wherein the arp update comprises the following:
a gateway RB generates an ARP table entry of a host according to an ARP protocol message sent by the host, wherein the ARP table entry comprises an identification of an access layer RB used for accessing the host;
the gateway RB divides at least one ARP table entry with the same identification of the access layer RB into the same ARP table entry group;
the gateway RB detects whether a route outlet of each access layer RB reached by the gateway RB is changed or not;
when the route outlet corresponding to at least one access layer RB is changed, the gateway RB updates the outlet identification of each ARP table entry in the ARP table entry grouping corresponding to the at least one access layer RB.
4. The method of claim 2, wherein the adding of the arp table comprises:
s1, for the ARP table item to be added, calculating the index of the IP address in the ARP table, wherein the ARP table at least comprises an IP sub-table, an MAC sub-table and a port sub-table;
s2, correspondingly endowing the IP address, the MAC address and the port number of the ARP table entry to be added to each sub-table entry at the index positions of the IP sub-table, the MAC sub-table and the port sub-table.
5. The method of claim 4, wherein for the ARP entry to be added, the index of its IP address in the ARP entry is calculated by a HASH algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011126837.2A CN112261173A (en) | 2020-10-20 | 2020-10-20 | DHCP server allocation address conflict detection method relating to convergence gateway |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011126837.2A CN112261173A (en) | 2020-10-20 | 2020-10-20 | DHCP server allocation address conflict detection method relating to convergence gateway |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112261173A true CN112261173A (en) | 2021-01-22 |
Family
ID=74245194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011126837.2A Pending CN112261173A (en) | 2020-10-20 | 2020-10-20 | DHCP server allocation address conflict detection method relating to convergence gateway |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112261173A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114301876A (en) * | 2021-12-23 | 2022-04-08 | 深圳创维数字技术有限公司 | Address allocation method, system, device and computer readable storage medium |
CN115150363A (en) * | 2022-06-27 | 2022-10-04 | 中兴通讯股份有限公司 | IP address updating method, gateway device, gateway drop device and storage medium |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070022211A1 (en) * | 2005-07-22 | 2007-01-25 | Shinsuke Shimizu | Packet transfer system, communication network, and packet transfer method |
CN1992736A (en) * | 2005-12-30 | 2007-07-04 | 西门子(中国)有限公司 | IP address distribution method and use thereof |
CN101159619A (en) * | 2007-11-20 | 2008-04-09 | 杭州华三通信技术有限公司 | Fast adding method, device and switching arrangement of ARP table |
CN101355594A (en) * | 2008-09-09 | 2009-01-28 | 中兴通讯股份有限公司 | Method for detecting address conflict when distributing IP address |
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 |
US8478891B1 (en) * | 2009-03-09 | 2013-07-02 | Sprint Communications Company L.P. | Employing socket ranges to ascertain layer 2 addresses |
CN103248716A (en) * | 2012-02-09 | 2013-08-14 | 华为技术有限公司 | Distribution method, device and system of private network address |
CN106255089A (en) * | 2016-08-26 | 2016-12-21 | 杭州迪普科技有限公司 | A kind of method and apparatus of radio three layer roaming |
CN106453677A (en) * | 2016-09-23 | 2017-02-22 | 杭州华三通信技术有限公司 | Address allocation method and apparatus |
CN106559506A (en) * | 2015-09-28 | 2017-04-05 | 中兴通讯股份有限公司 | ARP entry generation method and device |
CN106789670A (en) * | 2016-12-28 | 2017-05-31 | 迈普通信技术股份有限公司 | The method and device that a kind of ARP updates |
WO2017219777A1 (en) * | 2016-06-24 | 2017-12-28 | 中兴通讯股份有限公司 | Packet processing method and device |
-
2020
- 2020-10-20 CN CN202011126837.2A patent/CN112261173A/en active Pending
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070022211A1 (en) * | 2005-07-22 | 2007-01-25 | Shinsuke Shimizu | Packet transfer system, communication network, and packet transfer method |
CN1992736A (en) * | 2005-12-30 | 2007-07-04 | 西门子(中国)有限公司 | IP address distribution method and use thereof |
CN101159619A (en) * | 2007-11-20 | 2008-04-09 | 杭州华三通信技术有限公司 | Fast adding method, device and switching arrangement of ARP table |
CN101355594A (en) * | 2008-09-09 | 2009-01-28 | 中兴通讯股份有限公司 | Method for detecting address conflict when distributing IP address |
US8478891B1 (en) * | 2009-03-09 | 2013-07-02 | Sprint Communications Company L.P. | Employing socket ranges to ascertain layer 2 addresses |
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 |
CN103248716A (en) * | 2012-02-09 | 2013-08-14 | 华为技术有限公司 | Distribution method, device and system of private network address |
CN106559506A (en) * | 2015-09-28 | 2017-04-05 | 中兴通讯股份有限公司 | ARP entry generation method and device |
WO2017054526A1 (en) * | 2015-09-28 | 2017-04-06 | 中兴通讯股份有限公司 | Arp entry generation method and device |
WO2017219777A1 (en) * | 2016-06-24 | 2017-12-28 | 中兴通讯股份有限公司 | Packet processing method and device |
CN107547667A (en) * | 2016-06-24 | 2018-01-05 | 中兴通讯股份有限公司 | A kind of message processing method and device |
CN106255089A (en) * | 2016-08-26 | 2016-12-21 | 杭州迪普科技有限公司 | A kind of method and apparatus of radio three layer roaming |
CN106453677A (en) * | 2016-09-23 | 2017-02-22 | 杭州华三通信技术有限公司 | Address allocation method and apparatus |
CN106789670A (en) * | 2016-12-28 | 2017-05-31 | 迈普通信技术股份有限公司 | The method and device that a kind of ARP updates |
Non-Patent Citations (1)
Title |
---|
赵伟艇等: "局域网IP地址冲突问题研究", 《福建电脑》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114301876A (en) * | 2021-12-23 | 2022-04-08 | 深圳创维数字技术有限公司 | Address allocation method, system, device and computer readable storage medium |
CN114301876B (en) * | 2021-12-23 | 2023-11-21 | 深圳创维数字技术有限公司 | Address allocation method, system, device and computer readable storage medium |
CN115150363A (en) * | 2022-06-27 | 2022-10-04 | 中兴通讯股份有限公司 | IP address updating method, gateway device, gateway drop device and storage medium |
CN115150363B (en) * | 2022-06-27 | 2024-05-10 | 中兴通讯股份有限公司 | IP address updating method, gateway device, gateway down-hanging device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101534329B (en) | IP address assignment method and system | |
CN102143247B (en) | Method for allocating and configuring address, address allocation server and host machine | |
CN107733670B (en) | Forwarding strategy configuration method and device | |
EP0943201B1 (en) | Method for using dhcp to override learned ip addresses in a network | |
US7339895B2 (en) | Gateway device and control method for communication with IP and IPV6 protocols | |
US8054804B2 (en) | Method of and system for support of user devices roaming between routing realms by a single network server | |
EP3370371A1 (en) | System and method for identifying wireless terminal type in router network bridge mode | |
CN112261173A (en) | DHCP server allocation address conflict detection method relating to convergence gateway | |
CN105323173A (en) | Network rule entry setting method and device | |
CN102118453B (en) | Method, service device, client and communication system for automatic configuration of IP address | |
US20040258074A1 (en) | Method and apparatus for allocating addresses in integrated zero-configured and manually configured networks | |
CN105245629A (en) | DHCP-based host communication method and device | |
US20130089092A1 (en) | Method for preventing address conflict, and access node | |
WO2011114268A1 (en) | Method and device for relocating address space | |
CN107615723B (en) | Internet protocol address allocation method and relay equipment | |
US9819641B2 (en) | Method of and a processing device handling a protocol address in a network | |
WO2018019216A1 (en) | Ap access control | |
US20080320115A1 (en) | Apparatus, method and system for acquiring ipv6 address | |
RU2016146823A (en) | SYSTEM AND METHOD FOR RESTRICTING THE NUMBER OF USERS CONNECTED TO A PUBLIC NETWORK BY MEANS OF EQUIPMENT CREATED ON THE BASIS OF LINUX | |
WO2014007604A1 (en) | System and method for pre-emptive address conflict resolution in automatic device address assignments | |
CN114465987A (en) | Network address allocation method, Internet of things system, device, equipment and storage medium | |
KR100911284B1 (en) | Network connection apparatus, connection system, and network connection method | |
JP2000112851A (en) | Dynamic domain name system and method for managing dynamic domain name | |
CN113660357B (en) | Method and device for automatically acquiring IP address by IPv6 dual stack system | |
CN106878479B (en) | Address allocation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210122 |
|
RJ01 | Rejection of invention patent application after publication |