Specific embodiment
Technical solution in embodiment in order to enable those skilled in the art to better understand the present invention, and make of the invention real
The above objects, features, and advantages for applying example can be more obvious and easy to understand, with reference to the accompanying drawing to technical side in the embodiment of the present invention
Case is described in further detail.
It should be noted that in embodiments herein,
Domain: virtual machine (member device) the stacking domain (domain) having the same in a certain stacking is stacked, difference stacks
Same stacking can not be added in the virtual machine in domain.
Bridge MAC: heap poststack is added for virtual machine (member device), realizes the bridge MAC Address of correspondence with foreign country, i.e. each heap
Unique bridge MAC is presented outside overlay.
Cluster member number: for it is a certain stacking domain in virtual machine (member device) number, for being distinguished in stacked environment
Other virtual machines.
Referring to Fig. 1, it is a kind of flow diagram of stacking method provided in an embodiment of the present invention, may include following step
It is rapid:
Step 101, SDN controller obtain self-management the virtual machine stacked the first software version information and with
The corresponding first bridge MAC of first software version information.
It, can be to enable in order to improve the judging efficiency whether virtual machine can be added stacking system in the embodiment of the present invention
SDN controller can include but is not limited to software to the information collecting function of the virtual machine of self-management stacked, the information
Version information (referred to herein as the first software version information), and bridge MAC corresponding with first software version information
(Media Access Control, media access control) (referred to herein as first bridge MAC) etc..
As an alternative embodiment, it is virtual that SDN controller obtains having stacked for self-management in step 101
First software version information of machine and first bridge MAC corresponding with the first software version information, may comprise steps of:
11), the virtual machine of SDN controller and self-management establishes LLDP (Link Layer Discovery
Protocol, Link Layer Discovery Protocol) connection;
12), SDN controller receives the LLDP message that the virtual machine of self-management stacked is sent, which takes
The first software version information with the virtual machine for sending the LLDP message and corresponding with first software version information the
One bridge MAC.
In this embodiment, the LLDP link discovery function of enabling SDN controller and virtual machine, when virtual machine is added
When SDN network, SDN controller is established LLDP with the virtual machine and is connect, and in turn, for the virtual machine stacked, virtual machine can be with
It is connected by the LLDP to the transmission of SDN controller and carries the first software version information and corresponding with the first software version information
The first bridge MAC LLDP message so that the virtual machine that has stacked of the SDN controller according to the LLDP Receive message self-management
The first software version information and first bridge MAC corresponding with the first software version information, realize to the virtual of self-management
The collection of the relevant information of machine.
In the embodiment of the present invention, SDN controller gets the first software version of the virtual machine of self-management stacked
After the information such as information and the first bridge MAC corresponding with the first software version information, can in local maintenance relevant entries, with
Save the information got.
In the embodiment of the present invention, virtual machine can include but is not limited to VSR (Virtual Service Router, virtually
Router), VFW (Virtual Fire Wall, virtual firewall) or VLB (Virtual Load Balance, dummy load
Equalizing equipment) etc..
Step 102, when SDN controller detect target virtual machine need be added stack when, SDN controller obtains the target
Second software version information of virtual machine, and compare second software version information and the first software version information.
In the embodiment of the present invention, target virtual machine and the virtual machine for being not specific to a certain fixation, but may refer to SDN control
Any virtual machine for needing to be added stacking system of device management, the embodiment of the present invention is subsequent no longer to be repeated.
In the embodiment of the present invention, when target virtual machine needs that stacking system is added, target virtual machine is sent out to SDN controller
Send heartbeat message;After SDN controller receives the heartbeat message, determine that the target virtual machine needs that stacking system is added, thus,
The software version information (referred to herein as the second software version information) of the available target virtual machine of SDN.
Wherein, the software version information that SDN controller obtains the target virtual machine can also realize by LLDP connection, i.e.,
Target virtual machine can establish LLDP with SDN controller and connect after the network that SDN controller management is added, in turn, SDN control
Device processed can obtain the relevant information (such as software version information) of target virtual machine by the LLDP connection.
It, can be according in step 101 after SDN controller gets target software release information in the embodiment of the present invention
The first software version information got compares second software version information and the first software version information.
If existing and the consistent third software version of the second software version information in step 103, the first software version information
Information, then third bridge MAC corresponding with third software version information is carried and is sent in notification message is added by SDN controller
Target virtual machine.
In the embodiment of the present invention, after SDN controller compares the second software version information and the first software version information, if
Exist and the first software version information consistent software version information (referred to herein as third software in second software version information
Version information), SDN controller thinks that the corresponding bridge MAC of third software version information can be added (herein in the target virtual machine
Referred to as third bridge MAC) belonging to stacking system, at this point, SDN controller to target virtual machine send be added notification message, should plus
Enter and carry third bridge MAC corresponding with third software version information in notification message, the addition notification message is for notifying mesh
Stacking system belonging to bridge MAC is added in mark virtual machine.After the addition notification message that target virtual machine receives, obtaining should add
Enter the third bridge MAC carried in notification message, and according to the third bridge MAC third bridge MAC is added belonging to stacking system.
It should be noted that in embodiments of the present invention, software version information unanimously includes corresponding software version number phase
Together or software version is compatible etc..
In the embodiment of the present invention, it is contemplated that when software version information and the stacking system of virtual machine have the soft of member device
When part version information is inconsistent, virtual machine request addition stacking system will lead to the virtual machine and constantly restart, thus, if first is soft
In part version information there is no with the consistent software version information of the second software version information, i.e. in the first software version information not
There are above-mentioned third software version information, then SDN controller can be sent to target virtual machine for notify target virtual machine without
The notification message of method addition stacking system;After target virtual machine receives the notification message, determine that stacking can not be added in itself
System efficiently avoids requesting the software version information that member device is added and itself software version information not due to virtual machine
The problem of constantly restarting caused by consistent stacking system.
As it can be seen that SDN controller passes through the addition stacking system for collecting self-management in method flow shown in Fig. 1
Software version information and bridge MAC corresponding with the software version information, and when SDN controller detect target virtual machine need
When stacking system is added, the software version information of the available target virtual machine of SDN controller, and compare the software version
Information and the software version information of virtual machine stacked, and exist in the software version information for the virtual machine that ought have been stacked and mesh
When marking the consistent software version information of software version information of virtual machine, the corresponding bridge MAC of the software version information is carried and is existed
It is added in notification message and is sent to target virtual machine, realize and target virtual machine is judged automatically by SDN controller whether can
It is added and stacks, improve stacking efficiency.
Fig. 2 is referred to, may include following for the flow diagram of another stacking method provided in an embodiment of the present invention
Step:
Step 201, SDN controller obtain the first software version information of the virtual machine of self-management stacked, with the
The corresponding first bridge MAC of one software version information, and the first domain identifier corresponding with the first software version information.
In the embodiment of the present invention, it is contemplated that in the scene of the multiple stacking systems of SDN controller management, when virtual machine needs
Be added when stacking, the domain identifier of virtual machine need it is identical as the domain identifier of stacking of addition, thus, SDN controller is in addition to can be with
Obtain the first software version information of the virtual machine stacked of self-management and corresponding with first software version information
Except first bridge MAC, the domain identifier corresponding with the first software version information of the virtual machine stacked can also be obtained (herein
In be known as the first domain identifier).
Step 202, when SDN controller detect target virtual machine need to be added stack when, it is empty that SDN controller obtains target
Second domain identifier of quasi- machine, and compare the second domain identifier and the first domain identifier.If existing and the second domain identifier in the second domain identifier
Identical third domain identifier, then go to step 203;Otherwise, step 205 is gone to.
In the embodiment of the present invention, when SDN controller detects that target virtual machine needs that stacking is added, SDN controller is first
The domain identifier (referred to herein as the second domain identifier) of target virtual machine is obtained, and compares second domain identifier and the first domain identifier,
It whether there is domain identifier identical with the second domain identifier (referred to herein as third domain identifier) to determine in the first domain identifier;If depositing
In then further comparison software version information;Otherwise it is assumed that stacking can not be added in target virtual machine.
It should be noted that in embodiments of the present invention, between step 202 and step 203 and there is no inevitable timing
Relationship, i.e., in embodiments of the present invention, SDN controller detect that target virtual machine needs to be added heap poststack, can first carry out ratio
The step of compared with the second domain identifier and the first domain identifier, rear execute compare the second software version information and the first software version information
Step;The step of comparing the second software version information and the first software version information can also be first carried out, rear execute compares second
The step of domain identifier and the first domain identifier, the specific implementation embodiment of the present invention repeat no more.
Step 203, SDN controller obtain the second software version information of target virtual machine, and compare third domain identifier pair
The software version information and the second software version information answered.If the corresponding software version information of third domain identifier and the second software version
This information is consistent, goes to step 204;Otherwise, step 205 is gone to.
In the embodiment of the present invention, SDN controller, which determines, has third identical with the second domain identifier domain in the first domain identifier
After mark, SDN controller further compares the corresponding software version information of third domain identifier and the second software version information, with
Determine whether the corresponding software version information of third domain identifier and the second software version information are consistent;If consistent, (i.e. third domain is marked
Knowing corresponding software version information is the above third software version information), then SDN controller thinks destination virtual
Stacking belonging to the corresponding third bridge MAC of the third software version information can be added in machine;Otherwise, SDN controller thinks target
Stacking cannot be added in virtual machine.
Further, in one implementation, SDN controller can also obtain the virtual machine of self-management stacked
The first domain identifier corresponding cluster member number (referred to herein as the first cluster member number);When target virtual machine needs to add
Enter to stack, and SDN controller determines there is third domain identifier identical with the second domain identifier in the first domain identifier, then SDN is controlled
Device first can further obtain the cluster member number (referred to herein as the second cluster member number) of target virtual machine, and compare
The corresponding cluster member number of third domain identifier is numbered with the second cluster member;If the corresponding cluster member number of third domain identifier
It is different from the second cluster member number, then further comparison software version information;Otherwise it is assumed that heap can not be added in target virtual machine
It is folded.
It should be noted that in embodiments of the present invention, SDN controller is determined to exist in the first domain identifier and be marked with the second domain
After knowing identical third domain identifier, it can first carry out and compare the second cluster member number third cluster corresponding with third domain identifier
The step of member's number, then execute the step for comparing the second software version information software version information corresponding with third domain identifier
Suddenly;The step of comparing the second software version information corresponding with third domain identifier software version information can also be first carried out, then is held
The step of row relatively the second cluster member number third cluster member number corresponding with third domain identifier, i.e., therebetween not
In the presence of inevitable sequential relationship, the specific implementation embodiment of the present invention is repeated no more.
Step 204, SDN controller carry third bridge MAC corresponding with third software version information to disappear in addition notice
Target virtual machine is sent in breath.
In the embodiment of the present invention, SDN controller, which determines, has third identical with the second domain identifier domain in the first domain identifier
Mark, and unanimously (i.e. third domain identifier is corresponding with the second software version information for the corresponding software version information of third domain identifier
Software version information is third software version information), then SDN controller thinks that third software version can be added in target virtual machine
Stacking belonging to the corresponding third bridge MAC of information, in turn, SDN controller can will corresponding with third software version information
Three bridge MAC, which are carried, is sent to target virtual machine in notification message is added, so that corresponding stacking is added in target virtual machine.
Step 205, SDN controller are sent to target virtual machine for notifying target virtual machine that stacking system can not be added
Notification message.
In the embodiment of the present invention, when there is no domain identifier identical with the second domain identifier or third domains in the first domain identifier
When identifying corresponding software version information and inconsistent the second software version information, SDN controller can be sent out to target virtual machine
It send for notifying target virtual machine that the notification message of stacking system can not be added, to notify target virtual machine stops being added to stack.
In order to make those skilled in the art more fully understand technical solution provided in an embodiment of the present invention, below with reference to specific
Application scenarios technical solution provided in an embodiment of the present invention is described.
In this embodiment, virtual machine is added to stack and may include steps of:
Step 1 is pre-configured: including configuration management IP (Internet Protocol, Internet protocol) address, for connecing
Enter controller management network (i.e. SDN network), realizes a kind of openflow (opening flow table control protocol) connection;Configure user
Account and user password, for establishing http (Hypertext Transfer Protocol, hypertext transfer protocol)/https
(Secure Hypertext Transfer Protocol, Secure Hypertext Transfer Protocol) connection realizes SDN controller to certainly
The equipment of barrel reason issues or obtains the relevant configuration of the equipment of self-management;
Step 2, (Network Function Virtualization, network function are virtual by SDN controller addition NFV
Change) resource: by backstage API, (Application Programming Interface, application programming connect SDN controller
Mouthful) or add AFC (Auto Flow Control, automatic flow control) to create NFV resource, NFV resource and NFV network element device
(virtual machine) corresponds, in resource adding procedure, by interacting openflow hello report between virtual machine and SDN controller
Text establishes ofp (optical-fibre channel) connection;
Step 3 sends LLDP message: after virtual machine activation, it is assumed that virtual machine and controller have enabled LLDP function, then
LLDP connection can be established by interacting lldp hello packet between virtual machine and SDN controller, thus realize virtual machine and
The interaction of LLDP message between SDN controller.
Wherein, in this embodiment, the virtual machine stacked is sent to the LLDPPDU of the LLDP message of SDN controller
(LLDP Protocol Data Unit, LLDP protocol Data Unit) Optional (optional) TLV (Type, Length,
Value, type, length, value) bridge MAC, software version information and other stack arrangement information can be carried.
Step 4, SDN controller receive the LLDP message that the virtual machine of self-management is sent, and from the LLDP message
The information such as domain identifier, bridge MAC, the software version information of virtual machine are obtained in Optional TLV in LLDPPDU, and are added
In the NFV resource node list of local maintenance.
Step 5, virtual machine, which are added, to be stacked: when target virtual machine needs that stacking system is added, sending heartbeat to SDN controller
Message, after SDN controller receives the heartbeat message, obtain the second domain identifier of target virtual machine, the second software version information,
Second cluster member number;Then, NFV the Resources list of SDN controller inquiry self maintained, compares the second domain identifier and heap
The domain identifier of folded virtual machine is marked if there is third identical with the second domain identifier domain in the domain identifier of the virtual machine stacked
Know, then compares the corresponding cluster member number of third domain identifier;Otherwise, stacking system can not be added to target virtual machine transmission
Stacking system can not be added in notification message, notice target virtual machine.
If the corresponding cluster member number of third domain identifier is different from the second cluster member number, compare third domain identifier
Corresponding software version information and the second software version information;Otherwise, stacking system can not be added to target virtual machine transmission
Stacking system can not be added in notification message, notice target virtual machine.
If the corresponding software version information of third domain identifier is consistent with the second software version information, which is believed
It ceases corresponding bridge MAC carrying and is sent to target virtual machine in notification message is added, so that corresponding heap is added in target virtual machine
It is folded;Otherwise, the notification message that stacking system can not be added is sent to target virtual machine, stacking can not be added in notice target virtual machine
System.
Through above description as can be seen that in technical solution provided in an embodiment of the present invention, SDN controller passes through acquisition
First software version information of the virtual machine of self-management stacked and the first bridge corresponding with the first software version information
MAC, when SDN controller detects that target virtual machine needs that stacking is added, SDN controller obtains the second of the target virtual machine
Software version information, and compare the second software version information and the first software version information, if being deposited in the first software version information
With the consistent third software version information of the second software version information, then SDN controller will be with third software version information pair
The third bridge MAC answered, which is carried, is sent to target virtual machine in notification message is added, and realizes and is judged automatically by SDN controller
Whether target virtual machine can be added stacking, improve stacking efficiency.
Fig. 3 is referred to, is a kind of structural schematic diagram of stack device provided in an embodiment of the present invention, wherein the stacking
Device can be applied to the SDN controller in above method embodiment, as shown in figure 3, the stack device may include
Acquiring unit 310, for obtain the virtual machine of self-management stacked the first software version information and with
The corresponding first bridge MAC of first software version information;
Detection unit 320, for detecting whether virtual machine needs that stacking is added;
The acquiring unit 310 is also used to stack when the detection unit 320 detects that target virtual machine needs to be added
When, obtain the second software version information of the target virtual machine;
Comparing unit 330, for second software version information and first software version information;
Transmission unit 340, for obtaining first software version information according to the comparison result of the comparing unit 330
It, will be with the third software version information when middle presence third software version information consistent with second software version information
Corresponding third bridge MAC, which is carried, is sent to the target virtual machine in notification message is added.
In an alternative embodiment, the transmission unit 340 can be also used for the comparison knot according to the comparing unit 330
Fruit show that Xiang Suoshu target virtual machine is sent there is no when the third software version information in first software version information
For notifying the target virtual machine that the notification message of stacking system can not be added.
In an alternative embodiment, the acquiring unit 310 can be also used for obtaining and first software version information pair
The first domain identifier answered;
The acquiring unit 310 can be also used for detecting that target virtual machine needs that heap is added when the detection unit 320
When folded, the second domain identifier of the target virtual machine is obtained;
Correspondingly, the comparing unit 330, can be also used for the second domain identifier described in comparison and first domain identifier,
Compare second software version information and first software version information;
The transmission unit 340 can be also used for obtaining the first domain mark according to the comparison result of the comparing unit
There is third domain identifier identical with second domain identifier in knowledge, and there are the thirds in first software version information
When software version information, then third bridge MAC corresponding with the third software version information is carried in notification message is added
It is sent to the target virtual machine.
In an alternative embodiment, the comparing unit 320, can be specifically used for existing in first domain identifier and institute
When stating the identical third domain identifier of the second domain identifier, if the corresponding software version information of the third domain identifier and described second soft
Part version information is consistent, it is determined that exists in first software version information and second software version information consistent the
Three software version informations.
In an alternative embodiment, the acquiring unit 310 can be also used for obtaining corresponding with first domain identifier the
One cluster member number;
The acquiring unit 310, if can be also used for existing in first domain identifier identical as second domain identifier
Third domain identifier, then obtain the target virtual machine the second cluster member number;
Correspondingly, the comparing unit 330 can be also used for the number of the second cluster member described in comparison and third domain identifier
Corresponding third cluster member number;
The transmission unit 340 can be also used for obtaining second collection according to the comparison result of the comparing unit 330
Group members number is different from the third cluster member number, and there are the third softwares in first software version information
When version information, third bridge MAC corresponding with the third software version information is carried and is sent in notification message is added
The target virtual machine.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize the present invention program.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
As seen from the above-described embodiment, the first software that SDN controller passes through the virtual machine of acquisition self-management stacked
Version information and first bridge MAC corresponding with the first software version information, when SDN controller detects target virtual machine needs
When stacking is added, SDN controller obtains the second software version information of the target virtual machine, and compares the second software version information
With the first software version information, if in the first software version information exist and the consistent third software version of the second software version information
This information, then third bridge MAC corresponding with third software version information is carried and is sent in notification message is added by SDN controller
To target virtual machine, realizes and judge automatically whether target virtual machine can be added stacking by SDN controller, improve stacking
Efficiency.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.