Summary of the invention
The main object of the present invention realizes, for providing a kind of, method and the isomery collection that isomeric group equipment synchronizes
Group's system, it is intended to make the configuration of the network interface of cluster device in group system to synchronize, from
And reduce the complexity that Heterogeneous Cluster Environment is set up.
The present invention provides a kind of and realizes the method that isomeric group equipment synchronizes, including step:
The quantity of the network interface according to the first cluster device, its network interface is joined by the second cluster device
It is set to multiple virtual network interface;The quantity of the network interface of described first cluster device is more than institute
State the quantity of the network interface of the second cluster device;
Second cluster device detects when the first cluster device breaks down, by the net of the first cluster device
The configuration correspondence of network interface switches to the network interface of the second cluster device;
Second cluster device receiving network protocol stack sends the packet to its network interface, by described number
It is distributed to corresponding network interface according to bag process.
Preferably, the configuration of described network interface includes IP address and this network interface pair of network interface
The type of service answered.
Preferably, the quantity of the described network interface according to the first cluster device, the second cluster device will
Its network interface is configured to the step of multiple virtual network interface and specifically includes:
The quantity of the network interface according to the first cluster device, the second cluster device is by its at least one net
Network interface is configured to multiple virtual network interface, makes the second cluster device include described virtual network
The quantity of the network interface of interface is identical with the quantity of the network interface of described first cluster device.
Preferably, at described second cluster device, its network interface is configured to multiple virtual network interface
Step after, also include:
Second cluster device is that multiple described virtual network interface configures corresponding MAC Address.
Preferably, described second cluster device receiving network protocol stack sends the packet to network interface
, the step that described packet delivery carries out processing to corresponding network interface is included:
Second cluster device receiving network protocol stack sends the packet to network interface, it is judged that described net
Whether network interface is configured with multiple described virtual network interface, the most then according to described packet
Corresponding virtual network interface MAC Address, enters packet delivery to corresponding virtual network interface
Row processes.
The present invention also provides for a kind of Heterogeneous Cluster Environment, including the first cluster device and the second cluster device
, wherein:
The quantity of the network interface of described first cluster device connects more than the network of described second cluster device
The quantity of mouth;
Described second cluster device includes:
Interface configuration module, for the quantity of the network interface according to the first cluster device, by its network
Interface is configured to multiple virtual network interface;
Handover module, is used for detecting when the first cluster device breaks down, by the first cluster device
The configuration correspondence of network interface switches to the second cluster device and includes the net of described virtual network interface
Network interface;
Distribution module, sends the packet to network interface for receiving network protocol stack, by described number
It is distributed to corresponding network interface according to bag process.
Preferably, the configuration of described network interface includes IP address and this network interface pair of network interface
The type of service answered.
Preferably, described interface configuration module specifically for:
The quantity of the network interface according to the first cluster device, is configured to its at least one network interface
Multiple virtual network interfaces, the network of described virtual network interface connects to make the second cluster device include
The quantity of mouth is identical with the quantity of the network interface of described first cluster device.
Preferably, described second cluster device also includes:
Address configuration module, for configuring corresponding MAC Address for multiple described virtual network interfaces.
Preferably, described distribution module specifically includes:
Judge module, sends the packet to network interface for receiving network protocol stack, it is judged that described
Whether network interface is configured with multiple described virtual network interface;
Distribution submodule, for the virtual network interface MAC Address corresponding according to described packet, by number
It is distributed to corresponding virtual network interface according to bag process.
The present invention is by the quantity of the network interface according to the first cluster device, by the quantity of network interface
The network interface of less second cluster device is configured to multiple virtual network interface so that it is network
The quantity of interface is identical with the quantity of the first cluster device network interface;The first cluster detected
When equipment breaks down, the configuration correspondence of the network interface of the first cluster device is switched to second
Cluster device includes the network interface of virtual network interface, and is connect by the network interface after switching
Receive the packet that network protocol stack sends, and packet is processed accordingly so that cluster
In system, the configuration of the network interface of cluster device can synchronize, thus reduces isomeric group system
The complexity that system is set up.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not used to
Limit the present invention.
The present invention provides a kind of and realizes the method that isomeric group equipment synchronizes.More according to network interface
The quantity of the network interface of cluster device, connects the network on less for network interface cluster device
Mouth is configured to multiple virtual network interface so that it is the quantity of total network interface is with network interface relatively
The quantity of the network interface of many cluster devices is identical.When breaking down, by network interface relatively
The configuration correspondence of the network interface of many cluster devices switches to the less cluster device of network interface
On include the network interface of virtual network interface, it is achieved the synchronization between isomeric group equipment.
It is the stream that the present invention realizes the method first embodiment that isomeric group equipment synchronizes with reference to Fig. 2, Fig. 2
Journey schematic diagram.
What the present embodiment was provided realizes the method that isomeric group equipment synchronizes, including:
Step S10, according to the quantity of the network interface of the first cluster device, the second cluster device is by its net
Network interface is configured to multiple virtual network interface;The quantity of the network interface of the first cluster device is big
Quantity in the network interface of the second cluster device;
When setting up Heterogeneous Cluster Environment, at least two cluster device can be included, by these multiple collection
Group
Equipment completes the service processing function of group system jointly, and multiple cluster devices can arrange difference
The network interface of quantity.In the present embodiment, with Heterogeneous Cluster Environment include the first cluster device and
Illustrate as a example by second cluster device two cluster device.Including the first cluster device and
In the Heterogeneous Cluster Environment of two cluster devices, the first cluster device and the second cluster device are all provided with
It is equipped with multiple network interface for interacting with network.When setting up Heterogeneous Cluster Environment,
The ardware model number of cluster device owing to being used may be different, and the external network of cluster device connects
The quantity of mouth is the most different, in the present embodiment, it is assumed that the network interface of the first cluster device
Quantity more than the quantity of network interface of the second cluster device, and using the first cluster device as
Primary cluster device, and the second cluster device is as trim set group facility.
When setting up Heterogeneous Cluster Environment, according to the quantity of the network interface of the first cluster device, second
Cluster device turns to multiple logic network interface by virtual for its at least one network interface, will connect by network
Mouth is configured to multiple virtual network interface, and these multiple virtual network interfaces share a network interface
IP address, make the quantity of second cluster device network interface including virtual network interface
Identical with the quantity of the network interface of the first cluster device.
Step S20, the second cluster device detects when the first cluster device breaks down, by the first cluster
The configuration correspondence of the network interface of equipment switches to the second cluster device and includes virtual network interface
Network interface;
During the first cluster device work, if the second cluster device is by corresponding testing mechanism
Detect when the first cluster device breaks down, according to the number of the network interface of the first cluster device
Amount, by the configuration of the network interface of the first cluster device, correspondence switches to the second cluster device bag
Include the network interface of virtual network interface.In the present embodiment, the configuration of network interface can include
The IP address of each network interface, and the industry that service can be provided corresponding to this network interface
Service type.When switching, by the IP address of each network interface of the first cluster device and its industry
Service type switches to corresponding network interface on the second cluster device.
Step S30, the second cluster device receiving network protocol stack sends the packet to its network interface,
Packet delivery is processed to corresponding network interface.
After second cluster device completes the configuration correspondence switching of the network interface by the first cluster device, logical
Crossing its network interface replaces the network interface of the first cluster device and network protocol stack to carry out packet
Transmitting-receiving.When receiving network protocol stack sends to the packet of its network interface, will be received
The packet delivery arrived is to corresponding network interface, to process it.
The present embodiment is by the quantity of the network interface according to the first cluster device, by the number of network interface
Amount
The network interface of less second cluster device is configured to multiple virtual network interface so that it is network
The quantity of interface is identical with the quantity of the first cluster device network interface;The first cluster detected
When equipment breaks down, the configuration correspondence of the network interface of the first cluster device is switched to second
Cluster device includes the network interface of virtual network interface, and is connect by the network interface after switching
Receive the packet that network protocol stack sends, and packet is processed accordingly so that cluster
In system, the configuration of the network interface of cluster device can synchronize, thus reduces isomeric group system
The complexity that system is set up.
It is the stream that the present invention realizes method the second embodiment that isomeric group equipment synchronizes with reference to Fig. 3, Fig. 3
Journey schematic diagram.
On the basis of the present invention realizes the method first embodiment that isomeric group equipment synchronizes, perform step
After rapid S10, the method also includes:
Step S40, the second cluster device is that multiple virtual network interface configures corresponding MAC Address.
At the second cluster device by its network interface according to the quantity of the network interface of the first cluster device,
After being configured to multiple virtual network interface, the most independent for the configuration of each virtual network interface
For identifying the MAC Address of this virtual network interface.Send out when network interface receives network protocol stack
After the packet sent, according to the target MAC (Media Access Control) address of packet, can distinguish which this packet is
The packet of individual virtual network interface.In the present embodiment, virtual network interface receives from net
The ARP(Address Resolution Protocol of network interface, address resolution protocol) please
When asking, the MAC Address of virtual network interface is used to return arp reply to network interface;Further,
The source MAC of the packet sent out by virtual network interface uses the M of virtual network interface
AC address.
After its network interface is configured to multiple virtual network interface by the second cluster device, for each void
Intend network interface and be configured to identify the MAC Address of this virtual network interface, carry out packet
During transmitting-receiving, the corresponding relation of MAC Address identification packet and virtual network interface can be passed through, from
And further ensure and be capable of the same of the configuration of the network interface of cluster device in group system
Step.
It is that the present invention realizes packet delivery in the method that isomeric group equipment synchronizes with reference to Fig. 4, Fig. 4
Schematic flow sheet to corresponding network interface.
Method first embodiment and the second enforcement that isomeric group equipment synchronizes is realized based on the invention described above
Example, step S30 specifically includes:
Step S31, the second cluster device receiving network protocol stack sends the packet to network interface, sentences
Whether circuit network interface is configured with multiple virtual network interface, the most then perform step S32;
Step S32, according to the virtual network interface MAC Address that packet is corresponding, by packet delivery extremely
Corresponding virtual network interface processes.
After the second cluster device completes the configuration correspondence switching of network interface by the first cluster device,
The network interface of the first cluster device and network protocol stack is replaced to carry out data by its network interface
The transmitting-receiving of bag.Due to the corresponding corresponding network interface of each packet, receiving network association
View stack sends to the packet of network interface, first determines whether whether this network interface is configured with many
Individual virtual network interface, as no, then this network interface according to its can be provided by service service class
Type, directly processes accordingly to packet;And as network interface is configured with multiple virtual net
Network interface, then according to the virtual network interface MAC Address that packet is corresponding, by packet delivery extremely
Corresponding virtual network interface, virtual network interface can be provided by the type of service of service according to it
Packet is processed accordingly.
The present invention also provides for a kind of Heterogeneous Cluster Environment.
With reference to the structural representation that Fig. 5, Fig. 5 are Heterogeneous Cluster Environment first embodiment of the present invention.
The Heterogeneous Cluster Environment that the present embodiment is provided, sets including the first cluster device 10 and the second cluster
Standby 20, wherein, the quantity of the network interface of the first cluster device 10 is more than the second cluster device 20
The quantity of network interface;
Second cluster device 20 includes:
Interface configuration module 201, for the quantity of the network interface according to the first cluster device, by its net
Network interface is configured to multiple virtual network interface;
Handover module 202, is used for detecting when the first cluster device breaks down, by the first cluster device
The configuration correspondence of network interface switch to the second cluster device and include the network of virtual network interface
Interface;
Distribution module 203, sends the packet to network interface for receiving network protocol stack, by data
Bag is distributed to corresponding network interface and processes.
When setting up Heterogeneous Cluster Environment, at least two cluster device can be included, by these multiple collection
Group facility completes the service processing function of group system jointly, and multiple cluster devices can be arranged not
Network interface with quantity.In the present embodiment, include the first cluster device with Heterogeneous Cluster Environment
10 and 20 two cluster devices of the second cluster device as a example by illustrate.Including that the first cluster sets
Standby 10 and second cluster device 20 Heterogeneous Cluster Environment in, the first cluster device 10 and the second collection
Multiple network interface for interacting it is provided with network on group facility 20.Different setting up
During structure group system, the ardware model number of the cluster device owing to being used may be different, and cluster sets
The quantity of standby external network interface is the most different,
In the present embodiment, it is assumed that the quantity of the network interface of the first cluster device 10 sets more than the second cluster
The quantity of the network interface of standby 20, and using the first cluster device 10 as primary cluster device,
And the second cluster device 20 is as trim set group facility.
When setting up Heterogeneous Cluster Environment, according to the quantity of the network interface of the first cluster device 10, the
Two cluster devices 20 interface configuration module 201 by virtual for its at least one network interface turn to multiple
Logic network interface, will be configured to multiple virtual network interface by network interface, these multiple virtual networks
Interface shares the IP address of a network interface, makes the second cluster device 20 include that virtual network connects
Mouth is identical with the quantity of the network interface of the first cluster device 10 in the quantity of interior network interface.
During the first cluster device 10 work, if the second cluster device 20 is by corresponding detection
Mechanism detects when the first cluster device 10 breaks down, the handover module of the second cluster device 20
202 according to the quantity of the network interface of the first cluster device 10, by the network of the first cluster device 10
The configuration of interface, correspondence switches to the second cluster device 20 and includes that the network of virtual network interface connects
Mouthful.In the present embodiment, the configuration of network interface can include the IP address of each network interface,
And the type of service that service can be provided corresponding to this network interface.When switching, by the
The IP address of each network interface of one cluster device 10 and its type of service switch to the second cluster
Corresponding network interface on equipment 20.
After second cluster device 20 completes the configuration correspondence switching of the network interface by the first cluster device 10
, replaced the network interface of the first cluster device 10 to carry out with network protocol stack by its network interface
The transmitting-receiving of packet.When receiving network protocol stack sends to the packet of its network interface, the
Received packet delivery is connect by the distribution module 203 of two cluster devices 20 to corresponding network
Mouthful, so that it is processed.
The present embodiment is by the quantity of the network interface according to the first cluster device 10, by network interface
The network interface of the second cluster device 20 of negligible amounts is configured to multiple virtual network interface, makes
The quantity of its network interface is identical with the quantity of the first cluster device 10 network interface;Detecting
When first cluster device 10 breaks down, by right for the configuration of the network interface of the first cluster device 10
The second cluster device 20 should be switched to and include the network interface of virtual network interface, and by switching
After the packet that sends of network interface receiving network protocol stack, and packet is carried out accordingly
Process so that in group system, the configuration of the network interface of cluster device can synchronize, thus drops
The complexity that low Heterogeneous Cluster Environment is set up.
With reference to the structural representation that Fig. 6, Fig. 6 are Heterogeneous Cluster Environment the second embodiment of the present invention.
On the basis of Heterogeneous Cluster Environment first embodiment of the present invention, the second cluster device 20 also includes
:
Address configuration module 204, for configuring corresponding MAC Address for multiple virtual network interfaces.
At the second cluster device 20 by its network interface according to the number of the network interface of the first cluster device 10
Amount, after being configured to multiple virtual network interface, the address configuration module 20 of the second cluster device 20
4 configure the most independent M for identifying this virtual network interface for each virtual network interface
AC address.After network interface receives the packet that network protocol stack sends, according to packet
Target MAC (Media Access Control) address, the packet which virtual network interface this packet is can be distinguished.
In the present embodiment, virtual network interface receives the ARP(Address Re from network interface
Solution Protocol, address resolution protocol) request time, use virtual network interface
MAC Address returns arp reply to network interface;Further, sent out by virtual network interface
The source MAC of packet uses the MAC Address of virtual network interface.
After its network interface is configured to multiple virtual network interface by the second cluster device 20, for each
Virtual network interface is configured to identify the MAC Address of this virtual network interface, is carrying out packet
Transmitting-receiving time, can by the corresponding relation of MAC Address identification packet and virtual network interface,
Thus further ensure and be capable of the configuration of the network interface of cluster device in group system
Synchronize.
Show with reference to the distribution module structure that Fig. 7, Fig. 7 are Heterogeneous Cluster Environment the second cluster device of the present invention
It is intended to.
Based on Heterogeneous Cluster Environment first embodiment of the present invention and the second embodiment, the second cluster device 20
Distribution module 203 specifically include:
Judge module 2031, sends the packet to network interface for receiving network protocol stack, it is judged that
Whether network interface is configured with multiple virtual network interface;
Distribution submodule 2032, for the virtual network interface MAC Address corresponding according to packet, by number
It is distributed to corresponding virtual network interface according to bag process.
After the second cluster device completes the configuration correspondence switching of network interface by the first cluster device,
The network interface of the first cluster device and network protocol stack is replaced to carry out data by its network interface
The transmitting-receiving of bag.Due to the corresponding corresponding network interface of each packet, receiving network association
View stack sends to the packet of network interface, it is judged that module 2031 first determines whether this network interface
Whether being configured with multiple virtual network interface, as no, then this network interface can be provided by according to it
The type of service of service, directly processes accordingly to packet;And as network interface configures
There is multiple virtual network interface, then by distribution submodule 2032 according to corresponding virtual of packet
Network interface MAC Address, connects packet delivery to corresponding virtual network interface, virtual network
Packet is processed accordingly by mouth according to its type of service that can be provided by service.
The foregoing is only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention
, every equivalent structure utilizing description of the invention and accompanying drawing content to be made or equivalence flow process conversion
, or directly or indirectly it is used in other relevant technical fields, the most in like manner it is included in the present invention's
Scope of patent protection.