CN102291470A - IP (Internet Protocol) address allocation method - Google Patents

IP (Internet Protocol) address allocation method Download PDF

Info

Publication number
CN102291470A
CN102291470A CN201110236705XA CN201110236705A CN102291470A CN 102291470 A CN102291470 A CN 102291470A CN 201110236705X A CN201110236705X A CN 201110236705XA CN 201110236705 A CN201110236705 A CN 201110236705A CN 102291470 A CN102291470 A CN 102291470A
Authority
CN
China
Prior art keywords
address
client
effective
effective address
pond
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
CN201110236705XA
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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201110236705XA priority Critical patent/CN102291470A/en
Publication of CN102291470A publication Critical patent/CN102291470A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to the technical field of networks, and discloses an IP (Internet Protocol) address allocation method which comprises the following steps of: S1, selecting one or one section of address from an alternative address pool as an effective address according to a dynamic strategy, and putting the effective address in an effective address pool, wherein the dynamic strategy is a preset program algorithm which is called by a DHCP (Dynamic Host Configuration Protocol) server and used for screening the alternative address pool. Through adding the step of screening the address, the function of the DHCP server is expanded, and addresses with special formats can be allocated for a client end according to the strategy, thus the demand of the client end on allocation of the addresses with complex formats is met.

Description

