CN108667957A - IP address distribution method, the first electronic equipment and first server - Google Patents
IP address distribution method, the first electronic equipment and first server Download PDFInfo
- Publication number
- CN108667957A CN108667957A CN201810487743.4A CN201810487743A CN108667957A CN 108667957 A CN108667957 A CN 108667957A CN 201810487743 A CN201810487743 A CN 201810487743A CN 108667957 A CN108667957 A CN 108667957A
- Authority
- CN
- China
- Prior art keywords
- address
- server
- electronic equipment
- virtual machine
- broadcasting packet
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
An embodiment of the present invention provides a kind of IP address distribution method, the first electronic equipment and first servers, if the first virtual machine sends the broadcasting packet for carrying request distribution IP address in the first electronic equipment, then intercept and capture the broadcasting packet, prevent the first electronic equipment by the broadcasting packet from being forwarded at least one second electronic equipment, at least one second electronic equipment includes for distributing the second server of IP address (quantity of second server may be one or more), i.e. broadcasting packet will not be forwarded to second server by the first electronic equipment;Therefore, one or more second servers will not all generate corresponding feedback message;And in the present embodiment, it needs first server to send feedback message, does not need each second server and send feedback message, to greatly reduce the quantity of transmitting message, substantially reduce the network bandwidth of message occupancy, reduce the waste of Internet resources.
Description
Technical field
The present invention relates to fields of communication technology, are more particularly to IP address distribution method, the first electronic equipment and first
Server.
Background technology
Virtual network is a kind of comprising the computer network for being at least partly virtual network link.Virtual network link be
Two electric rooms do not include physical connection, but are realized by network virtualization.Virtualization refers to by virtualizing skill
One electronic equipment is virtually more virtual machines by art, can pass through virtual network communication between each virtual machine.
Before virtual machine is by virtual network communication, need server (for example, DHCP (Dynamic Host
Configuration Protocol, dynamic host configuration protocol) server) it is that virtual machine distributes IP (Internet
ProtocolAddress, internet protocol address) address, it is that virtual machine distributes IP address that current server, which is exemplified below,
Method:As shown in Figure 1, it is assumed that the first electronic equipment 11 includes the first virtual machine and the second virtual machine, it is assumed that first is virtual
Machine sends the broadcasting packet for IP address requesting, then each second server 12 for distributing IP address can receive
The broadcasting packet, each second server 12 can feed back the Target IP for carrying promising first virtual machine and distributing to the first virtual machine 11
The feedback message of address.
To sum up, a large amount of broadcasting packet occupies a large amount of network bandwidth, causes the waste of Internet resources.
Invention content
In view of this, the present invention provides a kind of IP address distribution method, the first electronic equipment and first server, with
Overcome the problems, such as the waste of Internet resources in the prior art.
To achieve the above object, the present invention provides the following technical solutions:
A kind of IP address distribution method is applied to the first electronic equipment, and first electronic equipment includes at least one void
Quasi- machine, at least one virtual machine include the first virtual machine, and the IP address distribution method includes:
It detects that first virtual machine sends the broadcasting packet for carrying request distribution IP address, intercepts and captures the broadcast report
Text, at least so that the broadcasting packet cannot be forwarded at least one second electronic equipment by first electronic equipment, it is described
At least one second electronic equipment includes the second server for distributing IP address;
The broadcasting packet is sent to first server, the first server is previously stored with the second server
Corresponding current unappropriated IP address;
Receive the feedback of the target ip address of the promising first virtual machine distribution of carrying of the first server feedback
Message, the target ip address belong to the corresponding current unappropriated IP address of the second server.
Wherein, first electronic equipment includes the first virtual switch for connecting at least one virtual machine,
It is described to intercept and capture the broadcasting packet and include:
Before first virtual switch receives the broadcasting packet, the broadcasting packet is intercepted and captured so that described
First virtual switch cannot receive the broadcasting packet;
Or,
For forwarding the first of the broadcasting packet at least one virtual machine in first virtual switch
Before flow table obtains the broadcasting packet, the broadcasting packet is intercepted and captured so that first flow table cannot be by the broadcasting packet
It is forwarded at least one virtual machine.
Wherein, first electronic equipment includes for connecting first electronic equipment and at least one second electricity
Second virtual switch of sub- equipment, the intercepting and capturing broadcasting packet include:
Before second virtual switch receives the broadcasting packet, the broadcasting packet is intercepted and captured so that described
Second virtual switch cannot receive the broadcasting packet;
Or,
For forwarding the broadcasting packet at least one second electronic equipment in second virtual switch
The second flow table obtain the broadcasting packet before, intercept and capture the broadcasting packet so that second flow table cannot will it is described extensively
It reports text and is forwarded at least one second electronic equipment.
Wherein, at least one second electronic equipment further includes:It is at least one to be in same with first electronic equipment
The other third electronic equipment of grade.
Wherein, first electronic equipment includes the first virtual switch for connecting at least one virtual machine,
And the second virtual switch for connecting first electronic equipment and at least one second electronic equipment, it is described
Receive the feedback message of the target ip address of the promising first virtual machine distribution of carrying of the first server feedback, packet
It includes:
Second virtual switch receives the feedback message;
Mailing address of second virtual switch based on the first electronic equipment described in the feedback message, will be described
Feedback message is sent to the first virtual switch in first electronic equipment;
MAC Address of first virtual switch based on the first virtual machine described in the feedback message, will be described anti-
Feedback message is sent to first virtual machine.
A kind of IP address distribution method is applied to first server, including:
Intercept and capture the broadcasting packet for carrying request distribution IP address of the first virtual machine transmission so that first virtual machine
The broadcasting packet cannot be forwarded at least one second electronic equipment by affiliated first electronic equipment, and described at least one second
Electronic equipment includes the second server for distributing IP address;
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
Being used to indicate the second server to second server transmission, to record the target ip address described
The instruction information that first virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
Wherein, the first server is also stored with:The corresponding at least one allocated IP of the second server
The MAC Address of location and virtual machine corresponding at least one allocated IP address, the method further include:
Store the MAC Address of the target ip address first virtual machine corresponding with the target ip address.
Wherein, in the corresponding current unappropriated IP address from the pre-stored second server, mesh is determined
IP address is marked, including:
Obtain the device identification of first electronic equipment;
From the corresponding IP address distribution managing process of pre-stored each device identification, acquisition is set with first electronics
The corresponding target ip address of standby device identification distributes managing process;
Executing the target ip address distribution managing process includes:
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
Being used to indicate the second server to second server transmission, to record the target ip address described
The instruction information that first virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
A kind of first electronic equipment, first electronic equipment includes at least one virtual machine, described at least one virtual
Machine includes the first virtual machine, further includes:
Memory, for storing program;
Processor, for executing described program, described program is specifically used for:Detect that first virtual machine sends carrying
The broadcasting packet for having request distribution IP address, intercepts and captures the broadcasting packet, at least so that first electronic equipment cannot be by institute
It states broadcasting packet and is forwarded at least one second electronic equipment, at least one second electronic equipment includes for distributing IP
The second server of location;
The broadcasting packet is sent to first server, the first server is previously stored with the second server
Corresponding current unappropriated IP address;
Receive the feedback of the target ip address of the promising first virtual machine distribution of carrying of the first server feedback
Message, the target ip address belong to the corresponding current unappropriated IP address of the second server.
A kind of first server, including:
Memory is used for storing said program;
Processor, for executing described program, described program is specifically used for:
Intercept and capture the broadcasting packet for carrying request distribution IP address of the first virtual machine transmission so that first virtual machine
The broadcasting packet cannot be forwarded at least one second electronic equipment by affiliated first electronic equipment, and described at least one second
Electronic equipment includes the second server for distributing IP address;
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
Being used to indicate the second server to second server transmission, to record the target ip address described
The instruction information that first virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
It can be seen via above technical scheme that compared with prior art, an embodiment of the present invention provides a kind of IP address point
Method of completing the square, if the first virtual machine sends the broadcasting packet for carrying request distribution IP address in the first electronic equipment, intercepting and capturing should
Broadcasting packet so that the broadcasting packet cannot be forwarded at least one second electronic equipment by the first electronic equipment, it is described extremely
Few second electronic equipment include for distribute the second server of IP address (quantity of second server may be one or
It is multiple), i.e. broadcasting packet will not be forwarded to second server, such as Dynamic Host Configuration Protocol server by the first electronic equipment;Therefore, one or
Multiple second servers will not all generate corresponding feedback message;Broadcasting packet is sent to first server by the present embodiment, by
It is previously stored with the corresponding current unappropriated IP address of second server in first server, therefore, first server can be with
It is the first virtual machine selection target IP address, and promising first virtual machine will be carried from current unappropriated IP address
The feedback message of the target ip address of distribution is sent to the first virtual machine, to realize the mesh for distributing IP address for virtual machine
, in the present embodiment, first server is needed to send feedback message, does not need each second server and send feedback message, from
And the quantity of transmitting message is greatly reduced, the network bandwidth of message occupancy is substantially reduced, the waste of Internet resources is reduced.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the schematic diagram of the transmission path of broadcasting packet and respective feedback message in the prior art;
Fig. 2 is a kind of structure chart of realization method of IP address distribution system;
Fig. 3 is a kind of signaling diagram of realization method of IP address distribution method provided in an embodiment of the present invention;
Fig. 4 a are a kind of schematic diagram of broadcasting packet transmission path provided in an embodiment of the present invention;
Fig. 4 b are the schematic diagram of another broadcasting packet transmission path provided in an embodiment of the present invention;
Fig. 5 is a kind of structure chart of the realization method provided in an embodiment of the present invention for being applied to the first electronic equipment;
Fig. 6 is a kind of structure chart of realization method of first server provided in an embodiment of the present invention;
Fig. 7 is the structure chart of another realization method of the first electronic equipment provided in an embodiment of the present invention;
Fig. 8 is the structure chart of another realization method of first server provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In the embodiment of the present invention by second server with and with the first electronic equipment 11 be in the other third electronics of ad eundem
Equipment is referred to as the second electronic equipment 12, and second server 12 is used to be third electronic equipment and the first electronics in the prior art
Equipment 11 distributes IP address.
First electronic equipment 11 may include:At least one virtual machine 111, the first virtual switch 112 and second are empty
Quasi- interchanger 113.
Wherein, the first virtual switch 112 at least one virtual machine 111 for being connected;Second virtual switch
113 with each second electronic equipment 12 for being connected.
First virtual switch 112 can be bridge br-int;Second virtual switch 113 can be tunnel net bridge br-
tun。
Assuming that at least one virtual machine 111 includes the first virtual machine and the second virtual machine, if the first virtual switch
Machine 112 receives the broadcasting packet of the request distribution IP address of the first virtual machine transmission, and the first virtual switch 112 can should
Broadcasting packet is forwarded to other virtual machines, as shown in Figure 1, for the transmission of broadcasting packet and respective feedback message in the prior art
A kind of propagation path schematic diagram in path.
If the first virtual machine sends the broadcasting packet 1 of request distribution IP address, it is wide that the first virtual switch 112 receives this
After reporting text 1, which can be forwarded to the second virtual machine and the second virtual switch 113 (such as Fig. 1 dotted lines institute
Show);After second virtual switch 113 receives broadcasting packet 1, broadcasting packet 1 can be sent to (the figure of third electronic equipment 12
Illustrated by taking a third electronic equipment 21 as an example in 2) and one or more second server 12 (with two the in Fig. 2
It is illustrated for two servers);And each second server 12 can respond the broadcasting packet 1, and the second virtual machine, third are electric
Sub- equipment will not generally respond the broadcasting packet 1.
, can be by the broadcast after if the second virtual switch 121 in third electronic equipment 12 receives the broadcasting packet 1
Report the first virtual switch 122 that 1 text is sent in third electronic equipment, the first virtual switch 122 that can report the broadcast
Text 1 is sent in each virtual machine 123 that third electronic equipment includes.Each second server 12 responds the broadcasting packet 1 and obtains
Message 2 is fed back, can be that the first virtual machine in the first electronic equipment 11 sends the feedback message 2 for carrying target ip address.
A large amount of broadcasting packet and feedback message occupy a large amount of network bandwidth, cause the waste of Internet resources.
An embodiment of the present invention provides a kind of IP address distribution method, which can be applied to the first electricity
Sub- equipment, the first electronic equipment may belong to IP address distribution system, as shown in Fig. 2, for a kind of reality of IP address distribution system
The structure chart of existing mode, the IP address distribution system include:
First electronic equipment 11, first server 13 and at least one second electronic equipment 12, wherein the first electronics is set
Standby 11 may include:At least one virtual machine 111, the first virtual switch 112 and the second virtual switch 113;It is described extremely
Second electronic equipment 12 may include less:It is at least one to be in the other third electronics of ad eundem with the first electronic equipment 11 and set
Standby 12, second server 12.
Wherein, the first virtual switch 112 at least one virtual machine 111 for being connected;Second virtual switch
113 at least one second electronic equipment 12 for being connected.
First virtual switch 112 can be bridge br-int;Second virtual switch 113 can be tunnel net bridge br-
tun。
First server 13 is used to divide for 12 and first electronic equipment 11 of each third electronic equipment in the embodiment of the present invention
With IP address, first server 13 is previously stored with the current unappropriated IP address of second server 12.
Wherein, other 12 and first electronic equipment 11 of third electronic equipment of ad eundem refers to all being needs by first server
13 distribution IP address;Third electronic equipment 12 and the first electronic equipment 11 are in same ground i.e. in IP address distribution system
Position.
IP address distribution method provided in an embodiment of the present invention can intercept and capture the broadcasting packet, change the transmission of broadcasting packet
Path, i.e. the first electronic equipment detect that the first virtual machine sends the broadcasting packet for carrying request distribution IP address, intercept and capture institute
Broadcasting packet is stated, is set at least so that the broadcasting packet cannot be forwarded at least one second electronics by first electronic equipment
It is standby;The feedback message of the target ip address of the promising first virtual machine distribution of carrying of the first server feedback is received,
The target ip address belongs to the corresponding current unappropriated IP address of the second server.
Since broadcasting packet will not be sent to the second electronic equipment, so broadcasting packet will not be sent to each third electronics and set
Standby and second server, therefore, broadcasting packet will not be forwarded in each virtual machine that third electronic equipment includes, and one or
Multiple second servers will not respond the broadcasting packet, so a large amount of feedback message is not will produce, to reduce broadcast report
The transmission quantity of text and feedback message, to save network bandwidth.
In conjunction with the structure of IP address distribution system, IP address distribution method is illustrated below, as shown in figure 3, for this
A kind of signaling diagram of realization method of IP address distribution method that inventive embodiments provide, this method include:
Step S301:First electronic equipment 11 detects that first virtual machine is sent and carries request distribution IP address
Broadcasting packet intercepts and captures the broadcasting packet.
It is set at least so that the broadcasting packet cannot be forwarded at least one second electronics by first electronic equipment 11
Standby, at least one second electronic equipment includes the second server for distributing IP address.
In an alternative embodiment, the broadcast can be intercepted and captured before the first virtual switch 112 receives broadcasting packet
Message so that the first virtual switch 112 cannot receive the broadcasting packet.Since the first virtual switch 112 does not connect
The broadcasting packet is received, therefore, which will not be forwarded to the first electronic equipment and include by the first virtual switch 112
In other virtual machines, broadcasting packet will not be forwarded to third electronic equipment and second service by the first virtual switch 112
In device, therefore, reduces the quantity for sending broadcasting packet, save bandwidth resources.From another angle, each is decreased
The feedback message of the two server feedback broadcasting packets, to save bandwidth resources.
In an alternative embodiment, it can be judged by the corresponding protocol number of broadcasting packet and port numbers, the broadcast report
Whether text will be sent to the first virtual switch 112, for example, protocol number is UDP (User DatagramProtocol, number of users
According to datagram protocol), port numbers be 68 DHCP (Dynamic HostConfiguration Protocol, dynamic host configuration association
View) message is the broadcasting packet for needing to be sent to the first virtual switch 112.
As shown in fig. 4 a, it is a kind of schematic diagram of broadcasting packet transmission path provided in an embodiment of the present invention.
In Fig. 4 a shown in dotted line, after the first virtual machine 111 sends broadcasting packet, the first electronic equipment 11 intercepts and captures the broadcast report
Wen Hou is sent directly to first server 13, needs not move through the first virtual switch 112 and the second virtual switch 113.
In another alternative embodiment, the first virtual switch 112 includes the first flow table, and the first flow table is used for the first electricity
At least one virtual machine that sub- equipment 11 includes forwards the broadcasting packet.In first virtual switch for
Before at least one virtual machine forwards the first flow table of the broadcasting packet to obtain the broadcasting packet, the broadcast is intercepted and captured
Message.
First flow table can be also used for forwarding the broadcasting packet to the second virtual switch 113.
Even if the first virtual switch 112 receives the broadcasting packet, as long as receiving the broadcasting packet in the first flow table
It is trapped before, the transmission path of broadcasting packet can also be as shown in fig. 4 a.
In another alternative embodiment, it can be intercepted and captured before the second virtual switch 113 receives the broadcasting packet
The broadcasting packet so that second virtual switch 113 cannot receive the broadcasting packet.
Since broadcasting packet is to be sent to the second virtual switch 113 by the first virtual switch 112, first
Broadcasting packet can be sent in other virtual machines that the first electronic equipment 11 includes by virtual switch 112, and still, second is virtual
Broadcasting packet cannot be sent in third electronic equipment by interchanger 113, be provided in an embodiment of the present invention another as shown in Figure 4 b
A kind of schematic diagram of broadcasting packet transmission path.
In a further alternative embodiment, for being set at least one second electronics in second virtual switch
It is standby forward the second flow table of the broadcasting packet to obtain the broadcasting packet before, intercept and capture the broadcasting packet so that described the
The broadcasting packet cannot be forwarded at least one second electronic equipment by two flow tables.
Optionally, the second flow table is additionally operable to forward broadcasting packet to second server.
Since the second flow table does not obtain broadcasting packet, the second virtual switch can not be turned broadcasting packet
Hair, therefore, the transmission path of broadcasting packet is still as shown in Figure 4 b.
Step S302:The broadcasting packet is sent to first server 13, the first service by the first electronic equipment 11
Device 13 is previously stored with the corresponding current unappropriated IP address of the second server.
Step S303:First server 13 is from the corresponding current unappropriated IP of the pre-stored second server
In location, target ip address is determined.
Step S304:First server 13 is used to indicate the second server record to the transmission of the second server 12
The instruction information that the target ip address has been used by first virtual machine.
Step S305:The feedback message for carrying the target ip address is sent to first void by first server 13
Quasi- machine.
In an alternative embodiment, feedback message can carry the mailing address and first of first electronic equipment
The MAC Address of virtual machine.I.e. purpose IP address is fed back to the first virtual machine by first server 13 in a manner of unicast.Specifically
Including:After second virtual switch 113 receives feedback message, based on the mailing address of the first electronic equipment, message will be fed back
It is sent to the first electronic equipment 11, the first electronic equipment will not be sent to the second electronic equipment;First virtual switch is based on the
Feedback message is sent to the first virtual machine by the MAC Address of one virtual machine, that is, is reduced feedback message forwarding quantity, saved
Bandwidth.
The mailing address of first electronic equipment may include:IP address.
An embodiment of the present invention provides a kind of IP address distribution methods, if the transmission of the first virtual machine is held in the first electronic equipment
It is loaded with the broadcasting packet of request distribution IP address, then intercepts and captures the broadcasting packet so that the first electronic equipment cannot be by the broadcast
Message is forwarded at least one second electronic equipment, and at least one second electronic equipment includes for distributing IP address
Two servers (quantity of second server may be one or more), i.e., broadcasting packet will not be forwarded to by the first electronic equipment
Second server, such as Dynamic Host Configuration Protocol server;Therefore, one or more second servers will not all generate corresponding feedback message;
Broadcasting packet is sent to first server by the present embodiment, and since first server is previously stored with, second server is corresponding to work as
Preceding unappropriated IP address, therefore, first server can select mesh from current unappropriated IP address for the first virtual machine
IP address is marked, and the feedback message for the target ip address for carrying the promising first virtual machine distribution is sent to first virtually
Machine in the present embodiment, needs first server to send feedback message to realize the purpose for distributing IP address for virtual machine,
Do not need each second server send feedback message substantially reduce message to greatly reduce the quantity of transmitting message
The network bandwidth of occupancy reduces the waste of Internet resources.
In an alternative embodiment, first server 13 can be previously stored with the second server corresponding at least one
The MAC Address of a allocated IP address and virtual machine corresponding at least one allocated IP address.
In an alternative embodiment, at least one allocated IP address that first server 13 stores is empty accordingly
The MAC Address of quasi- machine can be presented in table form, for example, IP/MAC address mapping table.
In an alternative embodiment, first server 13 may include:The corresponding IP address distribution of each device identification
Managing process, optionally, different IP address distribution managing process correspond to different IP sections of IP address;First server 13 is being held
Row is from the corresponding current unappropriated IP address of the pre-stored second server, when determining target ip address, specifically
For:
Obtain the device identification of first electronic equipment;
From the corresponding IP address distribution managing process of pre-stored each device identification, acquisition is set with first electronics
The corresponding target ip address of standby device identification distributes managing process;
Executing the target ip address distribution managing process includes:
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
Being used to indicate the second server to second server transmission, to record the target ip address described
The instruction information that first virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
To sum up, IP address distribution method provided in an embodiment of the present invention, in the case where not changing protocol, Ke Yigeng
The propagation path for changing broadcasting packet saves bandwidth resources to reduce the hop count of broadcasting packet.Implement in the present invention
In example so that the first virtual machine in the first electronic equipment can orient is sent to broadcasting packet in first server 13.
In the prior art due to the first electronic equipment broadcast transmission broadcasting packet, so broadcasting packet may be by illegal server
(for example, Dynamic Host Configuration Protocol server) malicious exploitation, for example, pushing a virtual machine by puppet as gateway address, in realizing
Between people attack etc..It, will not be non-since broadcasting packet is directed and is sent in first server 13 in the embodiment of the present invention
The case where method server malicious exploitation.
As shown in figure 5, for a kind of structure of the realization method provided in an embodiment of the present invention for being applied to the first electronic equipment
Figure, the IP address distributor are applied to the first electronic equipment, and first electronic equipment includes at least one virtual machine, described
At least one virtual machine includes the first virtual machine, and the IP address distribution facing paper includes:
Interception module 51, for detecting that first virtual machine sends the broadcast report for carrying request and distributing IP address
Text intercepts and captures the broadcasting packet, at least so that first electronic equipment broadcasting packet cannot be forwarded to it is at least one
Second electronic equipment, at least one second electronic equipment include the second server for distributing IP address;
Sending module 52, for the broadcasting packet to be sent to first server, the first server prestores
There is the corresponding current unappropriated IP address of the second server;
Receiving module 53, the mesh of the promising first virtual machine distribution of carrying for receiving the first server feedback
The feedback message of IP address is marked, the target ip address belongs to the corresponding current unappropriated IP address of the second server.
In an alternative embodiment, first electronic equipment includes first for connecting at least one virtual machine
Virtual switch, interception module 51 include:
First intercepts and captures unit, for before first virtual switch receives the broadcasting packet, described in intercepting and capturing
Broadcasting packet so that first virtual switch cannot receive the broadcasting packet;
Or,
Second intercepts and captures unit, for being used to forward institute at least one virtual machine in first virtual switch
Before the first flow table acquisition broadcasting packet for stating broadcasting packet, the broadcasting packet is intercepted and captured so that first flow table is not
The broadcasting packet can be forwarded to at least one virtual machine.
In an alternative embodiment, first electronic equipment include for connect first electronic equipment with it is described extremely
Second virtual switch of few second electronic equipment, interception module 51 include:
Third intercepts and captures unit, for before second virtual switch receives the broadcasting packet, described in intercepting and capturing
Broadcasting packet so that second virtual switch cannot receive the broadcasting packet;
Or,
4th intercepts and captures unit, for being used for at least one second electronic equipment in second virtual switch
Before forwarding the second flow table of the broadcasting packet to obtain the broadcasting packet, the broadcasting packet is intercepted and captured so that described second
The broadcasting packet cannot be forwarded at least one second electronic equipment by flow table.
In an alternative embodiment, first electronic equipment includes first for connecting at least one virtual machine
Virtual switch, and, second for connecting first electronic equipment and at least one second electronic equipment is virtual
Interchanger, receiving module 53 include:
First receiving unit receives the feedback message for second virtual switch;
First transmission unit is based on the first electronic equipment described in the feedback message for second virtual switch
Mailing address, the feedback message is sent to the first virtual switch in first electronic equipment;
Second transmission unit, for first virtual switch based on the first virtual machine described in the feedback message
The feedback message is sent to first virtual machine by MAC Address.
As shown in fig. 6, a kind of structure chart of realization method for first server provided in an embodiment of the present invention, the device
Including:
Interception module 61, the broadcasting packet for carrying request distribution IP address for intercepting and capturing the transmission of the first virtual machine, makes
The broadcasting packet cannot be forwarded at least one second electronic equipment by obtaining the first electronic equipment belonging to first virtual machine,
At least one second electronic equipment includes the second server for distributing IP address;
Determining module 62 is used for from the corresponding current unappropriated IP address of the pre-stored second server,
Determine target ip address;
First sending module 63, for being used to indicate described in the second server record to second server transmission
The instruction information that target ip address has been used by first virtual machine;
Second sending module 64, it is virtual for the feedback message for carrying the target ip address to be sent to described first
Machine.
In an alternative embodiment, first server is also stored with:The second server is corresponding at least one have been divided
The MAC Address of the IP address matched and virtual machine corresponding at least one allocated IP address further includes:Store mould
Block, the MAC Address for storing the target ip address first virtual machine corresponding with the target ip address.
In an alternative embodiment, determining module 62 includes:
First acquisition unit, the device identification for obtaining first electronic equipment;
Second acquisition unit, for from the corresponding IP address distribution managing process of pre-stored each device identification, obtaining
It obtains target ip address corresponding with the device identification of the first electronic equipment and distributes managing process;
Executing the target ip address distribution managing process includes:
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
Being used to indicate the second server to second server transmission, to record the target ip address described
The instruction information that first virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
As shown in fig. 7, the structure chart of another realization method for the first electronic equipment provided in an embodiment of the present invention, it should
First electronic equipment includes:Including at least one virtual machine, at least one virtual machine includes the first virtual machine, further includes:
Memory 71, for storing program;
Processor 72, for handling described program, described program is specifically used for:
It detects that first virtual machine sends the broadcasting packet for carrying request distribution IP address, intercepts and captures the broadcast report
Text, at least so that the broadcasting packet cannot be forwarded at least one second electronic equipment by first electronic equipment, it is described
At least one second electronic equipment includes the second server for distributing IP address;
The broadcasting packet is sent to first server, the first server is previously stored with the second server
Corresponding current unappropriated IP address;
Receive the feedback of the target ip address of the promising first virtual machine distribution of carrying of the first server feedback
Message, the target ip address belong to the corresponding current unappropriated IP address of the second server.
Processor 72 may be a central processor CPU or specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement of the invention real
Apply one or more integrated circuits of example.
Optionally, the first electronic equipment can also include communication bus 73 and communication interface 74, wherein memory 71,
Processor 72, completes mutual communication by communication bus 73 at communication interface 74;
Optionally, communication interface 74 can be the interface of communication module, such as the interface of gsm module.
As shown in figure 8, the structure chart of another realization method for first server provided in an embodiment of the present invention, this
One server includes:
Memory 81, for storing program;
Processor 82, for handling described program, described program is specifically used for:
Intercept and capture the broadcasting packet for carrying request distribution IP address of the first virtual machine transmission so that first virtual machine
The broadcasting packet cannot be forwarded at least one second electronic equipment by affiliated first electronic equipment, and described at least one second
Electronic equipment includes the second server for distributing IP address;
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
Being used to indicate the second server to second server transmission, to record the target ip address described
The instruction information that first virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
Processor 82 may be a central processor CPU or specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement of the invention real
Apply one or more integrated circuits of example.
Optionally, first server can also include communication bus 83 and communication interface 84, wherein memory 81, place
Reason device 82, completes mutual communication by communication bus 83 at communication interface 84;
Optionally, communication interface 84 can be the interface of communication module, such as the interface of gsm module.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only that
A little elements, but also include other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with other
The difference of embodiment, just to refer each other for identical similar portion between each embodiment.
The foregoing description of the disclosed embodiments enables professional and technical personnel in the field to realize or use the application.
Various modifications to these embodiments will be apparent to those skilled in the art, as defined herein
General Principle can in other embodiments be realized in the case where not departing from spirit herein or range.Therefore, the application
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest range caused.
Claims (10)
1. a kind of IP address distribution method, which is characterized in that be applied to the first electronic equipment, first electronic equipment includes extremely
A few virtual machine, at least one virtual machine include the first virtual machine, and the IP address distribution method includes:
It detects that first virtual machine sends the broadcasting packet for carrying request distribution IP address, intercepts and captures the broadcasting packet,
At least so that the broadcasting packet cannot be forwarded at least one second electronic equipment by first electronic equipment, it is described at least
One the second electronic equipment includes the second server for distributing IP address;
The broadcasting packet is sent to first server, the first server is previously stored with the second server and corresponds to
Current unappropriated IP address;
The feedback message of the target ip address of the promising first virtual machine distribution of carrying of the first server feedback is received,
The target ip address belongs to the corresponding current unappropriated IP address of the second server.
2. IP address distribution method according to claim 1, which is characterized in that first electronic equipment includes for connecting
First virtual switch of at least one virtual machine, the intercepting and capturing broadcasting packet include:
Before first virtual switch receives the broadcasting packet, the broadcasting packet is intercepted and captured so that described first
Virtual switch cannot receive the broadcasting packet;
Or,
The first flow table in first virtual switch for forwarding the broadcasting packet at least one virtual machine
Before obtaining the broadcasting packet, the broadcasting packet is intercepted and captured so that first flow table cannot forward the broadcasting packet
To at least one virtual machine.
3. IP address distribution method according to claim 1, which is characterized in that first electronic equipment includes for connecting
Second virtual switch of first electronic equipment and at least one second electronic equipment, it is described to intercept and capture the broadcast report
Text includes:
Before second virtual switch receives the broadcasting packet, the broadcasting packet is intercepted and captured so that described second
Virtual switch cannot receive the broadcasting packet;
Or,
For forwarding the of the broadcasting packet at least one second electronic equipment in second virtual switch
Before two flow tables obtain the broadcasting packet, the broadcasting packet is intercepted and captured so that second flow table cannot report the broadcast
Text is forwarded at least one second electronic equipment.
4. according to any IP address distribution method of claims 1 to 3, which is characterized in that at least one second electronics
Equipment further includes:It is at least one to be in the other third electronic equipment of ad eundem with first electronic equipment.
5. IP address distribution method according to claim 1, which is characterized in that first electronic equipment includes for connecting
First virtual switch of at least one virtual machine, and, for connecting first electronic equipment and described at least one
Second virtual switch of a second electronic equipment, the carrying promising described first for receiving the first server feedback are empty
The feedback message of the target ip address of quasi- machine distribution, including:
Second virtual switch receives the feedback message;
Mailing address of second virtual switch based on the first electronic equipment described in the feedback message, by the feedback
Message is sent to the first virtual switch in first electronic equipment;
MAC Address of first virtual switch based on the first virtual machine described in the feedback message, the feedback is reported
Text is sent to first virtual machine.
6. a kind of IP address distribution method, which is characterized in that it is applied to first server, including:
Intercept and capture the broadcasting packet for carrying request distribution IP address of the first virtual machine transmission so that belonging to first virtual machine
The broadcasting packet cannot be forwarded at least one second electronic equipment, at least one second electronics by the first electronic equipment
Equipment includes the second server for distributing IP address;
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
It is used to indicate the second server to second server transmission and records the target ip address by described first
The instruction information that virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
7. IP address distribution method according to claim 6, which is characterized in that the first server is also stored with:It is described
The corresponding at least one allocated IP address of second server and corresponding at least one allocated IP address
The MAC Address of virtual machine, the method further include:
Store the MAC Address of the target ip address first virtual machine corresponding with the target ip address.
8. IP address distribution method according to claim 6, which is characterized in that described from the pre-stored second service
In the corresponding current unappropriated IP address of device, target ip address is determined, including:
Obtain the device identification of first electronic equipment;
From the corresponding IP address distribution managing process of pre-stored each device identification, obtain and first electronic equipment
The corresponding target ip address of device identification distributes managing process;
Executing the target ip address distribution managing process includes:
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
It is used to indicate the second server to second server transmission and records the target ip address by described first
The instruction information that virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
9. a kind of first electronic equipment, which is characterized in that first electronic equipment includes at least one virtual machine, it is described at least
One virtual machine includes the first virtual machine, further includes:
Memory, for storing program;
Processor, for executing described program, described program is specifically used for:It detects that the first virtual machine transmission carries to ask
Ask distribution IP address broadcasting packet, intercept and capture the broadcasting packet, at least so that first electronic equipment cannot will it is described extensively
It reports text and is forwarded at least one second electronic equipment, at least one second electronic equipment includes for distributing IP address
Second server;
The broadcasting packet is sent to first server, the first server is previously stored with the second server and corresponds to
Current unappropriated IP address;
The feedback message of the target ip address of the promising first virtual machine distribution of carrying of the first server feedback is received,
The target ip address belongs to the corresponding current unappropriated IP address of the second server.
10. a kind of first server, which is characterized in that including:
Memory is used for storing said program;
Processor, for executing described program, described program is specifically used for:
Intercept and capture the broadcasting packet for carrying request distribution IP address of the first virtual machine transmission so that belonging to first virtual machine
The broadcasting packet cannot be forwarded at least one second electronic equipment, at least one second electronics by the first electronic equipment
Equipment includes the second server for distributing IP address;
From the corresponding current unappropriated IP address of the pre-stored second server, target ip address is determined;
It is used to indicate the second server to second server transmission and records the target ip address by described first
The instruction information that virtual machine uses;
The feedback message for carrying the target ip address is sent to first virtual machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810487743.4A CN108667957B (en) | 2018-05-21 | 2018-05-21 | IP address allocation method, first electronic device and first server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810487743.4A CN108667957B (en) | 2018-05-21 | 2018-05-21 | IP address allocation method, first electronic device and first server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108667957A true CN108667957A (en) | 2018-10-16 |
CN108667957B CN108667957B (en) | 2021-08-13 |
Family
ID=63777101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810487743.4A Active CN108667957B (en) | 2018-05-21 | 2018-05-21 | IP address allocation method, first electronic device and first server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108667957B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109151093A (en) * | 2018-10-24 | 2019-01-04 | 郑州云海信息技术有限公司 | A kind of method, apparatus, storage medium and computer equipment for distributing IP address |
CN113890867A (en) * | 2021-10-15 | 2022-01-04 | 济南浪潮数据技术有限公司 | Communication address allocation method and device, electronic equipment and storage medium |
CN114095460A (en) * | 2022-01-20 | 2022-02-25 | 杭州优云科技有限公司 | Message broadcasting method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1901552A (en) * | 2005-07-20 | 2007-01-24 | 华为技术有限公司 | Method for processing dymatic IP address in radio access technology |
WO2014035646A2 (en) * | 2012-08-30 | 2014-03-06 | Cisco Technology, Inc. | Host detection by top of rack switch in data center environments |
CN104468574A (en) * | 2014-12-05 | 2015-03-25 | 中国联合网络通信集团有限公司 | Dynamic IP address acquisition method, system and device for virtual machines |
CN106936943A (en) * | 2017-03-21 | 2017-07-07 | 深信服科技股份有限公司 | The distribution method and system of virtual machine address |
-
2018
- 2018-05-21 CN CN201810487743.4A patent/CN108667957B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1901552A (en) * | 2005-07-20 | 2007-01-24 | 华为技术有限公司 | Method for processing dymatic IP address in radio access technology |
WO2014035646A2 (en) * | 2012-08-30 | 2014-03-06 | Cisco Technology, Inc. | Host detection by top of rack switch in data center environments |
CN104468574A (en) * | 2014-12-05 | 2015-03-25 | 中国联合网络通信集团有限公司 | Dynamic IP address acquisition method, system and device for virtual machines |
CN106936943A (en) * | 2017-03-21 | 2017-07-07 | 深信服科技股份有限公司 | The distribution method and system of virtual machine address |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109151093A (en) * | 2018-10-24 | 2019-01-04 | 郑州云海信息技术有限公司 | A kind of method, apparatus, storage medium and computer equipment for distributing IP address |
CN113890867A (en) * | 2021-10-15 | 2022-01-04 | 济南浪潮数据技术有限公司 | Communication address allocation method and device, electronic equipment and storage medium |
CN114095460A (en) * | 2022-01-20 | 2022-02-25 | 杭州优云科技有限公司 | Message broadcasting method and device |
CN114095460B (en) * | 2022-01-20 | 2022-05-31 | 杭州优云科技有限公司 | Message broadcasting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108667957B (en) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104506408B (en) | The method and device of data transfer based on SDN | |
CN101443750B (en) | Techniques for load balancing over a cluster of subscriber-aware application servers | |
KR101177203B1 (en) | Mapless global traffic load balancing via anycast | |
CN105634956B (en) | A kind of message forwarding method, device and system | |
EP0909062A1 (en) | Methods and apparatus for accelerating OSI layer 3 routers | |
CN107257291B (en) | Network equipment data interaction method and system | |
CN105847108B (en) | Communication means and device between container | |
CN103825975A (en) | Cdn node distribution server and system | |
CN102377669B (en) | Method for sending message and switch | |
CN108667957A (en) | IP address distribution method, the first electronic equipment and first server | |
CN101938370A (en) | Redundant pseudowires for border gateway patrol-based virtual private local area network service multi-homing environments | |
CN101179603A (en) | Method and device for controlling user network access in IPv6 network | |
CN101789949B (en) | Method and router equipment for realizing load sharing | |
CN101340356A (en) | Method for forwarding information and information forwarding apparatus | |
CN101394333A (en) | Packet forwarding method, apparatus and network system | |
CN104780232B (en) | A kind of resource allocation methods, controller and system | |
CN111182022B (en) | Data transmission method and device, storage medium and electronic device | |
CN104980368A (en) | Bandwidth guarantee method and apparatus in software defined network (SDN) | |
CN107888492A (en) | A kind of method and apparatus of VRRP load balancing | |
CN112217843A (en) | Service unit switching method, system and equipment | |
CN106059946A (en) | Message forwarding method and message forwarding device | |
CN107710634B (en) | Communication means and equipment based on optical network system | |
CN110932972B (en) | Data transmission method and device and electronic equipment | |
CN103188120B (en) | The method for detecting packet loss of a kind of multicast service and device | |
CN101009692A (en) | Hardware address parsing method and communication processing device, and message processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |