CN104243240B - SDN (self-defending network) flow measuring method based on Open Flow - Google Patents

SDN (self-defending network) flow measuring method based on Open Flow Download PDF

Info

Publication number
CN104243240B
CN104243240B CN201410492338.3A CN201410492338A CN104243240B CN 104243240 B CN104243240 B CN 104243240B CN 201410492338 A CN201410492338 A CN 201410492338A CN 104243240 B CN104243240 B CN 104243240B
Authority
CN
China
Prior art keywords
flow
measurement
flow table
interchanger
table item
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201410492338.3A
Other languages
Chinese (zh)
Other versions
CN104243240A (en
Inventor
罗绪成
刘梦娟
刘峤
陈伟
张翔
刘亚军
汤四见
李伟铭
赵鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201410492338.3A priority Critical patent/CN104243240B/en
Publication of CN104243240A publication Critical patent/CN104243240A/en
Application granted granted Critical
Publication of CN104243240B publication Critical patent/CN104243240B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a SDN (self-defending network) flow measuring method based on Open Flow. The SDN flow measuring method based on the Open Flow comprises the following steps of generating a measurement flow table item by using a controller according to a flow measurement requirement; and transferring an operational order of a forwarding flow table item corresponding to data flow meeting the flow measurement requirement in a corresponding exchanger to a flow measurement flow table so that the data flow is accumulated by a counter of the measurement flow table item. The controller actively transmits flow querying information to the exchanger so as to query flow when the flow measurement requirement is inputted, new flow arrives and a time interval is maximum, and passively receives flow information reported by the exchanger when the measurement flow table item is deleted, so that the flow information is acquired and counted, and a result is stored in a flow statistical result table. By the measurement flow table item, the problems that the existing SDN flow measurement is high in cost, and wildcard characters cannot be recognized are solved; and the flow can be measured flexibly and accurately.

Description

A kind of SDN flow-measuring methods based on OpenFlow
Technical field
The invention belongs to SDN flow measurement technologies field, more specifically, it is related to a kind of SDN based on OpenFlow Flow-measuring method.
Background technology
Flow measurement is the major technique for obtaining the network resource conditions such as network traffic condition and link service condition Means, it is widely used in network management work, such as load balancing, traffic engineering and abnormality detection.
In legacy network, the Data Collection of flow measurement often on discrete point, it is difficult to the overall situation for obtaining flow is regarded Figure.And its network is centered on hardware, its flow measurement be unfavorable for deployment and expense is larger, with present in deployment it is ideal Based on stream netflow technology as a example by, NetFlow is needed to preset network collection device, and specified keyword is opened up Exhibition mark, by counting passing flow and being sent to network collection device using UDP message bag, analysis, statistics is completed by collector, So as to realize flow measurement function.Although NetFlow provides general support to different measurement tasks, they consume too much Resource, such as CPU, internal memory and bandwidth.
The birth of SDN (Software Defined Network, software defined network) is new for flow measurement brings Opportunity.In SDN, controller possesses global network view and enables that the data of flow measurement acquisition easily form net The data analysis of network level;SDN is using more flexible forwarding data flow mode and possesses counter in flow table so that flow number Become more convenient and flexible according to collection;SDN allows that data acquisition concentrates on controller using central controlled controller Upper completion, without spending substantial amounts of energy to go to gather the data on flows on respective switch in different time and space again.Existing In some SDN measurements, OpenTM methods inquire about flow table by the way of poll, and flowsense utilizes controller and exchanges The passive calculating network bandwidth availability ratio of PUSH message between machine, OpenSketch discretely measures net using various interchangers Network data and statistics collected by controller again.These three flow measurement modes can effectively count on the flow in network, but It is that OpenTM needs to be polled to each stream, increased the size of message for flow measurement, and can be influenceed in the selection of interchanger To the precision of flow measurement;Flowsense measurement results are to flow the Mean Speed in existence time, when the stream duration is more long Its efficiency can be influenceed;OpenSketch then needs to change the design of data surface, and three of the above method exist in flow table it is logical Situation with symbol all will failure.
OpenFlow is a kind of new network exchange model for proposing in recent years.In OpenFlow networks, the network equipment (OpenFlow interchangers) is safeguarded a FlowTable (flow table) and is forwarded only according to FlowTable, FlowTable The generation of itself, safeguard, issue and realized by controller completely.
The content of the invention
It is an object of the invention to overcome the deficiencies in the prior art, there is provided a kind of SDN flow measurements based on OpenFlow Method, the problems such as solving in existing SDN flow measurements that expense is big, can not recognize asterisk wildcard, realizes that flexible, accurate flow is surveyed Amount.
For achieving the above object, SDN flow-measuring method of the present invention based on OpenFlow, comprises the following steps:
S1:The controller that flow measurement demand is input into the SDN based on OpenFlow, in flow measurement demand Interchanger numbering and measurement relevant field are provided with, measurement relevant field is configured according to measurement needs;
S2:After controller receives flow measurement demand, measurement relevant field is combined into measurement stream as occurrence The matching head of list item, then numbers corresponding switch query flow table to interchanger, each forwarding in flow table according to feedback Flow table item is matched to measurement flow table item, and matched rule is:If the occurrence in forwarding flow table item matching head includes survey Occurrence in all occurrences in amount flow table item matching head, or measurement flow table item matching head includes forwarding flow table item All occurrences in head, as the match is successful, other situations be matching it is unsuccessful, if matching is unsuccessful, control Device does not make any operation, if the match is successful, controller is to the corresponding interchanger sending measuring of forwarding flow table item that the match is successful Flow table item is simultaneously stored in the local flow measurement flow table of interchanger, and the sequence number of flow measurement flow table is every other more than in the interchanger The sequence number of flow table is forwarded, instruction increase in the operational order of the forwarding flow table item that the match is successful is sent and is transferred to flow measurement flow table Operation, and to interchanger send flow table query messages, will issue interchanger numbering and measurement flow table item matching head deposit Enter to have issued flow table item record sheet, record issues the time as initial time T0, by initial data amount D0It is set to 0;Into step S4;
S3:During flow measurement, whenever controller receives the PacketIn message from interchanger, then from Parsing obtains interchanger numbering and measurement relevant field in PacketIn message, with the interchanger numbering of flow measurement demand and survey Amount relevant field is matched, if matching is unsuccessful, any operation is not made, if the match is successful, will measure related words Section is combined into the matching head of measurement flow table item, judges interchanger numbering and measurement flow table item with the presence or absence of in having issued flow table In item record sheet, if it is present increasing the behaviour for being transferred to flow measurement flow table in the operational order of the forwarding flow table item for issuing Make, and flow table query messages are sent to the interchanger, into step S4;If it does not, measurement flow table item is issued into correspondence Interchanger, and be stored in the local flow measurement flow table of interchanger, increase in the operational order of the forwarding flow table item for issuing and turn Inbound traffics measure the operation of flow table, and send flow table query messages to interchanger, will issue the numbering and measurement flow table of interchanger The matching head of item is stored in and has issued flow table item record sheet, and record issues the time as initial time T0, by initial data amount D0Put It is 0, into step S4;
S4:After controller transmitted traffic query messages, current time and initial time T are monitored0Time interval, work as the time When interval is equal to default maximum time interval t, controller is again to interchanger transmitted traffic query messages;
S5:After interchanger receives flow table query messages, the data volume that correspondence measurement flow table item Counter is obtained is read D1, using current time as terminate time T1, by data volume D1With termination time T1Controller is sent to, controller calculates time t Interior data traffic D=D1-D0With Mean Speed s=D/ (T1-T0), by interchanger numbering, measurement flow table item matching head, rise Time beginning T0, terminate time T1, data traffic D and Mean Speed s charge to traffic statistics the results list, update initial time T0= T1, initial data amount D0=D1
S6:When the measurement flow table item in interchanger is deleted, interchanger actively reads correspondence measurement flow table item Counter and obtains The data volume D for arriving1, if because idle time-out is deleted, idle timeout value as termination time T is subtracted using current time1, it is no Then using current time as terminate time T1, interchanger is by data volume D1With termination time T1Controller is sent to, controller is calculated Data traffic D=D1-D0With Mean Speed s=D/ (T1-T0), by interchanger numbering, flow table item matching head, initial time T0、 Termination time T1Traffic statistics the results list is charged to data traffic D, deletion issues the corresponding record of flow table item record sheet;
S7:When flow measurement termination condition reaches, controller deletes correspondence flow measurement demand, and inquiry has issued stream List item record sheet is with the presence or absence of corresponding measurement flow table item record, if it does not, do not make any operation, otherwise to measurement flow table The corresponding interchanger of item sends measurement flow table item and deletes instruction, and interchanger deletes corresponding measurement flow table after instruction is deleted in reception .
SDN flow-measuring method of the present invention based on OpenFlow, controller generates measurement stream according to flow measurement demand List item, the operational order increase that the corresponding forwarding flow table item of data flow of flow measurement demand will be met in correspondence interchanger is transferred to The operation of flow measurement flow table so that these data flows are added up by measuring the counter of flow table item.Controller is in flow Actively flow is carried out when measurement demand input, new stream are reached, time interval reaches maximum to interchanger transmitted traffic Query Information Inquiry, measuring the flow information that reports of passive desampler when flow table item is deleted, so as to carry out flow information collection and Statistics, result is saved in traffic statistics result table.
The invention has the advantages that:
(1) flow measurement is realized using multilevel flow table, the sequence number of flow measurement flow table is every other more than in the interchanger The sequence number of flow table is forwarded, so that without being counted to each data flow in flow table again, it is only necessary to according to measurement demand, issue One measurement flow table item is used to count the traffic conditions for needing measurement, during to time of measuring point, it is only necessary to go inquiry once to exchange Machine flow table information, it is possible to obtain the data volume that the counter of correspondence measurement flow table item is counted;
(2) measured data stream has been carried out collecting in interchanger, and controller only needs to carry out simple computation, so that real Showed distributed flow measurement statistics, reduce controller for measure expense;
(3) network information of measurement can be needed come sending flow rate measurement demand according to user's request independent assortment, with The still unsolved asterisk wildcard in the flow measurement scheme for solving the problems, such as existing use OpenFlow;
(4) message that the present invention meets OpenFlow protocol specifications and uses all is the essential option of OpenFlow agreements, institute Implementation of the invention is supported by so that any modification need not be carried out to interchanger;
(5) controller obtains flow information by the way of main passive combination, it is ensured that the granularity of measurement and the degree of accuracy.
Brief description of the drawings
Fig. 1 is the workflow schematic diagram of SDN flow-measuring method of the present invention based on OpenFlow;
Fig. 2 is the workflow diagram that measurement flow table item is issued when flow measurement demand is input into;
Fig. 3 is the workflow diagram that measurement flow table item is issued when new data stream is reached;
Fig. 4 is the time shaft exemplary plot of SDN flow-measuring method of the present invention based on OpenFlow.
Specific embodiment
Specific embodiment of the invention is described below in conjunction with the accompanying drawings, so as to those skilled in the art preferably Understand the present invention.Requiring particular attention is that, in the following description, when known function and design detailed description perhaps When can desalinate main contents of the invention, these descriptions will be ignored herein.
Embodiment
Fig. 1 is the workflow schematic diagram of SDN flow-measuring method of the present invention based on OpenFlow.As shown in figure 1, this SDN flow-measuring method of the invention based on OpenFlow mainly includes four-stage:The input of flow measurement demand, measurement flow table item Issue, flow information collection terminates with statistics and flow measurement.Below according to this four-stage to specific implementation of the invention Process is illustrated.
S101:Flow measurement demand is input into
Flow measurement demand is that survey crew needs to be configured according to measurement, then the people by being set with controller The controller that be input into flow measurement demand into the SDN based on OpenFlow by machine interface, in practical application, can use One flow measurement demand schedule stores different flow measurement demands, so that multiple flow measurement demands can be carried out simultaneously Operation.Be provided with flow measurement demand interchanger numbering and measurement relevant field, measurement relevant field according to measurement need into Row is set, typically can be including the Ethernet protocol type in input slogan, the Ethernet head of packet, source address and mesh Mark address.These information can determine that feature of the packet in network transmission, extracted from packet these information come with Compare with flow measurement demand, judge whether to meet the demand of measurement, in the case where demand is met, just perform follow-up step It is rapid to issue flow table or inquiry flow table information, so only in the presence of the data flow of measurement in need, just can sending measuring flow table , can effectively save measurement flow table item usage quantity.
In relevant field is measured, interchanger numbering can only specify an interchanger, it would however also be possible to employ the network segment is specified All interchangers of the network segment, if will to network in all interchangers carry out flow measurement, then interchanger may be compiled Number it is set to the whole network section.Likewise, measurement relevant field can also specify single or multiple values.For example input slogan can be Single port, it is also possible to be set to all of the port.
In the present embodiment, measurement demand is passed to controller by the URL that user passes through to specify according to the form of JSON, is controlled Device takes out the value of its each field from the packet of JSON forms, and by these field names and value, in the form of data dictionary, deposits Enter in flow measurement demand schedule.Using the form of JSON, can make the input of measurement demand need not consider language, be easy to user Use.
S102:Measurement flow table item is issued
Issuing including two kinds of situations for flow table item is measured, one kind is directed to the existing forwarding when flow measurement demand is input into The stream of flow table item, a kind of new data stream being directed in measurement process.
Fig. 2 is the workflow diagram that measurement flow table item is issued when flow measurement demand is input into.As shown in Fig. 2 flow measurement When demand is input into, measurement flow table item is issued and comprised the following steps:
S201:Generation measurement flow table item:
After controller receives flow measurement demand, measurement relevant field is combined into measurement flow table item as occurrence Matching head, set label for stream delete message back, instruction (instruction) fields and action in vacant instruction (action) field, makes measurement flow table item not produce influence to the forwarding of flow table;
S202:Inquire about the forwarding flow table of interchanger and match each forwarding flow table item:
Controller is numbered corresponding interchanger transmission query messages and carries out flow table inquiry to interchanger, according to the flow table of feedback In each forwarding flow table item to measurement flow table item match.It can be seen from OpenFlow agreements, when forwarding flow table is multilevel flow During table, the whole flow table that the forwarding flow table item for being matched is made up of the corresponding flow table item that streamline is constituted in multilevel flow table .Matched rule is:If owning in forwarding the occurrence in flow table item matching head comprising measurement flow table item matching head Occurrence in occurrence, or measurement flow table item matching head includes all occurrences in forwarding flow table item matching head, i.e., For the match is successful, it is unsuccessful that other situations are matching.
It is assumed that the measurement relevant field that measurement demand is set is input port 1, source address is 192.168.1.4.So when The occurrence for forwarding flow table item is " input port 1 ", " input port 1, source address is 192.168.1.4 " or " input port 1, source address is 192.168.1.4, and destination address is 192.168.1.20 " when, all for the match is successful.It is " defeated in the first situation Inbound port 1 " now passes through the number of the flow table item although the occurrence for not matching head with measurement flow table item is matched one by one According to stream possible from address 192.168.1.4, therefore judge that the match is successful, it is turned to measurement flow table carries out further Match somebody with somebody.It is either way below that the occurrence for matching head with measurement flow table item is matched completely, according to the two forwarding flow tables It is all to meet flow measurement demand that item forward the data flow of operation.Adopt in this way, can exist in forwarding flow table item logical In the case of with symbol, flow measurement can be still realized, accurately obtain measurement result.
S203:Judge whether the match is successful for forwarding flow table item and measurement flow table item, if matching is unsuccessful, illustrates this turn The data of hair flow table item treatment are unsatisfactory for flow measurement demand, into step S204, if the match is successful, illustrate the forwarding flow The data of list item treatment are in the scope of statistics of flow measurement demand, into step S205.
S204:Controller does not make any operation.
S205:Controller is to the corresponding interchanger sending measuring flow table item of forwarding flow table item that the match is successful and is stored in exchange The local flow measurement flow table of machine, the sequence number of sequence number every other forwarding flow table more than in the interchanger of flow measurement flow table, Send instruction increases the operation for being transferred to flow measurement flow table in the operational order of the forwarding flow table item that the match is successful, and to exchange Machine sends flow table query messages.
The present invention is measured using multilevel flow table so that without changing original forwarding demand, complete user's request Various measurements.It is because multilevel flow table can only jump to the big flow table of sequence number from the small flow table of sequence number therefore general in order to meet Property demand, the sequence number of flow measurement flow table can be set as a definitely big value, for example in the prior art, maximum table number is 255, you can the sequence number of flow measurement flow table is directly set as 255, can thus avoid increasing forwarding flow table when interchanger When the sequence number of flow measurement flow table is adjusted.
S206:The matching head of the numbering and measurement flow table item that will issue interchanger is stored in and has issued flow table item record sheet, Record issues the time as initial time T0, by initial data amount D0It is set to 0.
Fig. 3 is the workflow diagram that measurement flow table item is issued when new data stream is reached.As shown in figure 3, new data stream is reached When measurement flow table item issue and comprise the following steps:
S301:New data stream is reached:
In the SDN based on OpenFlow, whenever interchanger receives a new data stream, will be sent out to controller Send a PacketIn message, then when controller receives the PacketIn message from interchanger, then illustrate new data stream Reach, now need to judge this new data stream whether in flow measurement range, it is therefore desirable to parsed from PacketIn message Obtain interchanger numbering and measurement relevant field.
S302:Controller will parse the interchanger of interchanger numbering and measurement relevant field and the flow measurement demand for obtaining Numbering and measurement relevant field are matched.Due to containing the every terms of information of data flow in PacketIn message, therefore can be with The corresponding information of all measurement relevant fields is extracted, the matching for now carrying out is to match completely.
S303:Judge whether the matching in step S302 succeeds, if matching is unsuccessful, into step S304, if With success, into step S305.
S304:Controller does not make any operation.
S305:Controller will then measure relevant field and be combined into the matching head for measuring flow table item.
S305:Interchanger is numbered and measurement flow table item whether there is in flow table item record sheet has been issued, if it does, giving Into step S306, if it does not, into step S307.
S306:Now measurement flow table item has been handed down to the corresponding interchanger of interchanger numbering, therefore need not repeat to send out Send measurement flow table item, it is only necessary to increase the operation for being transferred to flow measurement flow table in the operational order of the forwarding flow table item for issuing, And send flow table query messages to the interchanger.
Same measurement demand can be made to hold up to one flow table item of occupancy in the same time using the operation of this step Space.Such as certain flow measurement demand is that destination address is the flow table of M, the existing forwarding flow table of interchanger in measuring certain interchanger In presence input port 1, destination address be the corresponding forwarding flow table items of M, while there is destination address in measuring flow table for M Measurement flow table item, and now the corresponding input port of new data stream is that 2, destination address is M, then new measurement need not be issued Flow table item, and only need to issue on input port 2, destination address for the forwarding flow table item of M in increase and be transferred to flow and survey Measure the operation of flow table.
S307:Measurement flow table item is issued to corresponding interchanger, and is stored in the local flow measurement flow table of interchanger, Increase the operation for being transferred to flow measurement flow table in the operational order of the forwarding flow table item for issuing, and flow table is sent to interchanger and inquire about Message, into S308.
S308:The matching head of the numbering and measurement flow table item that will issue interchanger is stored in and has issued flow table item record sheet, Record issues the time as initial time T0, by initial data amount D0It is set to 0.
In both cases, as long as controller is operated to the flow table of interchanger, no matter sending measuring flow table Item simultaneously changes forwarding flow table item, still only changes the forwarding flow table item for issuing, and after flow table operation has been carried out, controller is all to right The interchanger answered have sent flow table query messages, and then controller needs monitoring current time and initial time T0Time between Every when time interval is equal to default maximum time interval t, controller sends flow table query messages to interchanger again.
In the present embodiment, there is provided two kinds of methods of time interval monitoring.
1) timer is set in controller, when timer reaches threshold value, current time T is read2, judge T2-T0It is It is no that equal to t, if it is, time interval is equal to default maximum time interval t, it is 0 to set timer initial value, and threshold value is t, if It is not that setting timer initial value is 0, and threshold value is T0+t-T2
2) timer is set in controller, and its threshold value is t, is looked into whenever controller sends a flow table to correspondence interchanger Message is ask, then the value of timer is reset to 0, when the value of timer is t, time interval is equal to default maximum time interval t。
In practical application, maximum time interval t can prestore a default value, it is also possible to when measurement demand is input into It is configured.Measured by time interval, time interval is reached maximum time interval just carries out flow inquiry, without Inquired about using timing, so in the case where granularity is ensured, the number of times of active inquiry can be reduced, reduce controller and interchanger it Between size of message.
S103:Flow information is gathered and statistics
What flow information was gathered is divided into two kinds of situations:One kind is that controller actively sends flow table query messages to interchanger, Interchanger receives flow table query messages and carries out reply flow information to controller, and another kind is when measuring flow table item and being deleted Actively to controller report, controller passively receives flow information to interchanger.
After interchanger receives flow table query messages, the data volume D that correspondence measurement flow table item Counter is obtained is read1, Using current time as terminate time T1, by data volume D1With termination time T1Controller is sent to, controller was calculated in time t Data traffic D=D1-D0With Mean Speed s=D/ (T1-T0), by interchanger numbering, flow table item matching head, initial time T0, terminate time T1, data traffic D and Mean Speed s charge to traffic statistics the results list, update initial time T0=T1, starting Data volume D0=D1, wait issue flow table query messages next time.
When the measurement flow table item in interchanger is deleted, interchanger actively reads what correspondence measurement flow table item Counter was obtained Data volume D1, if because idle time-out is deleted, idle timeout value as termination time T is subtracted using current time1, otherwise with Current time is used as termination time T1, interchanger is by data volume D1With termination time T1Controller is sent to, controller calculates data Flow D=D1-D0With Mean Speed s=D/ (T1-T0), by interchanger numbering, flow table item matching head, initial time T0, terminate Time T1Traffic statistics the results list is charged to data traffic D, deletion issues the corresponding record of flow table item record sheet.
The reason for measurement flow table item is deleted has various, in the present invention, at the end of flow measurement, can also delete measurement stream List item, in this case whole flow measurement just finishes.If because other reasonses are deleted, such as idle time-out, So when there is new data stream to reach, it is also possible to measurement flow table item can be re-established.
Flow information collection is carried out by the way of main passive combination more than in the present invention, can be kept by active inquiry The granularity of flow information so that the degree of accuracy of measurement can obtain larger guarantee, and by it is passive receive reduce controller with Message overhead between interchanger, to save Internet resources.
S104:Flow measurement terminates
When flow measurement termination condition reaches, controller deletes correspondence flow measurement demand, and inquiry has issued flow table Item record sheet is with the presence or absence of corresponding measurement flow table item record, if it does not, do not make any operation, otherwise to measurement flow table item Corresponding interchanger sends measurement flow table item and deletes instruction, and interchanger deletes corresponding measurement flow table after instruction is deleted in reception .
In general, flow measurement termination condition has two kinds of situations:Controller receives the flow from survey crew and surveys Amount END instruction, or the default flow measurement end time arrival when flow measurement demand is input into.
Fig. 4 is the time shaft exemplary plot of SDN flow-measuring method of the present invention based on OpenFlow.As shown in figure 4, when Carve τ1Shi Youyi new flow measurement demand input, idiographic flow of the invention understands, it is assumed that be now based on There is the forwarding flow table item for meeting flow measurement demand in the interchanger of the SDN of OpenFlow, now controller can be issued Measurement flow table item, and issue a flow Query Information, i.e. time instant τ1It is the 1st measurement point of this flow measurement, now Initial time T01.In time instant τ2, although time interval is not reaching to maximum time interval t, but due to now having one newly Data flow is reached, and meets flow measurement demand, due to now there is measurement flow table item, therefore only needs to change turning of issuing Hair flow table item, makes it jump to flow measurement flow table, and issues a flow Query Information, as the 2nd measurement point, updates Initial time T02.Two measurement point τ afterwards3And τ4, produced when being all and reaching maximum time interval with the interval of initial time Raw measurement point.In time instant τ5, it is assumed that the free time for now measuring flow table item has reached idle timeout value, then measure flow table item It is deleted, the flow information that the passive desampler of controller is reported, produces the 5th measurement point.Due to now flow measurement still Do not terminate, in time instant τ6There is a new data stream to reach, although to meet flow measurement demand, but in the absence of measurement flow table item, Therefore measurement flow table item is re-issued, and changes the forwarding flow table item for issuing, issue a flow Query Information, produce the 6th Measurement point.In time instant τ7, flow measurement termination condition reaches, and flow measurement terminates, and controller deletes flow measurement demand, and Inquire interchanger and there is measurement flow table item, therefore delete measurement flow table item, passive desampler is reported controller again Flow information, produces the 7th measurement point.
Although being described to illustrative specific embodiment of the invention above, in order to the technology of the art Personnel understand the present invention, it should be apparent that the invention is not restricted to the scope of specific embodiment, to the common skill of the art For art personnel, as long as various change is in appended claim restriction and the spirit and scope of the present invention for determining, these Change is it will be apparent that all utilize the innovation and creation of present inventive concept in the row of protection.