A kind of IP address assignment method
Technical field
The present invention relates to networking technology area, relate in particular to a kind of IP address assignment method.
Background technology
Dynamic address allocation is a kind of address distribution method of the Internet.As the DHCP agreement of generally using at present, by this agreement, client can obtain basic network configuration information such as IP address, gateway, dns server automatically from Dynamic Host Configuration Protocol server, thereby realizes the network access of plug and play, has avoided complicated network parameter configuration.
Fig. 1 is the basic working modes of present traditional DHCP (Dynamic Host Configuration Protocol, DynamicHost is provided with agreement) server.Dynamic Host Configuration Protocol server can directly be chosen an address assignment at every turn and give client when distributing the address from alternative address pool.Under this pattern, the keeper is by configuration file static defining " alternative address pool " space, and client can be distributed to as effective address in all addresses in the alternative address pool.
In order to expand dhcp server functionality, can also distribute special address parameter to client by standard OPTION option, the OPTION43 that stipulates as IETF RFC2132 can distribute the wireless network controller address that pre-defines for client.
But under the IPv6 environment, some application has specific (special) requirements to the IPv6 address format, this makes Dynamic Host Configuration Protocol server to filter and to screen alternative address pool space according to strategy, therefrom select satisfactory effective address and distribute to client, and present traditional Dynamic Host Configuration Protocol server is not support this mode of operation.
Summary of the invention
(1) technical problem that will solve
The technical problem to be solved in the present invention is: the address of how distributing special shape for client.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides the IP address assignment method, may further comprise the steps:
S1, select one or a sector address to put into the effective address pond as effective address from alternative address pool according to dynamic strategy, described dynamic strategy is the programmed algorithm that alternative address pool is screened that a section of calling of Dynamic Host Configuration Protocol server pre-establishes.
Preferably, after step S1, also comprise step S2: call load-balancing algorithm and from the effective address pond, choose effective address and distribute to client.
Preferably, among the step S1, when effective address is put into the effective address pond, call load-balancing algorithm and from the effective address pond, choose effective address and distribute to client.
Preferably, when choosing effective address and distribute to client, selected effective address is labeled as distributes.
Preferably, discharged the address as client, then the address that is discharged has been recovered in the effective address pond, and be unallocated with the address mark that is reclaimed, the Address requests of subsequent client is then chosen from the unallocated address in effective address pond.
Preferably, step S1 and step S2 carry out by Dynamic Host Configuration Protocol server.
Preferably, described alternative address pool is the initial address allocation space by the configuration file static defining.
Preferably, described load-balancing algorithm is polling algorithm, random algorithm or hashing algorithm.
(3) beneficial effect
The present invention has expanded the function of Dynamic Host Configuration Protocol server by adding address screening step, can be the address that client is distributed special format according to strategy, thereby satisfy the demand of client to the complex format address assignment.
Description of drawings
Fig. 1 shows and uses the DHCP agreement to carry out the mode of operation of address assignment in the prior art;
Fig. 2 shows and uses the DHCP agreement to carry out the mode of operation of address assignment among the present invention.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used to illustrate the present invention, but are not used for limiting the scope of the invention.
Under the IPv6 network environment, some is used has specific (special) requirements (forming form as special address) to the IPv6 address, the present invention promptly is at this situation, by Dynamic Host Configuration Protocol server dynamic call a kind of " strategy " when moving, the initial address pond is screened, therefrom select satisfactory effective address and distribute to client, satisfy the distribution requirements of client the special shape address.
At first the relational term of using among the present invention is described.
Alternative address pool: by the initial address allocation space of keeper by the configuration file static defining, address wherein is called " alternative address ".
The effective address pond: be made up of according to address or address block that dynamic strategy screens the address in the alternative address pool, these are called " effective address " according to address or the address block that dynamic strategy screens, and are the legal addresses that can distribute to client.
Dynamic strategy: by the method for keeper by the alternative address of screening of programmed algorithm definition, this programmed algorithm is by Dynamic Host Configuration Protocol server dynamic call when carrying out address assignment.Effective address obtains by calling this programmed algorithm of dynamic strategy.
Dynamic Host Configuration Protocol server: the DHCP/DHCPv6 server that refers to support IPv4 and IPv6 dynamic address allocation.
" address " described in the present invention is meant IPv4 and IPv6 address.
" address assignment " described in the present invention is meant IPv4 and IPv6 address assignment.
As shown in Figure 2, the present invention and traditional Dynamic Host Configuration Protocol server difference are to have increased " dynamic strategy " module.By this module of dynamic call, Dynamic Host Configuration Protocol server can be selected satisfactory effective address according to strategy from alternative address pool.Simultaneously, this module can also be put into the effective address of selecting the need of effective address pond in order to subsequent allocations.
Generally speaking, in order to make address assignment uniform balance more, traditional Dynamic Host Configuration Protocol server can adopt load-balancing algorithm (as poll, at random or the hash scheduling algorithm) choose the address, this method has essence different with the present invention: in traditional Dynamic Host Configuration Protocol server, all addresses in the alternative address pool all are effective addresses, and load-balancing algorithm is just in order to make address choice distribute more evenly; And in the present invention, the address in the alternative address pool not all is an effective address also, and the effect of dynamic strategy is from alternative address pool effective address to be screened.
In the present invention, dynamic strategy is not conflicted with load-balancing algorithm, and Dynamic Host Configuration Protocol server can call load-balancing algorithm equally and choose effective address equably distribute to client from the effective address pond.
Embodiment one:
Alternative address pool: 2001:2000: :/32
Dynamic strategy: require to return to that 32-39 position (high order end is 0, and low order end is 127) is that 1, the 48-127 position is 0 entirely entirely in the address of client, sequence of addresses is for from low to high.
Implementation:
When the client request address first time, Dynamic Host Configuration Protocol server calls dynamic strategy, selects effective address 2001:2000:FF01: from alternative address pool: return to client, simultaneously the effective address pond is put in this address, and be labeled as " distributing ";
When the client request address second time, Dynamic Host Configuration Protocol server calls dynamic strategy, selects effective address 2001:2000:FF02: from alternative address pool: return to client, simultaneously the effective address pond is put in this address, and be labeled as " distributing "; So analogize, up to alternative address pool is all screened one time.
If have client to discharge the address during this, then in the effective address pond, this address is reclaimed, be labeled as " unallocated ".When new client-requested address was arranged again, server checked in the effective address pond whether " unallocated " address is arranged, and carried out address assignment with reference to the distribution method of traditional Dynamic Host Configuration Protocol server.
Embodiment two:
Alternative address pool: 2001:2000: :/32
Dynamic strategy: client mac address is embedded into 48 of the rightmosts of return address, and other positions are 0 entirely.
Implementation:
When client 00:26:c6:3a:5b:36 request address, Dynamic Host Configuration Protocol server calls dynamic strategy, selects effective address 2001:2000::0026:c63a:5b36 and distribute to client from alternative address pool;
When client 44:2a:60:72:99:e7 request address, Dynamic Host Configuration Protocol server calls dynamic strategy, selects effective address 2001:2000::442a:6072:99e7 and distribute to client from alternative address pool; So analogize.
Embodiment three:
Alternative address pool: 2001:2000: :/32
Dynamic strategy: according to from low to high order the v4 address of the 10.0.0.0/24 network segment is embedded into 32-63 position from left to right, other positions are 0 entirely.The size that requires each distribution to return to a v4 address of client correspondence is/64 v6 address field.
Implementation:
When the client request address first time, Dynamic Host Configuration Protocol server calls dynamic strategy, selects 2001:2000:A0:1: from alternative address pool :/64 return to client, simultaneously the effective address pond are put in this address, are labeled as " distributing ";
When the client request address second time, Dynamic Host Configuration Protocol server calls dynamic strategy, selects 2001:2000:A0:2: from alternative address pool :/64 return to client, simultaneously the effective address pond are put in this address, are labeled as " distributing "; So analogize, until the whole screenings of the v6 address field of this network segment correspondence of 10.0.0.0/24 are finished.
If have client to discharge the address during this, then in the effective address pond, this address is reclaimed, be labeled as " unallocated "; The Address requests of subsequent client will be chosen from address, effective address pond " unallocated ".
Embodiment four:
Alternative address pool: 2001:2000: :/32
Dynamic strategy: require to return to client one block size at every turn and be/48 address field according to from low to high order.
Implementation:
When the client request address first time, Dynamic Host Configuration Protocol server calls dynamic strategy, selects 2001:2000:0001: from alternative address pool :/48 return to client, simultaneously the effective address pond are put in this address, are labeled as " distributing ";
When the client request address second time, Dynamic Host Configuration Protocol server calls dynamic strategy, selects 2001:2000:0002: from alternative address pool :/48 return to client, simultaneously the effective address pond are put in this address, are labeled as " distributing "; So analogize, until with 2001:2000: :/32 these alternative address pool all assign.
In above embodiment, alternative address pool has all been used the method for expressing of " address prefix/mask-length ", also can adopt other expression modes in concrete enforcement, as long as can express a sector address space.For example if adopt " low side address boundary, high-end address boundary " representation, the alternative address pool space among the then above embodiment can be expressed as " 2001:2000::, 2001:2000:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF ".
In above embodiment, choosing of effective address all do not comprise the low side address boundary.In reality is implemented, can define whether comprise low side or high-end address boundary.For example, in embodiment one and embodiment four, if comprise the low side address boundary, the address that then returns to for the first time client should be 2001:2000:FF00:: and 2001:2000:0000: :/48.
In specific implementation, Dynamic Host Configuration Protocol server needs for optimizing, and may adopt the step incomplete same with above embodiment:
For example, in embodiment one and embodiment three, Dynamic Host Configuration Protocol server can finish whole alternative address pool screening when distributing the address for the first time, the disposable effective address pond of putting into of all effective addresses that will meet dynamic strategy, all addresses of distributing to client are all directly chosen from the effective address pond later on.Again for example, in embodiment one and embodiment three, Dynamic Host Configuration Protocol server is for the first time and for the second time, and during the subsequent allocations address, not necessarily must distribute in order, also can be according to hash, the even load equalization methods distributes at random.Again for example, in embodiment two, be assigned to identical address, the effective address of having selected can be put into the effective address pond and carry out mark in order to prevent different clients with identical MAC Address.
In traditional Dynamic Host Configuration Protocol server, the effective address pond is by configuration file or configuration parameter static defining, and effective address had wherein all defined before the server operation; But in the present invention, what configuration file and configuration parameter defined only is alternative address pool space, and server must be carried out the dynamic strategy algorithm by calling in operation, just can filter out effective address.OPTION expansion in dynamic strategy among the present invention and the traditional Dynamic Host Configuration Protocol server also has essence different: in traditional Dynamic Host Configuration Protocol server, the keeper can distribute the address parameter of expanded sense by the OPTION option to client, but static defining is good in advance by configuration file or configuration parameter equally for these OPTION spreading parameters, and these parameters are exactly clear and definite before the server operation.And the dynamic strategy among the present invention by the programmed algorithm definition, must be carried out by server dynamic call when moving and just can determine final result.In fact, dynamic strategy and the OPTION in the traditional server among the present invention expand not contradiction, in the present invention still can be by static defining OPTION expansion, by after calling dynamic strategy and determining effective address, pass to client simultaneously at server with the OPTION spreading parameter that pre-defines.
The above only is embodiments of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the technology of the present invention principle; can also make some improvement and modification, these improve and modification also should be considered as protection scope of the present invention.

