Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of link aggregations based on SDN
Based on SDN frameworks, full mesh topology structure is obtained, and send out in SDN controllers by SDN controllers according to LLDP agreements for method
When certain existing message has a plurality of attribute consistent link by SDN network, intelligently carried out based on certain policy selection optimum link
Forwarding, so as to dynamically realize load balancing;It also is able to when this link breaks down that dynamic select link is forwarded again.
In order to achieve the above objects and other related objects, the present invention provides a kind of link aggregation method based on SDN, including
Following steps:Step S1, SDN controllers are according to the network topology structure of the entire SDN network of LLDP protocol awares;Step S2, SDN
Controller receives the link-state information offered in SDN switch;Step S3, SDN controllers are according to link-state information and net
Network topological structure calculates convergence group and member port;Step S4, SDN controllers computational load is balanced and issues flow table;Step
S5, SDN controller forward first message, so that SDN switch is according to flow table content surface speed forwarding data.
According to the above-mentioned link aggregation method based on SDN, wherein:In the step S2, the link-state information packet
MAC Address containing system, port number, port numbers, port speed, duplex module, port stp state and port status.
According to the above-mentioned link aggregation method based on SDN, wherein:The step S2 includes the following steps:
SDN switch establishes control channel, and report current link-state information with SDN controllers;
In certain time interval, SDN switch detection link state;
If detecting, link changes, and reports the link-state information after change;
If not detecting, link changes, and does not perform any operation.
According to the above-mentioned link aggregation method based on SDN, wherein:The step S3 includes the following steps:
A) SDN controllers select main equipment and create convergence group according to link-state information and network topology structure;
B) SDN controllers selection candidate ports;
If c) quantity of candidate ports is less than or equal to the upper limit, candidate ports become selected port;
If d) quantity of candidate ports is more than the upper limit, candidate ports become alternate port.
Further, according to the above-mentioned link aggregation method based on SDN, wherein:In the step a), SDN controllers
Selection main equipment includes the following steps:
SDN controllers compare the LACP treaty override grades of SDN switch;
If the priority of LACP agreements is different, it is main equipment to select the smaller SDN switch of priority;
If the priority of LACP agreements is identical, then comparison system MAC Address, the smaller SDN switch of MAC Address is selected
For main equipment.
Further, according to the above-mentioned link aggregation method based on SDN, wherein:The step b) and including following step
Suddenly:
SDN controllers compare the LACP treaty override grades of port;
If the LACP treaty override grade of port is different, it is candidate ports to select the smaller port of priority;
If the LACP treaty override grades of port are identical, compare the size of port numbers;If port numbers are different, selection port
Number smaller port is candidate ports;If port numbers are identical, it is candidate ports to select the port on main equipment.
According to the above-mentioned link aggregation method based on SDN, wherein:The step S4 includes the following steps:
SDN controllers receive the first message that SDN switch is sent;
SDN controllers select suitable forwarding port according to the configuration strategy of load balancing;
SDN controllers issue all SDN switches in flow table to message forwarding path.
According to the above-mentioned link aggregation method based on SDN, wherein:Further include step S6, the weight when link breaks down
New dynamic select link is forwarded.
Further, according to the above-mentioned link aggregation method based on SDN, wherein:The step S6 includes the following steps:
The selected port for the convergence group that SDN controller SDN switches are sent becomes the message closed, and whether judges this port
To be chosen port;
If not being chosen port, then SDN controllers do not perform any operation;
If selected port, SDN controllers become the port not to be chosen port, related flow table item is removed, is recalculated
Selected port;Further according to the first message of reception, load balancing is recalculated, issue flow table and forwards first message, is carried out based on new
The forwarding of port.
According to the above-mentioned link aggregation method based on SDN, wherein:The SDN switch passes through privately owned extension
Experimenter messages are to SDN controller report link-state informations.
As described above, the link aggregation method based on SDN of the present invention, has the advantages that:
(1) can full mesh topology structure be obtained according to LLDP agreements by SDN controllers;
(2) it can find that certain message has a plurality of attribute (such as same link rate) unanimously by SDN network in SDN controllers
Link when, be intelligently forwarded based on certain tactful (such as purpose MAC, destination IP) selection optimum link, so as to dynamic
Realize load balancing in ground;
It (3) can dynamic select link be forwarded again when link breaks down.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.
It should be noted that the diagram provided in the present embodiment only illustrates the basic conception of the present invention in a schematic way,
Then in schema only display with it is of the invention in related component rather than component count, shape and size during according to actual implementation paint
System, kenel, quantity and the ratio of each component can be a kind of random change, and its assembly layout kenel also may be used during actual implementation
It can be increasingly complex.
In the link aggregation method based on SDN of the present invention, SDN controllers obtain entire SDN network according to LLDP agreements
Network network topological structure, and when SDN controllers find that certain message has the consistent link of a plurality of attribute by SDN network, intelligence
Energy ground is forwarded in certain policy selection optimum link, so as to dynamically realize load balancing;It also is able to go out in this link
Dynamic select link is forwarded again during existing failure.
With reference to Fig. 2 and Fig. 3, the link aggregation method of the invention based on SDN includes the following steps:
Step S1, SDN controllers are according to the network topology structure of the entire SDN network of LLDP protocol awares.
Step S2, SDN controllers receive the link-state information offered in SDN switch.
Wherein, link-state information includes system MAC Address, port number, port numbers, port speed, duplex module, port
Stp state and port status.Specific explanations once each information below.
(1) system MAC Address
Wherein, system MAC Address is smaller, and priority is higher.
(2) port number, for representing the quantity of port.
(3) port numbers
Wherein, port numbers are smaller, and priority is higher.
(4) port speed
Specifically, port speed includes tri- kinds of 10M, 100M and 1000M.
(5) dual-mode
Specifically, duplex module includes two kinds of full-duplex mode and semiduplex mode.
(6) port STP (Spanning Tree Protocol, Spanning-Tree Protocol) state
Specifically, port stp state include obstruction (blocking), monitor (listening), study (learning),
Forward (forwarding) and this five kinds of closing (disable).
(7) port status
Specifically, port status include open (UP)/close (Down) both.
SDN switch is needed in both cases to SDN controller report link-state informations.A kind of situation is that SDN is handed over
It changes planes and just establishes control channel with SDN controllers, SDN switch needs to report current link conditions information immediately;Second
When situation is that link changes, SDN switch need to report the link-state information after change immediately.If it does not detect
Link changes, and SDN switch does not perform any operation then.
As shown in figure 4, SDN switch reporting links status information includes the following steps:
41) SDN switch establishes control channel, and report current link-state information with SDN controllers;
42) in certain time interval, SDN switch detection link state;
If 43) detect that link changes, the link-state information after change is reported;
If 44) do not detect that link changes, any operation is not performed.
Specifically, SDN switch by Experimenter messages to SDN controller report link-state informations.
Experimenter messages carry link-state information.In present invention, it is desirable to privately owned expansion is carried out to Experimenter messages
Exhibition.It is reported from OLT (Optical Line Terminal, optical line terminal) to the privately owned extension Experimenter of SDN controllers
The form of text is as shown in Figure 5.Front two row field is original definition in figure, and remaining field is privately owned extended field.Wherein
Experimenter values are 255, are needed to ONF (Open Network Foundation, open network foundation) tissue Shen
Please.When Experimenter type values are 1, it is shown to be from OLT directions to SDN controllers.
Step S3, SDN controllers calculate convergence group and member port according to link-state information and network topology structure.
As shown in fig. 6, step S3 specifically includes following steps:
61) SDN controllers select main equipment and create convergence group according to link-state information and network topology structure.
As shown in fig. 7, SDN controllers select main equipment according to following steps:
71) SDN controllers compare the LACP treaty override grades of SDN switch;
72) if the priority of LACP agreements is different, it is main equipment to select the smaller SDN switch of priority;
If 73) priority of LACP agreements is identical, then comparison system MAC Address, the smaller SDN of MAC Address is selected to hand over
It changes planes as main equipment.
62) SDN controllers selection candidate ports.
Specifically, during SDN controllers selection candidate ports, the attribute of physical port and the category of the logic interfacing of convergence are selected
Property it is consistent, and the smaller port of port numbers be candidate ports.If the port numbers of two physical ports are equal, preferential selection master
Physical port in equipment is candidate ports.
As shown in figure 8, SDN controllers select candidate ports according to following steps:
81) SDN controllers compare the LACP treaty override grades of port;
82) if the LACP treaty override grade of port is different, it is candidate ports to select the smaller port of priority;
83) if the LACP treaty override grades of port are identical, compare the size of port numbers;If port numbers are different, select
The smaller port of port numbers is candidate ports;If port numbers are identical, it is candidate ports to select the port on main equipment.
If 63) quantity of candidate ports is less than or equal to the upper limit, candidate ports become selected (Selected) port, participate in
Load balancing.
If 64) quantity of candidate ports is more than the upper limit, candidate ports become alternative (Standby) port, are responsible for link
Protection.
Step S4, SDN controllers computational load is balanced and issues flow table.
Specifically, when first message is when SDN network forwards, SDN switch can will be first by Packet-in message
Message is sent to SDN controllers.SDN controllers parse first message, calculate suitable turn according to the configuration strategy of load balancing
Originator mouth.It E-Packets to ensure subsequent packet according to the result of calculation of SDN controllers, SDN controllers need to issue flow table
All SDN switches on to message forwarding path.
As shown in figure 9, step S4 specifically includes following steps:
91) SDN controllers receive the first message that SDN switch is sent;
92) SDN controllers select suitable forwarding port according to the configuration strategy of load balancing;
93) SDN controllers issue all SDN switches in flow table to message forwarding path.
Wherein, SDN controllers of the invention support load balancing mode as shown in Table 1.
The load balancing mode that table 1, SDN controllers are supported
Load balancing mode |
Description |
DST-IP |
Controller determines the path forwarded according to the purpose IP address of message |
DST-MAC |
Controller determines the path forwarded according to the target MAC (Media Access Control) address of message |
SRC-IP |
Controller determines the path forwarded according to the source IP address of message |
SRC-MAC |
Controller determines the path forwarded according to the source MAC of message |
SRC-DST-IP |
Controller determines the path forwarded according to the purpose and source IP address of message |
SRC-DST-MAC |
Controller determines the path forwarded according to the source and destination MAC Address of message |
It should be noted that the Flow Match fields of flow table need and the condition of load balancing is consistent.Such as:Load
Equilibrium is to be based on DST-IP, then the Flow Match fields of flow table are also necessary for DST-IP.
For fairness and harmony that proof load is shared, for different modes of sharing, the present invention is selected negative
It is as shown in table 2 to carry equalization algorithm.
Table 2, load-balancing algorithm
Step S5, SDN controllers forwarding first message, so that SDN switch is according to flow table content surface speed forwarding data.
Preferably, further include that step S6, dynamic select link is forwarded again when link breaks down.
Following steps are specifically included with reference to Figure 10, step S6:
101) the Selected ports for the convergence group that SDN controllers SDN switch is sent become the message of Down, judge this
Whether port is Selected ports;
102) if not Selected ports, then SDN controllers do not perform any operation;
If 103) Selected ports, which is become Unselected ports by SDN controllers, removes related flow table
, recalculate Selected ports;SDN controllers recalculate load balancing, issue flow table simultaneously according to the first message of reception
First message is forwarded, carries out the forwarding based on new port.
The simulation test environment of the link aggregation method based on SDN of the present invention is as shown in figure 11.In the test environment,
Following steps are performed successively:
A, mode networking as illustrated;
B, test instrumentation constructs two kinds of flow (Flow1:DST-IP:10.10.10.10Src-IP:
10.10.10.1Flow2:DST-IP:10.10.10.10Src-IP:10.10.10.2);
C, load balancing is based on SRC-IP, and forwarding port=(SRC-IP1^SRC-IP2^SRC-IP3^ is obtained according to formula
SRC-IP4 the forwarding port of) Mod Selected_Port_Num, Flow1 are that the forwarding port of 3, Flow2 is 0.
In conclusion the link aggregation method based on SDN of the present invention can be obtained by SDN controllers according to LLDP agreements
Full mesh topology structure is obtained, and when SDN controllers find that certain message has the consistent link of a plurality of attribute by SDN network, intelligence
Energy ground is forwarded in certain policy selection optimum link, so as to dynamically realize load balancing;It also is able to go out in this link
Dynamic select link is forwarded again during existing failure.So the present invention effectively overcome various shortcoming of the prior art and
Has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as
Into all equivalent modifications or change, should by the present invention claim be covered.