Claims (5)

1. a kind of SDN flow-measuring methods based on OpenFlow, it is characterised in that comprise the following steps:
S1:The controller that flow measurement demand is input into the SDN based on OpenFlow, is set in flow measurement demand There is interchanger to number and measurement relevant field, measurement relevant field is configured according to measurement needs;
S2:After controller receives flow measurement demand, measurement relevant field is combined into measurement flow table item as occurrence Matching head, then number corresponding switch query flow table to interchanger, each forwarding flow table in flow table according to feedback Item is matched to measurement flow table item, and matched rule is:If the occurrence in forwarding flow table item matching head includes measurement stream Occurrence in all occurrences in list item matching head, or measurement flow table item matching head includes forwarding flow table item matching head All occurrences in portion, as the match is successful, other situations be matching it is unsuccessful, if matching is unsuccessful, controller is not Make any operation, if the match is successful, controller is to the corresponding interchanger sending measuring flow table of forwarding flow table item that the match is successful Item is simultaneously stored in the local flow measurement flow table of interchanger, and the sequence number of flow measurement flow table is more than every other forwarding in the interchanger The sequence number of flow table, send instruction increases the behaviour for being transferred to flow measurement flow table in the operational order of the forwarding flow table item that the match is successful Make, and flow table query messages are sent to interchanger, the matching head of the numbering and measurement flow table item that will issue interchanger is stored in Flow table item record sheet is issued, record issues the time as initial time T0, by initial data amount D0It is set to 0;Into step S3;
S3:During flow measurement, whenever controller receives the PacketIn message from interchanger, then from PacketIn Parsing obtains interchanger numbering and measurement relevant field in message, interchanger numbering and measurement related words with flow measurement demand Duan Jinhang is matched, if matching is unsuccessful, any operation is not made, if the match is successful, measurement relevant field is combined into It is the matching head of measurement flow table item, judges interchanger numbering and measurement flow table item with the presence or absence of in having issued flow table item record sheet In, if it is present increase the operation for being transferred to flow measurement flow table in the operational order of the forwarding flow table item for issuing, and to this Interchanger sends flow table query messages, into step S4;If it does not, measurement flow table item is issued to corresponding interchanger, And the local flow measurement flow table of interchanger is stored in, increase in the operational order of the forwarding flow table item for issuing and be transferred to flow measurement The operation of flow table, and flow table query messages are sent to interchanger, the numbering of interchanger and the matching head of measurement flow table item will be issued Portion is stored in and has issued flow table item record sheet, and record issues the time as initial time T0, by initial data amount D00 is set to, into step Rapid S4;
S4:After controller transmitted traffic query messages, current time and initial time T are monitored0Time interval, work as time interval During equal to default maximum time interval t, controller is again to interchanger transmitted traffic query messages;
S5:After interchanger receives flow table query messages, the data volume D that correspondence measurement flow table item Counter is obtained is read1, with Current time is used as termination time T1, by data volume D1With termination time T1Controller is sent to, controller was calculated in time t Data traffic D=D1-D0With Mean Speed s=D/ (T1-T0), during by interchanger numbering, measurement flow table item matching head, starting Between T0, terminate time T1, data traffic D and Mean Speed s charge to traffic statistics the results list, update initial time T0=T1, rise Beginning data volume D0=D1
S6:When the measurement flow table item in interchanger is deleted, interchanger actively reads what correspondence measurement flow table item Counter was obtained Data volume D1, if because idle time-out is deleted, idle timeout value as termination time T is subtracted using current time1, otherwise with Current time is used as termination time T1, interchanger is by data volume D1With termination time T1Controller is sent to, controller calculates data Flow D=D1-D0With Mean Speed s=D/ (T1-T0), by interchanger numbering, flow table item matching head, initial time T0, terminate Time T1Traffic statistics the results list is charged to data traffic D, deletion issues the corresponding record of flow table item record sheet;
S7:When flow measurement termination condition reaches, controller deletes correspondence flow measurement demand, and inquiry has issued flow table item Record sheet is with the presence or absence of corresponding measurement flow table item record, if it does not, do not make any operation, otherwise to measurement flow table item pair The interchanger answered sends measurement flow table item and deletes instruction, and interchanger deletes corresponding measurement flow table item after instruction is deleted in reception.
2. SDN flow-measuring methods according to claim 1, it is characterised in that the measurement related words in the step S1 Section includes the Ethernet protocol type in input slogan, the Ethernet head of packet, source address and destination address.
3. SDN flow-measuring methods according to claim 1, it is characterised in that the prison of time interval in the step S4 Survey method is:One timer is set in controller, when timer reaches threshold value, current time T is read2, judge T2-T0It is It is no that equal to t, if it is, time interval is equal to default maximum time interval t, it is 0 to set timer initial value, and threshold value is t, if It is not that setting timer initial value is 0, and threshold value is T0+t-T2
4. SDN flow-measuring methods according to claim 1, it is characterised in that the prison of time interval in the step S4 Survey method is:One timer is set in controller, and its threshold value is t, is looked into whenever controller sends a flow to correspondence interchanger Message is ask, then the value of timer is reset to 0, when the value of timer is t, time interval is equal to default maximum time interval t。
5. SDN flow-measuring methods according to claim 1, it is characterised in that the flow measurement of the step S7 terminates Condition receives flow measurement END instruction for controller, or the default flow measurement end time reaches.
CN201410492338.3A 2014-09-23 2014-09-23 SDN (self-defending network) flow measuring method based on Open Flow Expired - Fee Related CN104243240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410492338.3A CN104243240B (en) 2014-09-23 2014-09-23 SDN (self-defending network) flow measuring method based on Open Flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410492338.3A CN104243240B (en) 2014-09-23 2014-09-23 SDN (self-defending network) flow measuring method based on Open Flow

