CN111835880A - IP address allocation method and system - Google Patents

IP address allocation method and system Download PDF

Info

Publication number
CN111835880A
CN111835880A CN202010581610.0A CN202010581610A CN111835880A CN 111835880 A CN111835880 A CN 111835880A CN 202010581610 A CN202010581610 A CN 202010581610A CN 111835880 A CN111835880 A CN 111835880A
Authority
CN
China
Prior art keywords
address
server
local device
record
database
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
CN202010581610.0A
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.)
Sina Technology China Co Ltd
Original Assignee
Sina Technology China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sina Technology China Co Ltd filed Critical Sina Technology China Co Ltd
Priority to CN202010581610.0A priority Critical patent/CN111835880A/en
Publication of CN111835880A publication Critical patent/CN111835880A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention provides an IP address allocation method and a system, comprising the following steps: the server sends an IP address allocation request to the local device, wherein the IP address allocation request carries the physical address of the server and is used for requesting the allocation of the IP address for the server; according to the physical address of the server carried by the received request for allocating the IP address, the local device searches whether the IP address records of the database of the local device have records for allocating the IP address to the server; if the IP address record of the local device database has a record of the IP address assigned to the server, the IP address bound with the physical address of the server in the IP address record of the local device database is sent to the server. The central database synchronizes its pool of stored IP addresses to the IP address records of the local device. The local device acquires the configured IP address bound with the physical address from the central database; so that each server has 1 fixed IP address.

Description

