Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related toWhen attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appendedThe example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application.It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majorityForm, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wrapsIt may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the applicationA little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing fromIn the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to asOne information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...When " or " in response to determination ".
Data center generallys use server virtualization technology, and a physical server is virtualized into more VM.Such as Fig. 1It is shown, it in the big double layer network using VXLAN technology, usually requires that physical server supports VXLAN technology, is sent as VMWhen two layer message reaches VTEP (VXLAN Tunnel End Point, VXLAN tunneling termination node) equipment, by VTEP equipment pairTwo layer message carries out three layers of encapsulation, then carries out three layers of forwarding to the message after encapsulation by switching equipment.During this, switching equipmentThe MAC Address of physical server can only be perceived, the MAC Address of VM can not be perceived, therefore, the increase of VM quantity will not be to exchangeThe processing capacity of equipment affects.
But under network environment shown in Fig. 2, since traditional physical server (physical server 2) does not support VXLAN skillArt can not carry out three layers of encapsulation, it is therefore desirable to the switching equipment 2 being connected with the traditional physical server to the two layer message of VMThe MAC Address of VM can be perceived, and two-layer retransmitting table item is generated according to the MAC Address of VM.However, with the increase of VM quantity,Two-layer retransmitting table item also will increase, this will bring great challenge to the memory capacity of switching equipment.
In view of the above-mentioned problems, the embodiment of the present application proposes a kind of two-layer retransmitting table item polymerization, this method is according to predeterminedThe MAC Address allocation rule of the VM of justice merges the two-layer retransmitting table item that switching equipment learns, to reduce switching equipmentThe quantity of middle two-layer retransmitting table item.
It is one embodiment flow chart of the application two-layer retransmitting table item polymerization, the embodiment is to two layers referring to Fig. 3The polymerization process of forwarding-table item is described.
Step 301, a plurality of two-layer retransmitting table item being located under same port is obtained, the two-layer retransmitting table item is for recordingThe medium access control MAC Address of VM and the corresponding relationship of port.
The two-layer retransmitting table item (also known as MAC Address list item) of switching equipment generallys use self study mode and obtains, that is, existsAfter receiving message, corresponding relationship is established according to the receiving port of the source MAC of message and the message, to indicate the MACAddress corresponds to equipment and is located under the port.
In the embodiment of the present application, the switching equipment connecting with traditional physical server can also generate two by self study modeLayer retransmitting table item.It is the two-layer retransmitting table item that the switching equipment shown in one exemplary embodiment of the application learns referring to table 1,The MAC Address of VM and the corresponding relationship of port are had recorded in each two-layer retransmitting table item, that is, indicate that a certain VM is connected to correspondenceUnder port.
| List item serial number | The MAC Address of VM | Port |
| 1 | 00:24:00:03:02:01 | 20 |
| 2 | 00:24:00:03:02:02 | 20 |
| 3 | 00:24:00:03:02:12 | 20 |
| 4 | 00:25:01:03:02:01 | 1 |
| 5 | 00:25:01:03:02:11 | 1 |
| 6 | 00:26:01:03:02:02 | 2 |
Table 1
Step 302, a plurality of two layers under the same port are turned according to the MAC Address allocation rule of VM predeterminedForwarding list item merges.
The embodiment of the present application has pre-defined the MAC Address allocation rule of VM before system operation.
The MAC Address allocation rule of the VM can be with are as follows: the MAC Address of VM is made of N prefixes and M suffix, wherein NThe physical network that position prefix is used to indicate to be connected with port, the VM that M suffix are used to indicate to be located in the physical network.ExampleSuch as, by taking MAC Address 00:24:00:03:02:01 as an example, first three byte (00:24:00) is prefix, rear three bytes (03:It 02:01) is suffix.Wherein, the affiliated data center of VM can be indicated with the first two byte (00:24);Third byte (00) indicatesVM is located in which muon physics network of data center, is the further refinement to data center's physical network, is suitable for dataIn the case that center physical network is more dispersed, data center is divided into multiple muon physics networks, each muon physics networkIt is connected with the port of switching equipment;Three bytes (03:02:01) are used to distinguish the VM in same physical network afterwards.
The embodiment of the present application does not limit the digit of prefix and suffix specifically, in practical applications, in combination with specific networkFlexible layout configures the prefix and suffix of the MAC Address of VM.
This step carries out the two-layer retransmitting table item under same port according to the MAC Address allocation rule of VM predeterminedMerge, specifically:
Judge whether the MAC Address prefix of the VM in a plurality of two-layer retransmitting table item under the port is identical, will have identicalThe two-layer retransmitting table item of MAC Address prefix merges into a two-layer retransmitting table item.Specific union operation can be, will be identicalMAC Address prefix of the MAC Address prefix as the two-layer retransmitting table item after merging.
By taking the port 20 in table 1 as an example, there are 3 two-layer retransmitting table items under the port, and before this 3 two-layer retransmitting table itemsSewing (first three byte) is 00:24:00, therefore, which is merged, the two-layer retransmitting table item after mergingMAC Address be 00:24:00:00:00:00, corresponding ports 20.Similarly, other ports can also merge, and two after mergingLayer retransmitting table item is as shown in table 2.
| List item serial number | The MAC Address of VM | Port |
| 1 | 00:24:00:00:00:00 | 20 |
| 2 | 00:25:01:00:00:00 | 1 |
| 3 | 00:26:01:03:02:02 | 2 |
Table 2
When switching equipment receives message, matching two-layer retransmitting table item is gone according to the target MAC (Media Access Control) address of message, is being confirmedWhen the target MAC (Media Access Control) address prefix of message is identical as the MAC Address prefix of two-layer retransmitting table item after merging, passes through corresponding ports and turnIt transmits messages text.
The application makes the MAC Address of VM by the MAC Address allocation rule of predefined VM it can be seen from foregoing descriptionDistribute it is regular follow, and then the two-layer retransmitting table item that switching equipment learns is merged according to the Distribution dynamics, to subtractThe quantity of two-layer retransmitting table item, reduces the requirement to switching equipment memory space, has saved switching equipment in few switching equipmentSystem resource.
Now by taking Fig. 4 as an example, two-layer retransmitting table item polymerisation process is discussed in detail.
Fig. 4 is simplified data center's schematic diagram, wherein VM11, VM12, VM21, VM22 are virtual machine, and SW1 and SW2 areSwitching equipment.It is assumed that data center 1 and data center 2 are all without applying VXLAN technology, then SW1 and SW2 requires execution twoLayer retransmitting table item polymerization.
It is assumed that definition virtual machine MAC Address allocation rule are as follows: MAC Address by three bytes (24bit) prefix andThe suffix composition of three bytes (24bit), wherein the first two byte representation data center, third byte representation muon physics netNetwork, rear three byte representation virtual machines.The MAC Address of each virtual machine is distributed referring to table 3.
| Virtual machine | MAC Address |
| VM11 | 00:24:00:03:02:01 |
| VM12 | 00:24:00:03:02:02 |
| VM21 | 00:25:01:03:02:01 |
| VM22 | 00:25:01:03:02:02 |
Table 3
SW1 obtains two-layer retransmitting table shown in table 4 by self study.
| List item serial number | The MAC Address of VM | Port |
| 1 | 00:25:01:03:02:01 | S10 |
| 2 | 00:25:01:03:02:02 | S10 |
| 3 | 00:24:00:03:02:01 | S11 |
| 4 | 00:24:00:03:02:02 | S12 |
Table 4
Wherein, there are two two-layer retransmitting table items, and the MAC Address prefix phase of two two-layer retransmitting table items under the port S10Together, this two two-layer retransmitting table items are merged, two-layer retransmitting table shown in table 5 can be obtained.
| List item serial number | The MAC Address of VM | Port |
| 1 | 00:25:01:00:00:00 | S10 |
| 2 | 00:24:00:03:02:01 | S11 |
| 3 | 00:24:00:03:02:02 | S12 |
Table 5
Similarly, SW2 obtains two-layer retransmitting table shown in table 6 by self study.
| List item serial number | The MAC Address of VM | Port |
| 1 | 00:24:00:03:02:01 | S20 |
| 2 | 00:24:00:03:02:02 | S20 |
| 3 | 00:25:01:03:02:01 | S21 |
| 4 | 00:25:01:03:02:02 | S22 |
Table 6
After 6 merging treatment of table, two-layer retransmitting table shown in table 7 can be obtained.
| List item serial number | The MAC Address of VM | Port |
| 1 | 00:24:00:00:00:00 | S20 |
| 2 | 00:25:01:03:02:01 | S21 |
| 3 | 00:25:01:03:02:02 | S22 |
Table 7
It is assumed that VM21 of the VM11 in data center 1 into data center 2 sends message, SW1 is according to the purpose of messageTwo-layer retransmitting table item in MAC Address 00:25:01:03:02:01 matching list 5, the target MAC (Media Access Control) address prefix 00:25 of the message:01 is identical as the MAC Address prefix in the 1st article of two-layer retransmitting table item, and therefore, SW1 forwards message from port S10.
After SW2 receives message, according to two layers in the target MAC (Media Access Control) address 00:25:01:03:02:01 matching list 7 of messageForwarding-table item, the target MAC (Media Access Control) address of the message is identical as the MAC Address in the 2nd article of two-layer retransmitting table item, and therefore, SW2 is by messageIt is forwarded from port S21, message reaches VM21.
Corresponding with the embodiment of aforementioned two-layer retransmitting table item polymerization, it is poly- that present invention also provides two-layer retransmitting table itemsAttach together the embodiment set.
The embodiment of the application two-layer retransmitting table item polyplant can be applied on switching equipment.Installation practice can be withBy software realization, can also be realized by way of hardware or software and hardware combining.Taking software implementation as an example, it is patrolled as oneThe device in meaning is collected, is that corresponding computer program instructions are formed in the processor run memory by equipment where it's.For hardware view, as shown in figure 5, for a kind of hardware knot of the application two-layer retransmitting table item polyplant place equipmentComposition, the usual root of equipment other than processor shown in fig. 5, network interface and memory, in embodiment where deviceAccording to the actual functional capability of the equipment, it can also include other hardware, this is repeated no more.
Referring to FIG. 6, for the structural schematic diagram of the two-layer retransmitting table item polyplant in the application one embodiment.This twoLayer retransmitting table item polyplant includes acquiring unit 601 and combining unit 602, in which:
Acquiring unit 601, for obtaining a plurality of two-layer retransmitting table item being located under same port, the two-layer retransmitting table itemFor recording the medium access control MAC Address of virtual machine VM and the corresponding relationship of port;
Combining unit 602, for the MAC Address allocation rule according to VM predetermined to more under the same portTwo-layer retransmitting table item merges.
Further,
The MAC Address allocation rule of the VM is that the MAC Address of the VM is made of N prefixes and M suffix, whereinThe N prefix is used for the physical network for indicating to be connected with port, and the M suffix is located in the physical network for indicatingVM.
Further, the combining unit 602, comprising:
Whether list item judgment module, the MAC Address prefix for judging the VM in a plurality of two-layer retransmitting table item are identical;
List item merging module turns for the two-layer retransmitting table item with identical MAC Address prefix to be merged into one two layersForwarding list item.
Further,
The list item merging module, specifically for using the identical MAC Address prefix as the two-layer retransmitting table after mergingMAC Address prefix so that target MAC (Media Access Control) address prefix and two layer described merge after of the switching equipment in confirmation messageWhen the MAC Address prefix of forwarding-table item is identical, the message is forwarded by corresponding ports.
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 apparatusRealization 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 realityApply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unitThe unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be withIt is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actualThe purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not payingOut in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the applicationWithin mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.