Publications (2)

Publication Number Publication Date
CN104243240A CN104243240A (en) 2014-12-24
CN104243240B true CN104243240B (en) 2017-05-24

Family

ID=52230637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410492338.3A Expired - Fee Related CN104243240B (en) 2014-09-23 2014-09-23 SDN (self-defending network) flow measuring method based on Open Flow

Country Status (1)

Country Link
CN (1) CN104243240B (en)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105991456B (en) * 2015-02-06 2019-04-05 中国电信股份有限公司 A kind of OpenFlow interchanger, network system and bandwidth sharing method
CN104821922B (en) * 2015-02-12 2019-03-15 新华三技术有限公司 A kind of traffic sharing method and apparatus
CN105991367B (en) * 2015-03-06 2019-10-18 清华大学 The method and system of dependence is communicated between a kind of measurement virtual machine
CN105282057B (en) * 2015-09-11 2019-12-17 华为技术有限公司 Flow table updating method, controller and flow table analysis device
CN105406992B (en) * 2015-10-28 2018-11-09 浙江工商大学 A kind of business demand conversion and dispositions method towards SDN
CN106656809B (en) * 2015-11-03 2020-03-20 中国电信股份有限公司 Flow table aggregation method, controller, network element and system
CN105262682B (en) * 2015-11-16 2018-06-22 国家电网公司 A kind of software defined network system and its traffic grooming method for electric power data communication
CN105357124B (en) * 2015-11-22 2018-08-17 华中科技大学 A kind of MapReduce bandwidth optimization methods
CN105429822B (en) * 2015-11-30 2018-07-20 东南大学 Hop-by-hop packet loss of link measurement method on end-to-end path based on software defined network
US10264035B2 (en) 2016-02-23 2019-04-16 At&T Intellectual Property I, L.P. Method and apparatus for architecting multimedia conferencing services using SDN
CN110703817B (en) * 2016-03-29 2022-04-05 华为技术有限公司 Control method, device and system for statistical flow
CN105827487A (en) * 2016-05-30 2016-08-03 上海斐讯数据通信技术有限公司 SDN network message flow statistics method, SDN network message flow processing method and SDN network system
CN106130769A (en) * 2016-06-30 2016-11-16 上海斐讯数据通信技术有限公司 A kind of Network Quality Analysis method based on SDN and SDN system
CN105959167B (en) * 2016-07-18 2019-04-23 东北大学 A kind of global optimization SDN measurement method based on greedy algorithm
CN106230652B (en) * 2016-07-19 2019-04-23 东北大学 SDN network performance measurement method based on OpenFlow agreement
CN106210123A (en) * 2016-08-03 2016-12-07 付宏伟 The software defined network controller system of one multinode
CN106302028B (en) * 2016-09-22 2020-01-03 新华三技术有限公司 Flow monitoring method and device
CN106850438A (en) * 2016-12-27 2017-06-13 中山大学 A kind of real-time method for obtaining SDN switch flow table space occupancy
CN108512769B (en) * 2017-02-28 2021-04-09 华为技术有限公司 Method and related equipment for sending and receiving flow table items in software defined network
CN107645425A (en) * 2017-09-05 2018-01-30 国家电网公司 The passive combining adaptive flow-measuring method of master and device based on SDN
CN109728932B (en) * 2017-10-31 2021-09-28 中兴通讯股份有限公司 SDN setting method, controller, switch and computer readable storage medium
CN107995121B (en) * 2017-11-27 2021-09-24 中国科学技术大学苏州研究院 Method for counting flow in software defined network based on wildcard
CN111327485A (en) * 2018-12-14 2020-06-23 中兴通讯股份有限公司 Flow table monitor management method and device, network equipment and network system
CN111835683B (en) 2019-04-19 2021-10-15 上海哔哩哔哩科技有限公司 Connection control method, system, device and computer readable storage medium
CN112152936B (en) * 2019-07-25 2023-09-12 北京天德科技有限公司 Intra-network control for explicit rate computation
CN110650064B (en) * 2019-09-09 2022-05-03 电子科技大学 Universal and configurable network flow measurement system
CN113067863B (en) * 2021-03-17 2022-04-19 西安电子科技大学 Dynamic load balancing method based on software defined network
CN114124810B (en) * 2021-11-26 2023-11-17 江苏省未来网络创新研究院 Virtual test platform test flow monitoring method based on SDN and openfalcon architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946325A (en) * 2012-11-14 2013-02-27 中兴通讯股份有限公司 Network diagnosis method, system and equipment based on software defined network
CN103326884A (en) * 2013-05-30 2013-09-25 烽火通信科技股份有限公司 Service flow aware system and method combining flow detection and package detection in SDN
CN103841056A (en) * 2014-03-13 2014-06-04 北京邮电大学 Open storage managing and scheduling method and system based on software-defined network
CN103986651A (en) * 2014-05-30 2014-08-13 杭州华三通信技术有限公司 SDN controller and control method thereof
CN104009877A (en) * 2014-06-22 2014-08-27 陈桂芳 Method for achieving visualization of SDN flow table

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9379973B2 (en) * 2013-02-11 2016-06-28 Cisco Technology, Inc. Binary compatible extension architecture in an openflow compliant network environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946325A (en) * 2012-11-14 2013-02-27 中兴通讯股份有限公司 Network diagnosis method, system and equipment based on software defined network
CN103326884A (en) * 2013-05-30 2013-09-25 烽火通信科技股份有限公司 Service flow aware system and method combining flow detection and package detection in SDN
CN103841056A (en) * 2014-03-13 2014-06-04 北京邮电大学 Open storage managing and scheduling method and system based on software-defined network
CN103986651A (en) * 2014-05-30 2014-08-13 杭州华三通信技术有限公司 SDN controller and control method thereof
CN104009877A (en) * 2014-06-22 2014-08-27 陈桂芳 Method for achieving visualization of SDN flow table

