A kind of multilink delay equalization method and system based on SDN
Technical field
The present embodiments relate to fields of communication technology, more particularly to one kind to be based on SDN (Software Defined
Network, software defined network) multilink delay equalization method and system.
Background technique
With the rapid development of Internet, scale is expanded rapidly, Network new operations continuously emerge, network topology structure
Increasingly complicate, have the characteristics that it is open, distributed, be not coordinated with, effectively managing and controlling for isomery internet becomes more difficult.
And popularizing with Internet is usually selected in order to avoid an Internet link bring Single Point of Faliure and performance bottleneck
Select the multiple internet service providers of access.
Network delay is important one of network performance index.Time delay is often referred to a message or grouping from one end of network
Time needed for being transmitted to the other end, traditional time delay strategy detect time delay value using interchanger, if there is a plurality of different chains
Road reaches the network environment of same destination address, in the outlet equal cost multipath (ECMP, Equal-Cost Multipath), choosing
Select the smallest outlet of time delay.
Existing time-delay calculation is to carry out local computing, can not be added up.As shown in Figure 1, setting destination address as electricity
Letter two, then arriving telecommunications two, there are both links S0-S1-S3- telecommunications two and S0-S1-S2-S3- telecommunications two.Interchanger
The time delay of S0 to interchanger S1 is t0, and the time delay of interchanger S1 to interchanger S2 is t1, time delay of the interchanger S1 to interchanger S3
For t2, the time delay of interchanger S2 to interchanger S3 is t3, it is assumed that t1 < t2, according to traditional time delay strategy, it will selection S0-
S1-S2-S3- telecommunications two, but very possible situation is t1+t3 > t2, this results in S0-S1-S2-S3- telecommunications
Two link overall delay is greater than the link overall delay of S0-S1-S3- telecommunications two.
It is difficult to perceive the case propagation delays of whole forward-path with time delay strategy since traditional Distributed Delay is calculated, often
Lead to not the forward-path for establishing minimal time delay.
Summary of the invention
The embodiment of the present invention provides a kind of multilink delay equalization method and system based on SDN, by using controller
Centralized calculation select the smallest forward-path of time delay, avoid be difficult to perceive as caused by distributed computing in the prior art it is whole
Forward-path time delay leads to not to select the shortcomings that time delay the smallest forward-path.
The embodiment of the present invention provides a kind of multilink delay equalization method based on SDN, comprising: SDN switch is to neighbours
Interchanger sends privately owned two layer message and calculates chain-circuit time delay;SDN switch is believed to SDN controller report mac address information, port
Breath and chain-circuit time delay, so that SDN controller calculates network topology;SDN switch does not match the report of flow table to SDN controller report
Text, the message for not matching flow table includes purpose MAC, network topology and chain-circuit time delay, when so that SDN controller calculating link
Prolong the smallest forward-path, and issues the flow table comprising the smallest forward-path of chain-circuit time delay to SDN switch.
Further, the privately owned two layer message includes timestamp;SDN switch sends privately owned two layers to neighbor switch
Message calculates chain-circuit time delay, comprising: and SDN switch sends privately owned two layer message to neighbor switch, and privately owned the two of the transmission
It include timestamp t0 in layer message;After neighbor switch receives the privately owned two layer message, setting local zone time is t0;Neighbours
Interchanger responds privately owned two layer message to SDN switch, includes the local zone time of setting in the privately owned two layer message of the response
t1;The time that SDN switch receives the privately owned two layer message of the response is t2;Then SDN switch and neighbor switch
Chain-circuit time delay are as follows: chain-circuit time delay=(t2-t0)-(t1-t0)=t2-t1.
Further, the SDN switch is to SDN controller report mac address information, port information and chain-circuit time delay,
It include: that SDN switch is believed by the Experimenter message of privately owned extension to SDN controller report mac address information, port
Breath and chain-circuit time delay, wherein Experimenter message, which at least extends, to be indicated the field of the MAC Address of interchanger, indicate to hand over
The field for the switching port changed planes and the field for indicating the chain-circuit time delay forwarded from the switching port.
Further, the SDN switch will be sent in the message for not matching flow table to SDN controller;It is described not match
Target MAC (Media Access Control) address, source MAC, type, sequence number and chain-circuit time delay are included at least in the message of flow table;Wherein, the purpose
MAC is broadcast address;When the type is the first value, the privately owned two layer message is to send message, when type is second value, institute
Stating privately owned two layer message is back message;The sequence number is numbered from setting value, the sequence number of back message and corresponding
The sequence number for sending message is consistent.
Further, the SDN controller calculates the smallest forward-path of chain-circuit time delay, and to giving out a contract for a project under SDN switch
The flow table of the smallest forward-path containing chain-circuit time delay, comprising: SDN controller is calculated according to target MAC (Media Access Control) address and network topology
At least one forward-path;SDN controller calculates described according to the chain-circuit time delay in each forward-path between SDN switch
The total link time delay of each forward-path, and determine the smallest forward-path of total link time delay;SDN controller is to SDN switch
Issue the flow table comprising the smallest forward-path of total link time delay.
The embodiment of the present invention provides a kind of multilink delay equalization system based on SDN, comprising: SDN switch, for
Neighbor switch sends privately owned two layer message and calculates chain-circuit time delay;To SDN controller report mac address information, port information and
Chain-circuit time delay;The message of flow table is not matched to SDN controller report, the message for not matching flow table includes purpose MAC, network
Topology and chain-circuit time delay;SDN controller, when for according to the mac address information, port information and link of SDN controller report
Prolong calculating network topology;Purpose MAC, network topology and the link in the message for not matching flow table sent according to SDN controller
The smallest forward-path of time-delay calculation chain-circuit time delay, and issue to SDN switch comprising the smallest forward-path of chain-circuit time delay
Flow table.
Further, the privately owned two layer message includes timestamp;SDN switch is used to send to neighbor switch privately owned
Two layer message calculates chain-circuit time delay, comprising: SDN switch sends privately owned two layer message, the private of the transmission to neighbor switch
Having includes timestamp t0 in two layer message;After neighbor switch receives the privately owned two layer message, setting local zone time is t0;
Neighbor switch responds privately owned two layer message to SDN switch, includes the local of setting in the privately owned two layer message of the response
Time t1;The time that SDN switch receives the privately owned two layer message of the response is t2;Then SDN switch and neighbours' exchange
The chain-circuit time delay of machine are as follows: chain-circuit time delay=(t2-t0)-(t1-t0)=t2-t1.
Further, when the SDN switch is used for SDN controller report mac address information, port information and link
Prolong, comprising: SDN switch is by the Experimenter message of privately owned extension to SDN controller report mac address information, end
Message breath and chain-circuit time delay, wherein Experimenter message at least extends the field for indicating the MAC Address of interchanger, table
Show the field of the switching port of interchanger and indicates the field of the chain-circuit time delay forwarded from the switching port.
Further, the SDN switch will be sent in the message for not matching flow table to SDN controller;It is described not match
Target MAC (Media Access Control) address, source MAC, type, sequence number and chain-circuit time delay are included at least in the message of flow table;
The purpose MAC is broadcast address;When the type is the first value, the privately owned two layer message is to send message,
When type is second value, the privately owned two layer message is back message;The sequence number is numbered from setting value, back message
Sequence number and it is corresponding send message sequence number be consistent.
Further, the SDN controller is for calculating the smallest forward-path of chain-circuit time delay, and under SDN switch
Give out a contract for a project the flow table of the smallest forward-path containing time delay, comprising: SDN controller is calculated according to target MAC (Media Access Control) address and network topology
At least one forward-path;SDN controller calculates described according to the chain-circuit time delay in each forward-path between SDN switch
The total link time delay of each forward-path, and determine the smallest forward-path of total link time delay;SDN controller is to SDN switch
Issue the flow table comprising the smallest forward-path of total link time delay.
Multilink delay equalization method and system provided in an embodiment of the present invention based on SDN, using in SDN controller collection
The chain-circuit time delay being segmented between interchanger in forward-path is calculated, so as to the chain-circuit time delay and network reported according to interchanger
Topology calculates the smallest forward-path of total link time delay, avoids and is difficult to perceive in the prior art as caused by distributed computing
Whole forward-path time delay leads to not the shortcomings that selecting time delay the smallest forward-path.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the existing networking schematic diagram that forward-path is selected according to chain-circuit time delay.
Fig. 2 is the flow diagram of the multilink delay equalization method based on SDN in the embodiment of the present invention;
Fig. 3 is the form schematic diagram of the privately owned two layer message in the embodiment of the present invention;
Fig. 4 is the schematic diagram that chain-circuit time delay is calculated in the embodiment of the present invention;
Fig. 5 is the configuration diagram of the multilink delay equalization system based on SDN in the embodiment of the present invention.
Fig. 6 is the networking schematic diagram for selecting forward-path in the embodiment of the present invention one according to chain-circuit time delay.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
SDN is a kind of novel network architecture, can be by OpenFlow (open flows) technology by the control of the network equipment
Face processed is separated with data surface, to realize the flexible control to network flow.In SDN, comprising realizing control plane function
Controller and it is several realize data surface function interchanger.
Fig. 2 is the flow diagram of the multilink delay equalization method of the invention based on SDN.As shown in Fig. 2, this method
It include SDN switch and SDN controller in the SDN applied in SDN, this method comprises:
Step S21, SDN switch send privately owned two layer message to neighbor switch and calculate chain-circuit time delay.
In this step, SDN switch periodically can send privately owned two layer message to neighbor switch and calculate chain-circuit time delay.
The two layer message mutually sent between interchanger in SDN in compared to the prior art, in the embodiment of the present invention
The privately owned two layer message that SDN switch is sent to neighbor switch is extended, which includes timestamp, from
And by calculating timestamp of the SDN switch into the privately owned two layer message that neighbor switch is sent and receiving the privately owned of response
The chain-circuit time delay between the SDN switch and neighbor switch can be accurately calculated in the timestamp of two layer message.
As shown in figure 3, the present invention calculates the schematic diagram of chain-circuit time delay.Assuming that calculating switch A and switch b in SDN
Chain-circuit time delay, specifically: switch A sends privately owned two layer message to switch b in time t0, in the two layer message of the transmission
Carry timestamp t0;After switch b receives two layer message, local zone time t0 is set;It is exchanged when local zone time t1 is arranged
Machine B responds two layer message to switch A, carries timestamp t1 in the two layer message of the response;Switch A receives response
The time of two layer message is t2.
So, the computation rule of the chain-circuit time delay of switch A and switch b are as follows:
Chain-circuit time delay=(t2-t0)-(t1-t0)=t2-t1.
Step S22, SDN switch to SDN controller report mac address information, port information and chain-circuit time delay so that
SDN controller calculates network topology.
In this step, SDN switch periodically sends the Experimenter message meter of privately owned extension to neighbor switch
After calculating chain-circuit time delay, SDN switch is to SDN controller report mac address information, port information and chain-circuit time delay, SDN controller
Network topology is calculated according to Link Layer Discovery Protocol (LLDP, Link Layer Discovery Protocol) agreement.
As shown in figure 4, the form schematic diagram of the privately owned two layer message in the embodiment of the present invention, privately owned two layer message can be
The Experimenter message of privately owned extension, Experimenter value need to organize to apply to ONF for 255;Experimenter
Type value is shown to be for 1 from SDN switch to SDN controller, and Experimenter type value is shown to be for 0 from SDN controller
To SDN switch.
In the Experimenter message of privately owned extension in embodiments of the present invention, Own MAC address, Port
Id and Delay is privately owned extended field, wherein the MAC Address of interchanger can be used as the identifier of interchanger, Port id table
The switching port of bright SDN switch, Delay show the chain-circuit time delay forwarded from this port.
Step S23, SDN switch do not match the message of flow table, the message for not matching flow table to SDN controller report
Including purpose MAC, network topology and chain-circuit time delay, so that SDN controller calculates the smallest forward-path of chain-circuit time delay, and to
SDN switch issues the flow table comprising the smallest forward-path of time delay.
In this step, SDN switch does not match the message of flow table to SDN controller report, and SDN controller never matches
Target MAC (Media Access Control) address is parsed in the message of flow table, which is broadcast address, and message format can be as follows:
Wherein,
When type=1, to send message;It is back message when type=2;
Target MAC (Media Access Control) address is 0xffffffffffff;
Sequence number is numbered from 1, and the sequence number of back message must keep one with the corresponding sequence number for sending message
It causes.
It is noted that above-mentioned numerical value is merely illustrative, or other numerical value do not limit in embodiments of the present invention
It is fixed.
After SDN controller parses target MAC (Media Access Control) address, at least one is calculated according to target MAC (Media Access Control) address and network topology
Forward-path;SDN controller calculates each item according to the chain-circuit time delay being segmented between interchanger in each forward-path and forwards road
The total link time delay of diameter, and determine the smallest forward-path of total link time delay;SDN controller to SDN switch issue comprising when
Prolong the flow table of the smallest forward-path.
Traditional multilink time delay is not based on SDN framework, generallys use distributed computing, whole so as to cause being difficult to perceive
The chain-circuit time delay situation of forward-path, so can not also establish the smallest chain-circuit time delay forward-path.The embodiment of the present invention is answered
It, can be according to friendship using the chain-circuit time delay being segmented between interchanger in SDN controller centralized calculation forward-path in SDN
The chain-circuit time delay reported and the network topology of changing planes calculate the smallest forward-path of total link time delay, to make full use of the chain of the whole network
Road resource accomplishes optimal network flow optimization.
Fig. 5 is the configuration diagram of the multilink delay equalization system based on SDN in the embodiment of the present invention.As shown in figure 5,
The system includes:
SDN switch calculates chain-circuit time delay for periodically sending privately owned two layer message to neighbor switch;It is controlled to SDN
Device reporting MAC address information, port information and chain-circuit time delay;Do not match the message of flow table to SDN controller report, it is described not
Message with flow table includes purpose MAC, network topology and chain-circuit time delay;
SDN controller, for calculating net according to the mac address information, port information and chain-circuit time delay of SDN controller report
Network topology;The purpose MAC in the message for not matching flow table, network topology and the chain-circuit time delay sent according to SDN controller calculates
The smallest forward-path of chain-circuit time delay, and the flow table comprising the smallest forward-path of time delay is issued to SDN switch.
Specifically,
The privately owned two layer message that SDN switch in the embodiment of the present invention is sent to neighbor switch is extended, should
Privately owned two layer message includes timestamp, thus by calculating SDN switch into the privately owned two layer message that neighbor switch is sent
Timestamp and receive response privately owned two layer message timestamp, calculate the chain-circuit time delay between interchanger.Privately owned two
The specific format of layer message and specifically chain-circuit time delay how is calculated as the aforementioned in the multilink delay equalization method based on SDN
Description, therefore this will not be repeated here.
SDN switch to SDN controller report mac address information, port information and chain-circuit time delay, SDN controller according to
LLDP agreement calculates network topology.
SDN switch does not match the message of flow table to SDN controller report, never parses mesh in the message of matching flow table
MAC Address, at least one forward-path is calculated according to target MAC (Media Access Control) address and network topology, according in each forward-path
The chain-circuit time delay being segmented between interchanger calculates the total link time delay of each forward-path, and determines that total link time delay is the smallest
Forward-path is issued to SDN switch.
The embodiment of the present invention uses the chain-circuit time delay being segmented between interchanger in SDN controller centralized calculation forward-path,
Chain-circuit time delay and network topology so as to be reported according to interchanger calculate the smallest forward-path of total link time delay, avoid
It is difficult to perceive whole forward-path time delay as caused by distributed computing in the prior art to lead to not select time delay the smallest
The shortcomings that forward-path.
Embodiment one
The embodiment based on the multilink delay equalization method and system of the invention based on SDN will be enumerated below.
As shown in fig. 5, it is assumed that user needs to connect telecommunication network, it can be seen that user has mulitpath to arrive when passing through SDN
Up to telecommunication network, such as S0-S2- gateway-telecommunication network and S0-S1-S3- gateway-telecommunication network.
Interchanger sends privately owned two layer message to neighbor switch, and mutual chain-circuit time delay, such as S0 is calculated
Time delay to interchanger S1 is t0, and the time delay of S0 to interchanger S2 is t0 ', and the time delay of interchanger S1 to interchanger S3 is t1, is handed over
The time delay of S2 to gateway of changing planes is t1 ', and the time delay of interchanger S3 to gateway is t2, and the time delay of gateway to telecommunications 1 is t2 ', gateway
Time delay to telecommunications 2 is t3.
Interchanger in SDN is respectively to SDN controller report mac address information, port information and chain-circuit time delay, SDN control
Device processed calculates network topology according to LLDP agreement.
SDN switch does not match the message of flow table to SDN controller report, never parses mesh in the message of matching flow table
MAC Address, at least one forward-path is calculated according to target MAC (Media Access Control) address and network topology, SDN controller turns according to each item
The chain-circuit time delay being segmented between interchanger in hair path calculates the total link time delay of each forward-path, and when determining total link
Prolong the smallest forward-path to issue to SDN switch.
Such as total link time delay t0 '+t1 '+t2 ' > t0+t1+t2+t3, therefore, SDN controller determines total link time delay most
Small forward-path S0-S1-S3- gateway-telecommunications 2, and S0-S1-S3- gateway-telecommunications 2 is handed down to the friendship in SDN
It changes planes.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.