Movatterモバイル変換


[0]ホーム

URL:


CN103401954B - The implementation method of virtual DHCP - Google Patents

The implementation method of virtual DHCP
Download PDF

Info

Publication number
CN103401954B
CN103401954BCN201310334143.1ACN201310334143ACN103401954BCN 103401954 BCN103401954 BCN 103401954BCN 201310334143 ACN201310334143 ACN 201310334143ACN 103401954 BCN103401954 BCN 103401954B
Authority
CN
China
Prior art keywords
address
dhcp
virtual
request message
virtual machine
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
Application number
CN201310334143.1A
Other languages
Chinese (zh)
Other versions
CN103401954A (en
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.)
Opzoon Technology Co Ltd
Original Assignee
Opzoon Technology 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 Opzoon Technology Co LtdfiledCriticalOpzoon Technology Co Ltd
Priority to CN201310334143.1ApriorityCriticalpatent/CN103401954B/en
Publication of CN103401954ApublicationCriticalpatent/CN103401954A/en
Application grantedgrantedCritical
Publication of CN103401954BpublicationCriticalpatent/CN103401954B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The invention discloses the implementation method of a kind of virtual DHCP, including: after the control node in virtual network receives virtual DHCP foundation request message, set up virtual DHCP configuration information, and set up two tuples list of MAC Address and IP address;Controlling node and two tuples list and virtual DHCP configuration information are sent at least one agent node, agent node sets up DHCP service;Virtual machine sends MAC Address allocation request message to controlling node, controls node and selects untapped two tuples from two tuples list, and MAC Address therein is distributed to virtual machine;Virtual machine sends IP address assignment request message, after agent node receives this message, finds out the IP address corresponding with the MAC Address of virtual machine and distribute to virtual machine from two tuples list.The method can realize virtual DHCP in virtual network, and distributes MAC Address and IP address for virtual machine.

Description