Claims (8)

1. an IP address assignment method is characterized in that, may further comprise the steps:
S1, select one or a sector address to put into the effective address pond as effective address from alternative address pool according to dynamic strategy, described dynamic strategy is the programmed algorithm that alternative address pool is screened that a section of calling of Dynamic Host Configuration Protocol server pre-establishes.
2. the method for claim 1 is characterized in that, also comprises step S2 after step S1: call load-balancing algorithm and choose effective address distribute to client from the effective address pond.
3. the method for claim 1 is characterized in that, among the step S1, when effective address is put into the effective address pond, calls load-balancing algorithm and chooses effective address distribute to client from the effective address pond.
4. as claim 2 or 3 described methods, it is characterized in that, when choosing effective address and distribute to client, selected effective address is labeled as distributes.
5. method as claimed in claim 4, it is characterized in that, discharged the address, then the address that is discharged is recovered in the effective address pond as client, and with the address mark that is reclaimed is unallocated, and the Address requests of subsequent client is then chosen from the unallocated address in effective address pond.
6. method as claimed in claim 2 is characterized in that, step S1 and step S2 carry out by Dynamic Host Configuration Protocol server.
7. the method for claim 1 is characterized in that, described alternative address pool is the initial address allocation space by the configuration file static defining.
8. as each described method in the claim 1~3,6,7, it is characterized in that described load-balancing algorithm is polling algorithm, random algorithm or hashing algorithm.
CN201110236705XA 2011-08-17 2011-08-17 IP (Internet Protocol) address allocation method Pending CN102291470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110236705XA CN102291470A (en) 2011-08-17 2011-08-17 IP (Internet Protocol) address allocation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110236705XA CN102291470A (en) 2011-08-17 2011-08-17 IP (Internet Protocol) address allocation method

