Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of link aggregation method based on SDN, based on SDN framework, full mesh topology structure is obtained according to LLDP agreement by SDN controller, and when SDN controller finds the link that certain message has many attributes consistent by SDN, forward based on certain policy selection optimum link intelligently, thus dynamically realize load balancing; Can also when this link failure again Dynamic Selection link forward.
For achieving the above object and other relevant objects, the invention provides a kind of link aggregation method based on SDN, comprise the following steps: step S1, SDN controller are according to the network topology structure of the whole SDN of LLDP protocol aware; Step S2, SDN controller receive the link-state information that SDN switch is offered; Step S3, SDN controller, according to link-state information and network topology structure, calculate convergence group and member port; The equilibrium of step S4, SDN controller computational load also issues stream table; Step S5, SDN controller forward literary composition of reporting for the first time, so that SDN switch is according to stream table content surface speed forwarding data.
According to the above-mentioned link aggregation method based on SDN, wherein: in described step S2, described link-state information comprises system MAC Address, 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: described step S2 comprises the following steps:
Control channel set up by SDN switch and SDN controller, and report current link-state information;
In certain time interval, SDN switch detects Link State;
If detect, link changes, then report the link-state information after change;
If do not detect, link changes, then do not perform any operation.
According to the above-mentioned link aggregation method based on SDN, wherein: described step S3 comprises the following steps:
A) SDN controller is according to link-state information and network topology structure, selects main equipment and creates convergence group;
B) candidate ports selected by SDN controller;
If c) quantity of candidate ports is less than or equal to the upper limit, then candidate ports becomes selected port;
If d) quantity of candidate ports is greater than the upper limit, then candidate ports becomes alternate port.
Further, according to the above-mentioned link aggregation method based on SDN, wherein: described step a) in, SDN controller select main equipment comprise the following steps:
SDN controller compares the LACP treaty override level of SDN switch;
If the priority of LACP agreement is different, then the SDN switch selecting priority less is main equipment;
If the priority of LACP agreement is identical, then comparison system MAC Address again, the SDN switch selecting MAC Address less is main equipment.
Further, according to the above-mentioned link aggregation method based on SDN, wherein: described step b) comprise the following steps again:
SDN controller compares the LACP treaty override level of port;
If the LACP treaty override level of port is different, then the port selecting priority less is candidate ports;
If the LACP treaty override level of port is identical, then compare the size of port numbers; If port numbers is different, then the port that selecting side slogan is less is candidate ports; If port numbers is identical, then the port on main equipment is selected to be candidate ports.
According to the above-mentioned link aggregation method based on SDN, wherein: described step S4 comprises the following steps:
SDN controller receives the literary composition of reporting for the first time that SDN switch is sent;
SDN controller, according to the collocation strategy of load balancing, selects suitable forwarding port;
SDN controller issues all SDN switch that stream is shown on message forwarding path.
According to the above-mentioned link aggregation method based on SDN, wherein: also comprise step S6, Dynamic Selection link forwards again when link failure.
Further, according to the above-mentioned link aggregation method based on SDN, wherein: described step S6 comprises the following steps:
The selected port of the convergence group that SDN controller SDN switch is sent becomes the message of closing, and judges whether this port is selected port;
If not selected port, then SDN controller does not perform any operation;
If selected port, this port is become not selected port by SDN controller, removes related streams list item, recalculates selected port; Again according to the literary composition of reporting for the first time received, recalculate load balancing, issue stream table and forward literary composition of reporting for the first time, carrying out the forwarding based on new port.
According to the above-mentioned link aggregation method based on SDN, wherein: described SDN switch by privately owned expansion Experimenter message to SDN controller report link-state information.
As mentioned above, the link aggregation method based on SDN of the present invention, has following beneficial effect:
(1) full mesh topology structure can be obtained by SDN controller according to LLDP agreement;
(2) can when SDN controller finds the link that certain message has many attributes (as same link speed) consistent by SDN, select optimum link to forward based on certain strategy (as object MAC, object IP etc.) intelligently, thus dynamically realize load balancing;
(3) can when link failure again Dynamic Selection link forward.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Of the present invention based in the link aggregation method of SDN, SDN controller obtains the network network topological structure of whole SDN according to LLDP agreement, and when SDN controller finds the link that certain message has many attributes consistent by SDN, forward based on certain policy selection optimum link intelligently, thus dynamically realize load balancing; Can also when this link failure again Dynamic Selection link forward.
With reference to Fig. 2 and Fig. 3, the link aggregation method based on SDN of the present invention comprises the following steps:
Step S1, SDN controller are according to the network topology structure of the whole SDN of LLDP protocol aware.
Step S2, SDN controller receive the link-state information that SDN switch is offered.
Wherein, link-state information comprises system MAC Address, port number, port numbers, port speed, duplex module, port stp state and port status.Specific explanations each information once below.
(1) system MAC Address
Wherein, system MAC Address is less, and its priority is higher.
(2) port number, for representing the quantity of port.
(3) port numbers
Wherein, port numbers is less, and its priority is higher.
(4) port speed
Particularly, port speed comprises 10M, 100M and 1000M tri-kinds.
(5) dual-mode
Particularly, duplex module comprises full-duplex mode and semiduplex mode two kinds.
(6) port STP (Spanning Tree Protocol, Spanning-Tree Protocol) state
Particularly, port stp state comprises obstruction (blocking), monitors (listening), learns (learning), forwards (forwarding) and close (disable) these five kinds.
(7) port status
Particularly, port status comprise open (UP)/close (Down) these two kinds.
SDN switch needs in both cases to SDN controller report link-state information.A kind of situation is that SDN switch and SDN controller just set up control channel, and SDN switch needs to report current link conditions information immediately; The second situation is link when changing, and SDN switch need report the link-state information after change immediately.If do not detect, link changes, and SDN switch does not then perform any operation.
As shown in Figure 4, SDN switch reporting links state information comprises the following steps:
41) control channel set up by SDN switch and SDN controller, and report current link-state information;
42) in certain time interval, SDN switch detects Link State;
43) if detect, link changes, then report the link-state information after change;
44) if do not detect, link changes, then do not perform any operation.
Particularly, SDN switch passes through Experimenter message to SDN controller report link-state information.Experimenter message carries link-state information.In the present invention, need to carry out privately owned expansion to Experimenter message.From OLT (Optical Line Terminal, optical line terminal) to the form of the privately owned expansion Experimenter message of SDN controller as shown in Figure 5.In figure, front two row fields are original definition, and residue field is privately owned extended field.Wherein Experimenter value is 255, needs to apply for ONF (Open Network Foundation, open network foundation) tissue.When Experimentertype value is 1, be shown to be from OLT direction to SDN controller.
Step S3, SDN controller, according to link-state information and network topology structure, calculate convergence group and member port.
As shown in Figure 6, step S3 specifically comprises the following steps:
61) SDN controller is according to link-state information and network topology structure, selects main equipment and creates convergence group.
As shown in Figure 7, SDN controller selects main equipment according to following steps:
71) SDN controller compares the LACP treaty override level of SDN switch;
72) if the priority of LACP agreement is different, then the SDN switch selecting priority less is main equipment;
73) if the priority of LACP agreement is identical, then comparison system MAC Address again, the SDN switch selecting MAC Address less is main equipment.
62) candidate ports selected by SDN controller.
Particularly, when candidate ports selected by SDN controller, select the attribute of physical port consistent with the attribute of the logic interfacing of convergence, and the less port of port numbers is candidate ports.If the port numbers of two physical ports is equal, the physical port on prioritizing selection main equipment is candidate ports.
As shown in Figure 8, SDN controller selects candidate ports according to following steps:
81) SDN controller compares the LACP treaty override level of port;
82) if the LACP treaty override level of port is different, then the port selecting priority less is candidate ports;
83) if the LACP treaty override level of port is identical, then the size of port numbers is compared; If port numbers is different, then the port that selecting side slogan is less is candidate ports; If port numbers is identical, then the port on main equipment is selected to be candidate ports.
63) if the quantity of candidate ports is less than or equal to the upper limit, then candidate ports becomes selected (Selected) port, participates in load balancing.
64) if the quantity of candidate ports is greater than the upper limit, then candidate ports becomes alternative (Standby) port, is responsible for link protection.
The equilibrium of step S4, SDN controller computational load also issues stream table.
Particularly, when first message forwards in SDN time, SDN switch can be sent to SDN controller by Packet-in message literary composition of reporting for the first time.SDN controller, according to the collocation strategy of load balancing, is resolved literary composition of reporting for the first time, is calculated suitable forwarding port.In order to ensure that subsequent packet E-Packets according to the result of calculation of SDN controller, SDN controller need issue all SDN switch that stream is shown on message forwarding path.
As shown in Figure 9, step S4 specifically comprises the following steps:
91) SDN controller receives the literary composition of reporting for the first time that SDN switch is sent;
92) SDN controller is according to the collocation strategy of load balancing, selects suitable forwarding port;
93) SDN controller issues all SDN switch that stream is shown on message forwarding path.
Wherein, load balancing mode as shown in table 1 supported by SDN controller of the present invention.
The load balancing mode that table 1, SDN controller are supported
Load balancing mode |
Describe |
DST-IP |
Controller, according to the object IP address of message, determines the path forwarded |
DST-MAC |
Controller, according to the target MAC (Media Access Control) address of message, determines the path forwarded |
SRC-IP |
Controller, according to the source IP address of message, determines the path forwarded |
SRC-MAC |
Controller, according to the source MAC of message, determines the path forwarded |
SRC-DST-IP |
Controller, according to the object of message and source IP address, determines the path forwarded |
SRC-DST-MAC |
Controller, according to the source and destination MAC Address of message, determines the path forwarded |
It should be noted that, the Flow Match field of stream table needs and the condition of load balancing is consistent.Such as: load balancing is based on DST-IP, so the Flow Match field of stream table is also necessary for DST-IP.
The fairness shared in order to proof load and harmony, share mode for different, and the load-balancing algorithm selected by the present invention is as shown in table 2.
Table 2, load-balancing algorithm
Step S5, SDN controller forward literary composition of reporting for the first time, so that SDN switch is according to stream table content surface speed forwarding data.
Preferably, also comprise step S6, Dynamic Selection link forwards again when link failure.
With reference to Figure 10, step S6 specifically comprises the following steps:
101) the Selected port of convergence group that SDN controller SDN switch is sent becomes the message of Down, judges whether this port is Selected port;
102) if not Selected port, then SDN controller does not perform any operation;
103) if Selected port, this port is become Unselected port by SDN controller, removes related streams list item, recalculates Selected port; SDN controller, according to the literary composition of reporting for the first time received, recalculates load balancing, issues stream table and forwards literary composition of reporting for the first time, carrying out the forwarding based on new port.
The simulation test environment of the link aggregation method based on SDN of the present invention as shown in figure 11.In this test environment, perform following steps successively:
A, according to illustrated mode networking;
B, test instrumentation construct two kinds of flows (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, based on SRC-IP, are 0 according to the forwarding port that the forwarding port of formula acquisition forwarding port=(SRC-IP1^SRC-IP2^SRC-IP3^SRC-IP4) Mod Selected_Port_Num, Flow1 is 3, Flow2.
In sum, link aggregation method based on SDN of the present invention can obtain full mesh topology structure by SDN controller according to LLDP agreement, and when SDN controller finds the link that certain message has many attributes consistent by SDN, forward based on certain policy selection optimum link intelligently, thus dynamically realize load balancing; Can also when this link failure again Dynamic Selection link forward.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.