The implementation method of virtual DHCP
Technical field
The present invention relates to virtual networking field, particularly to the implementation method of a kind of virtual DHCP.
Background technology
Virtual network be a kind of comprising be at least partly the computer network of virtual network link.Virtual network link beTwo are calculated equipment room and are not comprised physical connection, but realized by network virtualization, and the connection between i.e. two nodes is alsoNeed not the physical link of point-to-point needed for legacy network is built, but the logical links that framework is on the network platform.BaseVirtual network in virtual unit usually contains large number of virtual machine.Virtual machine (Virtual Machine, VM) refers to pass throughSoftware simulation there is complete hardware system function, the complete computer that operates in a completely isolated environment.LogicalCrossing software virtual machine, just can simulate one or more virtual computer on a physical host, these virtual machines are completeEntirely it is operated just as real computer, such as, operating system, set up applications, access Internet resources can be installedEtc..The same with physical host, virtual machine communicates in virtual network and needs also exist for a unique IP address.Virtual machineIP address can be defined by user oneself, it is also possible to by DHCP come to virtual machine distribute.
For the network of multiple node dynamic access, the side that use DHCP carry out IP address distribution is usually takenFormula.DHCP(Dynamic Host Configuration Protocol, DynamicHost arranges agreement) it is that one makes network managementMember can manage the communication protocol with automatic IP address allocation concentratedly.In an ip network, the equipment of each connection InternetNeed to distribute unique IP address.DHCP enables network manager from central node monitoring and distribution IP address.When certain meterWhen calculation machine moves on to other position in network, can automatically receive new IP address.
Along with developing rapidly of cloud computing technology, virtual networking is also developing rapidly and increasingly mature.For virtualIn network, virtual machine is large number of, the feature of node dynamic access, network virtualization, the mode of traditional DHCP distribution IP addressCannot adapt to the demand of virtual network, therefore, it is necessary to work out the IP address distribution side being more suitable for for virtual networkFormula.
Summary of the invention
(1) technical problem to be solved
It is an object of the invention to provide the implementation method of a kind of virtual DHCP such that it is able to utilize in virtual networkDHCP service is that virtual machine distributes IP address.
(2) technical scheme
In order to solve above-mentioned technical problem, the present invention proposes the implementation method of a kind of virtual DHCP, and described method includes:
After control node in S1, virtual network receives virtual DHCP foundation request message, set up virtual DHCP configurationInformation, and set up two tuples list of MAC Address and IP address, described two tuples list be used for preserving available MAC Address with canOne-to-one relationship with IP address;
Described two tuples list and described virtual DHCP configuration information are sent to described virtual by S2, described control nodeAt least one agent node in network, described agent node sets up DHCP service according to described virtual DHCP configuration information;
S3, when a certain virtual machine add described virtual network time, described virtual machine to described control node send MAC AddressAllocation request message, described control node selects untapped two tuples from described two tuples list, and by thereinMAC Address distributes to described virtual machine;
S4, described virtual machine pass through broadcast transmission IP address assignment request message, and described agent node receives described IPAfter address assignment request message, from described two tuples list, find out the IP ground corresponding with the MAC Address of described virtual machineLocation also assigns them to described virtual machine.
Optionally, described virtual DHCP sets up and asks message to include IP available address.
Optionally, step S1 specifically includes:
Described control node sets up the IP available address in request message according to described virtual DHCP, for each IP availableThe available MAC Address that address creation one is corresponding, and it is saved in described two tuples list.
Optionally, described virtual DHCP sets up and asks message to include gateway ip address and dns address.
Optionally, step S1 specifically includes:
Described control node sets up the gateway ip address in request message and dns address according to described virtual DHCP, sets upDescribed virtual DHCP configuration information.
Optionally, in step S4, described virtual machine is specifically included by broadcast transmission IP address assignment request message:
Described virtual machine sends described IP address assignment request by the way of sending DHCP DISCOVER broadcast packet and disappearsBreath.
Optionally, farther include after step S4:
S5, when described control nodal test to described agent node communicating interrupt, by described two tuples list and instituteStating other agent nodes that virtual DHCP configuration information is sent in described virtual network, other agent nodes are according to described virtualDHCP configuration information sets up DHCP service.
Optionally, step S5 farther includes:
Described control node and described agent node carry out a heart-beat test every Fixed Time Interval, if described controlNode does not receives the heartbeat packet that described agent node sends after exceeding prefixed time interval, then be judged to that described agent node leads toNews are interrupted.
Optionally, described Fixed Time Interval is 15 seconds.
Optionally, step S1 farther includes:
Described control node sets up data base, and described two tuples list and described virtual DHCP configuration information is preservedTo described data base.
(3) beneficial effect
The technical scheme that the present invention proposes can be based on controlling node and the collaborative work of agent node in virtual networkRealize virtual DHCP, and be that each virtual machine distributes unique MAC Address and IP address by DHCP service.Use virtualDHCP distributes IP address can be greatly improved work efficiency, saves the cost that management is safeguarded.
Accompanying drawing explanation
Fig. 1 is the flowchart of one embodiment of the invention.
Fig. 2 is the schematic diagram setting up DHCP service A in the embodiment of the present invention 1.
Fig. 3 is the schematic diagram of newly-built agent node in the embodiment of the present invention 1.
Fig. 4 is the schematic diagram setting up multiple virtual DHCP in one embodiment of the invention.
Detailed description of the invention
Below in conjunction with the accompanying drawings and embodiment, the detailed description of the invention of the present invention is described in further detail.
The present invention proposes the implementation method of a kind of virtual DHCP, as it is shown in figure 1, described method includes:
After control node in S1, virtual network receives virtual DHCP foundation request message, set up virtual DHCP configurationInformation, and set up two tuples list of MAC Address and IP address, described two tuples list be used for preserving available MAC Address with canOne-to-one relationship with IP address;
Described two tuples list and described virtual DHCP configuration information are sent to described virtual by S2, described control nodeAt least one agent node in network, described agent node sets up DHCP service according to described virtual DHCP configuration information;
S3, when a certain virtual machine add described virtual network time, described virtual machine to described control node send MAC AddressAllocation request message, described control node selects untapped two tuples from described two tuples list, and by thereinMAC Address distributes to described virtual machine;
S4, described virtual machine pass through broadcast transmission IP address assignment request message, and described agent node receives described IPAfter address assignment request message, from described two tuples list, find out the IP ground corresponding with the MAC Address of described virtual machineLocation also assigns them to described virtual machine.
The technical scheme that the present invention proposes can be based on controlling node and the collaborative work of agent node in virtual networkRealize virtual DHCP, and be that each virtual machine distributes unique MAC Address and IP address by DHCP service.Use virtualDHCP distributes IP address can be greatly improved work efficiency, saves the cost that management is safeguarded.
Below by a specific embodiment, the preferred implementation of described method is illustrated.
Embodiment 1:
First user needs to set up a virtual network in systems, then give this virtual network set up one virtualDHCP.As in figure 2 it is shown, the virtual network in the present embodiment includes host A, host B and host C, wherein, host A is that this is virtualNetwork-based control node, host B and host C are agent node.
User is when setting up virtual DHCP, it is necessary first to send virtual DHCP foundation request message, at this to controlling nodeIn request message, user can provide the title of virtual DHCP, the scope of IP available address, gateway ip address and the IP of DNSThe information such as address.Then this request can be sent to control node.In the present embodiment, user asks the virtual DHCP's of foundationTitle is designated as A.Control node, after receiving virtual DHCP foundation request message, can be set up according to this virtual DHCP and ask in messageIP available address, for the available MAC Address that each IP available address creation one is corresponding, and be saved in two tuples listIn (MAC, IP), (MAC, IP) here is two tuple result sets, for preserving available MAC Address and IP available addressOne-to-one relationship;Meanwhile, control node and set up the title of virtual DHCP in request message, gateway IP according to this virtual DHCPAddress and dns address, set up virtual DHCP configuration information.It addition, as in figure 2 it is shown, control node can also set up data base, andDescribed two tuples list (MAC, IP) and described virtual DHCP configuration information are saved in described data base, follow-up to facilitateSearch.
When control node send set up the order of virtual DHCP to agent node time, described two tuples list (MAC, IP) withAnd described virtual DHCP configuration information can transmit over together.As in figure 2 it is shown, the agent node on host B and host C is receivingAfter the order of control node, the DHCP service process of response can be set up, i.e. the agent node on host B and host C all can be createdBuild DHCP service A, and be the virtual machine distribution IP address in this virtual network jointly.
When a certain newly-built virtual machine needs to add this virtual network, this newly-built virtual machine first can be to controlling jointPoint sends MAC Address allocation request message;After control node receives request, from (MAC, IP), select one untapped twoTuple, and MAC Address therein is distributed to this newly-built virtual machine;Then this newly-built virtual machine this MAC groundThe Microsoft Loopback Adapter of oneself is set up in location.
When, after the virtual machine activation that this is newly-built, dhcp broadcast being sent and carry out IP address requesting;At this moment establish beforeDHCP service A can receive this request bag, owing to having included the right of this MAC in the configuration file of DHCP service A beforeAnswer IP, so this most designated good IP will distribute to newly-built virtual machine.Here virtual machine obtains the process of IP addressIdentical with traditional DHCP service, it may be assumed that virtual machine sends IP address by the way of sending DHCP DISCOVER broadcast packet and distributesRequest message;Agent node on host B or host C is after receiving this IP address assignment request message, from two tuples list(MAC, IP) finds out the IP address corresponding with the MAC Address of this virtual machine, and sends it to virtual machine, i.e. to voidA DHCP OFFER message replied by plan machine;After virtual machine receives IP address, send a DHCP REQUEST to network wideBroadcast bag;Last agent node replys a DHCP ACK message to virtual machine, and so far, the IP address of virtual machine is assigned.
In order to ensure network reliability service, controlling node needs to confirm that each provides the agent node of DHCP service can oneDirectly keep normal communication.Therefore, control to carry out one every Fixed Time Interval (such as 15 seconds) between node and agent nodeSecondary heart-beat test;When a main frame is closed or netting twine is pulled out, control node it finds that cannot with on itAgent node carry out communication, at this moment control node and can select another main frame in this virtual network, and take from data baseGo out described two tuples list and described virtual DHCP configuration information, then send virtual DHCP and set up order to another main frameOn agent node, another main frame re-establishes DHCP service, to ensure the high availability of DHCP service.
As it is shown on figure 3, originally set up by the agent node on host B and provide DHCP service A.Control node and host BOn agent node carry out a heart-beat test every Fixed Time Interval.At a time, node is controlled when exceeding defaultBetween do not receive the heartbeat packet that agent node on host B sends behind interval, then judge in the agent node communication on host BDisconnected.Therefore, control node from this virtual network, have selected main frame D, from data base, take out (MAC, IP) and DHCP service AConfiguration information, and be sent to the agent node on main frame D;Then the agent node on main frame D sets up DHCP service A, and isVirtual machine distribution IP address in this virtual network.Above-mentioned mechanism ensure that always certain amount of agency in virtual networkNode provides IP address allocation services, thus ensures the high reliability of network.
It should be noted that in the case of there is multiple virtual network in systems, the agent node on a certain main frame was bothThe virtual DHCP of virtual network A can be set up, the virtual DHCP of virtual network B can also be set up simultaneously.As shown in Figure 4, systemTwo virtual networks of middle existence;One of them virtual network needs to set up DHCP service A, and another virtual network needs to set upDHCP service B;Then, host B and host C are set up the most simultaneously there are DHCP service A and DHCP service B.Due to virtual network itBetween be mutually isolated, therefore, for the newly-built virtual machine in one of them virtual network, its IP address assignment request is onlyCan be received by the DHCP service corresponding to this virtual network.
To sum up, the technical scheme that the present invention proposes can be based on controlling the collaborative of node and agent node in virtual networkWork realizes virtual DHCP, and is that each virtual machine distributes unique MAC Address and IP address by DHCP service.Use voidPlan DHCP distributes IP address can be greatly improved work efficiency, saves the cost that management is safeguarded.
The above is only the preferred embodiment of the present invention, it is noted that come for those of ordinary skill in the artSaying, on the premise of without departing from the technology of the present invention principle, it is also possible to make some improvement and replacement, these improve and replace also shouldIt is considered as protection scope of the present invention.