Publications (1)

Publication Number Publication Date
CN102291470A true CN102291470A (en) 2011-12-21

Family

ID=45337570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110236705XA Pending CN102291470A (en) 2011-08-17 2011-08-17 IP (Internet Protocol) address allocation method

Country Status (1)

Country Link
CN (1) CN102291470A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103002067A (en) * 2012-12-24 2013-03-27 曙光云计算技术有限公司 Acquiring method of internet protocol (IP) addresses of virtual machine
CN103002068A (en) * 2012-12-24 2013-03-27 曙光云计算技术有限公司 Partition method of internet protocol (IP) addresses of virtual machine
CN103078965A (en) * 2012-12-25 2013-05-01 曙光云计算技术有限公司 IP (Internet Protocol) address management method of virtual machines
CN104184840A (en) * 2013-05-23 2014-12-03 中国电信股份有限公司 Dynamic address management method, device and system
CN104519150A (en) * 2014-12-31 2015-04-15 迈普通信技术股份有限公司 Network address translation port distribution method and system
CN106878478A (en) * 2016-12-13 2017-06-20 新华三技术有限公司 Address distribution method and device
CN107343058A (en) * 2017-07-06 2017-11-10 北京网瑞达科技有限公司 A kind of system and its method of work of IP address distribution

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992736A (en) * 2005-12-30 2007-07-04 西门子(中国)有限公司 IP address distribution method and use thereof
CN101150597A (en) * 2006-09-22 2008-03-26 华为技术有限公司 Method, system and device for allocating media access control address for access point
US20080092213A1 (en) * 2005-04-29 2008-04-17 Huawei Technologies Co., Ltd. Method, system and server for realizing secure assignment of dhcp address

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080092213A1 (en) * 2005-04-29 2008-04-17 Huawei Technologies Co., Ltd. Method, system and server for realizing secure assignment of dhcp address
CN1992736A (en) * 2005-12-30 2007-07-04 西门子(中国)有限公司 IP address distribution method and use thereof
CN101150597A (en) * 2006-09-22 2008-03-26 华为技术有限公司 Method, system and device for allocating media access control address for access point

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103002067A (en) * 2012-12-24 2013-03-27 曙光云计算技术有限公司 Acquiring method of internet protocol (IP) addresses of virtual machine
CN103002068A (en) * 2012-12-24 2013-03-27 曙光云计算技术有限公司 Partition method of internet protocol (IP) addresses of virtual machine
CN103002068B (en) * 2012-12-24 2017-05-17 曙光云计算技术有限公司 Partition method of internet protocol (IP) addresses of virtual machine
CN103078965A (en) * 2012-12-25 2013-05-01 曙光云计算技术有限公司 IP (Internet Protocol) address management method of virtual machines
CN103078965B (en) * 2012-12-25 2015-07-29 曙光云计算技术有限公司 The IP address management method of virtual machine
CN104184840A (en) * 2013-05-23 2014-12-03 中国电信股份有限公司 Dynamic address management method, device and system
CN104184840B (en) * 2013-05-23 2017-07-25 中国电信股份有限公司 Methods, devices and systems for dynamic management address
CN104519150A (en) * 2014-12-31 2015-04-15 迈普通信技术股份有限公司 Network address translation port distribution method and system
CN104519150B (en) * 2014-12-31 2018-03-02 迈普通信技术股份有限公司 Network address conversion port distribution method and system
CN106878478A (en) * 2016-12-13 2017-06-20 新华三技术有限公司 Address distribution method and device
CN107343058A (en) * 2017-07-06 2017-11-10 北京网瑞达科技有限公司 A kind of system and its method of work of IP address distribution