IP address allocation method and system
Technical Field
The invention relates to network management, in particular to an I P address allocation method and system.
Background
The server operates and communicates and needs an IP address, and the IP address of the server can be manually managed and configured or automatically configured by using a DHCP server in general.
In the process of implementing the invention, the applicant finds that at least the following problems exist in the prior art:
manually managing the IP addresses is complex, different configuration files need to be created on each machine, the cost is high, and the efficiency is low; with DHCP automatic management, the biggest problem is that it is not suitable for the internet IDC environment, because DHCP technology cannot guarantee IP address fixing, and in some cases, it is possible that the same server will obtain completely different IP addresses twice, which is not acceptable in the IDC environment.
Disclosure of Invention
The embodiment of the invention provides an IP address distribution method and system in a central database, wherein a server can acquire an IP address configured for the server from the central database by transferring through a local device; and the IP address is bound with the physical address of the server, each server has 1 IP address, so the IP address of the server can be forcibly fixed.
To achieve the above object, in one aspect, an embodiment of the present invention provides a method for allocating an IP address to a central database, including:
the server sends an IP address allocation request to the local device, wherein the IP address allocation request carries the physical address of the server and is used for requesting the allocation of the IP address for the server;
according to the physical address of the server carried by the received request for allocating the IP address, the local device searches whether the IP address records of the database of the local device have records for allocating the IP address to the server; the central database periodically synchronizes an IP address pool stored by the central database into an IP address record of a local device database, wherein the IP address pool records a binding relationship between IP addresses distributed for different servers and physical addresses of corresponding servers;
if the IP address record of the local device database has a record of the IP address assigned to the server, the IP address bound with the physical address of the server in the IP address record of the local device database is sent to the server.
In another aspect, an embodiment of the present invention provides an IP address allocation system, including a server, a central database, and a local device, where the server includes a first request unit, and the local device includes a matching unit, a first sending unit, and a local device database, where:
the first request unit is used for sending an IP address allocation request to the local device, wherein the IP address allocation request carries the physical address of the server and is used for requesting the server to allocate the IP address;
the central database is used for storing an IP address pool, and the binding relationship between the IP addresses distributed for different servers and the physical addresses of the corresponding servers is recorded in the IP address pool; periodically synchronizing the IP address pool stored in the local device database to the IP address record of the local device database;
the matching unit is used for searching whether a record for distributing the IP address for the server exists in the IP address record of the local device database according to the physical address of the server carried by the received IP address distribution request;
and a first transmitting unit that transmits the IP address bound to the physical address of the server within the IP address record of the local device database to the server if the IP address record of the local device database has a record that allocates the IP address to the server.
The technical scheme has the following beneficial effects: the server can obtain the configured IP address from the central database by transferring through the local device; and the IP address is bound with the physical address of the server, each server has 1 IP address, so the IP address of the server can be forcibly fixed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an IP address assignment method according to an embodiment of the present invention;
fig. 2 is a structural diagram of an IP address assignment system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system architecture deployment of an embodiment of the present invention;
fig. 4 is a logic diagram of an IP address assignment implementation of an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
As shown in fig. 1, in conjunction with the embodiment of the present invention, there is provided an IP address allocation method, including:
s101: the server sends an IP address allocation request to the local device, wherein the IP address allocation request carries the physical address of the server and is used for requesting the allocation of the IP address for the server;
s102: according to the physical address of the server carried by the received request for allocating the IP address, the local device searches whether the IP address records of the database of the local device have records for allocating the IP address to the server; the central database periodically synchronizes an IP address pool stored by the central database into an IP address record of a local device database, wherein the IP address pool records a binding relationship between IP addresses distributed for different servers and physical addresses of corresponding servers;
s103: if the IP address record of the local device database has a record of the IP address assigned to the server, the IP address bound with the physical address of the server in the IP address record of the local device database is sent to the server.
Preferably, step S101 specifically includes:
the server sends an IP address allocation request to the local device through a DHCP protocol;
the step 103 specifically includes:
the local device sends an IP address bound to the physical address of the server to the server via DHCP protocol.
Preferably, the method further comprises the following steps:
s104: if the IP address record of the local device database does not have the record for distributing the IP address to the server, the local device sends a request for synchronizing an IP address pool to the central database;
s105: after receiving a request of a local device for synchronizing an IP address pool, a central database synchronizes the IP address pool to an IP address record of a local device database;
s106: the local device searches whether the IP address record allocated to the server exists in the IP address records of the synchronized database of the local device again, and if so, the IP address bound with the physical address of the server is sent to the server.
Preferably, the local device processes the IP address records of its database in a stateless manner, and when there are multiple local devices, the local devices are arranged in parallel, and the IP address record of any local device database does not affect the IP address records of other local device databases.
Preferably, the method further comprises the following steps:
s107: after the IP address bound with the physical address of the server in the IP address record of the database is sent to the server, the server periodically sends an IP address confirmation request to a local device, wherein the IP address confirmation request carries the physical address of the server and the current IP address of the server;
s108: according to the physical address of the server carried by the received IP address confirmation request, the local device confirms whether a record for distributing the IP address for the server exists in an IP address record of a database of the local device and whether the IP address bound with the physical address of the server is consistent with the current IP address of the local device;
s109: and if the IP address record of the local device database has a record for allocating the IP address for the server, and the current IP address of the server is consistent with the IP address bound with the physical address of the server in the IP address record of the local device database, sending an IP address confirmation response to the server.
Preferably, the method further comprises the following steps:
s110: after receiving the IP address confirmation request, if the local device does not have a record for allocating an IP address to the server in the IP address record of the database of the local device or the IP address bound with the physical address of the server is inconsistent with the current IP address of the local device, the local device sends a request for synchronizing an IP address pool to a central database;
s120: after receiving a request of a local device for synchronizing an IP address pool, a central database synchronizes the IP address pool to an IP address record of a local device database;
s130: the local device confirms whether the record of allocating the IP address to the server and the IP address bound with the physical address of the server are consistent with the current IP address again in the IP address record of the synchronized database of the local device;
s140: if the IP address record of the local device database has a record for allocating an IP address to the server, and the current IP address of the server is consistent with the IP address bound with the physical address of the server in the IP address record of the local device database, an IP address confirmation response is sent to the server; and if the IP address record of the local device database does not have a record for allocating the IP address to the server, or the current IP address of the server is inconsistent with the IP address bound with the physical address of the server in the IP address record of the local device database, sending an IP address release message to the server.
As shown in fig. 2, in conjunction with the embodiment of the present invention, there is provided an IP address allocation system, including: a server, a central database 22 and a local device, the server comprising a first requesting unit, the local device comprising a matching unit, a first sending unit and a local device database, wherein:
a first request unit 21, configured to send an IP address allocation request to a local apparatus, where the IP address allocation request carries a physical address of a server itself, and is used to request allocation of an IP address for the server itself;
the central database 22 is used for storing an IP address pool, and binding relationships between IP addresses allocated to different servers and physical addresses of corresponding servers are recorded in the IP address pool; periodically synchronizing the IP address pool stored in the local device database to the IP address record of the local device database;
the matching unit 23 is configured to search whether a record for allocating an IP address to the server exists in an IP address record of the local device database according to the physical address of the server carried by the received request for allocating an IP address;
the first transmission unit 24 transmits the IP address bound to the physical address of the server within the IP address record of the local device database to the server if the IP address record of the local device database has a record that assigns an IP address to the server.
Preferably, the first request unit 21 is specifically configured to:
sending an IP address allocation request to a local device through a DHCP protocol;
the first sending unit 24 is specifically configured to:
the IP address bound to the physical address of the server is sent to the server by DHCP protocol.
Preferably, the local apparatus further includes a synchronization request unit 25 and a second transmission unit 26, wherein:
a synchronization request unit 25, configured to send a request for synchronizing the IP address pool to the central database if the IP address record of the local device database does not have a record for allocating an IP address to the server;
the central database 22 is further configured to synchronize the IP address pool into the IP address record of the local device database after receiving the request of the synchronization request unit to synchronize the IP address pool;
the matching unit 23 is further configured to search again, in the synchronized IP address record of the local device database, whether there is a record for allocating an IP address to the server;
a second sending unit 26, configured to send the IP address bound with the physical address of the server to the server if the IP address record of the synchronized local device database has a record that assigns an IP address to the server.
Preferably, the local device:
and processing the IP address records of the database in a stateless mode, wherein when a plurality of local devices are provided, the local devices are arranged in parallel, and the IP address records of any local device database do not influence the IP address records of other local device databases.
Preferably, the server further comprises a confirmation requesting unit 27, the local device further comprises a confirmation unit 28 and a third sending unit 29:
a confirmation request unit 27, configured to periodically send an IP address confirmation request to the local apparatus after receiving the IP address bound to the physical address of the server, where the IP address confirmation request carries the physical address of the server and its current IP address;
a confirming unit 28, configured to confirm, according to the physical address of the server carried in the received IP address confirmation request, whether a record for allocating an IP address to the server exists in an IP address record of the local device database, and whether the IP address bound to the physical address of the server is consistent with the current IP address of the server;
and a third sending unit 29, configured to send an IP address confirmation response to the server if the IP address record of the local device database has a record therein that assigns an IP address to the server, and the current IP address of the server matches the IP address bound to the physical address of the server in the IP address record of the local device database.
Preferably, the local apparatus further includes a fourth acknowledgement sending unit 30, wherein:
a synchronous request unit 25, further configured to, after receiving the IP address confirmation request, send a request for synchronizing the IP address pool to the central database if there is no record for allocating an IP address to the server in the IP address record of the local device database, or the IP address bound to the physical address of the server is inconsistent with the current IP address of the server;
the central database 22 is further configured to synchronize the IP address pool into an IP address record of the local device database after receiving the request for synchronizing the IP address pool by the local device;
a confirming unit 28, configured to confirm again whether there is a record for allocating an IP address to the server in the synchronized IP address record of the local device database and whether the IP address bound to the physical address of the server is consistent with the current IP address of the server;
a fourth acknowledgement sending unit 30, configured to send an IP address acknowledgement response to the server if the IP address record of the local device database has a record that allocates an IP address to the server, and the current IP address of the server is consistent with the IP address bound to the physical address of the server in the IP address record of the local device database; and if the IP address record of the local device database does not have a record for allocating the IP address to the server, or the current IP address of the server is inconsistent with the IP address bound with the physical address of the server in the IP address record of the local device database, sending an IP address release message to the server.
The embodiment of the invention has the following beneficial effects:
firstly, management is convenient, compared with manual management, operation is simplified greatly, compared with the traditional DHCP server, expansion is convenient, and the IP address of the server and the statistical deployment condition are easy to deploy based on a central database instead of a distributed configuration file.
Secondly, the flexibility is high, the universality is strong, the operation can be performed in a plurality of scenes, and a physical machine and a virtualization scene (such as a private cloud which can serve as a virtual machine of the private cloud) can work, because the IP address is bound with the physical customization of the server, each server has 1 IP address, the IP address of the server can be forcibly fixed, and the trouble that the traditional DHCP server cannot fix a unique IP address for each server is avoided.
Third, the conventional DHCP server is stand-alone and also needs to manage the IP pool through a configuration file. When high availability is needed, a plurality of DHCP servers need to be operated, and single-machine configuration is carried out, so that management is very inconvenient; and through the mode of managing IP record table in a stateless way, can work at the same time by a plurality of local devices, each device works independently, even if any one goes wrong, as long as there is a device working, will not influence the final function, realize the high usability.
The above technical solutions of the embodiments of the present invention are described in detail below with reference to specific application examples, and reference may be made to the foregoing related descriptions for technical details that are not described in the implementation process.
The invention relates to an IP address allocation method and device based on a centralized database, which can not only avoid the complexity of manual configuration, but also can fixedly allocate IP addresses. Wherein the IP addresses may include IPv4 addresses and IPv6 addresses.
First, a centralized database (central database) is needed, which is used to store the IP pool of the server, i.e. all IP lists that can be allocated, and also stores the relationship between the IP address and the physical address of the server in the central database. Then, a plurality of local devices (local devices) and servers (servers may be physical machines or virtual machines) are deployed in the same network, and the central database periodically synchronizes the IP pools in the local devices to the local devices, where the specific deployment situation is shown in fig. 3.
The device is stateless, can work simultaneously, and even if any one of the devices goes wrong, the final function is not influenced, and high usability is realized.
The server and the device are deployed in the same network and can access each other.
All servers acquire IP addresses through a DHCP protocol, and the device can issue the IP addresses to the servers according to a standard DHCP protocol for realizing the server side of the DHCP protocol.
As shown in fig. 4, the standard flow implemented by the present apparatus is as follows:
1. the server sends an IP address request to the network;
2. after receiving the request, any device inquires a database in a memory of the device according to the physical address of the server, and if records (records for allocating IP addresses to the server) exist in the database, the device sends the IP address bound with the physical address of the server to the server;
3. if the query of the database in the memory fails and the corresponding physical address binding relationship does not exist, requesting a central database, synchronizing the IP pool in the database and the physical address binding relationship, after the synchronization is completed, querying the database in the memory, and if records exist in the database, sending the IP address bound with the physical address of the server to the server;
4. if after the third step no corresponding record is still queried, the request is ignored (the request can be considered as an invalid request, since the address of the server is pre-written into the central server).
5. The server will periodically send an acknowledgement request with the physical address of the server and the current IP address.
6. The device receives the request, queries a database in the memory, and sends a confirmation message to the server if a record (a record for allocating an IP address to the server) exists in the database and the IP address in the database is the same as the current IP address of the physical machine;
7. if the query of the database in the memory fails and the corresponding physical address binding relationship does not exist, the central database is requested, the binding relationship between the IP pool in the synchronous database and the physical address is synchronized, the database in the memory is queried again, and if the record exists in the database and the IP address in the database is the same as the current IP address of the physical machine, a confirmation message is sent to the server, namely the current IP address of the server is correct. And if no record exists in the database or the IP address in the record is different from the current IP address of the server, sending an IP address release message to the server.
The embodiment of the invention has the following beneficial effects:
firstly, management is convenient, compared with manual management, operation is simplified greatly, compared with the traditional DHCP server, expansion is convenient, and the IP address of the server and the statistical deployment condition are easy to deploy based on a central database instead of a distributed configuration file.
Secondly, the flexibility is high, the universality is strong, the operation can be performed in a plurality of scenes, and a physical machine and a virtualization scene (such as a private cloud which can serve as a virtual machine of the private cloud) can work, because the IP address is bound with the physical customization of the server, each server has 1 IP address, the IP address of the server can be forcibly fixed, and the trouble that the traditional DHCP server cannot fix a unique IP address for each server is avoided.
Third, the conventional DHCP server is stand-alone and also needs to manage the IP pool through a configuration file. When the demand is high, a plurality of DHCP servers need to be operated, and the configuration is simplex, so that the management is very inconvenient. In the local device, the server can acquire the configured IP address from the central database through transferring; and through the mode of managing IP record table in a stateless way, can work at the same time by a plurality of local devices, each device works independently, even if any one goes wrong, as long as there is a device working, will not influence the final function, realize the high usability.
It should be understood that the specific order or hierarchy of steps in the processes disclosed is an example of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not intended to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, invention lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. To those skilled in the art; various modifications to these embodiments will be readily apparent, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
What has been described above includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent that the term "includes" is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term "comprising" as "comprising" is interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or".
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (12)