Claims (8)

CN201310334143.1A2013-08-022013-08-02The implementation method of virtual DHCPExpired - Fee RelatedCN103401954B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201310334143.1ACN103401954B (en)2013-08-022013-08-02The implementation method of virtual DHCP

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201310334143.1ACN103401954B (en)2013-08-022013-08-02The implementation method of virtual DHCP

Publications (2)

Publication NumberPublication Date
CN103401954A CN103401954A (en)2013-11-20
CN103401954Btrue CN103401954B (en)2016-12-28

Family

ID=49565476

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201310334143.1AExpired - Fee RelatedCN103401954B (en)2013-08-022013-08-02The implementation method of virtual DHCP

Country Status (1)

CountryLink
CN (1)CN103401954B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105450690B (en)2014-08-212019-02-22国际商业机器公司 Hypervisor execution method and virtual machine management system
CN106375486B (en)*2016-11-242019-05-21国云科技股份有限公司System for cloud platform software definition DHCP service
US10666606B2 (en)*2017-06-282020-05-26Amazon Technologies, Inc.Virtual private network service endpoints
CN107707689B (en)*2017-10-312020-09-22迈普通信技术股份有限公司DHCP message processing method, DHCP server and gateway equipment
US10536431B2 (en)*2018-04-302020-01-14Microsoft Technology LicensingOn-node DHCP implementation for virtual machines
CN113938467A (en)*2020-06-292022-01-14富士康精密电子(太原)有限公司Machine node address allocation and state confirmation method and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102685267A (en)*2012-05-162012-09-19上海兆民云计算科技有限公司IP (Internet Protocol) address leak preventing method in desktop cloud cluster running state
CN102710814A (en)*2012-06-212012-10-03奇智软件(北京)有限公司Method and device for controlling Internet protocol (IP) address of virtual machine
CN103037023A (en)*2012-11-232013-04-10中国电信股份有限公司云计算分公司Operation method of virtual machine system and virtual machine system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP4704043B2 (en)*2005-01-072011-06-15富士通株式会社 Movement processing program, information processing apparatus, computer system, and computer-readable recording medium storing movement processing program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102685267A (en)*2012-05-162012-09-19上海兆民云计算科技有限公司IP (Internet Protocol) address leak preventing method in desktop cloud cluster running state
CN102710814A (en)*2012-06-212012-10-03奇智软件(北京)有限公司Method and device for controlling Internet protocol (IP) address of virtual machine
CN103037023A (en)*2012-11-232013-04-10中国电信股份有限公司云计算分公司Operation method of virtual machine system and virtual machine system

