A kind of data transmission method and system
Technical field
The present invention relates to the communications field, particularly relate to a kind of data transmission method and system.
Background technology
Along with deepening continuously of IT application in enterprise and carrying out of Constructing data center, various base application systems also get more and more, and various design data need increasing high-performance calculation machine equipment to process. The use of large number quipments, management and operation have been increasingly becoming the important step of service supporting platform. Server virtualization technology can by the CPU (CentralProcessingUnit of a physical server, central processing unit), internal memory, the resource such as equipment and I/O virtualize, one physical server invents several virtual servers use, each virtual server has independent memory headroom, independent Microsoft Loopback Adapter, independent virtual cpu and runs independent operating system, does not interfere with each other. Every equipment needs to carry out data exchange with external equipment, IP (InternetProtocol, Internet protocol) address and MAC (MediaAccessControl, media interviews control) address be data exchange essential condition, accordingly, it would be desirable to distribute independent IP address and MAC Address to each virtual server.
The physical server connected when switch is relatively more, and every physical server fictionalize tens even up to a hundred virtual servers time, Layer 2 switch needs to learn substantial amounts of MAC address entries, three-tier switch needs to learn substantial amounts of MAC address entries and ARP (AddressResolutionProtocol, address resolution protocol) list item.
MAC address entries is that switch device is for carrying out two layers of forwarding, if owing to the specification exceeding mac learning causes learning MAC, so message will at VLAN (VirtualLocalAreaNetwork, VLAN) in broadcast, broadcasting packet can be forwarded to all virtual servers in VLAN, consume server cpu resource, add the pressure of server.
The ARP of three-tier switch is used to the purpose MAC's port and encapsulation IP message of searching three layers forwarding, owing to the MAC Address of the ARP of major part exchange is individually deposit within hardware, multiple ARP is taked to share MAC space, accordingly, it would be desirable to substantial amounts of space preserves MAC Address. If the MAC Address space of three-tier switch cannot meet the requirement of a large amount of ARP study, the target MAC (Media Access Control) address of the IP message of three-tier message encapsulation will appear from problem, and this will cause virtual server service exception.
Being required for individually applying for MAC Address additionally, due to every virtual server, this is also by the MAC Address in the applied address pond of consumption manufacturer server or enterprise and distribution.
Summary of the invention
It is an object of the invention to provide a kind of data transmission method and system, to reduce the consumption of MAC Address, save system resource, reduce the MAC address learning load of exchange network equipment, for this, the present invention adopts the following technical scheme that
A kind of data transmission method, it is applied to the system including physical server and exchange network equipment, described physical server includes virtual server and virtual switch, described physical server also includes media interviews and controls MAC proxy module, described virtual server is configured with the internal mac address corresponding with self internet protocol address, and each virtual LAN VLAN is assigned a MAC Address in same physical server, in described MAC proxy module, storage has the IP address of described virtual server and the corresponding relation of internal mac address, and the VLAN of described VLAN identifies the corresponding relation of ID and MAC Address, described virtual switch storage has the corresponding relation of logic port and the internal mac address of the virtual server being connected connecting virtual server, the method includes:
When described MAC proxy module receives the message that described virtual switch forwards, source MAC in this message, according to the VLANID carried in message and the VLANID self stored and the corresponding relation of MAC Address, is replaced with the MAC Address corresponding with the VLANID carried in message by described MAC proxy module;
Message after source MAC replacement is transmitted to described exchange network equipment by described MAC proxy module, described exchange network equipment this message is processed;
When described MAC proxy module receives the message of described exchange network device forwards, the described MAC proxy module corresponding relation according to the purpose IP address carried in message and the IP address self stored and internal mac address, replaces with the internal mac address corresponding with the purpose IP address carried in message by the target MAC (Media Access Control) address in this message;
Message after target MAC (Media Access Control) address replacement is transmitted to described virtual switch by described MAC proxy module, by described virtual switch according to the corresponding relation self storing logic port and the internal mac address of virtual server, determine the logic port connecting purpose virtual server, and forward the packet to purpose virtual server by this logic port.
Wherein, in described virtual switch, also storage study is to the mac address information of other equipment, and the port that goes out of this mac address information is the logic port that virtual switch connects MAC proxy module;
Described MAC proxy module also includes before receiving the message that described virtual switch forwards:
Source virtual server sends described message to described virtual switch, and the source MAC of described message is the internal mac address of described source virtual server;
When described virtual switch determines when going out the logic port that port is the described virtual switch described MAC proxy module of connection of described message according to the target MAC (Media Access Control) address of described message, described message is transmitted to described MAC proxy module by described virtual switch.
Wherein, when purpose virtual server and source virtual server are in same physical server, and when belonging to same VLAN, the internal mac address that MAC Address is described purpose virtual server of the described purpose virtual server that described source virtual server learns;
When purpose virtual server is in different physical server from source virtual server, but when belonging to same VLAN, the MAC Address of the described purpose virtual server that described source virtual server learns is the MAC Address corresponding for VLANID of VLAN belonging to described purpose virtual server;
When purpose virtual server belongs to different VLAN from source virtual server, the virtual interface MAC Address that MAC Address is exchange network equipment of the described purpose virtual server that described source virtual server learns.
Wherein, MAC Address when the virtual interface that the target MAC (Media Access Control) address of described message is described exchange network equipment, or during MAC Address corresponding to the VLANID of VLAN belonging to purpose virtual server, described virtual switch determines that the port that of described message is the logic port that described virtual switch is connected with described MAC proxy module.
Wherein, the method also includes:
For the purpose of the target MAC (Media Access Control) address of described message during the internal mac address of virtual server, the described virtual switch corresponding relation according to the logic port self stored Yu the internal mac address of virtual server, determine the logic interfacing that the target MAC (Media Access Control) address of described message is corresponding, and this message is transmitted to described purpose virtual server by this logic interfacing.
A kind of data transmission system, including physical server and exchange network equipment, described physical server includes virtual server and virtual switch, described physical server also includes media interviews and controls MAC proxy module, described virtual server is configured with the internal mac address corresponding with self internet protocol address, and the MAC Address that in a physical server, each virtual LAN VLAN is assigned, in described MAC proxy module, storage has the IP address of described virtual server and the corresponding relation of internal mac address, and the VLAN of described VLAN identifies the corresponding relation of ID and MAC Address, described virtual switch storage has the corresponding relation of logic port and the internal mac address of the virtual server being connected connecting virtual server,
Described MAC proxy module is used for, when receiving the message that virtual switch forwards, corresponding relation according to the VLANID carried in message and the VLANID self stored and MAC Address, source MAC in this message is replaced with the MAC Address corresponding with the VLANID carried in message, and the message after source MAC replacement is transmitted to described exchange network equipment; When receiving the message of described exchange network device forwards, corresponding relation according to the purpose IP address carried in message and the IP address self stored and internal mac address, target MAC (Media Access Control) address in this message is replaced with the internal mac address corresponding with the purpose IP address carried in message, and the message after target MAC (Media Access Control) address replacement is transmitted to described virtual switch;
Described exchange network equipment is used for, and the message that the described MAC proxy module received is sent processes;
Described virtual switch is used for, the corresponding relation according to self storage logic port with the internal mac address of virtual server, it is determined that connect the logic port of purpose virtual server, and forward the packet to purpose virtual server by this logic port.
Wherein, in described virtual switch, also storage study is to the mac address information of other equipment, and the port that goes out of this mac address information is the logic port that virtual switch connects MAC proxy module;
Described virtual server is additionally operable to, and sends described message to described virtual switch, and the source MAC of described message is the internal mac address of described source virtual server;
Described virtual switch is additionally operable to, and determines when going out the logic port that port is the described virtual switch described MAC proxy module of connection of described message according to the target MAC (Media Access Control) address of described message, described message is transmitted to described MAC proxy module.
Wherein, when purpose virtual server and source virtual server are in same physical server, and when belonging to same VLAN, the internal mac address that MAC Address is described purpose virtual server of the described purpose virtual server that described source virtual server learns;
When purpose virtual server is in different physical server from source virtual server, but when belonging to same VLAN, the MAC Address of the described purpose virtual server that described source virtual server learns is the MAC Address corresponding for VLANID of VLAN belonging to described purpose virtual server;
When purpose virtual server belongs to different VLAN from source virtual server, the virtual interface MAC Address that MAC Address is exchange network equipment of the described purpose virtual server that described source virtual server learns.
Wherein, described virtual switch specifically for, MAC Address when the virtual interface that the target MAC (Media Access Control) address of described message is described exchange network equipment, or during MAC Address corresponding to the VLANID of VLAN belonging to purpose virtual server, it is determined that the port that goes out of described message is the logic port that described virtual switch is connected with described MAC proxy module.
Wherein, described virtual switch is additionally operable to, for the purpose of the target MAC (Media Access Control) address of described message during the internal mac address of virtual server, corresponding relation according to the logic port self stored with the internal mac address of virtual server, determine the logic interfacing that the target MAC (Media Access Control) address of described message is corresponding, and this message is transmitted to described purpose virtual server by this logic interfacing.
In the above embodiment of the present invention, configure the internal mac address corresponding with own IP address for virtual server, virtual server is carried out VLAN division, for each physical server, applies for for each VLAN and distribute a MAC Address; Physical server arranges MAC proxy module, so that the internal mac address of the virtual server in this physical server and the MAC Address of affiliated VLAN are managed, in this MAC proxy module, storage has the IP address of the virtual server in this physical server and the corresponding relation of internal mac address and the corresponding relation of the VLANID of VLAN belonging to the virtual server in this physical server and MAC Address; When MAC proxy module receives the message that virtual switch forwards, the source MAC of this message is replaced with MAC Address corresponding to the VLANID carried in message by MAC proxy module, and the message after being replaced by source MAC is transmitted to exchange network equipment, exchange network equipment this message is processed; When MAC proxy module receives the message of exchange network device forwards, the target MAC (Media Access Control) address of this message is replaced with the internal mac address corresponding with the purpose IP address of this message by MAC proxy module, and the message after being replaced by this target MAC (Media Access Control) address is sent to virtual switch, purpose virtual switch is forwarded the packet to by virtual switch, decrease the consumption of MAC Address, save system resource, reduce the MAC address learning load of exchange network equipment.
Accompanying drawing explanation
Fig. 1 is virtual server message forwarding plane schematic diagram in prior art;
The schematic flow sheet of a kind of data transmission method that Fig. 2 provides for the embodiment of the present invention;
The configuration diagram of a kind of concrete application scenarios that Fig. 3 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of data transmission method under the scene (1) that Fig. 4 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of data transmission method under the scene (2) that Fig. 5 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of data transmission method under the scene (3) that Fig. 6 provides for the embodiment of the present invention;
The schematic flow sheet of the another kind of data transmission method under the scene (3) that Fig. 7 provides for the embodiment of the present invention;
The structural representation of a kind of data transmission system that Fig. 8 provides for the embodiment of the present invention.
Detailed description of the invention
In order to be more fully understood that the technical scheme that the embodiment of the present invention provides, below virtual server message in prior art in a network two layers is forwarded and three layers forwarding process is briefly described.
Referring to Fig. 1, in existing virtualization running environment, the virtual switch on physical server provides the ability to communicate between virtual server and between virtual server and external network.
System is that each virtual server creates a Microsoft Loopback Adapter, the Microsoft Loopback Adapter of each virtual server corresponds on a logic port of virtual switch on physical server, the port that the physical network card of physical server is connected with exchange network equipment corresponding to virtual switch. In virtual switch, storage has the MAC address entries of record virtual server MAC Address and virtual switch logic port corresponding relation.
In prior art, the two layers of forwarding in a network of virtual server message can include following several step with three layers forwarding process:
1), according to different functions, different virtual servers is divided in different VLAN, the IP address of differently configured subnet section;
2), can pass through between the virtual server belonging to same VLAN on Same Physical server that virtual switch is made directly Layer 2 data to forward;
3) network service between the virtual server belonging to identical VLAN, on different physical server requires over the first line of a couplet network interface of virtual switch, carries out Layer 2 data forwarding by outside double layer network switch;
4), belong to the network service of (including on Same Physical server and different physical servers) between the virtual server of different VLAN and require over the first line of a couplet network interface of virtual switch, carry out three-layer routing forwarding by external network multilayer switch/router (being generally the core switch of data center).
In the prior art, each virtual server on physical server all needs application and distributes MAC Address, if the physical server connected under exchange network equipment is relatively more, and every physical server fictionalizes tens even up to a hundred virtual servers, so the Layer2 switching network equipment needs to learn substantial amounts of MAC address entries, the L3 Switching network equipment needs to learn substantial amounts of MAC Address and ARP, the MAC address learning load of system resources consumption and exchange network equipment is excessive, influential system stability.
For the problems referred to above that prior art exists, the embodiment of the present invention provides the technical scheme of a kind of data transmission, is applied to the system including physical server and exchange network equipment. In this technical scheme, for the internal mac address that virtual server configuration is corresponding with own IP address, virtual server is carried out VLAN division, applying for for each VLAN in each physical server and distribute a MAC Address, the MAC Address of the different VLAN of Same Physical server and each VLAN of different physical server all differs;Physical server arranges MAC proxy module, so that the internal mac address of the virtual server in this physical server and the MAC Address of affiliated VLAN are managed, in this MAC proxy module, storage has the IP address of the virtual server in this physical server and the corresponding relation of internal mac address and the corresponding relation of the VLANID of VLAN belonging to the virtual server in this physical server and MAC Address; When MAC proxy module receives the message that virtual switch forwards, the source MAC of this message is replaced with MAC Address corresponding to the VLANID carried in message by MAC proxy module, and the message after being replaced by source MAC is transmitted to exchange network equipment, exchange network equipment this message is processed; When MAC proxy module receives the message of exchange network device forwards, the target MAC (Media Access Control) address of this message is replaced with the internal mac address corresponding with the purpose IP address of this message by MAC proxy module, and the message after being replaced by this target MAC (Media Access Control) address is sent to virtual switch, virtual switch forward the packet to purpose virtual switch. Wherein, in virtual switch, storage has the corresponding relation of logic port and the internal mac address of the virtual server being connected connecting virtual server.
In embodiments of the present invention, virtual server owing to belonging to identical VLAN has only to application and distributes an identical MAC Address, and in VLAN each virtual switch be respectively allocated internal mac address (can self-defined by service provider and distribution, for one virtual server of unique mark in a physical server, it is made without application), therefore, the consumption of MAC Address is decreased; In addition, the message outwards forwarded is needed to be replaced with by the source MAC of message after MAC Address corresponding to VLANID to exchange network device forwards by MAC proxy module, the message that exchange network equipment internally forwards forwards to virtual switch after the target MAC (Media Access Control) address of message being replaced with internal mac address by MAC proxy module, exchange network equipment carry out MAC address entries or/and ARP study time, only need study MAC Address of VLAN application and distribution belonging to virtual server, reduce MAC address learning load, save system resource.
Below in conjunction with the accompanying drawing in embodiments of the invention, the technical scheme in embodiments of the invention is carried out clear, complete description, it is clear that the embodiments described below are only a part of embodiment of the present invention, rather than whole embodiments. Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not paying creative work premise, broadly fall into the scope of embodiments of the invention protection.
As in figure 2 it is shown, the schematic flow sheet of a kind of data transmission method provided for the embodiment of the present invention, it is possible to comprise the following steps:
Step 201, when MAC proxy module receive virtual switch forward message time, the source MAC of message is replaced with the MAC Address corresponding with the VLANID carried in message by MAC proxy module.
Concrete, when virtual switch receives the message that source virtual server sends, virtual switch can according to the MAC address entries inquiry of the target MAC (Media Access Control) address of message and self storage corresponding go out port. When virtual switch determine message go out port be the logic port that virtual switch is connected with MAC proxy module time, virtual switch forwards the packet to MAC proxy module.
After MAC proxy module receives the message that virtual switch forwards, corresponding relation according to the VLANID carried in this message and the VLANID self stored and MAC Address, determine MAC Address corresponding to the VLANID carried in message, and the source MAC of this message is replaced with determined MAC Address. Wherein, when source virtual switch sends message, the source MAC of encapsulated message is the internal mac address distributed.
Message after source MAC replacement is transmitted to exchange network equipment by step 202, MAC proxy module, exchange network equipment this message is processed.
Concrete, after the MAC proxy module message to receiving carries out source MAC replacement, the message after being replaced by source MAC is transmitted to exchange network equipment, exchange network equipment this message is processed. After exchange network equipment receives this message, corresponding MAC address entries can be carried out or/and the study of ARP, or directly message is forwarded by target MAC (Media Access Control) address or IP address according to message, its concrete handling process is similar with relevant treatment flow process in prior art, does not repeat them here.
Step 203, when MAC proxy module receives the message of exchange network device forwards, the target MAC (Media Access Control) address in message is replaced with the internal mac address corresponding with the IP address carried in message by MAC proxy module.
Concrete, in embodiments of the present invention, due to MAC proxy module at the message that source virtual server is sent to before exchange network device forwards, all need the MAC Address to the VLAN replaced with by the source MAC of message belonging to the virtual server of source, therefore, exchange network learning equipment to the MAC Address that MAC Address is the VLAN belonging to the virtual server of source of source virtual server, exchange network device forwards is generally the MAC Address of VLAN belonging to purpose virtual server to the target MAC (Media Access Control) address of the message of MAC proxy module.
When MAC proxy module receives the message of exchange network device forwards, in order to make virtual switch function forward the packet to purpose virtual server, MAC proxy module needs to replace with the target MAC (Media Access Control) address of this message the internal mac address of purpose virtual server. Therefore, after MAC proxy module receives the message of exchange network device forwards, can according to the corresponding relation of the IP address of the purpose IP address in this message and the virtual server of self storage and internal mac address, determine the internal mac address that the IP address in this message is corresponding, and the target MAC (Media Access Control) address of this message is replaced with determined internal mac address.
Message after target MAC (Media Access Control) address replacement is transmitted to virtual switch by step 204, MAC proxy module, virtual switch forward the packet to purpose virtual server.
Concrete, after the MAC proxy module message to receiving carries out the replacement of target MAC (Media Access Control) address, the message after the replacement of this target MAC (Media Access Control) address is transmitted to virtual switch by MAC proxy module. After virtual switch receives the message that MAC proxy module forwards, the logic port of the connection virtual server that can store according to self is with the corresponding relation of the internal mac address of the virtual server being connected (in a particular application, generally store with the form of MAC table), inquire about the logic port corresponding with the target MAC (Media Access Control) address in the message received, and forward the packet to purpose virtual server by this logic port.
The technical scheme embodiment of the present invention provided below in conjunction with concrete application scenarios carries out clearly, describes in detail.
Referring to Fig. 3, the structural representation of the concrete application scenarios of a kind of data transmission method provided for the embodiment of the present invention. Wherein:
(virtual server that function is identical belongs to identical VLAN previously according to the function of virtual server, virtual server to be carried out VLAN division, the virtual server that function is different belongs to different VLAN), and apply for and one MAC Address of distribution for each VLAN, each virtual server in each VLAN is respectively allocated an internal mac address, in MAC proxy module, storage has the IP address of each virtual server on self place physical server and the corresponding relation of internal mac address, and the corresponding relation of the VLANID of VLAN belonging to each virtual server and MAC Address, in the MAC address entries of virtual switch, record has the corresponding relation of each logic port and corresponding MAC Address. wherein, the internal mac address of the virtual server in Same Physical server is different, and the internal mac address of the virtual server of different physical servers can be identical.
In embodiments of the present invention, the message between source virtual server and purpose virtual server forwards and can be divided into following several scene:
(1), source virtual server and purpose virtual server are in Same Physical server, and belong to identical VLAN;
(2), source virtual server and purpose virtual server are in different physical servers, but belong to identical VLAN;
(3), source virtual server and purpose virtual server are in different VLAN.
Wherein, can realize intercoming mutually either directly through virtual switch for scene (1), source virtual server and purpose virtual server; For scene (2), source virtual server is sent to the message of purpose virtual server, it is necessary to carry out two layers of forwarding by exchange network equipment; For scene (3), source virtual server is sent to the message of purpose virtual server, it is necessary to carry out three layers forwarding by exchange network equipment.
In addition, owing to the message of virtual server transmission is before being transmitted to exchange network equipment, need to carry out source MAC replacement through MAC proxy module, therefore, carry out in the learning process of MAC Address (carrying out MAC address learning sending ARP request) at virtual server:
For scene (1), the IP address for source virtual server carried in the ARP request message that purpose virtual server receives and the study relation of MAC Address, the study relation of the IP address of virtual server and MAC Address for the purpose of carrying in the arp reply message that source virtual server receives, namely in scene (1), the MAC Address that MAC Address is this purpose (source) virtual server of purpose (source) virtual server that source (purpose) virtual server learns;
For scene (2), the source MAC (MAC Address of source virtual server) of the ARP request message that source virtual server sends is replaced by the MAC Address of VLAN belonging to the virtual server of source when MAC proxy module forwards, the corresponding relation of the MAC Address of VLAN belonging to virtual server IP address, source and source virtual server carried in the ARP request message that purpose virtual server receives, correspondingly, the source MAC (MAC Address of purpose virtual server) of the arp reply message of purpose virtual server response is replaced by the MAC Address of VLAN belonging to purpose virtual server when MAC proxy module forwards, the corresponding relation of the MAC Address of VLAN belonging to virtual server IP address and purpose virtual server for the purpose of carrying in the arp reply message that source virtual server receives, namely in scene (2), the MAC Address of the MAC Address of purpose (source) virtual server that source (purpose) virtual server learns VLAN belonging to this purpose (source) virtual server,
For scene (3), the source MAC (MAC Address of source virtual server) of the ARP request message that source virtual server sends is replaced by the MAC Address of VLAN belonging to the virtual server of source when MAC proxy module forwards, and the virtual interface MAC Address of exchange network equipment it is being replaced by through exchange network equipment, the corresponding relation for virtual server IP address, source with the virtual interface MAC Address of exchange network equipment carried in the ARP request message that purpose virtual server receives, correspondingly, the source MAC (MAC Address of purpose virtual server) of the ARP request message of purpose virtual server response is replaced by the MAC Address of VLAN belonging to purpose virtual server when MAC proxy module forwards, and the virtual interface MAC Address of exchange network equipment it is being replaced by through exchange network equipment, the corresponding relation of the virtual interface MAC Address of virtual server IP address and exchange network equipment for the purpose of carrying in the arp reply message that source virtual server receives, namely in scene (3), the virtual interface MAC Address that MAC Address is exchange network equipment of purpose (source) virtual server that source (purpose) virtual server learns.
Wherein, the concrete processing mode of the MAC Address of source (purpose) virtual server learning goals (source) virtual server is similar with relevant treatment mode in prior art, does not repeat them here.
Separately below the data transmission technology scheme under scene (1), (2) and (3) is illustrated.
As shown in Figure 4, for the schematic flow sheet of a kind of data transmission method under the scene (1) that the embodiment of the present invention provides, in this embodiment, source virtual server is the virtual server a in physical server A1, purpose virtual server is the virtual server a in physical server A2, virtual server a1With virtual server a2Belonging to same VLAN, the method flow process may comprise steps of:
Step 401, virtual server a1Sending message to virtual switch A, the source MAC of this message is virtual server a1Internal mac address, target MAC (Media Access Control) address is virtual server a2Internal mac address.
Step 402, virtual switch inquire about MAC address entries according to the target MAC (Media Access Control) address of the message received, it is determined that the logic port that this target MAC (Media Access Control) address is corresponding is and virtual server a2The logic port connected.
Concrete, the MAC address entries of virtual switch can record the corresponding relation of the logic port being connected to virtual server and the internal mac address of the virtual server being connected. After virtual switch receives the message that virtual server sends, inquire about self MAC list item according to the target MAC (Media Access Control) address of this message, go out port with what determine this message.
In this embodiment, the target MAC (Media Access Control) address of message is and virtual server a1It is in Same Physical server, and belongs to the virtual server a of identical VLAN2Internal mac address, the port that goes out of its correspondence is virtual switch and virtual server a2The logic port connected.
The message received is transmitted to virtual server a by determined logic port by step 403, virtual switch2��
As it is shown in figure 5, the schematic flow sheet of a kind of data transmission method under the scene (2) provided for the embodiment of the present invention, in this embodiment, source virtual server is the virtual server a in physical server A1, purpose virtual server is the virtual server b in physical server B1, virtual server a1With virtual server b1Belonging to same VLAN, the method flow process may comprise steps of:
Step 501, virtual server a1Sending message to virtual switch A, the source MAC of this message is virtual server a1Internal mac address, target MAC (Media Access Control) address is virtual server b1The MAC Address of affiliated VLAN.
Step 502, virtual switch A inquire about MAC address entries according to the target MAC (Media Access Control) address of the message received, it is determined that the logic port that this target MAC (Media Access Control) address is corresponding is and the MAC proxy module A logic port being connected.
Concrete, the MAC address entries of virtual switch also records the corresponding relation of logic port and the corresponding MAC Address connected to MAC proxy module, namely target MAC (Media Access Control) address is the port that of the message of this corresponding MAC Address is the logic port that virtual switch is connected with MAC proxy module, this corresponding MAC Address can be the virtual interface MAC Address of exchange network equipment, the MAC Address of VLAN belonging to purpose virtual server.
In this embodiment, the target MAC (Media Access Control) address of message is and virtual server a1It is in different physical server, but belongs to the virtual server b of identical VLAN1The MAC Address of affiliated VLAN, the port that goes out of its correspondence is the logic port that virtual switch is connected with MAC proxy module.
The message received is transmitted to MAC proxy module A by determined logic interfacing by step 503, virtual switch A.
The source MAC of the message received is replaced with virtual server a by step 504, MAC proxy module A1The MAC Address of affiliated VLAN.
Concrete, after MAC proxy module receives the message that virtual switch forwards, it is possible to according to the VLANID carried in message, and the corresponding relation of the VLANID of self storage and MAC Address, determine the MAC Address of correspondence, and the source MAC of this message is replaced with determined MAC Address.
Message after source MAC replacement is transmitted to exchange network equipment by step 505, MAC proxy module A, exchange network equipment interconnection the message received processes.
Wherein, the target MAC (Media Access Control) address of the message that the MAC proxy module A received due to exchange network equipment forwards is not the virtual interface MAC Address of exchange network equipment, therefore, this exchange network equipment determines that this message is two layers and E-Packets, can determine the port that of this message according to the target MAC (Media Access Control) address of this message and VLANID, so by message from determined go out port be sent to corresponding physical server.
Step 506, MAC proxy module B receive the message of exchange network device forwards, and the target MAC (Media Access Control) address of message is replaced with virtual server b1Internal mac address.
Concrete, after MAC proxy module receives the message of exchange network device forwards, can according to the purpose IP address of message, and the corresponding relation of the IP address of the virtual server of self storage and internal mac address, determine the internal mac address of correspondence, and the target MAC (Media Access Control) address of message is replaced with determined MAC Address.
Message after target MAC (Media Access Control) address replacement is transmitted to virtual switch B by step 507, MAC proxy module B.
After step 508, virtual switch B receive the message that MAC proxy module forwards, inquire about MAC address entries according to the target MAC (Media Access Control) address of message, it is determined that the logic port that this target MAC (Media Access Control) address is corresponding is and virtual server b1The logic port connected.
The message received is transmitted to virtual server b by determined logic port by step 509, virtual switch B1��
As shown in Figure 6, for the schematic flow sheet of a kind of data transmission method under the scene (3) that the embodiment of the present invention provides, in this embodiment, source virtual server is the virtual server a in physical server A1, purpose virtual server is the virtual server b in physical server B2, virtual server a1With virtual server b2Belonging to different VLAN, the method flow process may comprise steps of:
Step 601, virtual server a1Sending message to virtual switch A, the source MAC of this message is virtual server a1Internal mac address, target MAC (Media Access Control) address is the virtual interface MAC Address of exchange network equipment.
Step 602, virtual switch A inquire about MAC address entries according to the target MAC (Media Access Control) address of the message received, it is determined that the logic port that this target MAC (Media Access Control) address is corresponding is and the MAC proxy module A logic port being connected.
Concrete, in this embodiment, the target MAC (Media Access Control) address of message is the virtual interface MAC Address of exchange network equipment, and the port that goes out of its correspondence is the logic port that virtual switch is connected with MAC proxy module.
The message received is transmitted to MAC proxy module A by determined logic interfacing by step 603, virtual switch A.
The source MAC of the message received is replaced with virtual server a by step 604, MAC proxy module A1The MAC Address of affiliated VLAN.
Message after source MAC replacement is transmitted to exchange network equipment by step 605, MAC proxy module A, exchange network equipment interconnection the message received processes.
Wherein, the virtual interface MAC Address that target MAC (Media Access Control) address is this exchange network equipment of the message that the MAC proxy module A received due to exchange network equipment forwards, therefore, this exchange network equipment determines that this message is that three layers E-Packets, can determine the port that of this message according to the purpose IP address of this message, and by message from determined go out port be sent to corresponding physical server.
Step 606, MAC proxy module B receive the message of exchange network device forwards, and the target MAC (Media Access Control) address of message is replaced with virtual server b2Internal mac address.
Message after target MAC (Media Access Control) address replacement is transmitted to virtual switch B by step 607, MAC proxy module B.
After step 608, virtual switch B receive the message that MAC proxy module forwards, inquire about MAC address entries according to the target MAC (Media Access Control) address of message, it is determined that the logic port that this target MAC (Media Access Control) address is corresponding is and virtual server b2The logic port connected.
The message received is transmitted to virtual server b by determined logic port by step 609, virtual switch B2��
As it is shown in fig. 7, the schematic flow sheet of another kind of data transmission method under the scene (3) provided for the embodiment of the present invention, in this embodiment, source virtual server is the virtual server a in physical server A1, purpose virtual server is the virtual server a in physical server A3, virtual server a1With virtual server a3Belonging to different VLAN, the method flow process may comprise steps of:
Step 701, virtual server a1Sending message to virtual switch A, the source MAC of this message is virtual server a1Internal mac address, target MAC (Media Access Control) address is the virtual interface MAC Address of exchange network equipment.
Step 702, virtual switch A inquire about MAC address entries according to the target MAC (Media Access Control) address of the message received, it is determined that the logic port that this target MAC (Media Access Control) address is corresponding is and the MAC proxy module A logic port being connected.
The message received is transmitted to MAC proxy module A by determined logic interfacing by step 703, virtual switch A.
The source MAC of the message received is replaced with virtual server a by step 704, MAC proxy module A1The MAC Address of affiliated VLAN.
Message after source MAC replacement is transmitted to exchange network equipment by step 705, MAC proxy module A, exchange network equipment interconnection the message received processes.
Wherein, the virtual interface MAC Address that target MAC (Media Access Control) address is this exchange network equipment of the message that the MAC proxy module A received due to exchange network equipment forwards, therefore, this exchange network equipment determines that this message is that three layers E-Packets, can determine the port that of this message according to the purpose IP address of this message, and by message from determined go out port be sent to corresponding physical server.
Step 706, MAC proxy module A receive the message of exchange network device forwards, and the target MAC (Media Access Control) address of message is replaced with virtual server a3Internal mac address.
Message after target MAC (Media Access Control) address replacement is transmitted to virtual switch A by step 707, MAC proxy module A.
After step 708, virtual switch A receive the message that MAC proxy module forwards, inquire about MAC address entries according to the target MAC (Media Access Control) address of message, it is determined that the logic port that this target MAC (Media Access Control) address is corresponding is and virtual server a3The logic port connected.
The message received is transmitted to virtual server a by determined logic port by step 709, virtual switch A3��
Be can be seen that by above description, in the technical scheme that the embodiment of the present invention provides, configure the internal mac address corresponding with own IP address for virtual server, virtual server is carried out VLAN division, for each physical server, apply for for each VLAN and distribute a MAC Address; Physical server arranges MAC proxy module, so that the internal mac address of the virtual server in this physical server and the MAC Address of affiliated VLAN are managed, in this MAC proxy module, storage has the IP address of the virtual server in this physical server and the corresponding relation of internal mac address and the corresponding relation of the VLANID of VLAN belonging to the virtual server in this physical server and MAC Address; When MAC proxy module receives the message that virtual switch forwards, the source MAC of this message is replaced with MAC Address corresponding to the VLANID carried in message by MAC proxy module, and the message after being replaced by source MAC is transmitted to exchange network equipment, exchange network equipment this message is processed; When MAC proxy module receives the message of exchange network device forwards, the target MAC (Media Access Control) address of this message is replaced with the internal mac address corresponding with the purpose IP address of this message by MAC proxy module, and the message after being replaced by this target MAC (Media Access Control) address is sent to virtual switch, purpose virtual switch is forwarded the packet to by virtual switch, decrease the consumption of MAC Address, save system resource, reduce the MAC address learning load of exchange network equipment (including but not limited to Layer 2 switch or three-tier switch).
Based on the inventive concept of said method embodiment system, the embodiment of the present invention additionally provides a kind of data transmission system.
As shown in Figure 8, the structural representation of a kind of data transmission system provided for the embodiment of the present invention, it is possible to including:
A kind of data transmission system, including physical server 81 and exchange network equipment 82, described physical server 81 includes virtual server 811 and virtual switch 812, described physical server also includes media interviews and controls MAC proxy module 813, described virtual server 811 is configured with the internal mac address corresponding with self internet protocol address, and the MAC Address that in a physical server 81, each virtual LAN VLAN is assigned, in described MAC proxy module 813, storage has the IP address of described virtual server and the corresponding relation of internal mac address, and the VLAN of described VLAN identifies the corresponding relation of ID and MAC Address, the storage of described virtual switch 812 has the corresponding relation of logic port and the internal mac address of the virtual server being connected connecting virtual server,
Described MAC proxy module 813 is used for, when receiving the message that virtual switch 812 forwards, corresponding relation according to the VLANID carried in message and the VLANID self stored and MAC Address, source MAC in this message is replaced with the MAC Address corresponding with the VLANID carried in message, and the message after source MAC replacement is transmitted to described exchange network equipment 82;When receiving the message of described exchange network device forwards, corresponding relation according to the purpose IP address carried in message and the IP address self stored and internal mac address, target MAC (Media Access Control) address in this message is replaced with the internal mac address corresponding with the purpose IP address carried in message, and the message after target MAC (Media Access Control) address replacement is transmitted to described virtual switch 812;
Described exchange network equipment 82 is used for, and the message that the described MAC proxy module 813 received is sent processes;
Described virtual switch 812 is used for, the corresponding relation according to self storage logic port with the interior MAC Address of virtual server, it is determined that connect the logic port of purpose virtual server, and forward the packet to purpose virtual server by this logic port.
Wherein, in described virtual switch 812, also storage study is to the mac address information of other equipment, and the port that goes out of this mac address information is the logic port that virtual switch 812 connects MAC proxy module 813;
Described virtual server 811 is additionally operable to, and sends described message to described virtual switch, and the source MAC of described message is the internal mac address of described source virtual server;
Described virtual switch 812 is additionally operable to, and determines when going out the logic port that port is the described virtual switch described MAC proxy module 813 of connection of described message according to the target MAC (Media Access Control) address of described message, described message is transmitted to described MAC proxy module 813.
Wherein, when purpose virtual server and source virtual server are in same physical server, and when belonging to same VLAN, the internal mac address that MAC Address is described purpose virtual server of the described purpose virtual server that described source virtual server learns;
When purpose virtual server is in different physical server from source virtual server, but when belonging to same VLAN, the MAC Address of the described purpose virtual server that described source virtual server learns is the MAC Address corresponding for VLANID of VLAN belonging to described purpose virtual server;
When purpose virtual server belongs to different VLAN from source virtual server, the virtual interface MAC Address that MAC Address is exchange network equipment of the described purpose virtual server that described source virtual server learns.
Wherein, described virtual switch 812 specifically for, MAC Address when the virtual interface that the target MAC (Media Access Control) address of described message is described exchange network equipment 82, or during MAC Address corresponding to the VLANID of VLAN belonging to purpose virtual server, it is determined that the port that goes out of described message is the logic port that described virtual switch is connected with described MAC proxy module 813.
Wherein, described virtual switch 812 is additionally operable to, for the purpose of the target MAC (Media Access Control) address of described message during the internal mac address of virtual server, corresponding relation according to the logic port self stored with the internal mac address of virtual server, determine the logic interfacing that the target MAC (Media Access Control) address of described message is corresponding, and this message is transmitted to described purpose virtual server by this logic interfacing.
It will be appreciated by those skilled in the art that the module in the device in embodiment can describe according to embodiment to carry out being distributed in the device of embodiment, it is also possible to carry out respective change and be disposed other than in one or more devices of the present embodiment. The module of above-described embodiment can merge into a module, it is also possible to is further split into multiple submodule.
Through the above description of the embodiments, those skilled in the art is it can be understood that can add the mode of required general hardware platform by software to the present invention and realize, naturally it is also possible to by hardware, but in a lot of situation, the former is embodiment more preferably. ?he ? peaceful fried twisted dough sticks ? convulsion 19. saddle cloth border sweet wine oar pair office that raises of hacking of shelf ? of standing up bites casket rice weevil rub-a-dub cutter rhythm clock bits border ankle the upper and lower teeth not meeting properly childhood and finishes vertebra and try to gain the sincere tip of bran and pound the even ? of pressing and smooth ? and return man and ask that religion spouse grows the falcon ? eyebrow that stand tall and upright and flutters the ? that is satisfied and press and smooth the anti-Wa of ? ? (16) show off Huan disagreement Wa 13. big shield hands school ? ? �� Xi Chinese herbaceous peony main officer of Tibet metal plate and waste fair ditch and waste fear �� to cut Song Pu ? can be mobile phone, personal computer, server, or the network equipment etc.) perform the method described in each embodiment of the present invention.
The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should look protection scope of the present invention.