Also Published As

Publication number Publication date
CN104243240A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN104243240B (en) SDN (self-defending network) flow measuring method based on Open Flow
CN106656847B (en) The maximized SDN load-balancing method of network utility
CN107659419B (en) Network slicing method and system
CN108600102B (en) Flexible data transmission system based on intelligent cooperative network
CN104378264B (en) A kind of virtual machine process flux monitoring method based on sFlow
CN106130796B (en) SDN network topology traffic visualization monitoring method and control terminal
Chao et al. Flow classification for software-defined data centers using stream mining
CN101383737B (en) Method and system for link quality detection based on link layer discovery protocol
CN104580222A (en) DDoS attack distributed detection and response system and method based on information entropy
CN107147535A (en) A kind of distributed network measurement data statistical analysis technique
CN105556916B (en) The information statistical method and device of network flow
CN109120525A (en) For the determining method of path of SDN, device, SDN controller and network
CN105530115B (en) A kind of method and device for realizing operation management maintainance function
CN107659505B (en) SDN network routing method and SDN controller
CN105357071A (en) Identification method and identification system for network complex traffic
CN105991367B (en) The method and system of dependence is communicated between a kind of measurement virtual machine
CN103580959B (en) Distributed statistical reporting implementation method
CN102655480A (en) Similar mail handling system and method
CN106130764B (en) A kind of whether available method and system of monitor video direct broadcasting room data service
CN105052088A (en) Network statistical information providing system, network statistical information providing method, and program
CN102567470A (en) System-level performance data processing method and equipment utilizing same
Xie et al. Shared bottleneck detection for multipath transmission in high latency satellite network
Wang et al. SCSCDaylight: Network Monitoring Tools for Software-Defined Networks Based on Opendaylight
CN106130823B (en) Uniformly send the method and system of BFD message
Hsu et al. A flow-based method to measure traffic statistics in software defined network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170524

Termination date: 20190923

CF01 Termination of patent right due to non-payment of annual fee