1. An IP address assignment method, comprising:
the server sends an IP address allocation request to the local device, wherein the IP address allocation request carries the physical address of the server and is used for requesting the allocation of the IP address for the server;
according to the physical address of the server carried by the received request for allocating the IP address, the local device searches whether the IP address records of the database of the local device have records for allocating the IP address to the server; the central database periodically synchronizes an IP address pool stored by the central database into an IP address record of a local device database, wherein the IP address pool records a binding relationship between IP addresses distributed for different servers and physical addresses of corresponding servers;
if the IP address record of the local device database has a record of the IP address assigned to the server, the IP address bound with the physical address of the server in the IP address record of the local device database is sent to the server.
2. The IP address assignment method according to claim 1, wherein the server sends an IP address assignment request to the local device, and specifically includes:
the server sends an IP address allocation request to the local device through a DHCP protocol;
if the IP address record of the local device database has a record for allocating an IP address to the server, the IP address bound to the physical address of the server in the IP address record of the local device database is sent to the server, and the method specifically includes:
the local device sends an IP address bound to the physical address of the server to the server via DHCP protocol.
3. The IP address allocation method according to claim 1, further comprising:
if the IP address record of the local device database does not have the record for distributing the IP address to the server, the local device sends a request for synchronizing an IP address pool to the central database;
after receiving a request of a local device for synchronizing an IP address pool, a central database synchronizes the IP address pool to an IP address record of a local device database;
the local device searches whether the IP address record allocated to the server exists in the IP address records of the synchronized database of the local device again, and if so, the IP address bound with the physical address of the server is sent to the server.
4. The IP address allocation method according to claim 1,
the local devices process the IP address records of the databases in a stateless mode, when a plurality of local devices are provided, the local devices are arranged in parallel, and the IP address records of any local device database do not influence the IP address records of other local device databases.
5. The IP address allocation method according to claim 1, further comprising:
after the IP address bound with the physical address of the server in the IP address record of the database is sent to the server, the server periodically sends an IP address confirmation request to a local device, wherein the IP address confirmation request carries the physical address of the server and the current IP address of the server;
according to the physical address of the server carried by the received IP address confirmation request, the local device confirms whether a record for distributing the IP address for the server exists in an IP address record of a database of the local device and whether the IP address bound with the physical address of the server is consistent with the current IP address of the local device;
and if the IP address record of the local device database has a record for allocating the IP address for the server, and the current IP address of the server is consistent with the IP address bound with the physical address of the server in the IP address record of the local device database, sending an IP address confirmation response to the server.
6. The IP address allocation method according to claim 5, further comprising:
after receiving the IP address confirmation request, if the local device does not have a record for allocating an IP address to the server in the IP address record of the database of the local device or the IP address bound with the physical address of the server is inconsistent with the current IP address of the local device, the local device sends a request for synchronizing an IP address pool to a central database;
after receiving a request of a local device for synchronizing an IP address pool, a central database synchronizes the IP address pool to an IP address record of a local device database;
the local device confirms whether the record of allocating the IP address to the server and the IP address bound with the physical address of the server are consistent with the current IP address again in the IP address record of the synchronized database of the local device;
if the IP address record of the local device database has a record for allocating an IP address to the server, and the current IP address of the server is consistent with the IP address bound with the physical address of the server in the IP address record of the local device database, an IP address confirmation response is sent to the server; and if the IP address record of the local device database does not have a record for allocating the IP address to the server, or the current IP address of the server is inconsistent with the IP address bound with the physical address of the server in the IP address record of the local device database, sending an IP address release message to the server.
7. An IP address allocation system comprising a server, a central database, and a local device, the server comprising a first request unit, the local device comprising a matching unit, a first transmission unit, and a local device database, wherein:
the first request unit is used for sending an IP address allocation request to the local device, wherein the IP address allocation request carries the physical address of the server and is used for requesting the server to allocate the IP address;
the central database is used for storing an IP address pool, and the binding relationship between the IP addresses distributed for different servers and the physical addresses of the corresponding servers is recorded in the IP address pool; periodically synchronizing the IP address pool stored in the local device database to the IP address record of the local device database;
the matching unit is used for searching whether a record for distributing the IP address for the server exists in the IP address record of the local device database according to the physical address of the server carried by the received IP address distribution request;
and a first transmitting unit that transmits the IP address bound to the physical address of the server within the IP address record of the local device database to the server if the IP address record of the local device database has a record that allocates the IP address to the server.
8. The IP address assignment system of claim 7,
the first request unit is specifically configured to: sending an IP address allocation request to a local device through a DHCP protocol;
the first sending unit is specifically configured to:
the IP address bound to the physical address of the server is sent to the server by DHCP protocol.
9. The IP address allocation system according to claim 7, wherein the local apparatus further comprises a synchronization request unit and a second transmission unit, wherein:
a synchronization request unit, configured to send a request for synchronizing an IP address pool to a central database if the IP address record of the local device database does not have a record for allocating an IP address to the server;
the central database is also used for synchronizing the IP address pool into the IP address record of the local device database after receiving the request of the synchronous request unit for synchronizing the IP address pool;
the matching unit is also used for searching whether the IP address record allocated to the server exists in the IP address record of the synchronized local device database;
and a second sending unit, configured to send the IP address bound to the physical address of the server to the server if the synchronized IP address record of the local device database has a record that assigns an IP address to the server.
10. The IP address allocation system according to claim 7, wherein the local devices process the IP address records of their databases in a stateless manner, and when there are a plurality of local devices, the local devices are arranged in parallel, and the IP address record of any local device database does not affect the IP address records of other local device databases.
11. The IP address allocation system according to claim 7, wherein the server further includes a confirmation request unit, the local apparatus further includes a confirmation unit and a third transmission unit, wherein:
a confirmation request unit, configured to periodically send an IP address confirmation request to a local device after receiving an IP address bound to a physical address of the server, where the IP address confirmation request carries the physical address of the server and a current IP address of the server;
a confirming unit, configured to confirm, according to the physical address of the server carried in the received IP address confirmation request, whether there is a record for allocating an IP address to the server in an IP address record of the local device database, and whether the IP address bound to the physical address of the server is consistent with the current IP address of the server;
and a third sending unit, configured to send an IP address confirmation response to the server if the IP address record of the local device database has a record therein that allocates an IP address to the server, and the current IP address of the server is consistent with the IP address bound to the physical address of the server in the IP address record of the local device database.
12. The IP address allocation system according to claim 11, wherein the local apparatus further comprises a fourth acknowledgment transmission unit in which:
the synchronous request unit is also used for sending a request of synchronizing an IP address pool to the central database if the IP address record of the local device database does not have a record for allocating the IP address to the server or the IP address bound with the physical address of the server is inconsistent with the current IP address after receiving the IP address confirmation request;
the central database is also used for synchronizing the IP address pool into the IP address record of the local device database after receiving the request of the local device for synchronizing the IP address pool;
the confirming unit is also used for confirming whether the record for distributing the IP address to the server exists in the IP address record of the synchronized local device database and whether the IP address bound with the physical address of the server is consistent with the current IP address of the server again;
a fourth acknowledgement sending unit, configured to send an IP address acknowledgement response to the server if the IP address record of the local device database has a record that allocates an IP address to the server, and the current IP address of the server is consistent with the IP address bound to the physical address of the server in the IP address record of the local device database; and if the IP address record of the local device database does not have a record for allocating the IP address to the server, or the current IP address of the server is inconsistent with the IP address bound with the physical address of the server in the IP address record of the local device database, sending an IP address release message to the server.
CN202010581610.0A 2020-06-23 2020-06-23 IP address allocation method and system Pending CN111835880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010581610.0A CN111835880A (en) 2020-06-23 2020-06-23 IP address allocation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010581610.0A CN111835880A (en) 2020-06-23 2020-06-23 IP address allocation method and system

