CN102404418B - Method, device and system for distributing IP (internet protocol) address for user terminal - Google Patents
Method, device and system for distributing IP (internet protocol) address for user terminal Download PDFInfo
- Publication number
- CN102404418B CN102404418B CN201110369801.1A CN201110369801A CN102404418B CN 102404418 B CN102404418 B CN 102404418B CN 201110369801 A CN201110369801 A CN 201110369801A CN 102404418 B CN102404418 B CN 102404418B
- Authority
- CN
- China
- Prior art keywords
- address
- dhcp
- message
- user terminal
- dynamic host
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a method, a device and a system for distributing IP (internet protocol) address for a user terminal, wherein the method comprises the steps of receiving a first DHCP (Dynamic host configuration protocol) message from the user terminal for requesting the IP address; generating a second DHCP message according to the first DHCP message; the second DHCP message carries the IP address of a first physical interface and the IP address of at least one access; sending the second DHCP message to a DHCP server according to a reachable router corresponding to the IP address of the access; the IP address that the DHCP server distributes for the user terminal is from an address pool corresponding to the IP address of the first physical interface; sending the IP address distributed by the DHCP server to the user terminal. In the invention, the generality for dynamically distributing the IP address for the user terminal based on the DHCP protocol can be improved.
Description
Technical field
The embodiment of the present invention relates to communication technical field, particularly relates to a kind of methods, devices and systems for user terminal distributing IP address.
Background technology
DHCP (Dynamic Host Configuration Protocol is called for short DHCP) is a kind of Dynamic Host Configuration Protocol based on transmission control protocol/Internet Protocol (being called for short TCP/IP).In actual applications, can be user terminal distributing IP address as dhcp client (Client) by Dynamic Host Configuration Protocol server (Server) usually, to avoid the IP address conflict between different user terminals, put forward the allocative efficiency of higher ip address.If user terminal and Dynamic Host Configuration Protocol server are positioned at the different physics network segment, usually need to be transmitted between above-mentioned user terminal and Dynamic Host Configuration Protocol server for asking or the DHCP message of distributing IP address by DHCP relay (Relay) equipment.
Existing is the method for user terminal distributing IP address based on DHCP relay equipment, normally DHCP relay equipment receives the DHCP message for applying for IP address of user terminal, the physical interface IP address of DHCP relay equipment is increased (also referred to as gateway interface IP address in this DHCP message, Gateway IP Address, be called for short GIADDR), and send to Dynamic Host Configuration Protocol server; This physical interface IP address is the IP address of the physical interface of DHCP relay equipment and described user terminal communication.Dynamic Host Configuration Protocol server is user terminal distributing IP address from address pool corresponding to this physical interface IP address, and the DHCP message returned using this physical interface IP address as destination address for distributing IP address, IP address is sent to relative users terminal by DHCP relay equipment.
But, in real network is disposed and is planned, in order to save routing list capacity, loopback interface (Loopback Interface) the IP route of DHCP relay equipment is only configured with in the routing table of Dynamic Host Configuration Protocol server, therefore, between Dynamic Host Configuration Protocol server and DHCP relay equipment, only have the route corresponding to the IP address of loopback interface to be (Reachable) that can reach, the route corresponding to the IP address of other interfaces between Dynamic Host Configuration Protocol server and DHCP relay equipment is inaccessible (Unreachable).In this case, DHCP message cannot be transmitted based on above-mentioned prior art between DHCP relay equipment and Dynamic Host Configuration Protocol server, thus DHCP agreement cannot be adopted to be user terminal distributing IP address.
Summary of the invention
The invention provides a kind of methods, devices and systems for user terminal distributing IP address, in order to improve based on DHCP agreement the versatility of the prior art being user terminal distributing IP address.
On the one hand, the invention provides a kind of method for user terminal distributing IP address, comprising:
Receive first DHCP message for IP address requesting of user terminal;
According to described first DHCP message, generate the second DHCP message; IP address and at least one path IP address of the first physical interface is carried in described second DHCP message, wherein, described DHCP relay equipment is connected with described user terminal by described first physical interface, and the route corresponding to described path IP address between described DHCP relay equipment and Dynamic Host Configuration Protocol server can reach;
According to the reached route corresponding with described path IP address, send described second DHCP message to described Dynamic Host Configuration Protocol server;
Receive the DHCP response message that described Dynamic Host Configuration Protocol server returns, it is the IP address that described user terminal distributes that described DHCP response message carries described Dynamic Host Configuration Protocol server; Wherein: the object IP address of described DHCP response message is described path IP address; Described Dynamic Host Configuration Protocol server is the IP address that described user terminal distributes, from the address pool corresponding with the IP address of described first physical interface;
Sending described Dynamic Host Configuration Protocol server to described user terminal is the IP address that described user terminal distributes.
On the other hand, present invention also offers the another kind of method for user terminal distributing IP address, comprising:
Receive the second DHCP message for IP address requesting that DHCP relay equipment sends; Described second DHCP message carries the IP address of the first physical interface of described DHCP relay equipment, and at least one path IP address;
According to the IP address of described first physical interface, be user terminal distributing IP address in the address pool of correspondence;
Generate DHCP response message, wherein, described DHCP response message carries the IP address for described user terminal distributes, and the object IP address of described DHCP response message is described path IP address;
Described DHCP response message is sent to described DHCP relay equipment.
On the other hand, present invention also offers a kind of DHCP relay equipment, comprising:
First Receive message module, for receiving first DHCP message for IP address requesting of user terminal;
Second message generation module, for according to described first DHCP message, generates the second DHCP message; IP address and at least one path IP address of the first physical interface is carried in described second DHCP message, wherein: described DHCP relay equipment is connected with described user terminal by described first physical interface, the route corresponding to described path IP address between described DHCP relay equipment and Dynamic Host Configuration Protocol server can reach;
Second message sending module, for according to the reached route corresponding with described path IP address, sends described second DHCP message to described Dynamic Host Configuration Protocol server;
Response message receiver module, for receiving the DHCP response message that described Dynamic Host Configuration Protocol server returns, it is the IP address that described user terminal distributes that described DHCP response message carries described Dynamic Host Configuration Protocol server; Wherein: the object IP address of described DHCP response message is described path IP address; Described Dynamic Host Configuration Protocol server is the IP address that described user terminal distributes, from the address pool corresponding with the IP address of described first physical interface;
IP address sending module is the IP address that described user terminal distributes for sending described Dynamic Host Configuration Protocol server to described user terminal.
On the other hand, present invention also offers a kind of Dynamic Host Configuration Protocol server, comprising:
Request message receiver module, for receiving the second DHCP message for IP address requesting that DHCP relay equipment sends; Described second DHCP message carries the IP address of the first physical interface of described DHCP relay equipment, and at least one path IP address;
IP address assignment module, for the IP address according to described first physical interface, is user terminal distributing IP address in the address pool of correspondence;
Response message generation module, for the IP address according to described first physical interface, is user terminal distributing IP address in the address pool of correspondence;
Response message sending module, for sending described DHCP response message to described DHCP relay equipment.
On the other hand, present invention also offers a kind of system for user terminal distributing IP address, comprising: above-mentioned DHCP relay equipment and above-mentioned Dynamic Host Configuration Protocol server.
Provided by the invention is in the methods, devices and systems of user terminal distributing IP address, path IP address is carried in DHCP message by DHCP relay equipment, and transmit message by reached at the route that path IP address is corresponding to this Dynamic Host Configuration Protocol server, solve DHCP relay equipment physical interface and Dynamic Host Configuration Protocol server route in prior art thus unreachable, DHCP agreement cannot be adopted to be the problem of user terminal distributing IP address, and improve based on DHCP agreement is the versatility of user terminal distributing IP address.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The method flow diagram for user terminal distributing IP address that Fig. 1 provides for the embodiment of the present invention one;
The method flow diagram for user terminal distributing IP address that Fig. 2 provides for the embodiment of the present invention two;
The method flow diagram for user terminal distributing IP address that Fig. 3 a provides for the embodiment of the present invention three;
The user terminal A that Fig. 3 b provides for the embodiment of the present invention and Dynamic Host Configuration Protocol server are positioned at the Sample Scenario of consolidated network plane;
The user terminal A that Fig. 3 c provides for the embodiment of the present invention and Dynamic Host Configuration Protocol server are positioned at the Sample Scenario of heterogeneous networks plane;
The structural representation of the DHCP relay equipment that Fig. 4 provides for the embodiment of the present invention three;
The structural representation of the Dynamic Host Configuration Protocol server that Fig. 5 provides for the embodiment of the present invention five;
The structural representation of the system for user terminal distributing IP address that Fig. 6 provides for the embodiment of the present invention six.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, be clearly and completely described the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not paying the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The sequence number of following examples of the present invention, just to describing, does not represent the quality of embodiment.
The method flow diagram for user terminal distributing IP address that Fig. 1 provides for the embodiment of the present invention one, comprising:
11:DHCP trunking receives first DHCP message for IP address requesting of user terminal.
In embodiments of the present invention, described user terminal is exactly dhcp client.In the optional implementation of one, access sub-network when the user terminal described in the embodiment of the present invention and when carrying out DHCP initialization, described first DHCP message can be broadcasted to the sub-network belonging to described user terminal self.DHCP relay equipment by the physical interface with this user terminal communication, can receive described first DHCP message.
12: according to described first DHCP message, generate the second DHCP message; IP address and at least one path IP address of the first physical interface is carried in described second DHCP message, wherein: described DHCP relay equipment is connected with described user terminal by described first physical interface, between described DHCP relay equipment and Dynamic Host Configuration Protocol server, the route of corresponding described path IP address can reach.
DHCP relay equipment generally includes multiple physical interface; Each physical interface has the IP address of its correspondence, and the IP address of different physical interface is not identical; The Dynamic Host Configuration Protocol server that different physical interface is corresponding can be the same or different.For ease of describing, by the physical interface of DHCP relay equipment and described user terminal communication, be called the first physical interface; Other physical interfaces of DHCP relay equipment, be then called the second physical interface; Hereafter repeat no more.
In an embodiment of the present invention, above-mentioned path IP address refers to: the IP address that DHCP relay equipment is corresponding with reaching route between Dynamic Host Configuration Protocol server; As adopted above-mentioned path IP address on DHCP relay equipment, Dynamic Host Configuration Protocol server can be led to by PING.Optionally, above-mentioned path IP address can first be configured in the attribute information of each physical interface of DHCP relay equipment.Described path IP address can be any one or more in following address: the IP address of DHCP relay facility loopback interface, the IP address of the first physical interface, and the IP address of the second physical interface; Wherein, loopback interface is the virtual logical interface being assigned IP address that DHCP relay equipment is arranged, and the route corresponding to the IP address of this loopback interface between DHCP relay equipment and Dynamic Host Configuration Protocol server can reach.
Optionally, DHCP relay equipment, after receiving described first DHCP message, adds IP address and at least one path IP address of the first physical interface in the first DHCP message, thus generates the second DHCP message.
13: according to the reached route corresponding with described path IP address, send described second DHCP message to Dynamic Host Configuration Protocol server.
In the network of reality, the Dynamic Host Configuration Protocol server that first physical interface is corresponding, and first route between physical interface not necessarily can reach, therefore, if the DHCP relay equipment conventionally direct route corresponding according to the IP address of the first physical interface sends DHCP message, Dynamic Host Configuration Protocol server cannot receive, thus cannot be user terminal distributing IP address.Be different from prior art, in an embodiment of the present invention, DHCP relay equipment sends DHCP message via reached at the route corresponding with described path IP address, therefore improves the probability that Dynamic Host Configuration Protocol server receives the message from DHCP relay equipment.
14: receive the DHCP response message that described Dynamic Host Configuration Protocol server returns, it is the IP address that described user terminal distributes that described DHCP response message carries described Dynamic Host Configuration Protocol server; Wherein: the object IP address of described DHCP response message is described path IP address; Described Dynamic Host Configuration Protocol server is the IP address that described user terminal distributes, from the address pool corresponding with the IP address of described first physical interface.
15: sending described Dynamic Host Configuration Protocol server to described user terminal is the IP address that described user terminal distributes.
DHCP relay equipment, after receiving the DHCP response message that Dynamic Host Configuration Protocol server returns, optionally, can adopt the mode of broadcast, send described IP address to this user terminal.
What the present embodiment provided is in the method for user terminal distributing IP address, path IP address is carried in DHCP message by DHCP relay equipment, and transmit message by reached at the route that path IP address is corresponding with this Dynamic Host Configuration Protocol server, solve DHCP relay equipment physical interface and Dynamic Host Configuration Protocol server route in prior art thus unreachable, DHCP agreement cannot be adopted to be the problem of user terminal distributing IP address, and improve based on DHCP agreement is the versatility of user terminal distributing IP address.
The method flow diagram for user terminal distributing IP address that Fig. 2 provides for the embodiment of the present invention two, comprising:
21: receive the second DHCP message for IP address requesting that DHCP relay equipment sends; Described second DHCP message carries the IP address of the first physical interface of described DHCP relay equipment, and at least one path IP address.
22: according to the IP address of described first physical interface, be described user terminal distributing IP address in the address pool of correspondence.
The address pool that Dynamic Host Configuration Protocol server is corresponding according to the IP address of the first physical interface is user terminal distributing IP address, is conducive to the IP address ensured as user terminal distributes, belongs to the same network segment with the IP address of the first physical interface.
23: generate DHCP response message, wherein, described DHCP response message carries the IP address into user terminal distributes, and the object IP address of described DHCP response message is described path IP address.
24: send described DHCP response message to described DHCP relay equipment.
Optionally, Dynamic Host Configuration Protocol server can adopt the mode of broadcast, sends DHCP response message to DHCP relay equipment.
What the present embodiment provided is in the method for user terminal distributing IP address, Dynamic Host Configuration Protocol server receives the second DHCP message that DHCP relay equipment sends, according to the IP address of the first physical interface, for this user terminal distributing IP address, and according to path IP address, return DHCP response message, solve DHCP relay equipment physical interface and Dynamic Host Configuration Protocol server route in prior art thus unreachable, DHCP agreement cannot be adopted to be the problem of user terminal distributing IP address, and improve based on DHCP agreement is the versatility of user terminal distributing IP address.
The method flow diagram for user terminal distributing IP address that Fig. 3 a provides for the embodiment of the present invention three, comprising:
31: as in subnet belonging to self of the user terminal A of dhcp client, broadcast is used for the first DHCP message of IP address requesting.
32: the DHCP relay equipment covering user terminal A receives the first DHCP request message, and determine between the Dynamic Host Configuration Protocol server that DHCP relay equipment is corresponding with the first physical interface, whether the route corresponding to the IP address of the first physical interface can reach; If route can reach, perform 33, otherwise, perform 34.
Above-mentioned first physical interface of DHCP relay equipment is the physical interface that this DHCP relay equipment communicates with user terminal A.
DHCP relay equipment can, according to the information obtained in advance, be determined between DHCP relay equipment and Dynamic Host Configuration Protocol server, and whether the route based on the IP address of the first physical interface can reach.This information obtained in advance can include but not limited to: the state information etc. whether webmaster breaks down according to the route of pre-configured relevant information, the first physical interface formerly recorded and the corresponding Dynamic Host Configuration Protocol server of network organizing situation.
33:DHCP trunking adds the IP address of the first physical interface, to generate the second DHCP message in " GIADDR " field of the first DHCP message; And send the second DHCP message to Dynamic Host Configuration Protocol server, be user terminal A distributing IP address for asking Dynamic Host Configuration Protocol server; Perform 35.
Route when the IP address corresponding to the first physical interface can reach, and the path IP address in the embodiment of the present invention can be the IP address of described first physical interface.
34:DHCP trunking adds the IP address of the first physical interface in " GIADDR " field of the first DHCP message and adds described path IP address, to obtain the second DHCP message in " OPTION 125 " field of the first DHCP message; According to the reached route corresponding with path IP address, send the second DHCP message to Dynamic Host Configuration Protocol server; Perform 35.
Between the Dynamic Host Configuration Protocol server that DHCP relay equipment is corresponding with the first physical interface, based on the first physical interface IP address between the inaccessible scene of route, following situation can be included but not limited to:
Scene one: user terminal A and Dynamic Host Configuration Protocol server are positioned at consolidated network plane, as shown in Figure 3 b, in network between Dynamic Host Configuration Protocol server and DHCP relay equipment, route corresponding to the IP address of the physical interface of DHCP relay equipment is unreachable, but, corresponding to loopback interface IP address between route can reach;
Scene two: user terminal A and Dynamic Host Configuration Protocol server are positioned at consolidated network plane, as shown in Figure 3 b, in network between Dynamic Host Configuration Protocol server and DHCP relay equipment, route corresponding to the IP address of the second physical interface of DHCP relay equipment can reach, but the route corresponding to the IP address of the first physical interface of DHCP relay equipment is unreachable;
Scene three: user terminal A and Dynamic Host Configuration Protocol server are positioned at heterogeneous networks plane, as shown in Figure 3 c, user terminal A be positioned at public network and Dynamic Host Configuration Protocol server be positioned at private network (also referred to as, Virtual Private Network, be called for short VPN), due to the restrict access of VPN under this scene, between DHCP relay equipment and Dynamic Host Configuration Protocol server, route corresponding to the IP address of the physical interface of DHCP is unreachable, but the two route based on the IP address of loopback interface can reach; In Fig. 3 c, " C " represents user terminal A, and " R " represents the physical interface of DHCP relay equipment, and " L " represents the loopback interface of DHCP relay equipment.
DHCP relay equipment can in the attribute configuration information of the first physical interface pre-configured path IP address, a kind of optional configuration mode adopts following order line: " IP Relayip-address<ip-address> [vpn-instance<vpn-instance>] ".In this order line, " ip-address " represents path IP address option, and the number of addresses that this option comprises can be one or more; " vpn-instance " is option, represents the VPN instance information at its place when Dynamic Host Configuration Protocol server is in VPN.
Specifically correspond in above-mentioned scene: under scene one situation, the information of this order line " ip-address " option, can be the loopback interface IP address of DHCP relay equipment; Under scene two situation, the information of this order line " ip-address " option, can be the IP address of the second physical interface of DHCP relay equipment; Under scene two situation, if there is the route path based on other types IP address between Dynamic Host Configuration Protocol server and DHCP relay equipment, then the information of this order line " ip-address " option also can comprise IP address corresponding to these route paths, as the IP address etc. of the loopback interface of DHCP relay equipment; Under scene three situation, the information of this order line " ip-address " option can be the IP address of the loopback interface of DHCP relay equipment.For above-mentioned scene one and scene two, DHCP relay equipment is reached at the route according to public network, sends the second DHCP message to Dynamic Host Configuration Protocol server; And for above-mentioned scene three, DHCP relay equipment need capable according to mentioned order in the information of " vpn-instance " option, determine that private network can reach route, and route can be reached according to private network and send the second DHCP message to Dynamic Host Configuration Protocol server.
It should be noted that, no matter which kind of scene, if between DHCP relay equipment and Dynamic Host Configuration Protocol server route, route based on the IP address of the first physical interface is unreachable, but when the route based on other IP addresses can reach, the path IP address that IP address corresponding to route all can be used as DHCP relay equipment can be reached.
35:DHCP server receives the second DHCP message, the IP address of the first physical interface that " GIADDR " field obtaining the second DHCP message is carried, and according to the IP address of the first physical interface, is this user terminal distributing IP address in appropriate address pond.
36:DHCP server determines whether " OPTION 125 " field of the second DHCP message carries path IP address, if had, then performs 37, otherwise, perform 38.
37:DHCP server generates DHCP response message, and broadcasts this DHCP response message to downstream network device; This DHCP response message for the purpose of the path IP address that " OPTION 125 " field of the second DHCP message is carried address and include Dynamic Host Configuration Protocol server be this user terminal distribute IP address; Perform 39.
If " OPTION 125 " field carries multiple path IP address, the reliability of response message is then received in order to improve DHCP relay equipment, Dynamic Host Configuration Protocol server can generate the multiple DHCP response messages identical with path IP number of addresses, and each DHCP response message is using one of them path IP address as destination address.
38:DHCP server generates DHCP response message, and broadcasts this DHCP response message to downstream network device; Address for the purpose of the IP address of the first physical interface that this DHCP response message carries by " GIADDR " field of the second DHCP message and include Dynamic Host Configuration Protocol server be this user terminal distribute IP address; Perform 39.
39:DHCP trunking receives the DHCP response message that Dynamic Host Configuration Protocol server sends, and broadcasts this DHCP response message in the subnet scoping that the first physical interface is corresponding.
310: this user terminal receives DHCP response message, obtaining the Dynamic Host Configuration Protocol server carried in this DHCP response message is the IP address that it distributes.
The present embodiment is on the basis realizing Fig. 1 and Fig. 2 corresponding embodiment similar technique effect, make use of the privately owned field of existing DHCP message, as " OPTION 125 " field, carry common IP address, therefore the change of method to existing network communication process that provide of the present embodiment is less, has the advantages such as cost is low, easy realization.It should be noted that, can be out of shape the present embodiment technical scheme, as adopted other fields outside " OPTION 125 " field to carry common IP address, its method being embodied as user terminal distributing IP address is similar to the present embodiment, does not repeat them here.
The structural representation of the DHCP relay equipment that Fig. 4 provides for the embodiment of the present invention three.DHCP relay equipment as shown in Figure 4 comprises: the first Receive message module 41, second message generation module 42, second message sending module 43, response message receiver module 44 and IP address sending module 45.
First Receive message module 41 can be used for the first DHCP message for IP address requesting receiving user terminal.
Second message generation module 42 can be used for, according to described first DHCP message, generating the second DHCP message; IP address and at least one path IP address of the first physical interface is carried in described second DHCP message, wherein: described DHCP relay equipment is connected with described user terminal by described first physical interface, the route corresponding to described path IP address between described DHCP relay equipment and Dynamic Host Configuration Protocol server can reach.
Second message sending module 43 can be used for, according to the reached route corresponding with described path IP address, sending described second DHCP message to described Dynamic Host Configuration Protocol server.
Response message receiver module 44 can be used for receiving the DHCP response message that described Dynamic Host Configuration Protocol server returns, and it is the IP address that described user terminal distributes that described DHCP response message carries described Dynamic Host Configuration Protocol server; Wherein: the object IP address of described DHCP response message is described path IP address; Described Dynamic Host Configuration Protocol server is the IP address that described user terminal distributes, from the address pool corresponding with the IP address of described first physical interface.
It is the IP address that described user terminal distributes that IP address sending module 45 can be used for sending described Dynamic Host Configuration Protocol server to described user terminal.
Optionally, described second request message generation module 42, specifically be used in the IP address of adding described first physical interface in " GIADDR " field of described first DHCP message and add path IP address described at least one in " OPTION 125 " field of described first DHCP message, generating described second DHCP message.Described path IP address can be any one or more in following address:: the IP address of the loopback interface of described DHCP relay equipment; The IP address of the first physical interface, and the IP address of the second physical interface of described DHCP relay equipment, described second physical interface is described DHCP relay equipment other physical interfaces except described first physical interface.
The DHCP relay equipment that the present embodiment provides, path IP address is carried in DHCP message, and transmit message by reached at the route that path IP address is corresponding with this Dynamic Host Configuration Protocol server, solve DHCP relay equipment physical interface and Dynamic Host Configuration Protocol server route in prior art thus unreachable, DHCP agreement cannot be adopted to be the problem of user terminal distributing IP address, and improve based on DHCP agreement is the versatility of user terminal distributing IP address.The working mechanism of the DHCP relay equipment that the present embodiment provides, see the corresponding record of Fig. 1 and Fig. 3 a, can not repeat them here.
The structural representation of the Dynamic Host Configuration Protocol server that Fig. 5 provides for the embodiment of the present invention five.Dynamic Host Configuration Protocol server comprises as shown in Figure 5: request message receiver module 51, IP address assignment module 52, response message generation module 53 and response message sending module 54.
Request message receiver module 51 can be used for the second DHCP message for IP address requesting receiving the transmission of DHCP relay equipment; Described second DHCP message carries the IP address of the first physical interface of described DHCP relay equipment, and at least one path IP address.
IP address assignment module 52 can be used for the IP address according to described first physical interface, is user terminal distributing IP address in the address pool of correspondence.
Response message generation module 53 can be used for the IP address according to described first physical interface, is user terminal distributing IP address in the address pool of correspondence;
Response message sending module 54 can be used for sending described DHCP response message to described DHCP relay equipment.
Optionally, after request message receiver module 51 is also used in and receives described second DHCP message, in " GIADDR " field of described second DHCP message, obtain the IP address of described first physical interface; In " OPTION 125 " field of described second DHCP message, obtain path IP address described at least one.
The Dynamic Host Configuration Protocol server that the present embodiment provides receives the second DHCP message that DHCP relay equipment sends, according to the IP address of the first physical interface in the second DHCP message, for this user terminal distributing IP address, and according to the path IP address in the second DHCP message, return DHCP response message, solve DHCP relay equipment physical interface and Dynamic Host Configuration Protocol server route in prior art thus unreachable, DHCP agreement cannot be adopted to be the problem of user terminal distributing IP address, and improve based on DHCP agreement is the versatility of user terminal distributing IP address.The working mechanism of the Dynamic Host Configuration Protocol server that the present embodiment provides, see the corresponding record of Fig. 1 and Fig. 3 a, can not repeat them here.
The structural representation of the system for user terminal distributing IP address that Fig. 6 provides for the embodiment of the present invention six.System as shown in Figure 6 comprises: DHCP relay equipment 61 and Dynamic Host Configuration Protocol server 62, DHCP relay equipment 61 communicates with Dynamic Host Configuration Protocol server 62.User terminal 63 communicates with DHCP relay equipment 61.Optionally, according to the needs of actual networking, multi-hop relay can be there is between DHCP relay equipment and Dynamic Host Configuration Protocol server.Wherein: the structure of DHCP relay equipment and accessible technique effect thereof, can see the record of the corresponding embodiment of Fig. 4, the structure of Dynamic Host Configuration Protocol server and accessible technique effect thereof, see the record of the corresponding embodiment of Fig. 5, can not repeat them here.
One of ordinary skill in the art will appreciate that: accompanying drawing is the schematic diagram of an embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
One of ordinary skill in the art will appreciate that: the module in the device in embodiment can describe according to embodiment and be distributed in the device of embodiment, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that program command is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (7)
1. be a method for user terminal assignment of the Internet protocol IP address, it is characterized in that, comprising:
Dynamic host configuration protocol DHCP trunking receives first DHCP message for IP address requesting of user terminal;
According to described first DHCP message, generate the second DHCP message; IP address and at least one path IP address of the first physical interface is carried in described second DHCP message, wherein, described DHCP relay equipment is connected with described user terminal by described first physical interface, and the route corresponding to described path IP address between described DHCP relay equipment and Dynamic Host Configuration Protocol server can reach;
According to the reached route corresponding with described path IP address, send described second DHCP message to described Dynamic Host Configuration Protocol server;
Receive the DHCP response message that described Dynamic Host Configuration Protocol server returns, it is the IP address that described user terminal distributes that described DHCP response message carries described Dynamic Host Configuration Protocol server; Wherein: the object IP address of described DHCP response message is described path IP address; Described Dynamic Host Configuration Protocol server is the IP address that described user terminal distributes, from the address pool corresponding with the IP address of described first physical interface;
Sending described Dynamic Host Configuration Protocol server to described user terminal is the IP address that described user terminal distributes;
Wherein, described second DHCP message of described generation comprises:
By adding the IP address of described first physical interface and add path IP address described at least one in the gateway ip address giaddr field of described first DHCP message in option OPTION 125 field of described first DHCP message, generate described second DHCP message.
2. method according to claim 1, it is characterized in that, described path IP address is any one or more in following address: the IP address of the loopback interface of described DHCP relay equipment, the IP address of the first physical interface, and the IP address of the second physical interface.
3. be a method for user terminal assignment of the Internet protocol IP address, it is characterized in that, comprising:
Dynamic host configuration protocol DHCP server receives the second DHCP message for IP address requesting that DHCP relay equipment sends; Described second DHCP message carries the IP address of the first physical interface of described DHCP relay equipment, and at least one path IP address;
According to the IP address of described first physical interface, be user terminal distributing IP address in the address pool of correspondence;
Generate DHCP response message, wherein, described DHCP response message carries the IP address for described user terminal distributes, and the object IP address of described DHCP response message is described path IP address;
Described DHCP response message is sent to described DHCP relay equipment;
Wherein, after receiving described second DHCP message, also comprise:
In the gateway ip address giaddr field of described second DHCP message, obtain the IP address of described first physical interface; In option OPTION 125 field of described second DHCP message, obtain path IP address described at least one.
4. method according to claim 3, it is characterized in that, described path IP address is any one or more in following address: the IP address of the loopback interface of described DHCP relay equipment, the IP address of the first physical interface, and the IP address of the second physical interface.
5. a dynamic host configuration protocol DHCP trunking, is characterized in that, comprising:
First Receive message module, for receiving first DHCP message for asking Internet protocol IP address of user terminal;
Second message generation module, for according to described first DHCP message, generates the second DHCP message; IP address and at least one path IP address of the first physical interface is carried in described second DHCP message, wherein, described DHCP relay equipment is connected with described user terminal by described first physical interface, and the route corresponding to described path IP address between described DHCP relay equipment and Dynamic Host Configuration Protocol server can reach;
Second message sending module, for according to the reached route corresponding with described path IP address, sends described second DHCP message to described Dynamic Host Configuration Protocol server;
Response message receiver module, for receiving the DHCP response message that described Dynamic Host Configuration Protocol server returns, it is the IP address that described user terminal distributes that described DHCP response message carries described Dynamic Host Configuration Protocol server; Wherein: the object IP address of described DHCP response message is described path IP address; Described Dynamic Host Configuration Protocol server is the IP address that described user terminal distributes, from the address pool corresponding with the IP address of described first physical interface;
IP address sending module is the IP address that described user terminal distributes for sending described Dynamic Host Configuration Protocol server to described user terminal; Wherein,
Described second message generation module, specifically for adding the IP address of described first physical interface and add path IP address described at least one in the gateway ip address giaddr field of described first DHCP message in option OPTION 125 field of described first DHCP message, generate described second DHCP message.
6. a dynamic host configuration protocol DHCP server, is characterized in that, comprising:
Request message receiver module, for receiving the second DHCP message for asking Internet protocol IP address that DHCP relay equipment sends; Described second DHCP message carries the IP address of the first physical interface of described DHCP relay equipment, and at least one path IP address;
IP address assignment module, for the IP address according to described first physical interface, is user terminal distributing IP address in the address pool of correspondence;
Response message generation module, for the IP address according to described first physical interface, is user terminal distributing IP address in the address pool of correspondence;
Response message sending module, for sending described DHCP response message to described DHCP relay equipment;
Wherein, described request message receiver module, also for after receiving described second DHCP message, in the gateway ip address giaddr field of described second DHCP message, obtains the IP address of described first physical interface; In option OPTION 125 field of described second DHCP message, obtain path IP address described at least one.
7. be a system for user terminal assignment of the Internet protocol IP address, it is characterized in that, comprising:
Dynamic host configuration DHCP trunking as claimed in claim 5; And
Dynamic Host Configuration Protocol server as claimed in claim 6.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110369801.1A CN102404418B (en) | 2011-11-18 | 2011-11-18 | Method, device and system for distributing IP (internet protocol) address for user terminal |
PCT/CN2012/078280 WO2013071765A1 (en) | 2011-11-18 | 2012-07-06 | Method, device and system for distributing ip address for user terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110369801.1A CN102404418B (en) | 2011-11-18 | 2011-11-18 | Method, device and system for distributing IP (internet protocol) address for user terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102404418A CN102404418A (en) | 2012-04-04 |
CN102404418B true CN102404418B (en) | 2015-01-28 |
Family
ID=45886196
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110369801.1A Expired - Fee Related CN102404418B (en) | 2011-11-18 | 2011-11-18 | Method, device and system for distributing IP (internet protocol) address for user terminal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102404418B (en) |
WO (1) | WO2013071765A1 (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102404418B (en) * | 2011-11-18 | 2015-01-28 | 北京华为数字技术有限公司 | Method, device and system for distributing IP (internet protocol) address for user terminal |
EP2888863B1 (en) * | 2012-08-24 | 2018-10-10 | Thomson Licensing | Method and apparatus for configuring dhcp client |
CN103888551B (en) | 2012-12-19 | 2017-09-12 | 华为技术有限公司 | Internet Protocol address acquisition methods, trunking and system in a kind of network |
CN104158916A (en) * | 2013-05-13 | 2014-11-19 | 中兴通讯股份有限公司 | Method and device for device accessing to network |
CN105338125B (en) | 2014-06-25 | 2019-11-05 | 华为技术有限公司 | Message processing method and device |
CN107547665B (en) * | 2016-06-23 | 2021-02-09 | 华为技术有限公司 | Method, equipment and system for allocating DHCP (dynamic host configuration protocol) address |
CN106656659B (en) * | 2016-11-30 | 2020-12-29 | 浙江宇视科技有限公司 | Network path selection method and network video recorder |
CN108600408A (en) * | 2018-03-30 | 2018-09-28 | 新华三技术有限公司 | The method and device of request address |
CN111049763B (en) * | 2019-11-08 | 2022-02-22 | 苏州浪潮智能科技有限公司 | Configuration method and device for forwarding table of data center switch |
CN112911026A (en) * | 2019-12-03 | 2021-06-04 | 北京华为数字技术有限公司 | Address application method, device and equipment |
CN113472621B (en) * | 2020-03-30 | 2023-05-30 | 北京沃东天骏信息技术有限公司 | Network data forwarding method, device and system |
CN113438335B (en) * | 2021-06-10 | 2022-09-06 | 深圳市广和通无线股份有限公司 | Routing method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1949784A (en) * | 2005-10-12 | 2007-04-18 | 华为技术有限公司 | IP address requesting method for DHCP client by DHCP repeater |
CN1960380A (en) * | 2005-11-03 | 2007-05-09 | 华为技术有限公司 | Method for obtaining service IP address |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102404418B (en) * | 2011-11-18 | 2015-01-28 | 北京华为数字技术有限公司 | Method, device and system for distributing IP (internet protocol) address for user terminal |
-
2011
- 2011-11-18 CN CN201110369801.1A patent/CN102404418B/en not_active Expired - Fee Related
-
2012
- 2012-07-06 WO PCT/CN2012/078280 patent/WO2013071765A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1949784A (en) * | 2005-10-12 | 2007-04-18 | 华为技术有限公司 | IP address requesting method for DHCP client by DHCP repeater |
CN1960380A (en) * | 2005-11-03 | 2007-05-09 | 华为技术有限公司 | Method for obtaining service IP address |
Also Published As
Publication number | Publication date |
---|---|
WO2013071765A1 (en) | 2013-05-23 |
CN102404418A (en) | 2012-04-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102404418B (en) | Method, device and system for distributing IP (internet protocol) address for user terminal | |
US11863625B2 (en) | Routing messages between cloud service providers | |
CN102845123B (en) | Virtual private cloud connection method and tunnel proxy server | |
CN102447748B (en) | Method, equipment and system for allocating outer Internet protocol IP addresses during network address translation (NAT) | |
EP2451125B1 (en) | Method and system for realizing network topology discovery | |
CN104618243A (en) | Routing method, device and system, and gateway scheduling method and device | |
CN102882781B (en) | Method, route bridge and system for transmitting message | |
CN104333610A (en) | IPv6 address allocation method and device | |
CN103347179A (en) | Device and method for achieving monitor front-end equipment networking | |
CN102143242B (en) | IP (internet protocol) network address allocation method, IP network address allocation equipment and IP network address allocation system | |
CN103039059B (en) | IP address allocation method, system and device | |
CN104734930B (en) | Method and device for realizing access of Virtual Local Area Network (VLAN) to Variable Frequency (VF) network and Fiber Channel Frequency (FCF) | |
US9503418B2 (en) | Method and apparatus for obtaining remote IP address | |
CN104104749A (en) | Method and device for allocating tunnel IP addresses | |
CN112583947B (en) | DHCP processing method, device, equipment and machine readable storage medium | |
EP3503484B1 (en) | Message transmission methods and devices | |
CN113709133A (en) | IPVC6 communication system based on data center | |
CN103414800B (en) | A kind of NAT passes through the distribution of middle distributed relay server and system of selection and system | |
CN112689029A (en) | Method, device and equipment for acquiring IP address of group user | |
CN103701626A (en) | Method and equipment for acquiring bandwidth information | |
CN107172229B (en) | Router configuration method and device | |
CN101309154A (en) | Datagram sending method, sending apparatus and transmission system | |
CN110913029A (en) | IPv6 address configuration method in operator | |
CN103701943A (en) | Method and device for controlling MAC (Media Access Control) address | |
CN117376315A (en) | User address allocation method and device, computer storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C53 | Correction of patent of invention or patent application | ||
CB02 | Change of applicant information |
Address after: 100085 Beijing, Haidian District on the road, No. 3 Applicant after: Beijing Huawei Digital Technology Co.,Ltd. Address before: 100085 Beijing, Haidian District on the road, No. 3 Applicant before: Huawei Digit Technology Co., Ltd. |
|
COR | Change of bibliographic data |
Free format text: CORRECT: APPLICANT; FROM: HUAWEI DIGIT TECHNOLOGY CO., LTD. TO: BEIJING HUAWEI DIGITAL TECHNOLOGY CO., LTD. |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20150128 Termination date: 20191118 |
|
CF01 | Termination of patent right due to non-payment of annual fee |