A kind of virtual network and construction method of realizing the flow isolated controllingTechnical field
The present invention relates to virtual network administrative skill field, relate in particular to a kind of virtual network and construction method of realizing the flow isolated controlling.
Background technology
Virtual network is to be based upon on the basis of switching technology, with network node by job specification with need to be divided into several " logic working groups ", one " logic working group " i.e. a virtual network.Can fictionalize a lot of virtual machines by virtual machine on a host computer, as long as the configuration of true main frame is enough just passable.Network management is part and parcel in the virtual machine network management platform, the main body of virtual management: virtual machine and computing node, memory node that resource is provided for virtual machine etc. all are operated in a network environment, various different softwares are fought for and are taken Internet resources, if the isolation flow-dividing control is bad, can cause some to use cisco unity malfunction, perhaps corresponding speed reduces, and has a strong impact on the user and experiences.
For this solution of problem, common scheme is as follows:
Scheme one: build a plurality of physical networks, allow dissimilar flow use the different network interface card of server.
This scheme has higher requirement to network interface card number and the network card configuration of physics clothes, has improved cost.And physical network configuration more complicated, the keeper need to guarantee the availability of every type of network.
Scheme two: allow the keeper that the network interface card of individual server is bound, and allow the dissimilar flow of part to use same network interface card or network card binding (bond).
This scheme can solve subproblem substantially, and to the requirement reduction of server, but the keeper needs configure separately for different server by hand, complex management.If server network interface card number is consistent, really can provides unified network configuration interface, but so again hardware configuration proposed Secretary.Do not provide good isolation mech isolation test to dissimilar flow in addition yet, still can have the problem of fighting for flow.
Summary of the invention
The technical problem that (one) will solve
For defects, the technical problem to be solved in the present invention is the requirement that how to reduce the configuration of server physical network card, how the flow in virtual net is dynamically controlled according to demand.
(2) technical scheme
For addressing the above problem, the invention provides a kind of virtual network that realizes the flow isolated controlling, described virtual network comprises:
Virtual machine, virtual switch, network card binding, physical network card and physical switches;
Wherein said virtual switch is controlled the network traffics of connected all virtual machines;
Described network card binding is bound into a Microsoft Loopback Adapter with a plurality of physical network cards of server;
Described physical switches is connected with all physical network card makes network-in-dialing.
Preferably, described virtual switch provides packet COS tagging mechanism, stream table to control function, flow control function, and described network traffics are controlled.。
Preferably, by configuring during every stream table rule mates according to packet COS tagging mechanism and forward corresponding formation to, according to different demands, different queue is done different flow control configurations, and then realize control of network flow quantity in described stream table.
For addressing the above problem, the present invention also provides a kind of virtual network construction method of realizing the flow isolated controlling, and described method specifically comprises:
S1: create the binding of a plurality of physical network cards in each server, finally obtain a Microsoft Loopback Adapter;
S2: physical network card, the virtual switch of the Servers-all under management server is controlled described management server are configured, and realize the control to network traffics.
Preferably, the physical network card in described step S1 is the physical network card that is in upstate, and after server is restarted, described network card binding is rebuild, and in described network card binding process of reconstruction, the Sampling network state is also got rid of invalid physical network card.
Preferably, the Servers-all under described management server is controlled described management server is configured specifically and comprises:
S21: create formation in virtual switch, and the flow control of configuration different queue;
S22: the coupling in the configuration flow table forwards rule;
S23: the flow control configuration is carried out in different formations, mated and forward in corresponding formation according to packet COS tagging mechanism by configuring every stream table rule in the stream table.
(3) beneficial effect
The present invention proposes a kind of virtual network and construction method of realizing the flow isolated controlling, build virtual network by virtual machine, virtual switch, network card binding, physical network card and physical switches, and by create the binding of a plurality of physical network cards in each server, obtain Microsoft Loopback Adapter, Servers-all under management server is controlled described management server is configured, and realizes the control to network traffics.Network provided by the invention reduces the requirement of server network card configuration, the physical environment configuration is simple, use network card binding technique guarantee network high availability, also can not affect the various application operations of whole system even the part network interface card breaks down, management is simple and can dynamically do according to demand flow control.
Description of drawings
Fig. 1 is a kind of structural representation of realizing the virtual network of flow isolated controlling of the embodiment of the present invention one;
Fig. 2 is that the embodiment of the present invention one a kind of realizes flow control schematic diagram in the virtual network of flow isolated controlling;
Fig. 3 is that the embodiment of the present invention one a kind of realizes the schematic diagram that in the virtual network of flow isolated controlling, management server is configured;
Fig. 4 is a kind of flow chart of realizing the virtual network construction method of flow isolated controlling of the embodiment of the present invention two;
Fig. 5 is a kind of flow chart of realizing the virtual network construction method step S2 of flow isolated controlling of the embodiment of the present invention two.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation the present invention, but are not used for limiting the scope of the invention.
Embodiment one
A kind of virtual network that realizes the flow isolated controlling is provided in the embodiment of the present invention one, and structural representation is described the general structure of virtual network as shown in Figure 1, specifically comprises:
Virtual machine 11,virtual switch 12, network card binding 13,physical network card 14 andphysical switches 15.
12 pairs of connected allvirtual machines 11 of virtual switch are controlled, and network card binding 13 is bound into a Microsoft Loopback Adapter with a plurality ofphysical network cards 14, and the network traffics on 15 pairs of connectedphysical network cards 14 of physical switches are controlled.
The method that realizes this virtual network has a variety of, can use Linux bonding(network card binding technology) and Linux flow control tool TC realize.
Virtual machine 11,virtual switch 12, network card binding 13,physical network card 14 all are arranged inmain frame 10, control twovirtual machines 11 with avirtual switch 12 in Fig. 1, andphysical switches 15 is controlled twomain frames 10 and described for example.
Use the centre management program in the present embodiment, as shown in Figure 3, unified management is carried out in stream table rule (flow entry), formation (queue) and the flow control (QOS) of every station server, do not use the OpenFlow agreement.Also can not use the centre management program, use default script to be configured when startup of server.Flow control (QOS) is a kind of controlling mechanism, and it provides for different user or different data streams and has adopted different priority, or adopts different priority according to the requirement of application program, guarantees that the performance of data flow reaches stable.
Virtual switch 12 provides packet COS tagging mechanism, stream table to control function, flow control function, and by these functions, network traffics are controlled.In mating according to packet COS mark (TOS) mechanism by every stream table of configuration regular (flow entry) in stream table and forwarding corresponding formation (queue) to, carry out flow control according to different demands, the flow control schematic diagram as shown in Figure 2.Wherein packet COS mark (TOS) is given different values by the TOS field of giving packet and is done sign to packet.
The main feature of virtual network: the unified configuration of physical network; No matter the network interface card number of physical server be what, network interface card is binding automatically all, unified management; Carry out the flow control management by software, be the reasonable bandwidth of difference in functionality assignment of traffic.
Build virtual network by virtual machine, virtual switch, network card binding, physical network card and physical switches, reduction is to the requirement of server network card configuration, the physical environment configuration is simple, use network card binding technique guarantee network high availability, also can not affect the various application operations of whole system even the part network interface card breaks down, management is simple and can dynamically do according to demand flow control.
Embodiment two
For achieving the above object, a kind of virtual network construction method of realizing the flow isolated controlling also is provided in embodiments of the invention two, the schematic flow sheet of concrete steps comprises the following steps as shown in Figure 4:
Step S1: create the binding of a plurality of physical network cards in each server, obtain a Microsoft Loopback Adapter.
It is virtual machine (VM that server adds cluster (cluster), Virtual Machine) when resource is provided, the number of each physical server network interface card all will add network card binding (bond), and the title of every station server network card binding (bond) is consistent, so that unified management.Create the operation of network card binding (bond), can be placed in the booting script of server and carry out.Restart server, network card binding (bond) reconstruction of need to dismantling can foreclose invalid physical network card in the Sampling network state in network card binding (bond) process of reconstruction so in advance at every turn.
Create in the process of network card binding (bond), guarantee that adding the physical network card of network card binding (bond) is the physical network card that is in upstate, with management server UNICOM (guaranteeing that network is connected correctly), call the abbreviation of the OVS(Open Vswitch of virtual switch) order establishment network card binding (bond).Physical network card in same network is bound " synthetic network interface card " in logic of formation.
Step S2: physical network card, the virtual switch of the Servers-all under management server is controlled described management server are configured, and realize the control to network traffics.
Concrete, the steps flow chart that the Servers-all under management server is controlled management server is configured specifically comprises the following steps as shown in Figure 5:
Step S21: create formation in virtual switch, and the flow control of configuration different queue.
Step S22: the coupling in configuration flow table (flow table) forwards rule.
Step 23: flow control configuration is carried out in different formations, in mating according to packet COS tagging mechanism (TOS) and forward corresponding formation to by every stream table of configuration is regular in the stream table.
To preserve original OVS when also needing in addition to guarantee to tear network card binding (bond) open to the configuration information of this network card binding (bond) mouth.
By said method, by creating the binding of server and physical network card, obtain Microsoft Loopback Adapter, the Servers-all under management server is controlled described management server is configured, and realizes flow control.Reduction is to the requirement of server network card configuration, the physical environment configuration is simple, use network card binding technique guarantee network high availability, also can not affect the various application operations of whole system even the part network interface card breaks down, management is simple and can dynamically carry out according to demand flow control.
Above execution mode only is used for explanation the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.