Publications (1)

Publication Number Publication Date
CN111835880A true CN111835880A (en) 2020-10-27

Family

ID=72898008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010581610.0A Pending CN111835880A (en) 2020-06-23 2020-06-23 IP address allocation method and system

Country Status (1)

Country Link
CN (1) CN111835880A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1682516A (en) * 2002-09-16 2005-10-12 思科技术公司 Method and apparatus for preventing spoofing of network addresses
CN101534329A (en) * 2009-04-16 2009-09-16 华为技术有限公司 IP address assignment method and system
CN103179218A (en) * 2011-12-20 2013-06-26 中国电信股份有限公司 Method and system for distributing internet protocol (IP) address for cloud computer
CN103929506A (en) * 2014-04-21 2014-07-16 华为技术有限公司 Method and device for distributing IP address for IP hard disk
CN106790734A (en) * 2016-01-29 2017-05-31 新华三技术有限公司 A kind of network address assignment method and device
CN106878483A (en) * 2017-01-24 2017-06-20 新华三技术有限公司 A kind of IP address distribution method and device
CN107580083A (en) * 2017-09-20 2018-01-12 北京京东尚科信息技术有限公司 A kind of method and system of container IP address distribution
US20190097966A1 (en) * 2017-09-28 2019-03-28 Nicira, Inc, Systems and methods for providing multi-tenant dynamic host configuration protocol services

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1682516A (en) * 2002-09-16 2005-10-12 思科技术公司 Method and apparatus for preventing spoofing of network addresses
CN101534329A (en) * 2009-04-16 2009-09-16 华为技术有限公司 IP address assignment method and system
CN103179218A (en) * 2011-12-20 2013-06-26 中国电信股份有限公司 Method and system for distributing internet protocol (IP) address for cloud computer
CN103929506A (en) * 2014-04-21 2014-07-16 华为技术有限公司 Method and device for distributing IP address for IP hard disk
CN106790734A (en) * 2016-01-29 2017-05-31 新华三技术有限公司 A kind of network address assignment method and device
CN106878483A (en) * 2017-01-24 2017-06-20 新华三技术有限公司 A kind of IP address distribution method and device
CN107580083A (en) * 2017-09-20 2018-01-12 北京京东尚科信息技术有限公司 A kind of method and system of container IP address distribution
US20190097966A1 (en) * 2017-09-28 2019-03-28 Nicira, Inc, Systems and methods for providing multi-tenant dynamic host configuration protocol services

