CN105657081B - The method, apparatus and system of DHCP service are provided - Google Patents

The method, apparatus and system of DHCP service are provided Download PDF

Info

Publication number
CN105657081B
CN105657081B CN201610216278.1A CN201610216278A CN105657081B CN 105657081 B CN105657081 B CN 105657081B CN 201610216278 A CN201610216278 A CN 201610216278A CN 105657081 B CN105657081 B CN 105657081B
Authority
CN
China
Prior art keywords
virtual machine
dynamic host
host configuration
configuration protocol
protocol server
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.)
Active
Application number
CN201610216278.1A
Other languages
Chinese (zh)
Other versions
CN105657081A (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.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610216278.1A priority Critical patent/CN105657081B/en
Publication of CN105657081A publication Critical patent/CN105657081A/en
Application granted granted Critical
Publication of CN105657081B publication Critical patent/CN105657081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Abstract

The embodiment of the present invention provides the method, apparatus and system of a kind of offer DHCP service, is related to the communications field, can shorten the response delay of Dynamic Host Configuration Protocol server.Method includes: the access information that network administration apparatus obtains the first virtual machine;Network administration apparatus indicates that the first Dynamic Host Configuration Protocol server records the MAC Address of the first virtual machine and the corresponding relationship of IP address;Indicate the protocol interaction channel that the first virtual switch is established between the first virtual machine and the first Dynamic Host Configuration Protocol server;First Dynamic Host Configuration Protocol server provides DHCP service for the first virtual machine.Virtual machine of the present invention for by distributed DHCP server to be deployed in multiple calculate nodes provides Dynamic Host Configuration Protocol server.

Description

The method, apparatus and system of DHCP service are provided
Technical field
The present invention relates to the communications field more particularly to a kind of method, apparatus and system of offer DHCP service.
Background technique
With virtualization, cloud computing technology high speed development, traditional physics dynamic host configuration protocol (full name in English: Dynamic Host Configuration Protocol, English abbreviation: DHCP).Server also achieves virtualization deployment.
As shown in Fig. 1-A, virtual Dynamic Host Configuration Protocol server concentration is deployed in a kind of deployment scheme of existing Dynamic Host Configuration Protocol server Network node, virtual machine (full name in English: Virtual Machine, English abbreviation: VM) are deployed in calculate node.Virtual machine with Virtual machine interchanger (full name in English: Virtual Switch) and net between Dynamic Host Configuration Protocol server by being located in network node Basic network between network node and calculate node interconnects, and represents basic network in Fig. 1-A with physical switches.
Virtual switch divides the virtual machine for being located at different sub-network and Dynamic Host Configuration Protocol server.In conjunction with shown in Fig. 1-B, Dynamic Host Configuration Protocol server A connection subnet A, Dynamic Host Configuration Protocol server B connection subnet B.VMa, VMb and calculate node B in calculate node A In VMf connection subnet A.VMd, VMe in VMc and calculate node B in calculate node A connect subnet B.One DHCP Server can connect one or more subnet, and Fig. 1-B show a Dynamic Host Configuration Protocol server and accesses a subnet, be a son Virtual machine in net provides the situation of DHCP service.
By taking VMa in Fig. 1-B as an example, when creating VMa or restarting VMa, VMa broadcasts DHCP Discover message, the message By the network node where the virtual switch 101 of calculate node where VMa, physical switches 102 and Dynamic Host Configuration Protocol server A Interior virtual switch 103 finally receives and returns DHCP Offer message by Dynamic Host Configuration Protocol server A, the message and subsequent The message interacted between Dynamic Host Configuration Protocol server A and VMa also passes through virtual switch 101, virtual switch 103 and physics and hands over It changes planes 102 these three interchangers, is finally received and processed by VMa and Dynamic Host Configuration Protocol server A.
The transmission path of progress message interaction between Dynamic Host Configuration Protocol server and VM, the void including calculate node where virtual machine Quasi- interchanger, the basic network (physical exchange between virtual switch and calculate node and network node in network node Machine), since transmission path is long, the time delay of dhcp server response VM service request is longer.In addition, when tenant network is virtually may be used When extending local area network (full name in English: Virtual extensible Local Area Network, English abbreviation: VxLAN), Calculate node and network node encapsulation reconciliation packaging V xlan heading, equally will increase response delay.Especially in DHCP service In the case that device needs to provide DHCP service positioned at the VM of multiple calculate nodes, since transmission path is long and flowing of access is big, So that the response delay of Dynamic Host Configuration Protocol server becomes the bottleneck for restricting cloud computing service efficiency.
Summary of the invention
The application provides the method, apparatus and system of a kind of offer DHCP service, can shorten the response of Dynamic Host Configuration Protocol server Time delay.
In order to achieve the above objectives, the application adopts the following technical scheme that
In a first aspect, providing a kind of method of offer DHCP service, it is responsible for creating in calculate node by network administration apparatus Distributed Dynamic Host Configuration Protocol server is built or deletes, wherein network administration apparatus can be concentration deployment, can also be with distributed deployment In multiple calculate nodes.Network administration apparatus configures a Dynamic Host Configuration Protocol server in a calculate node, so that The Dynamic Host Configuration Protocol server provides DHCP service for the virtual machine in the calculate node of place, and by taking the first calculate node as an example, first is virtual Machine, the first Dynamic Host Configuration Protocol server and the first virtual switch are run in first calculate node, and concrete scheme includes:
Network administration apparatus obtains the access information of the first virtual machine, and access information is used to indicate the identity of the first virtual machine Mark, including MAC Address and IP address, are in addition also used to indicate which calculate node the first virtual machine is located in, which is accessed A subnet is located at the first calculate node with the first virtual machine in the application, is illustrated in case where accessing targeted subnet.
After network administration apparatus obtains the access information of the first virtual machine, the first Dynamic Host Configuration Protocol server of instruction records described first The MAC Address of virtual machine and the corresponding relationship of IP address, in this way when the first Dynamic Host Configuration Protocol server receives the transmission of the first virtual machine When DHCP Discover message, it will be able to respond DHCP Discover message, provide DHCP service for the first virtual machine.
Interaction between first Dynamic Host Configuration Protocol server and the first virtual machine needs to carry out by protocol interaction channel, including DHCP Interaction channel, or can further include Internet Control Message agreement (full name in English: Internet Control Message Protocol, English abbreviation: ICMP) interaction channel, therefore network administration apparatus also needs to indicate the first virtual machine Forwarding device i.e. the first virtual switch between first Dynamic Host Configuration Protocol server establishes first virtual machine and described the Protocol interaction channel between one Dynamic Host Configuration Protocol server.
After completing the aforementioned steps, the first virtual machine can be asked by protocol interaction channel to the first Dynamic Host Configuration Protocol server Seek DHCP service.Since the first Dynamic Host Configuration Protocol server and the first virtual machine are located at the same calculate node, virtual machine and DHCP Transmission path between server is shorter, and propagation delay time is shorter.
Optionally, in a kind of specific embodiment, network administration apparatus creates multiple points in multiple calculate nodes Cloth Dynamic Host Configuration Protocol server, each Dynamic Host Configuration Protocol server provide DHCP service for the virtual machine in respectively place calculate node.One Dynamic Host Configuration Protocol server can provide DHCP service to access the virtual machine of one or more subnet in the calculate node of place.Pass through The distributed deployment of Dynamic Host Configuration Protocol server also only influences to calculate where the Dynamic Host Configuration Protocol server even if a Dynamic Host Configuration Protocol server failure Virtual machine in node obtains IP address, and the virtual machine in other calculate nodes is then unaffected.
Preferably, when a Dynamic Host Configuration Protocol server in a calculate node is unavailable, in another calculate node Dynamic Host Configuration Protocol server can be used as proxy server, provide the DHCP service across calculate node, restore rapidly on being influenced by failure The DHCP service of virtual machine, to improve system survivability.One of Dynamic Host Configuration Protocol server is unavailable, including the DHCP Server failure or forbidden situation.
Second aspect provides a kind of network administration apparatus, comprising: processor, memory, bus and transceiver;Processing Device, memory, transceiver are connected with each other by bus;Memory is stored with program code, when processor caller code, Realize the function of network administration apparatus in method provided by first aspect.
The third aspect provides a kind of calculate node, comprising: processor, memory, bus and transceiver;Processor is deposited Reservoir, transceiver are connected with each other by bus;Memory is stored with program code, when processor caller code, realizes Run on virtual machine, Dynamic Host Configuration Protocol server and the virtual switch in calculate node, the virtual machine, the Dynamic Host Configuration Protocol server and should Virtual switch is virtual for realizing the first virtual machine, the first Dynamic Host Configuration Protocol server and first in method provided by first aspect The function of interchanger.
Fourth aspect provides a kind of communication system, including network administration apparatus and at least two calculate nodes;Wherein net Network managing device is network administration apparatus described in second aspect, and calculate node is calculate node provided by the third aspect.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, embodiment will be described below Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without creative efforts, can also be attached according to these Figure obtains other attached drawings.
Fig. 1-A is the physical connection schematic diagram in a kind of existing deployment scheme of Dynamic Host Configuration Protocol server;
Fig. 1-B is the logical connection schematic diagram in a kind of existing deployment scheme of Dynamic Host Configuration Protocol server;
Fig. 2 is that the application scenarios for the method for providing DHCP service provided by the embodiment of the present invention illustrate schematic diagram;
Fig. 3 is a kind of flow diagram for the method for providing DHCP service provided by the embodiment of the present invention;
Fig. 4 is to illustrate schematic diagram to DHCP message forward-path in the embodiment of the present invention;
Fig. 5 is to illustrate schematic diagram to the another of DHCP message forward-path in the embodiment of the present invention;
Fig. 6 is a kind of network administration apparatus structural schematic diagram provided by the embodiment of the present invention;
Fig. 7 is a kind of calculate node structural schematic diagram provided by the embodiment of the present invention;
Fig. 8 is a kind of communication system architecture schematic diagram provided by the embodiment of the present invention.
Specific embodiment
For the ease of clearly describing the technical solution of the embodiment of the present invention, in an embodiment of the present invention, use " the One ", the printed words such as " second " distinguish function and the essentially identical identical entry of effect or similar item, and those skilled in the art can To understand that the printed words such as " first ", " second " are not to be defined to quantity and execution order.
The method of DHCP service is provided provided by the embodiment of the present invention, applied in communication system as shown in Figure 2. Communication system includes network administration apparatus 20 and at least two calculate nodes, and Fig. 2 show including calculate node 201 and calculates section The case where 202 two calculate nodes of point.
Network administration apparatus 20 judges whether the VM in a calculate node needs DHCP service, if so, instruction calculates Node creates Dynamic Host Configuration Protocol server example.For ease of description, referring to Dynamic Host Configuration Protocol server with Dynamic Host Configuration Protocol server in the embodiment of the present invention Example.
Can there are multiple VM, a VM that can access one or more subnet, reality of the invention in one calculate node It applies in example and is illustrated in case where a VM accesses a subnet.Two different VM can access same subnet, or Person accesses two different subnets.One Dynamic Host Configuration Protocol server accesses a subnet, for the calculate node where the Dynamic Host Configuration Protocol server It is interior, DHCP service is provided with the VM of Dynamic Host Configuration Protocol server access same subnet.
As shown in connection with fig. 2, the VM in calculate node 201, including VM1, VM2 and VM3, wherein VM1 and VM2 accesses subnet 1, VM3 access subnet 2.Dynamic Host Configuration Protocol server in calculate node 201 includes DHCP 1 and DHCP 2.
DHCP 1 accesses subnet 1, for providing DHCP service, as VM1 for the VM of access subnet 1 in calculate node 201 DHCP service is provided with VM2.
DHCP2 accesses subnet 2, and for providing DHCP service for the VM of access subnet 2 in calculate node 201, as VM3 is mentioned For DHCP service.
Similarly, in calculate node 202, DHCP3 provides DHCP service for VM4.DHCP4 provides DHCP service for VM5.
Dynamic Host Configuration Protocol server is respectively created in network administration apparatus 20 in multiple calculate nodes, and a Dynamic Host Configuration Protocol server is its institute VM in calculate node provides DHCP service, by creating Dynamic Host Configuration Protocol server in the calculate node where virtual machine, realizes The distributed deployment of Dynamic Host Configuration Protocol server.It, only need to be with the DHCP in the calculate node of place when virtual machine needs to request DHCP service Server carries out service interaction, scheme compared with prior art, and transmission path needs not move through basic network (physical switches), because This shortens transmission path when virtual machine request DHCP service, correspondingly shortens propagation delay time, improves efficiency of service.
Network administration apparatus 20 can be network manager (full name in English: network Manager), or software It defines network controller (full name in English: software defined network controller), or includes network management The device of device and software defined network controller.In addition, so-called some Dynamic Host Configuration Protocol server of access in the embodiment of the present application Message is directed to unicast, broadcasting packet that the Dynamic Host Configuration Protocol server sends or forwards, including DHCP message, address resolution protocol (full name in English: Address Resolution Protocol, English abbreviation: ARP) message etc..
Embodiment
The embodiment of the present invention provides a kind of method of offer DHCP service, is applied to network administration apparatus, referring to Fig. 3 institute Show, comprising the following steps:
301, network administration apparatus obtains the access information of the first virtual machine.
Network administration apparatus is responsible for Internet protocol (full name in English: Internet Protocol, English abbreviation: IP) The Internet resources such as address, media access control (full name in English: Media Access Control, English abbreviation: MAC) address Management and distribution, and the topological structure of virtual network is managed.Including managing global ip address, Dynamic Host Configuration Protocol server is indicated The IP address of virtual machine and the binding relationship of MAC Address are recorded (see step 302) etc..
After Dynamic Host Configuration Protocol server records the IP address of virtual machine and the binding relationship of MAC Address, when virtual machine needs make When with IP address, so that it may obtain the IP address bound with its MAC Address to Dynamic Host Configuration Protocol server request.
Execute the trigger condition of step 301:
When creating virtual machine, when network administration apparatus determines that needs distribute IP address for newly-built virtual machine, step is executed Rapid 301.Alternatively, network administration apparatus detects newly-increased tap on the virtual switch of calculate node after virtual machine creating is completed When interface, step 301 is executed.In the embodiment of the present invention, carried out in case where newly-built virtual machine is the first virtual machine Explanation.
In a kind of specific application scenarios, when network administration apparatus determination needs to pass through DHCP protocol for the first virtual machine When configuration of IP, the access information of the first virtual machine is obtained.Wherein the effect of access information includes following 4 points:
The first, targeted subnet, the virtual subnet that targeted subnet is accessed by the first virtual machine are indicated.Targeted subnet can lead to Cross its corresponding VLAN ID or VxLAN ID mark.
The second, indicate that the first calculate node, the first calculate node are the calculate node where the first virtual machine.
Third provides the identification information of the first virtual machine, specifically includes the MAC Address and IP address of the first virtual machine.
302, network administration apparatus indicates that the first Dynamic Host Configuration Protocol server records the MAC Address of the first virtual machine and pair of IP address It should be related to.
Wherein, the first Dynamic Host Configuration Protocol server is located at the first calculate node, for positioned at the first calculate node and access target The virtual machine of subnet provides DHCP service.
In first calculate node, before accessing first virtual machine starting DHCP protocol process of the first subnet, creation First Dynamic Host Configuration Protocol server.Usually starting creation Dynamic Host Configuration Protocol server while starting creates first virtual machine.
Optionally, in a kind of specific embodiment, Dynamic Host Configuration Protocol server is managed collectively by network administration apparatus, When network administration apparatus determines that the virtual machine creating of first access targeted subnet is completed, the first Dynamic Host Configuration Protocol server is created.
Alternatively, network administration apparatus distributed deployment works as network in calculate node in a kind of specific embodiment When managing device determines the virtual machine creating of first access targeted subnet in the calculate node at place, network administration apparatus creation First Dynamic Host Configuration Protocol server.
First Dynamic Host Configuration Protocol server itself needs to occupy an IP address, and network administration apparatus can be the first Dynamic Host Configuration Protocol server Distribute IP address.One IP address of the first Dynamic Host Configuration Protocol server occupancy targeted subnet.
After the completion of the creation of first Dynamic Host Configuration Protocol server, network administration apparatus indicates that the first Dynamic Host Configuration Protocol server records the first virtual machine MAC Address and IP address corresponding relationship.First Dynamic Host Configuration Protocol server is by the MAC Address of the first virtual machine and the first virtual machine IP address binding, and record.When the first virtual machine requests DHCP service to the first Dynamic Host Configuration Protocol server, the first DHCP service Device provides DHCP service according to the MAC and IP address binding relationship of the first virtual machine recorded for the first virtual machine, including match Set IP address, routing etc..
First Dynamic Host Configuration Protocol server and the first virtual machine are located at same calculate node, and interactive message is without increasing therebetween Vxlan heading, therefore eliminate because of time delay caused by encapsulation and decapsulation.
In the first calculate node, whenever having new virtual machine creating and accessing targeted subnet, network administration apparatus is just The corresponding relationship of new virtual machine MAC Address and IP address is recorded in instruction, is no longer needed to creation at this time and is served mesh Mark the Dynamic Host Configuration Protocol server (the first Dynamic Host Configuration Protocol server) of subnet.
303, network administration apparatus indicates that the first virtual switch is established between the first virtual machine and the first Dynamic Host Configuration Protocol server Protocol interaction channel.
Protocol interaction channel includes DHCP interaction channel.Network administration apparatus can be by sending to the first virtual switch Flow table (full name in English: Flow table), establishes the DHCP interaction channel between the first virtual machine and the first Dynamic Host Configuration Protocol server.Its In, the first virtual switch is located at the first calculate node.First virtual switch saves flow table, according to flow table forwarding DHCP report Text.
The particular content of flow table is illustrated below in conjunction with shown in Fig. 4.In calculate node 40, DHCP401 is for being VM402 and VM403 provides DHCP service.DHCP404 is used to provide DHCP service for VM405 and VM406.
The port A1 connection of DHCP401 connection virtual switch 407.
The port B1 of VM402 connection virtual switch 407.
The port B2 of VM403 connection virtual switch 407.
The port A2 of DHCP404 connection virtual switch 407.
The port B3 of VM405 connection virtual switch 407.
The port B4 of VM406 connection virtual switch 407.
By taking virtual switch 407 as an example, the forward-path of the DHCP message in conjunction with indicated by line with the arrow in Fig. 4, It is a kind of to forward the flow table of DHCP message as follows by the virtual switch 407 that is used to indicate that pseudo-code indicates:
Flowtable1:
In_port=B1, ip, udp_dst=67, output:A1
In_port=B2, ip, udp_dst=67, output:A1
In_port=B3, ip, udp_dst=67, output:A2
In_port=B4, ip, udp_dst=67, output:A2
In_port=A1, ip, udp_dst=68, output:B 1, B2
In_port=A2, ip, udp_dst=68, output:B3, B4
Optionally, protocol interaction channel further includes Internet Control Message agreement (full name in English: Internet Control Message Protocol, English abbreviation: ICMP) interaction channel.In this way, can ping when the first virtual machine executes business Logical first Dynamic Host Configuration Protocol server requests DHCP service to the first Dynamic Host Configuration Protocol server.
After protocol interaction Path Setup between first virtual machine and the first Dynamic Host Configuration Protocol server, the first Dynamic Host Configuration Protocol server can To provide DHCP service by the first virtual switch for the first virtual machine.
In conjunction with the DHCP Discover message that above-mentioned flow table, VM402 issue, virtual switch is sent to by port B1 407。
Virtual switch 407 inquires flow table, and when port B1 is input port, corresponding output port is A1, then virtual to hand over It changes planes and 407 is forwarded the packet by port A1 to DHCP401.
The MAC Address that DHCP401 inquiry is received from network administration apparatus, and recorded is corresponding with IP address to close System, the IP address that the determining MAC Address with VM402 is bound, generates DHCP Offer message according to the IP address.DHCP401 will The message is sent to virtual switch 407 by port A1.
Virtual switch 407 inquires flow table, and when port A1 is input port, corresponding output port is B1 and B2, then empty DHCP Offer message is forwarded to VM402 and VM403 by port B1 and B2 by quasi- interchanger 407.
After VM402 receives DHCP Offer, the IP address bound with the MAC Address of VM402 is obtained.VM403 is received To after DHCP Offer, due to not including the MAC Address of VM403 in the message, by the packet loss.
304, network administration apparatus establishes multiple distributed DHCP servers.
It is referred to as the Dynamic Host Configuration Protocol server being located in multiple calculate nodes in the present embodiment with distributed DHCP server.
In conjunction with step 301 to step 303, when meeting the trigger condition for executing step 301, be carried out step 301 to Step 303.
In the first calculate node, to guarantee that Dynamic Host Configuration Protocol server can handle the DHCP of virtual machine sending in time Discover message, network administration apparatus need the virtual machine for accessing targeted subnet at first to issue DHCP Discover report Before text request DHCP service, the first Dynamic Host Configuration Protocol server is created, the virtual machine wound of targeted subnet can be specifically accessed at first During building, when creation is completed, or create when detecting that the virtual machine is connect with the virtual switch in calculate node the One Dynamic Host Configuration Protocol server.
In first calculate node whenever having virtual machine to access targeted subnet, network administration apparatus indicates the first DHCP service Device records the corresponding relationship of new MAC Address and IP address, and the flow table of update is issued to the first virtual switch, and description is empty Between quasi- machine and Dynamic Host Configuration Protocol server, the forwarding relationship of DHCP message.
In different calculate nodes, the Dynamic Host Configuration Protocol server in this calculate node can be created, serves access target The virtual machine of net.Certainly, the method for offer DHCP service described in the embodiment by invention can also be saved in each calculating The distributed server of other subnets is served in point creation.In conjunction with the calculate node 201 in Fig. 2, when in a calculate node When virtual machine accesses two subnets, it can establish two Dynamic Host Configuration Protocol server, be respectively used to serve two subnets.Further, By repeating step 301 to step 304, more than two Dynamic Host Configuration Protocol server can be created in a calculate node, one In a calculate node, different Dynamic Host Configuration Protocol server serve different sub-network.
Certainly, a Dynamic Host Configuration Protocol server can serve multiple subnets.It is only taken in the present embodiment with a Dynamic Host Configuration Protocol server It is engaged in elaborating in case where a subnet.
The multiple distributed DHCP servers for serving same subnet can share MAC Address and IP address, therefore will not Multiple MAC Address and IP address are occupied because multiple Dynamic Host Configuration Protocol server are established.The embodiment of the present invention is only to serve target Subnet is located at for two Dynamic Host Configuration Protocol server of the first calculate node and the second calculate node, to distributed DHCP service Device is illustrated.
In conjunction with step 301 to step 304, the second Dynamic Host Configuration Protocol server is created in the second calculate node, for being located at the Two calculate nodes and the virtual machine offer DHCP service for accessing targeted subnet.Second Dynamic Host Configuration Protocol server passes through the second virtual switch It is connect with the virtual machine for being located at the second calculate node and access targeted subnet.
Since the second Dynamic Host Configuration Protocol server and the first Dynamic Host Configuration Protocol server share MAC Address and IP address, to prevent first Dynamic Host Configuration Protocol server and the second Dynamic Host Configuration Protocol server lead to IP address conflict using identical IP address, and network administration apparatus forbids the first void The message that quasi- interchanger and the second virtual switch pass through respective upstream Interface forwarding access Dynamic Host Configuration Protocol server.
The message for accessing Dynamic Host Configuration Protocol server includes DHCP message.That is, in a calculate node, virtual machine and DHCP DHCP message between server, spread scope control in this calculate node, will not be forwarded to another and calculate section Point.
The message for accessing Dynamic Host Configuration Protocol server further includes ARP message, forbids virtual switch to Dynamic Host Configuration Protocol server forwarding ARP report Text prevents the IP address of Dynamic Host Configuration Protocol server from externally exposing.
The present embodiment provides two kinds to forbid virtual switch to pass through the message of upstream Interface forwarding access Dynamic Host Configuration Protocol server Specific embodiment is as follows:
In the first embodiment, network administration apparatus can forbid by issuing flow table to the first virtual switch One virtual switch forwards the message of the first Dynamic Host Configuration Protocol server of access of the virtual machine in other calculate nodes by its upstream Interface. As shown in connection with fig. 4, a kind of by what pseudo-code indicated to be used to that virtual switch 407 to be forbidden to pass through it by taking virtual switch 407 as an example The flow table of the message of upstream Interface forwarding access Dynamic Host Configuration Protocol server is as follows:
Flowtable2:
In_port=C, arp, arp_tpa=vdhcp, actions:drop
Dl_Vlan=net1, arp, arp_tpa=vdhcp, output:A1
Dl_Vlan=net2, arp, arp_tpa=vdhcp, output:A2
Port C in Flowtable2 is the uplink port 4071 of virtual switch 407.Net1 is corresponding to DHCP401 The VLAN ID, net2 of subnet are the VLAN ID of subnet corresponding to DHCP404.
According to Flowtable2, virtual switch 407 by from the DHCP message that receives of virtual machine of access net1 or APR message is forwarded to port A1, and the DHCP message or APR message that receive from the virtual machine of access net2 are forwarded to port A2 will receive DHCP message or APR packet loss from uplink port.In calculate node 40 virtual machine and Dynamic Host Configuration Protocol server it Between DHCP message, only forwarded in calculate node 40.In addition, being reached by forbidding the IP address of Dynamic Host Configuration Protocol server externally to expose To different calculate nodes using identical DHCP service IP without the purpose of conflict.
In second of embodiment, network administration apparatus can forbid by issuing flow table to the first virtual switch One virtual switch forwards the virtual machine in the first calculate node to access the DHCP in other calculate nodes by its upstream Interface Server message.That is the virtual machine in the first calculate node, the Dynamic Host Configuration Protocol server being merely able in the first calculate node of access.
When distributed DHCP server includes the multiple Dynamic Host Configuration Protocol server being distributed in multiple calculate nodes, network management Device can issue respectively flow table for the virtual switch where each Dynamic Host Configuration Protocol server, forbid virtual switch forwarding place Virtual machine in calculate node accesses the message of Dynamic Host Configuration Protocol server in another calculate node, or forbids another calculate node Interior virtual machine accesses the message of Dynamic Host Configuration Protocol server in this calculate node.
In case where Dynamic Host Configuration Protocol server includes the first Dynamic Host Configuration Protocol server and the second Dynamic Host Configuration Protocol server in a distributed manner, first is empty Quasi- machine, the first Dynamic Host Configuration Protocol server and the first virtual switch are located at the first calculate node, the second virtual machine, the second Dynamic Host Configuration Protocol server It is located at the second calculate node with the second virtual switch.
Network administration apparatus forbids the first virtual switch to send virtual machine visit in the first calculate node by upstream Interface It asks the message of Dynamic Host Configuration Protocol server in other calculate nodes (the second Dynamic Host Configuration Protocol server), and the second virtual switch is forbidden to pass through uplink Interface sends the report that virtual machine in the second calculate node accesses Dynamic Host Configuration Protocol server (the first Dynamic Host Configuration Protocol server) in other calculate nodes Text.
Alternatively, network administration apparatus forbids the first virtual switch to forward virtual machine in other calculate nodes, (second is virtual Machine) message of the first Dynamic Host Configuration Protocol server is accessed, and the second virtual switch is forbidden to forward virtual machine (first in other calculate nodes Virtual machine) access the second Dynamic Host Configuration Protocol server message.
Further, for the virtual switch in a calculate node, network managing device can both forbid virtual switch Machine sends the message that virtual machine in this calculate node accesses Dynamic Host Configuration Protocol server in other calculate nodes to other calculate nodes, simultaneously Also the message for forbidding virtual switch that virtual machine in other calculate nodes is forwarded to access Dynamic Host Configuration Protocol server in this calculate node.
305, distributed DHCP server provides the DHCP service across calculate node.
In the case where distributed DHCP server works normally, a Dynamic Host Configuration Protocol server only needs for this calculate node Interior virtual machine provides DHCP service.
When a Dynamic Host Configuration Protocol server is unavailable, to enable the virtual machine normal request in calculate node where it DHCP service, network administration apparatus can specify another Dynamic Host Configuration Protocol server, and the agency as not available Dynamic Host Configuration Protocol server takes Business device provides DHCP service for the virtual machine where not available Dynamic Host Configuration Protocol server in calculate node.
One not available situation of Dynamic Host Configuration Protocol server, including Dynamic Host Configuration Protocol server failure cannot provide DHCP service, Or user in order to upgrade maintenance is carried out to the Dynamic Host Configuration Protocol server and the case where disable the Dynamic Host Configuration Protocol server.Preferably, DHCP takes Business the not available situation of device further include, to Dynamic Host Configuration Protocol server carry out load dispatch so that Dynamic Host Configuration Protocol server to partial virtual machine not The case where DHCP service is provided again.For example, network administration apparatus can be prohibited if the workload of a Dynamic Host Configuration Protocol server is larger Only it provides DHCP service, and the specified DHCP service positioned at another calculate node for the partial virtual machine in the calculate node of place Device provides DHCP service as proxy server, for this partial virtual machine.
It should be pointed out that proxy server here, usually serves the Dynamic Host Configuration Protocol server of same subnet.For example, When second Dynamic Host Configuration Protocol server is unavailable, network administration apparatus specifies agency of first Dynamic Host Configuration Protocol server as the second Dynamic Host Configuration Protocol server Server provides DHCP service to the virtual machine for being located at the second calculate node and access targeted subnet.
In conjunction with Fig. 5, calculate node 51 and calculate node 52 are connected by physical switches 53.
Calculate node 51, including virtual switch 511, Dynamic Host Configuration Protocol server 512, VM513 and VM514.
Calculate node 52, including virtual switch 521, Dynamic Host Configuration Protocol server 522, VM523.
When Dynamic Host Configuration Protocol server 512 and Dynamic Host Configuration Protocol server 522 work normally, in the forward-path such as Fig. 5 of DHCP message Shown in dotted line with the arrow.
When Dynamic Host Configuration Protocol server 522 is unavailable, Dynamic Host Configuration Protocol server 512 is in addition to providing DHCP service for VM513 and VM514 Except, also DHCP service is provided for VM523.DHCP message between VM523 and Dynamic Host Configuration Protocol server 512 need to pass through virtual switch 521, physical switches 53 and virtual switch 511 forward, with the arrow shown in solid of transmission path such as Fig. 5.To complete to turn Hair, network administration apparatus 50 need to complete following two points configuration:
First, due in the case where virtual switch 511 and virtual switch 521 work normally, virtual switch The upstream Interface of machine 511 and virtual switch 521 is prohibited the message of forwarding access Dynamic Host Configuration Protocol server, therefore works as DHCP service When device 522 is unavailable, the needs of network administration apparatus 50 issue flow table to virtual switch 511 and virtual switch 521 respectively, Virtual switch 511 and virtual switch 521 is allowed to forward VM523 and Dynamic Host Configuration Protocol server 512 by respective upstream Interface Between DHCP message.
Allow virtual switch to forward the message of access Dynamic Host Configuration Protocol server, accesses DHCP clothes with virtual switch forwarding is forbidden The message of business device is corresponding.
If network administration apparatus 50 only prohibits virtual switch 511 and virtual switch 521 passes through respective uplink Interface sends the message that virtual machine in this calculate node accesses Dynamic Host Configuration Protocol server in other calculate nodes, then need to only allow virtually to hand over Change planes 511 and virtual switch 521 sent by respective upstream Interface and to be interacted between VM523 and Dynamic Host Configuration Protocol server 512 DHCP message.
If network administration apparatus 50 only prohibits virtual switch 511 and virtual switch 521 passes through respective uplink Interface forwards virtual machine in other calculate nodes to access the message of Dynamic Host Configuration Protocol server in this calculate node, then need to only allow virtually to hand over Change planes 511 and virtual switch 521 forwarded by respective upstream Interface and to be interacted between VM523 and Dynamic Host Configuration Protocol server 512 DHCP message.
If network administration apparatus 50 had both prohibited virtual switch and has sent the other calculating of virtual machine access in this calculate node The message of Dynamic Host Configuration Protocol server in machine point, while also prohibiting virtual switch and virtual machine in other calculate nodes is forwarded to access this section The message of Dynamic Host Configuration Protocol server in point, then allow virtual switch 511 and virtual switch 521 to connect by respective uplink simultaneously Mouth sends and forwards the DHCP message interacted between VM523 and Dynamic Host Configuration Protocol server 512.
Need to particularly point out the flow table for a little originally forbidding the message of upstream Interface forwarding access Dynamic Host Configuration Protocol server, still Effectively.Here it only makes an exception to VM523, allows the forwarding of the DHCP message between VM523 and Dynamic Host Configuration Protocol server 512.If there is it Its virtual machine needs across calculate node access Dynamic Host Configuration Protocol server 512, it is also desirable to allow virtual switch to forward by issuing flow table The message of virtual machine access Dynamic Host Configuration Protocol server 512.
Second, network administration apparatus 50 indicates that virtual switch 511 establishes the association between VM523 and Dynamic Host Configuration Protocol server 512 Discuss interaction channel.And indicate that virtual switch 522 establishes the agreement between VM523 and Dynamic Host Configuration Protocol server 512 by issuing flow table Interaction channel.
In this way, the DHCP message between VM523 and Dynamic Host Configuration Protocol server 512, it will be able to pass through solid line institute with the arrow in Fig. 5 The forward-path shown completes forwarding, and Dynamic Host Configuration Protocol server 512 is enabled to provide the DHCP service across calculate node for VM523.
Dynamic Host Configuration Protocol server concentration is deployed in the scheme of network node in the prior art, between Dynamic Host Configuration Protocol server and virtual machine Transmission path include at least two virtual switches and a physical switches, the Single Point of Faliure in transmission path will lead to Virtual machine obtains DHCP service failure.If the virtual switch failure in network node, all empty of targeted subnet is accessed Quasi- machine is unable to normally access Dynamic Host Configuration Protocol server.
In the embodiment of the present invention, Dynamic Host Configuration Protocol server is located in calculate node, provides for the virtual machine in this calculate node DHCP service, so as to shorten the transmission path between Dynamic Host Configuration Protocol server and virtual machine.In addition, working as the quantity of distributed server When more than or equal to 2, if a Dynamic Host Configuration Protocol server is unavailable, network administration apparatus can choose a normal work Dynamic Host Configuration Protocol server allows the virtual machine of access first network normally to obtain DHCP service as proxy server.Therefore logical Distributed Dynamic Host Configuration Protocol server is crossed, not only shortens the transmission path between Dynamic Host Configuration Protocol server and virtual machine, while also improving System survivability can also be by another Dynamic Host Configuration Protocol server as its agency even if a Dynamic Host Configuration Protocol server failure Server provides normal DHCP service for virtual machine.
306, configuration of the network administration apparatus when virtual machine is deleted to distributed DHCP server and virtual switch.
When a virtual machine of linking objective subnet is deleted, so that it may indicate that Dynamic Host Configuration Protocol server deletes the MAC of virtual machine Binding relationship between address and IP address, and cancel for providing the protocol interaction channel of DHCP service for the virtual machine.With Under be illustrated in two kinds of situation.
The first situation is deleted virtual machine point and is located at same calculating section with the Dynamic Host Configuration Protocol server for serving the virtual machine The case where point.
With the first virtual machine instance, when the first virtual machine is deleted, network administration apparatus indicates the first Dynamic Host Configuration Protocol server, The MAC Address of the first virtual machine originally recorded and the binding relationship of IP address are deleted.In addition, network administration apparatus instruction the One virtual switch deletes the protocol interaction channel between the first virtual machine and the first Dynamic Host Configuration Protocol server.
Further, if there is no other virtual machine in addition to the first virtual machine in virtual machine in the first calculate node Targeted subnet is accessed, then network administration apparatus can delete the first Dynamic Host Configuration Protocol server, and indicate that the cleaning of the first virtual switch is used In forbid the first virtual switch pass through upstream Interface forwarding access Dynamic Host Configuration Protocol server message flow table.
Second situation is deleted virtual machine point and is located at two different meters from the Dynamic Host Configuration Protocol server for serving the virtual machine The case where operator node.
Dynamic Host Configuration Protocol server as shown in connection with fig. 5 provides the case where across calculate node DHCP service, with the second virtual machine instance, When the second virtual machine is deleted, network administration apparatus indicates the first Dynamic Host Configuration Protocol server, by the second virtual machine originally recorded MAC Address and the binding relationship of IP address are deleted.In addition, network administration apparatus indicates the first virtual switch and the second virtual friendship The protocol interaction channel changed planes between the second virtual machine of deletion and the first Dynamic Host Configuration Protocol server.
Further, if there is no other virtual machine in addition to the second virtual machine in virtual machine in the second calculate node Targeted subnet is accessed, then network administration apparatus can indicate the first virtual switch and the cleaning of the second virtual switch for allowing First virtual switch and the second virtual switch pass through respective upstream Interface forwarding the second virtual machine the first DHCP service of access The flow table of the message of device.
Further, after the second virtual machine is deleted, if none virtual machine accesses target in the first calculate node Subnet then deletes the first Dynamic Host Configuration Protocol server.And indicate the cleaning of the first virtual switch for forbidding the first virtual switch to pass through The flow table of the message of upstream Interface forwarding access Dynamic Host Configuration Protocol server.
The method of DHCP service is provided provided by the embodiment of the present invention, it is virtual that network administration apparatus obtains first first Then the access information of machine indicates the first Dynamic Host Configuration Protocol server with recording MAC Address and the IP of the first virtual machine according to access information The corresponding relationship of location, and indicate that the first virtual switch establishes the protocol interaction between the first virtual machine and the first Dynamic Host Configuration Protocol server Channel, as a result, when the first virtual machine requests DHCP service, so that it may provide DHCP service by the first Dynamic Host Configuration Protocol server for it. Compared with prior art, empty since the first Dynamic Host Configuration Protocol server and the first virtual machine are located at the same calculate node in the application Transmission path between quasi- machine and Dynamic Host Configuration Protocol server is shorter, and propagation delay time is shorter.In addition, passing through the distributed portion of Dynamic Host Configuration Protocol server Administration, even if a Dynamic Host Configuration Protocol server failure, the virtual machine where also only influencing the Dynamic Host Configuration Protocol server in calculate node obtains IP Address, the virtual machine in other calculate nodes are then unaffected.By specifying another Dynamic Host Configuration Protocol server to take as failure DHCP The proxy server of business device, can restore rapidly on the DHCP service of the virtual machine influenced by failure, to improve system Fault-tolerant ability.
The method of DHCP service is provided provided by based on the embodiment of the present invention, the embodiment of the present invention also provides one kind Network administration apparatus, for completing step performed by network administration apparatus in embodiment corresponding to Fig. 3.Referring to shown in Fig. 6, Network administration apparatus 60 includes: processor 601, memory 602, bus 603 and transceiver 604;The processor 601, institute Memory 602 is stated, the transceiver 604 is connected with each other by the bus 603;
Program code for executing the present invention program saves in the memory 602, and is held by processor 601 to control Row.
Memory 602 may include volatile memory (full name in English: volatile memory), such as arbitrary access Memory (full name in English: random-access memory, English abbreviation: RAM).Memory 602 also may include non-volatile Property memory (full name in English: non-volatile memory), such as read-only memory (full name in English: read-only Memory, English abbreviation: ROM), flash memory (full name in English: flash memory), hard disk (full name in English: hard Disk drive, English abbreviation: HDD) or solid state hard disk (full name in English: solid-state drive, English abbreviation: SSD). Memory 602 can also include the combination of the memory of mentioned kind.
Processor 601 can be central processing unit 601 (full name: Central Processing Unit, abbreviation: CPU), Or the combination of CPU and hardware chip.Above-mentioned hardware chip can be the (full name in English: network of network processing unit 601 Processor, English abbreviation: NP), specific integrated circuit (full name in English: application-specific integrated Circuit, English abbreviation: ASIC), programmable logic device (full name in English: programmable logic device, English Referred to as: PLD) or any combination thereof.Above-mentioned PLD can be Complex Programmable Logic Devices (full name in English: complex Programmable logic device, English abbreviation: CPLD), field programmable gate array (full name in English: field- Programmable gate array, English abbreviation: FPGA), Universal Array Logic (full name in English: generic array Logic, English abbreviation: GAL) or any combination thereof.
Processor 601, for calling the program code in memory 602, and by transceiver 604 receive other devices to The information such as data, the request that network administration apparatus 60 is sent, processor 601 are corresponding to generating after the information completion processing received The information such as instruction, data, issued by transceiver 604.In the present embodiment, the processor 601 of network administration apparatus 60 passes through Issue the virtual switch in instruction instruction calculate node, Dynamic Host Configuration Protocol server completes certain function, the data that processor 601 issues It can be the flow table issued to virtual switch, to indicate that virtual switch is forwarded the message received according to flow table.
In a kind of possible embodiment, when above procedure is executed by processor 601, following steps are executed:
The access information of first virtual machine is obtained by the transceiver 604, first virtual machine runs on One calculate node, the access information are used to indicate targeted subnet, first calculate node and first virtual machine MAC address and internet protocol address;Wherein, the targeted subnet is connect by first virtual machine The virtual subnet entered;
It is sent and is instructed by the transceiver 604, the first Dynamic Host Configuration Protocol server of instruction is with recording the MAC of first virtual machine The corresponding relationship of location and IP address;It is sent and is instructed by the transceiver 604, the first virtual switch of instruction establishes described first Protocol interaction channel between virtual machine and first Dynamic Host Configuration Protocol server;In order to which first Dynamic Host Configuration Protocol server is described in Protocol interaction channel is that first virtual machine mentions according to the MAC Address of first virtual machine and the corresponding relationship of IP address For DHCP service;Wherein, first Dynamic Host Configuration Protocol server and first virtual switch run on described first and calculate In node.
Optionally, when the processor 601 executes said program code, following steps is also realized: determining described first When virtual machine is the virtual machine of first access targeted subnet in first calculate node, pass through the transceiver 604 Instruction is sent, indicates that first calculate node creates first Dynamic Host Configuration Protocol server.
Optionally, when the processor 601 executes said program code, following steps is also realized: passing through the transceiver 604 send flow table to the first virtual switch, to forbid first virtual switch to forward at least two calculate node In virtual machine in other calculate nodes in addition to first calculate node access the message of first Dynamic Host Configuration Protocol server;Or Flow table is sent by the transceiver 604 to forbid first virtual switch to forward the first virtual machine access described extremely The message of the Dynamic Host Configuration Protocol server in other calculate nodes in few two calculate nodes in addition to first calculate node.
Optionally, when the processor 601 executes said program code, following steps is also realized: passing through the transceiver 604 send instruction, and the second calculate node of instruction creates the second Dynamic Host Configuration Protocol server, and second calculate node is described at least two Any calculate node in calculate node in addition to first calculate node, second Dynamic Host Configuration Protocol server are used for positioned at institute The virtual machine for stating the second calculate node and the access targeted subnet provides DHCP service;Second Dynamic Host Configuration Protocol server with it is described First Dynamic Host Configuration Protocol server shares MAC Address and IP address;Flow table is sent by the transceiver 604, forbids first void Quasi- interchanger and the second virtual switch send the message of access Dynamic Host Configuration Protocol server by respective upstream Interface;Wherein described Two virtual switches are located at described positioned at second calculate node;Or flow table is sent by the transceiver 604, forbid described First virtual switch forwards in other calculate nodes at least two calculate node in addition to first calculate node Virtual machine access the message of first Dynamic Host Configuration Protocol server, and forbid second virtual switch forwarding described at least two Virtual machine in other calculate nodes in calculate node in addition to second calculate node accesses second Dynamic Host Configuration Protocol server Message.
Optionally, when the processor 601 executes said program code, also realization following steps: when determining described second When Dynamic Host Configuration Protocol server is unavailable, flow table is sent by the transceiver 604, allows first virtual switch and described second Virtual switch sends the DHCP interacted between the second virtual machine and first virtual switch by respective upstream Interface Message;And the message for allowing first virtual switch that second virtual machine is forwarded to access first Dynamic Host Configuration Protocol server; Wherein second virtual machine is the virtual machine positioned at second calculate node and the access targeted subnet;
Sent and instructed by the transceiver 604, indicate first virtual switch establish second virtual machine with Protocol interaction channel between first Dynamic Host Configuration Protocol server;Second virtual switch is also indicated by the transceiver 604 Machine establishes the protocol interaction channel between second virtual machine and first Dynamic Host Configuration Protocol server.
The method of DHCP service is provided provided by based on the embodiment of the present invention, the embodiment of the present invention also provides one kind Calculate node, for completing step performed by calculate node in embodiment corresponding to Fig. 3.Referring to shown in Fig. 7, calculate node 70 include: processor 701, memory 702, bus 703 and transceiver 704;The processor 701, the memory 702, The transceiver 704 is connected with each other by the bus 703;
Program code for executing the present invention program is stored in memory 702, and is held by processor 701 to control Row.
Memory 702 may include volatile memory (full name in English: volatile memory), such as arbitrary access Memory (full name in English: random-access memory, English abbreviation: RAM).Memory 702 also may include non-volatile Property memory (full name in English: non-volatile memory), such as read-only memory (full name in English: read-only Memory, English abbreviation: ROM), flash memory (full name in English: flash memory), hard disk (full name in English: hard Disk drive, English abbreviation: HDD) or solid state hard disk (full name in English: solid-state drive, English abbreviation: SSD). Memory 702 can also include the combination of the memory of mentioned kind.
Processor 701 can be central processing unit 701 (full name: Central Processing Unit, abbreviation: CPU), Or the combination of CPU and hardware chip.Above-mentioned hardware chip can be the (full name in English: network of network processing unit 701 Processor, English abbreviation: NP), specific integrated circuit (full name in English: application-specific integrated Circuit, English abbreviation: ASIC), programmable logic device (full name in English: programmable logic device, English Referred to as: PLD) or any combination thereof.Above-mentioned PLD can be Complex Programmable Logic Devices (full name in English: complex Programmable logic device, English abbreviation: CPLD), field programmable gate array (full name in English: field- Programmable gate array, English abbreviation: FPGA), Universal Array Logic (full name in English: generic array Logic, English abbreviation: GAL) or any combination thereof.
Processor 701, for calling the program code in memory 702, in a kind of possible embodiment, when above-mentioned When program is executed by processor 701, completes the first virtual machine, the first Dynamic Host Configuration Protocol server and the first virtual switch and respectively correspond to Function;
First Dynamic Host Configuration Protocol server, described for being sent by the 704 receiving network managing device of transceiver The MAC address and internet protocol address of one virtual machine, and with recording the MAC of first virtual machine The corresponding relationship of location and IP address;
First virtual switch, for according to the instruction of the network administration apparatus establish first virtual machine with Protocol interaction channel between first Dynamic Host Configuration Protocol server;
First Dynamic Host Configuration Protocol server is also used to through the protocol interaction channel, according to the MAC of first virtual machine The corresponding relationship of address and IP address provides DHCP service for first virtual machine.
Optionally, when the processor 701 executes said program code, also according to the instruction of the network administration apparatus Create first Dynamic Host Configuration Protocol server.
Optionally, first virtual switch is also used to forbid described according to the instruction of the network administration apparatus One virtual switch forwards the virtual machine in other calculate nodes 70 to access the message of first Dynamic Host Configuration Protocol server;Or according to institute The instruction for stating network administration apparatus forbids that first virtual machine is forwarded to access the Dynamic Host Configuration Protocol server in other calculate nodes 70 Message.
Optionally, first virtual switch is also used to allow described the according to the instruction of the network administration apparatus One virtual switch sends the DHCP message interacted between the second virtual machine and first virtual switch by upstream Interface; And the report for according to the instruction of the network administration apparatus allowing that second virtual machine is forwarded to access first Dynamic Host Configuration Protocol server Text;Wherein second virtual machine is positioned at other calculate nodes 70 in addition to the calculate node 70 and access target The virtual machine of net;
First virtual switch is also used to establish second virtual machine according to the instruction of the network administration apparatus With the protocol interaction channel between first Dynamic Host Configuration Protocol server.
The method of DHCP service is provided provided by based on the embodiment of the present invention, the embodiment of the present invention also provides one kind Communication system, referring to shown in Fig. 8, communication system 80 includes network administration apparatus 801 and at least two calculate nodes 802, is used In completing corresponding to Fig. 3 in embodiment step performed by network administration apparatus and calculate node.
It is interconnected between at least two calculate nodes 802 by basic network, represents basis in Fig. 8 with physical switches 803 Network.
Network administration apparatus 801 can be network administration apparatus described in embodiment corresponding to Fig. 6, at least two Any calculate node 802 in calculate node can be calculate node described in embodiment corresponding to Fig. 7.
Network administration apparatus, calculate node and communication system, network management are provided provided by the embodiment of the present invention Device obtains the access information of the first virtual machine first, then indicates that the first Dynamic Host Configuration Protocol server record first is empty according to access information The MAC Address of quasi- machine and the corresponding relationship of IP address, and indicate that the first virtual switch establishes the first virtual machine and the first DHCP Protocol interaction channel between server, as a result, when the first virtual machine requests DHCP service, so that it may by the first DHCP service Device provides DHCP service for it.Compared with prior art, since the first Dynamic Host Configuration Protocol server and the first virtual machine are located at together in the application One calculate node, therefore the transmission path between virtual machine and Dynamic Host Configuration Protocol server is shorter, propagation delay time is shorter.In addition, passing through The distributed deployment of Dynamic Host Configuration Protocol server also only influences to calculate where the Dynamic Host Configuration Protocol server even if a Dynamic Host Configuration Protocol server failure Virtual machine in node obtains IP address, and the virtual machine in other calculate nodes is then unaffected.By specifying another DHCP Proxy server of the server as failure Dynamic Host Configuration Protocol server can restore rapidly on the DHCP of the virtual machine influenced by failure clothes Business, to improve system survivability.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
It will be understood by those skilled in the art that the embodiment of the present invention can provide as method, apparatus (equipment) or computer journey Sequence product.Therefore, complete hardware embodiment, complete software embodiment or combining software and hardware aspects can be used in the present invention The form of embodiment.Moreover, it wherein includes the calculating of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in machine usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.Computer program is stored/distributed in suitable medium, is provided together with other hardware or as the one of hardware Part can also use other distribution forms, such as pass through the wired or wireless telecommunication system of Internet or other.
The present invention be referring to the embodiment of the present invention method, apparatus (equipment) and computer program product flow chart with/ Or block diagram describes.It should be understood that each process that can be realized by computer program instructions in flowchart and/or the block diagram and/ Or the combination of the process and/or box in box and flowchart and/or the block diagram.It can provide these computer program instructions To general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices processor to generate one A machine so that by the instruction that the processor of computer or other programmable data processing devices executes generate for realizing The device for the function of being specified in one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although in conjunction with specific features and embodiment, invention has been described, it is clear that, do not departing from this hair In the case where bright spirit and scope, it can be carry out various modifications and is combined.Correspondingly, the specification and drawings are only institute The exemplary illustration of the invention that attached claim is defined, and be considered as covered in the scope of the invention any and all and repair Change, change, combining or equivalent.Obviously, those skilled in the art various changes and modifications can be made to the invention without It is detached from the spirit and scope of the present invention.For example, the scheme of the application is equally applicable to virtual machine replacing with container (such as Docker the case where) the case where, virtual machine and container coexist or virtual machine and container are not distinguished, and with virtual machine or Person's container is the case where the interface on virtual switch is to identify virtual machine or container.If these modifications of the invention and change Within the scope of the claims of the present invention and its equivalent technology, then the present invention is also intended to encompass these modification and variations and exists type It is interior.

Claims (12)

1. a kind of provide the method for dynamic host configuration protocol DHCP service, it is applied to network administration apparatus and at least two calculating Node, at least two calculate node include the first calculate node, which is characterized in that the first virtual machine, the first DHCP service Device and the first virtual switch run on first calculate node, and the method for providing DHCP service includes:
The network administration apparatus obtains the access information of first virtual machine, and the access information is used to indicate target Net, the MAC address of first calculate node and first virtual machine and Internet protocol IP Location;Wherein, the virtual subnet that the targeted subnet is accessed by first virtual machine;
The network administration apparatus indicates that first Dynamic Host Configuration Protocol server records the MAC Address and IP address of first virtual machine Corresponding relationship;Indicate that first virtual switch is established between first virtual machine and first Dynamic Host Configuration Protocol server Protocol interaction channel;
First Dynamic Host Configuration Protocol server is by the protocol interaction channel, according to the MAC Address of first virtual machine and IP The corresponding relationship of location provides DHCP service for first virtual machine;
The network administration apparatus forbids first virtual switch to forward at least two calculate node except described the The virtual machine in other calculate nodes outside one calculate node accesses the message of first Dynamic Host Configuration Protocol server;
Or the network administration apparatus forbids first virtual switch to forward the first virtual machine access described at least two The message of the Dynamic Host Configuration Protocol server in other calculate nodes in a calculate node in addition to first calculate node.
2. according to claim 1 provide the method for DHCP service, which is characterized in that the network administration apparatus obtains institute After the access information for stating the first virtual machine, further includes:
When the network administration apparatus determines that first virtual machine is first access mesh in first calculate node When marking the virtual machine of subnet, indicate that first calculate node creates first Dynamic Host Configuration Protocol server.
3. according to claim 1 or 2 provide the method for DHCP service, which is characterized in that further include:
The network administration apparatus indicates that the second calculate node creates the second Dynamic Host Configuration Protocol server, and second calculate node is described Any calculate node at least two calculate nodes in addition to first calculate node, second Dynamic Host Configuration Protocol server are used for DHCP service is provided to the virtual machine for being located at second calculate node and the access targeted subnet;Second DHCP service Device and first Dynamic Host Configuration Protocol server share MAC Address and IP address;
The network administration apparatus forbids first virtual switch and the second virtual switch to pass through respective upstream Interface Send the message of access Dynamic Host Configuration Protocol server;Wherein second virtual switch is located at described positioned at second calculate node;
Or the network administration apparatus forbids first virtual switch to forward at least two calculate node except described The virtual machine in other calculate nodes outside first calculate node accesses the message of first Dynamic Host Configuration Protocol server, and forbids described Second virtual switch forwards in other calculate nodes at least two calculate node in addition to second calculate node Virtual machine access the message of second Dynamic Host Configuration Protocol server.
4. according to claim 3 provide the method for DHCP service, which is characterized in that described to provide the method for DHCP service Further include:
When the network administration apparatus determines that second Dynamic Host Configuration Protocol server is unavailable, allow first virtual switch and Second virtual switch is sent by respective upstream Interface and is handed between the second virtual machine and first virtual switch Mutual DHCP message;And allow first virtual switch that second virtual machine is forwarded to access first Dynamic Host Configuration Protocol server Message;Wherein second virtual machine is the virtual machine positioned at second calculate node and the access targeted subnet;
The network administration apparatus indicates that first virtual switch establishes second virtual machine and the first DHCP takes Protocol interaction channel between business device;It also indicates second virtual switch and establishes second virtual machine and described first Protocol interaction channel between Dynamic Host Configuration Protocol server.
5. a kind of network administration apparatus characterized by comprising processor, memory, bus and transceiver;The processing Device, the memory, the transceiver are connected with each other by the bus;The memory is stored with program code, when described When processor executes said program code, following steps are realized:
The access information of the first virtual machine is obtained by the transceiver, first virtual machine runs on the first calculate node, The access information is used to indicate the media interviews control of targeted subnet, first calculate node and first virtual machine MAC Address and internet protocol address processed;Wherein, the virtual subnet that the targeted subnet is accessed by first virtual machine Net;
The MAC Address for recording first virtual machine by the transceiver the first Dynamic Host Configuration Protocol server of instruction is corresponding with IP address Relationship;By the transceiver indicate the first virtual switch establish first virtual machine and first Dynamic Host Configuration Protocol server it Between protocol interaction channel;It is empty according to described first in order to which first Dynamic Host Configuration Protocol server is by the protocol interaction channel The MAC Address of quasi- machine and the corresponding relationship of IP address provide DHCP service for first virtual machine;Wherein, the first DHCP Server and first virtual switch are run in first calculate node;
When the processor executes said program code, following steps are also realized: first void is forbidden by the transceiver Quasi- interchanger forwards the virtual machine in other calculate nodes at least two calculate nodes in addition to first calculate node to visit Ask the message of first Dynamic Host Configuration Protocol server;Or the first virtual switch forwarding described first is forbidden by the transceiver Virtual machine accesses the clothes of the DHCP in other calculate nodes at least two calculate node in addition to first calculate node The message of business device.
6. network administration apparatus according to claim 5, which is characterized in that the processor executes said program code When, it also realizes following steps: determining that first virtual machine is first access target in first calculate node When the virtual machine of subnet, indicate that first calculate node creates first Dynamic Host Configuration Protocol server by the transceiver.
7. network administration apparatus according to claim 5 or 6, which is characterized in that the processor executes described program generation Code when, also realization following steps: by the transceiver indicate the second calculate node create the second Dynamic Host Configuration Protocol server, described second Calculate node is any calculate node in addition to first calculate node at least two calculate node, described second Dynamic Host Configuration Protocol server is used to provide DHCP service to the virtual machine for being located at second calculate node and the access targeted subnet;Institute It states the second Dynamic Host Configuration Protocol server and first Dynamic Host Configuration Protocol server shares MAC Address and IP address;Forbidden by the transceiver First virtual switch and the second virtual switch send the message of access Dynamic Host Configuration Protocol server by respective upstream Interface; Wherein second virtual switch is located at described positioned at second calculate node;Or forbid described by the transceiver One virtual switch forwards in other calculate nodes at least two calculate node in addition to first calculate node Virtual machine accesses the message of first Dynamic Host Configuration Protocol server, and forbids the second virtual switch forwarding at least two meter The virtual machine in other calculate nodes in operator node in addition to second calculate node accesses second Dynamic Host Configuration Protocol server Message.
8. network administration apparatus according to claim 7, which is characterized in that the processor executes said program code When, also realize following steps: when determining that second Dynamic Host Configuration Protocol server is unavailable, passing through the transceiver allows described first Virtual switch and second virtual switch are virtual by respective upstream Interface the second virtual machine of transmission and described first The DHCP message of interaction between interchanger;And first virtual switch is allowed to forward the second virtual machine access described the The message of one Dynamic Host Configuration Protocol server;Wherein second virtual machine is positioned at second calculate node and the access targeted subnet Virtual machine;
Indicate that first virtual switch establishes second virtual machine and first DHCP service by the transceiver Protocol interaction channel between device;Also indicate that second virtual switch establishes second virtual machine by the transceiver With the protocol interaction channel between first Dynamic Host Configuration Protocol server.
9. a kind of calculate node characterized by comprising processor, memory, bus and transceiver;The processor, institute Memory is stated, the transceiver is connected with each other by the bus;The memory is stored with program code, when the processor When executing said program code, the first virtual machine, the first Dynamic Host Configuration Protocol server and the first virtual switch are realized;
First Dynamic Host Configuration Protocol server, first virtual machine for being sent by the transceiver receiving network managing device MAC address and internet protocol address, and record the MAC Address and IP of first virtual machine The corresponding relationship of location;
First virtual switch, for according to the instruction of the network administration apparatus establish first virtual machine with it is described Protocol interaction channel between first Dynamic Host Configuration Protocol server;
First Dynamic Host Configuration Protocol server is also used to through the protocol interaction channel, according to the MAC Address of first virtual machine DHCP service is provided with the corresponding relationship of IP address for first virtual machine;
First virtual switch is also used to forbid first virtual switch according to the instruction of the network administration apparatus The virtual machine in other calculate nodes is forwarded to access the message of first Dynamic Host Configuration Protocol server;Or according to the network administration apparatus Instruction forbid the message for forwarding first virtual machine to access the Dynamic Host Configuration Protocol server in other calculate nodes.
10. calculate node according to claim 9, which is characterized in that when the processor executes said program code, Instruction also according to the network administration apparatus creates first Dynamic Host Configuration Protocol server.
11. calculate node according to claim 9, which is characterized in that
First virtual switch is also used to allow first virtual switch according to the instruction of the network administration apparatus The DHCP message interacted between the second virtual machine and first virtual switch is sent by upstream Interface;And according to the net The message that the instruction of network managing device allows that second virtual machine is forwarded to access first Dynamic Host Configuration Protocol server;Wherein described Two virtual machines are the virtual machine positioned at other calculate nodes in addition to the calculate node and access targeted subnet;
First virtual switch is also used to establish second virtual machine and institute according to the instruction of the network administration apparatus State the protocol interaction channel between the first Dynamic Host Configuration Protocol server.
12. a kind of communication system, which is characterized in that including such as described in any item network administration apparatus of claim 5-8 and At least two such as described in any item calculate nodes of claim 9-11.
CN201610216278.1A 2016-04-07 2016-04-07 The method, apparatus and system of DHCP service are provided Active CN105657081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610216278.1A CN105657081B (en) 2016-04-07 2016-04-07 The method, apparatus and system of DHCP service are provided

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610216278.1A CN105657081B (en) 2016-04-07 2016-04-07 The method, apparatus and system of DHCP service are provided

Publications (2)

Publication Number Publication Date
CN105657081A CN105657081A (en) 2016-06-08
CN105657081B true CN105657081B (en) 2019-01-18

Family

ID=56497002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610216278.1A Active CN105657081B (en) 2016-04-07 2016-04-07 The method, apparatus and system of DHCP service are provided

Country Status (1)

Country Link
CN (1) CN105657081B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11882050B2 (en) 2016-07-04 2024-01-23 Telefonaktiebolaget Lm Ericsson (Publ) Method, apparatus and system for handling an internet protocol packet
CN106936943A (en) * 2017-03-21 2017-07-07 深信服科技股份有限公司 The distribution method and system of virtual machine address
WO2018188089A1 (en) * 2017-04-14 2018-10-18 华为技术有限公司 Data processing method, storage system and exchange device
CN106953943B (en) * 2017-04-25 2019-07-16 中国联合网络通信集团有限公司 Method and device suitable for switch communication
CN108933844B (en) * 2017-05-27 2020-08-25 华为技术有限公司 Method and equipment for providing DHCP service
CN107800696B (en) * 2017-10-23 2020-07-03 国云科技股份有限公司 Method for identifying communication counterfeiting source on cloud platform virtual switch
CN109768871B (en) * 2017-11-09 2022-09-16 阿里巴巴集团控股有限公司 Method for configuring multiple virtual network cards, host machine and storage medium
CN108039968B (en) * 2017-12-12 2021-02-23 深圳市泰信通信息技术有限公司 Network optimization method, device and computer readable storage medium
CN108307002B (en) * 2018-05-09 2021-06-22 华为技术有限公司 DHCP message processing method and device
CN108390956A (en) * 2018-05-29 2018-08-10 郑州云海信息技术有限公司 A kind of method and system for virtual machine configuration internet protocol address
CN108833613B (en) * 2018-09-28 2021-11-26 郑州云海信息技术有限公司 Method and system for implementing dynamic host configuration protocol
CN115291964B (en) * 2018-12-21 2023-05-09 华为云计算技术有限公司 Mechanism for reducing start-up delay of server-less function
CN113286011B (en) * 2021-04-27 2023-08-22 锐捷网络股份有限公司 IP address allocation method and device based on VXLAN
CN113923253A (en) * 2021-10-12 2022-01-11 西安万像电子科技有限公司 Virtual machine image transmission method, electronic equipment and storage medium
CN114338609A (en) * 2022-01-25 2022-04-12 广东省广播电视网络股份有限公司 IP address allocation management system and method thereof
CN115484232A (en) * 2022-07-29 2022-12-16 天翼云科技有限公司 DHCP server deployment method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534329A (en) * 2009-04-16 2009-09-16 华为技术有限公司 IP address assignment method and system
CN104394130A (en) * 2014-11-12 2015-03-04 国云科技股份有限公司 A multi-tenant virtual network isolating method
CN104468574A (en) * 2014-12-05 2015-03-25 中国联合网络通信集团有限公司 Dynamic IP address acquisition method, system and device for virtual machines
CN104717081A (en) * 2013-12-13 2015-06-17 杭州华为数字技术有限公司 Gateway function realization method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9419937B2 (en) * 2014-01-29 2016-08-16 Vmware, Inc. System and method for dynamically configuring a DNS server in a virtual network environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534329A (en) * 2009-04-16 2009-09-16 华为技术有限公司 IP address assignment method and system
CN104717081A (en) * 2013-12-13 2015-06-17 杭州华为数字技术有限公司 Gateway function realization method and device
CN104394130A (en) * 2014-11-12 2015-03-04 国云科技股份有限公司 A multi-tenant virtual network isolating method
CN104468574A (en) * 2014-12-05 2015-03-25 中国联合网络通信集团有限公司 Dynamic IP address acquisition method, system and device for virtual machines

Also Published As

Publication number Publication date
CN105657081A (en) 2016-06-08

Similar Documents

Publication Publication Date Title
CN105657081B (en) The method, apparatus and system of DHCP service are provided
CN112470436B (en) Systems, methods, and computer-readable media for providing multi-cloud connectivity
US20240113998A1 (en) Domain name system operations implemented using scalable virtual traffic hub
US10897417B2 (en) Automated route propagation among networks attached to scalable virtual traffic hubs
US20220377045A1 (en) Network virtualization of containers in computing systems
US10742446B2 (en) Interconnecting isolated networks with overlapping address ranges via scalable virtual traffic hubs
WO2017045471A1 (en) Method and apparatus for acquiring service chain information in cloud computing system
JP5976942B2 (en) System and method for providing policy-based data center network automation
TWI543566B (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
CN108347493B (en) Hybrid cloud management method and device and computing equipment
CN111917893B (en) Virtual private cloud and data center under cloud communication and configuration method and related device
US20190222440A1 (en) Inter-Cloud Communication Method and Related Device, and Inter-Cloud Communication Configuration Method and Related Device
US9584369B2 (en) Methods of representing software defined networking-based multiple layer network topology views
JP6738965B2 (en) Network service life cycle management permission method and device
CN110896371B (en) Virtual network equipment and related method
JP6330923B2 (en) Orchestrator device, system, virtual machine creation method and program
JP2013097394A (en) Network system management method, network system, and management server
CN105991387A (en) Message transformation method and device of virtual extensible local area network (VXLAN)
CN109995639B (en) Data transmission method, device, switch and storage medium
CN110855488B (en) Virtual machine access method and device
WO2021037133A1 (en) Network management method and device
CN105704042A (en) Message processing method, BNG and BNG cluster system
WO2021147358A1 (en) Network interface establishing method, apparatus, and system
WO2020029928A1 (en) Method for establishing bgp session and sending interface address and alias, and network device
CN107454011A (en) A kind of message forwarding method, apparatus and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220216

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right