Similar Documents

Publication Publication Date Title
CN102291470A (en) IP (Internet Protocol) address allocation method
CN108924268B (en) Container cloud service system and pod creation method and device
CN100502413C (en) IP address requesting method for DHCP client by DHCP repeater
CN101335744B (en) Ciphered generation address configuring method, system and apparatus
CN102761499B (en) Gateway and method for preventing same from being attacked
US9438507B2 (en) Routing aggregation and prefix delegation
CN101729500B (en) Method, device and system for identifying IP session
WO2005013038A3 (en) Automatic configuration of an address allocation mechanism in a computer network
CN101827138B (en) Optimized method and device for processing IPV6 filter rule
CN104468568A (en) Virtual machine security isolation method
US7958220B2 (en) Apparatus, method and system for acquiring IPV6 address
CN111064793B (en) Method and system for maintaining and managing elastic public network IP address pool under public cloud platform
CN102377669A (en) Method for sending message and switch
CN102752413A (en) Method for selecting DHCP (dynamic host configuration protocol) server and network equipment
CN106878481B (en) Method, device and system for acquiring Internet Protocol (IP) address
CN1744597A (en) Method for host use obtaining IP address parameters in IPV6 network
CN111866212B (en) Method for automatically distributing IPV6PD prefix for down-hanging router by gateway
CN102340551B (en) A kind of method and system building IPv6 address pool
US20170222970A1 (en) Ipv6 address assignment method and apparatus
JP2004015795A (en) IPv4 MANAGEMENT METHOD AND MANAGEMENT DEVICE IN IPv6 WIRELESS LAN ENVIRONMENT
CN106878478B (en) Address allocation method and device
CN108712522B (en) IP address allocation method and device
KR100319976B1 (en) Dynamic multicast address allocation mechanism for Ipv6
KR100628331B1 (en) Method of dynamic acquisition of ipv4 address blocks using dhcpv6 in dstm server
CN112714133B (en) ND attack prevention method and device suitable for DHCPv6 server

Legal Events

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

Application publication date: 20111221