Similar Documents

Publication Publication Date Title
US11418480B2 (en) Translating a network configuration request for a network control apparatus
CN101951417B (en) Method, system and trunk equipment for assigning multiple server addresses
US6614788B1 (en) Network address management
US8767737B2 (en) Data center network system and packet forwarding method thereof
JP5153782B2 (en) Simplified automatic configuration and service discovery within ad hoc networks
CN100407625C (en) Method for providing business according to its type
US20160127193A1 (en) D2hcp protocol in ad hoc networks: merging of sub-networks and address conflict resolution
CN102075591A (en) Method, device and system for acquiring media access control address
CN108600281B (en) Cloud storage system, media data storage method and system
US9054976B2 (en) Network configuration system based on location and configuration method thereof
CN101188514A (en) Method, device and system for automatically discovering network element device
JP2003078541A (en) Network connecting device, system, and method
CN112689029A (en) Method, device and equipment for acquiring IP address of group user
CN111835880A (en) IP address allocation method and system
WO2018050055A1 (en) Data request processing method and system, access device, and storage device therefor
TWI469578B (en) Access control method, access control device and access control program
JPH09282259A (en) Network system
JP4645236B2 (en) Network device address automatic setting method and system
CN105162898A (en) Method and device for realizing intelligent resolution through DNS (Domain Name Sever), DHCP (Dynamic Host Configuration Protocol) and IPAM (Internet Protocol Address Management)
WO2022089147A1 (en) Method for acquiring address, apparatus and system
CN101656722A (en) Method for generating dynamic host configuration protocol (DHCP) snooping binding information, and device thereof
CN111541738B (en) Communication method and device
CN109451093B (en) Loopback interface address allocation method and device
CN109525685B (en) IP address allocation method and system
JPH08307451A (en) Data transfer system and method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201027