Also Published As

Publication numberPublication date
CN103401954A (en)2013-11-20

Similar Documents

PublicationPublication DateTitle
US10601728B2 (en)Software-defined data center and service cluster scheduling and traffic monitoring method therefor
CN108293001B (en) A software-defined data center and a deployment method for a service cluster therein
US9999030B2 (en)Resource provisioning method
CN102067533B (en)Port grouping for association with virtual interfaces
CN103401954B (en)The implementation method of virtual DHCP
CN105009521B (en)Message treatment method and gateway
EP2843906B1 (en)Method, apparatus, and system for data transmission
CN104506408A (en)Data transmission method and device based on SDN
CN104104570A (en)Aggregation processing method in IRF (Intelligent Resilient Framework) system and device
US20160330143A1 (en)Method for Acquiring Physical Address of Virtual Machine
CN104812021B (en)A kind of method and device of AP access AC
JP2018530256A (en) User migration
WO2016169218A1 (en)Gateway virtualization method and system, and computer storage medium
CN109088823B (en)Method and device for realizing terminal interconnection
CN106936943A (en)The distribution method and system of virtual machine address
CN105704042A (en)Message processing method, BNG and BNG cluster system
CN106612196B (en)Obtain the method and device of resource
CN104980368A (en)Bandwidth guarantee method and apparatus in software defined network (SDN)
CN104580029A (en)Address distribution method and device
CN108011907A (en)The resource allocation methods and device of adapted telecommunication net
CN106101297B (en)A kind of message answer method and device
CN103716169B (en)Point-to-multipoint method of realizing group broadcasting, network node and system
CN103546308A (en) Distribution method, device and system for wireless controller networking
CN105743781B (en)A kind of VRRP load-balancing method and device
CN106330511B (en)Network element equipment and method for opening data communication network

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
PP01Preservation of patent right

Effective date of registration:20180823

Granted publication date:20161228

PP01Preservation of patent right
PD01Discharge of preservation of patent

Date of cancellation:20210823

Granted publication date:20161228

PD01Discharge of preservation of patent
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20161228

Termination date:20180802

CF01Termination of patent right due to non-payment of annual fee

[8]ページ先頭

©2009-2025 Movatter.jp