Summary of the invention
To solve problem of the prior art, the embodiment of the present invention provides a kind of test the SDN method and dress of building new flow velocity rate
It sets.
First aspect of the embodiment of the present invention provides a kind of method that test SDN builds new flow velocity rate characterized by comprising
Test device cycles through S data packet to forwarding device since the first moment T1, with input rate V1,
In, the S is the integer more than or equal to 1, and the S data packet is the data packet newly flowed at first moment T1;
The test device tests the output speed V2 of the forwarding device;
The test device determines the second moment T2, and the output speed V2 is from the second moment T2, when default
Between be persistently not less than the input rate V1 in section;
The test device determines that the SDN builds new flow velocity rate according to V=S/ (T2-T1), wherein described in the V expression
SDN builds new flow velocity rate.
With reference to first aspect, in the first possible implementation, the forwarding device receives the S data packet
After any one data packet, judge whether any one described data packet is the data packet newly flowed;
If any one described data packet is the data packet of the new stream, the forwarding device will any one described data packet
It is reported to controller, the controller creates flow table according to any one described data packet, and the controller is by the flow table issuance
To the forwarding device, the forwarding device exports any one described data packet according to the flow table;
If any one described data packet is not the data packet of the new stream, the forwarding device is according to the data packet pair
The flow table answered exports any one described data packet.
With reference to first aspect or the first possible implementation, in the second possible implementation, the test
Device determines that the SDN is built after new flow velocity rate, further includes:
New flow velocity rate is built by SDN described in UI interface display.
Second aspect of the embodiment of the present invention provides a kind of test SDN device for building new flow velocity rate, comprising:
Sending module, for cycling through S data to forwarding device with input rate V1 since the first moment T1
Packet, wherein the S is the integer more than or equal to 1, and the S data packet is to build the data packet newly flowed in the first moment T1;
Test module, for testing the output speed V2 of the forwarding device;
Determining module, for determining the second moment T2, the output speed V2 is from the second moment T2, when default
Between be persistently not less than the input rate in section;
Processing module, for determining that the SDN builds new flow velocity rate according to V=S/ (T2-T1), wherein the V indicates institute
It states SDN and builds new flow velocity rate.
In conjunction with second aspect, in the first possible implementation, described device further include:
Display module, for showing that SDN builds new flow velocity rate.
The method and apparatus that test SDN provided in an embodiment of the present invention builds new flow velocity rate, when by test device from first
It carves T1 to start, S data packet is cycled through to forwarding device with input rate V1, wherein S data packet be in the first moment T1
Build the data packet newly flowed;Test the output speed V2 of forwarding device;Determine the second moment T2, output speed V2 is from the second moment T2
It rises, is persistently not less than input rate V1 within a preset period of time;According to V=S/ (T2-T1), determine that SDN builds new flow velocity rate,
In, V indicates that SDN builds new flow velocity rate.It is, being said when output speed is persistently not less than input rate within a preset period of time
Bright controller has created the S flow tables newly flowed, and has been issued to forwarding device, and subsequent data packet passes through forwarding device
When, forwarding device can be directly forwarded according to flow table, without reporting controller again, so T2-T1 is S namely newly-built
Therefore the new stream time used according to V=S/ (T2-T1), it is more reasonable to determine that SDN builds new flow velocity rate.
Description and claims of this specification and term " first ", " second ", " third " " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiment of the present invention described herein for example can be to remove
Sequence other than those of illustrating or describe herein is implemented.In addition, term " includes " and " having " and theirs is any
Deformation, it is intended that cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, production
Product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for this
A little process, methods, the other step or units of product or equipment inherently.
In the system architecture of SDN, after forwarding device receives data packet, first judge whether forwarding device is stored with this
The corresponding flow table of data packet illustrates that the data packet belongs to newly if forwarding device does not locally store the corresponding flow table of the data packet
The data packet is then reported controller by the data packet of stream, and controller creates the corresponding flow table of the data packet, and is handed down to the data
Each forwarding device on the forward-path of packet, each forwarding device storage flow table, and the data packet is forwarded according to flow table.If forwarding is set
After receiving data packet, forwarding device has stored the corresponding flow table of the data packet, then forwarding device can direct root
The data packet is forwarded according to corresponding flow table.
The technical solution that test SDN of the invention builds new flow velocity rate is at least applied to following two kinds of scenes, two kinds of scenes point
Not are as follows: the first scene: after a forwarding device receives the data packet that one is newly flowed, which being reported to control
Device, controller create the corresponding flow table of the data packet, and by flow table issuance to forwarding device, forwarding device should according to the flow table
Data packet forwards, in this application scenarios, build new flow velocity rate refer to from data packet enter a forwarding device to
The rate of the whole process forwarded from the forwarding device;Second of scene: forwarding device receives one and newly flows
After data packet, which is reported to controller, controller creates the corresponding flow table of the data packet, and flow table issuance is arrived
Each forwarding device on the forward-path of the data packet, the flow table that each forwarding device on the forward-path is issued according to controller
The data packet is forwarded, in this application scenarios, new flow velocity rate is built and refers to from first forwarding device and receive the data
After packet, the rate for the whole process that the last one forwarding device on forward-path forwards the data packet.
The core concept of which kind of either above-mentioned application scenarios, the method that test SDN builds new flow velocity rate is identical, of the invention
The core concept of technical solution is: test device is followed with constant input rate V1 to forwarding device since the first moment T1
Ring sends S data packet, wherein and S is the integer more than or equal to 1, and S data packet is the data packet newly flowed in the first moment T1,
Namely most starting the S data packet sent is the S data packets newly flowed;Test the output speed V2 of forwarding device;Determine
Two moment T2, output speed V2 are persistently not less than input rate V1, according to V=from the second moment T2 within a preset period of time
S/ (T2-T1) determines that SDN builds new flow velocity rate, wherein V indicates that SDN builds new flow velocity rate.It is, when output speed is when default
Between when being persistently not less than input rate in section, illustrate that controller has created the S flow tables newly flowed, and be issued to forwarding and set
It is standby, it is subsequent with constant rate of speed input data packet pass through forwarding device when, forwarding device can directly according to corresponding flow table into
Row forwarding, without reporting controller again, so the time that the namely newly-built S new stream of T2-T1 is used, therefore, according to V=S/
(T2-T1), determine that SDN builds that new flow velocity rate is more reasonable, and the scope of application is wider.
Technical solution of the present invention is described in detail with specifically embodiment below.These specific implementations below
Example can be combined with each other, and the same or similar concept or process may be repeated no more in some embodiments.
Fig. 1 is the flow diagram for the embodiment of the method one that present invention test SDN builds new flow velocity rate, as shown in Figure 1, this reality
The method for applying example is as follows:
S101: test device cycles through S data to forwarding device since the first moment T1, with input rate V1
Packet.
Wherein, S is the integer more than or equal to 1, and S data packet is the data packet newly flowed in the first moment T1.
For the first above-mentioned scene, the connection relationship of test device and forwarding device is as shown in Fig. 2, Fig. 2 is the present invention
A kind of application scenarios schematic diagram;For above-mentioned second of scene, connection relationship such as Fig. 3 institute of test device and forwarding device
Show, Fig. 3 is another application scenarios schematic diagram of the invention;
In conjunction with Fig. 2 or Fig. 3, test device cycles through S to forwarding device since the first moment T1, with input rate V1
A data packet;Specifically, S data packet for most starting input to forwarding device with input rate V1 belongs to S different data
Stream, at the T1 moment, this S different data flows belong to S new streams for forwarding device, require to obtain to controller report
Flow table is taken, data packet could be forwarded, after sending the S data packet most started, is continued with identical input rate V1
Input belongs to the data packet of above-mentioned S data flow;Such as: the data packet of 5 data flows, 5 numbers are inputted with the input rate of V1
It is respectively stream 1, stream 2 according to stream, flows 3, stream 4 and stream 5, then the sequence of input data packet are as follows: 5 data packets is belonging respectively to stream 1~stream
5,5 data packets be belonging respectively to stream 1~stream 5 ..., 5 data packets are belonging respectively to stream 1~stream 5.
It should be noted that cycling through S data packet in the scene of Fig. 2 to forwarding device and being directed to forwarding device
201 send.In the scene of Fig. 3, S data packet is cycled through to forwarding device and is directed to the transmission of forwarding device 301.
In SDN framework, after forwarding device receives any one data packet of above-mentioned S data packet, any of the above-described is judged
Whether data packet is the data packet newly flowed;
If any of the above-described a data packet is the data packet of above-mentioned new stream, forwarding device reports any one described data packet
To controller, above controller creates flow table according to any of the above-described a data packet, and controller sets above-mentioned flow table issuance to forwarding
Standby, forwarding device exports any of the above-described a data packet according to above-mentioned flow table;
If any of the above-described a data packet is not the data packet of above-mentioned new stream, forwarding device is corresponding according to above-mentioned data packet
Flow table exports any of the above-described a data packet.
S102: the output speed V2 of test device test forwarding device.
Test device tests the output speed V2 of forwarding device at various moments.
It should be noted that the output speed tested here refers to the output speed of forwarding device 201 in the scene of Fig. 2
Rate.In the scene of Fig. 3, the output speed tested here refers to (the last one namely on forward-path of forwarding device 302
Forwarding device) output speed.
S103: test device determines that the second moment T2, output speed V2 are held within a preset period of time from the second moment T2
It is continuous to be not less than input rate V1.
When output speed is persistently not less than input rate V1 within a preset time, illustrate that controller has created S
The flow table of data flow, and it has been issued to forwarding device, after forwarding device receives the data packet of this S data flow, Ke Yizhi
It connects and is forwarded according to corresponding flow table, without reporting controller again, so the time difference of T2 and T1 namely newly-built S new
The stream time used.
Refer within the time before test terminates in preset time mentioned here, the condition for testing end is to export
Rate is persistently equal to input rate within a certain period of time, that is, output speed converges on input rate, is in stable state, this
In certain time in can rule of thumb be arranged.
The present invention also provides test curve figures, as shown in figure 4, Fig. 4 is the test curve figure of invention, ordinate in Fig. 4
Indicate output speed, abscissa indicates the time, from fig. 4, it can be seen that T2 is the time point where the circle on the left side.In Fig. 4
Bursty data amount source Yu Jianxin between left side circle and the right circle flows the storage forwarding of the data packet after completing.?
After time point where the circle on the right, output speed is constantly equal to input rate, and test terminates can be identical in output speed
In certain time after input rate.
S104: test device determines that SDN builds new flow velocity rate according to V=S/ (T2-T1).
Wherein, V indicates that SDN builds new flow velocity rate.
It is to build the new stream of the S times used therefore by V=S/ (T2-T1), to obtain in the time difference of T2 and T1
It obtains SDN and builds new flow velocity rate.
In the present embodiment, through test device since the first moment T1, is recycled and sent out to forwarding device with input rate V1
Send S data packet, wherein S data packet is to build the data packet newly flowed in the first moment T1;Test the output speed of forwarding device
V2;Determine the second moment T2, output speed V2 is persistently not less than input rate from the second moment T2 within a preset period of time
V1;According to V=S/ (T2-T1), determine that SDN builds new flow velocity rate, wherein V indicates that SDN builds new flow velocity rate.It is, when output speed
When rate is persistently not less than input rate within a preset period of time, illustrate that controller has created the flow tables that S newly flows, and under
It is dealt into forwarding device, when the subsequent data packet with constant rate of speed input passes through forwarding device, forwarding device can be directly according to right
The flow table answered is forwarded, without reporting controller again, so the time that the namely newly-built S new stream of T2-T1 is used, because
This determines that SDN builds that new flow velocity rate is more reasonable, and the scope of application is wider according to V=S/ (T2-T1).
In the above-described embodiments, test device determines that SDN is built after new flow velocity rate, can be above-mentioned by UI interface display
SDN builds new flow velocity rate, with for reference.
It should be noted that during the test, forwarding device only send out by transmitted test device in technical solution of the present invention
The data packet sent, not from other equipment received data packet, to avoid the influence to test result accuracy.
Fig. 5 is the structural schematic diagram for the Installation practice one that present invention test SDN builds new flow velocity rate, as shown in figure 5, this reality
The device for applying example includes sending module 501, test module 502, determining module 503 and processing module 504, wherein sending module
501 for since the first moment T1, cycles through S data packet to forwarding device with input rate V1, wherein the S is
Integer more than or equal to 1, the S data packet are to build the data packet newly flowed in the first moment T1;Test module 502 is used for
Test the output speed V2 of the forwarding device;Determining module 503 is for determining the second moment T2, and the output speed V2 is from institute
It stated for the second moment T2 to rise, is persistently not less than the input rate within a preset period of time;Processing module 504 is used for according to V=S/
(T2-T1), determine that the SDN builds new flow velocity rate, wherein the V indicates that the SDN builds new flow velocity rate.
Fig. 6 is the structural schematic diagram for the Installation practice two that present invention test SDN builds new flow velocity rate, and Fig. 6 is shown in Fig. 5
It further include display module 505, display module 505 is for showing that SDN builds new flow velocity rate further on the basis of embodiment.
The technical solution of Fig. 5 or the corresponding executable above method embodiment of the device of embodiment illustrated in fig. 6 are realized former
Reason is similar with technical effect, and details are not described herein again.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or
The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.