The content of the invention
For the shortcoming or deficiency of above-mentioned prior art, the technical problem to be solved in the present invention is to provide a kind of traffic policing
The traffic policing algorithm based on SDN frameworks that process is uniformly controlled by SDN controllers.
In order to solve the above technical problems, the present invention has following composition:
A kind of traffic policing algorithm based on SDN frameworks, the method includes:S101:User configures flow on SDN controllers
Monitor strategy;S102:SDN controllers receive message from SDN switch, parse purpose IP and source IP;S103:SDN controllers from
SDN switch receives privately owned extension Experimenter messages, parses Experimenter messages;S104:SDN switch is detected
The speed of flow, SDN controllers are reported according to detecting result.
The SDN controllers support the traffic policing configuration task based on SDN, the configuration task include traffic policing table with
And the traffic policing function based on SDN;Traffic characteristic, threshold value and the SDN that the traffic policing table is specified including user
The supervision state that interchanger is reported;The traffic policing function based on SDN, for opening or closing the stream based on SDN
Amount monitoring function.
Also include privately owned traffic policing table, the privately owned traffic policing table by user's static configuration or dynamic creation,
And the priority of static entries is higher than dynamic environment;The privately owned traffic policing table include purpose IP, source IP, green threshold,
Yellow threshold value and supervision state;The purpose IP and source IP are used for target flow;By flow rate respectively at green threshold with
And yellow threshold value is compared, the SDN switch reports SDN controllers after carrying out traffic statistics;The supervision state representation
The SDN switch reports the labeled color of message.
The form that the SDN controllers receive privately owned extension Experimenter messages from SDN switch is, described
Experimenter values are shown to be from SDN switch direction to SDN controllers for 1, and the Experimenter values are 255;Institute
State privately owned extension Experimenter messages and SDN controllers are reported by the SDN switch on forward-path;The purpose IP and
Source IP uniquely determines a stream;Which kind of color is the supervision state table free flow amount be labeled.
The step S101 is specially:SDN switch reports the message for not matching flow table;SDN controllers are supervised based on flow
Pipe strategy and forward-path issue flow table;SDN switch reports traffic policing result.
According to purpose IP and source IP query flows supervision table, if hit, threshold value and priority are obtained from matching entry
Not;Then message forwarding path is obtained, flow table is issued to all SDN switches on forward-path according to matching entry;According to mesh
IP and source IP query flows supervision table, if do not hit, the dynamic new supervision entry of generation;Finally obtain message forwarding road
Footpath, flow table is issued according to matching entry to all SDN switches on forward-path;If do not hit, the SDN controllers are moved
State generates new supervision entry, and threshold value takes default value, and priority level takes from message, without modification.
In the step S103, according to the Experimenter messages that the SDN controllers are parsed, traffic policing table is updated
Supervision state.
If the detecting speed≤green threshold of SDN switch, the flow is marked as green, the SDN switch
Controller is reported after carrying out traffic statistics;The traffic statistics include that byte number and message number are counted;If SDN switch is detectd
The rate that tests the speed > green thresholds, and the detecting speed≤yellow threshold value, then the flow be marked as yellow, the SDN switch is entered
Row major level heavy label, and report SDN controllers;The processing mode that the priority is re-flagged is drop priority processing;Such as
The detecting speed of fruit SDN switch>Yellow threshold value, then the flow is marked as red, and reports SDN controllers.
When the flow is marked as red, the SDN switch will carry out packet loss treatment.
The SDN controllers and SDN switch are supported to expand flow table;The Match fields for expanding flow table include source
IP and purpose IP;The action field for expanding flow table is to detect the speed of flow.
The expansion flow table is specially:When speed≤green threshold is detected, then the flow is marked as green, described
SDN switch reports controller after carrying out traffic statistics;When speed≤yellow threshold value is detected, then the flow is marked as Huang
Color, the SDN switch carries out priority heavy label, and reports SDN controllers;When detecting speed>Yellow threshold value, the then flow
Red is marked as, the SDN switch carries out packet loss, and reports SDN controllers.
Compared with prior art, traffic policing process of the present invention based on SDN frameworks is unifiedly calculated by SDN controllers, is collected
Middle management, all of traffic policing configuration all concentrates on SDN controllers, is easy to management and later stage to run;SDN controllers supervise into
Enter the specification of a certain flow of network, it be limited in one it is rational within the scope of, or partial discharge to exceeding " punish
Penalize ", to protect the interests of Internet resources and operator.
Specific embodiment
The technique effect of design of the invention, concrete structure and generation is described further below with reference to accompanying drawing, with
It is fully understood from the purpose of the present invention, feature and effect.
As shown in figure 1, traffic policing algorithm of the present invention based on SDN frameworks, the method following steps:S101:User exists
On SDN controllers, traffic policing strategy is configured;S102:SDN controllers receive message from SDN switch, parse purpose IP and source
IP;S103:SDN controllers receive privately owned extension Experimenter messages, parsing Experimenter reports from SDN switch
Text;S104:SDN switch detects the speed of flow, and SDN controllers are reported according to detecting result.The present invention is based on SDN frameworks
Traffic policing process is unifiedly calculated by SDN controllers, centralized management, and all of traffic policing configuration all concentrates on SDN controllers,
It is easy to management and O&M.
The specific supervision algorithm of different step will be specifically described below:
Step S101, is shown in Fig. 2:User configures traffic policing strategy on SDN controllers.
Specifically, the SDN switch reports the message for not matching flow table;SDN controllers be based on traffic policing strategy and
Forward-path issues flow table;SDN switch reports traffic policing result.
The SDN controllers support the traffic policing configuration task based on SDN, the configuration task include traffic policing table with
And the traffic policing function based on SDN.Traffic characteristic, threshold value and the SDN that the traffic policing table is specified including user
The supervision state that interchanger is reported.The traffic policing function based on SDN, for opening or closing the stream based on SDN
Amount monitoring function.
Step S102, is shown in Fig. 3:The SDN controllers receive message from SDN switch, parse purpose IP and source IP.
Privately owned traffic policing table is inquired about according to purpose IP and source IP, if hit, obtained from matching entry threshold value and
Priority level;Then message forwarding path is obtained, flow table is issued to all SDN switches on forward-path according to matching entry.
Privately owned traffic policing table is inquired about according to purpose IP and source IP, if do not hit, the SDN controllers are dynamically raw
The supervision entry of Cheng Xin, threshold value takes default value, and priority level takes from message, without modification.Finally obtain message forwarding path, root
According to matching entry flow table is issued to all SDN switches on forward-path.
The privately owned traffic policing table is by user's static configuration or dynamic creation, and the priority of static entries is higher than dynamic
State entry.
The privately owned traffic policing table includes purpose IP, source IP, green threshold, yellow threshold value and supervision state;Institute
Stating purpose IP and source IP is used for target flow;Flow rate is compared respectively at green threshold and yellow threshold value, it is described
SDN switch reports SDN controllers after carrying out traffic statistics;SDN switch described in the supervision state representation reports message quilt
The color of mark.
Step S103, is shown in Fig. 4:SDN controllers receive privately owned extension Experimenter messages, parsing from SDN switch
Experimenter messages, then update the supervision state of traffic policing table.
The form that the SDN controllers receive privately owned extension Experimenter messages from SDN switch is, described
Experimenter values are shown to be from SDN switch direction to SDN controllers for 1, and the Experimenter values are 255;Institute
State privately owned extension Experimenter messages and SDN controllers are reported by the SDN switch on forward-path;The purpose IP and
Source IP uniquely determines a stream;Which kind of color is the supervision state table free flow amount be labeled(See below description).
The supervision state generally indicates that flow is marked as three kinds of colors:Green, yellow and red, when flow is marked
During into green, the SDN switch reports controller after carrying out traffic statistics;When flow is marked as yellow, the SDN is exchanged
Machine carries out priority heavy label, and reports SDN controllers;When flow is marked as red, the SDN switch will carry out packet loss
Treatment, and report SDN controllers.
Step S104, is shown in Fig. 5:SDN switch detects the speed of flow, and SDN controllers are reported according to detecting result.
If specifically, the detecting speed≤green threshold of SDN switch, the flow is marked as green, the SDN
Interchanger reports controller after carrying out traffic statistics.The traffic statistics include that byte number and message number are counted.
If the detecting speed > green thresholds of SDN switch, and the detecting speed≤yellow threshold value, then the flow is marked
Note yellowly, the SDN switch carries out priority heavy label, and reports SDN controllers.The place that the priority is re-flagged
Reason mode is drop priority processing.
If the detecting speed of SDN switch>Yellow threshold value, then the flow be marked as red, the SDN switch will
Packet loss treatment is carried out, and reports SDN controllers.
By the setting of above-mentioned different threshold values, the SDN controllers supervision enters the specification of a certain flow of network, it
Be limited in one it is rational within the scope of, or partial discharge to exceeding carries out " punishment ", to protect Internet resources and operator
Interests.
As a further improvement, the SDN controllers and SDN switch are supported to expand flow table.The expansion flow table
Match fields include source IP and purpose IP.The action field for expanding flow table is to detect the speed of flow.
The expansion flow table is specifically described as:When speed≤green threshold is detected, then the flow is marked as green, institute
Stating SDN switch carries out traffic statistics(Should support that byte number and message number are counted)After report controller;When detecting speed≤Huang
During chromatic threshold value, then the flow is marked as yellow, and the SDN switch carries out priority heavy label(Drop priority), and report
SDN controllers;When detecting speed>Yellow threshold value, then the flow be marked as red, the SDN switch carries out packet loss, and on
Report SDN controllers.
Traffic policing algorithm of the present invention based on SDN is specifically addressed below with reference to specific test environment.
First, according to test environment shown in Fig. 6, is built, user configures traffic policing strategy on SDN controllers.
The SDN controllers support the traffic policing configuration task based on SDN, the configuration task include traffic policing table with
And the traffic policing function based on SDN.Traffic characteristic, threshold value and the SDN that the traffic policing table is specified including user
The supervision state that interchanger is reported.The traffic policing function based on SDN, for opening or closing the stream based on SDN
Amount monitoring function.
In addition, the SDN controllers and SDN switch are supported to expand flow table.The expansion flow table includes Match fields
And action field, the Match fields include source IP and purpose IP, and the action field of the expansion flow table is to detect the speed of flow
Rate.
The expansion flow table is specifically described as:When speed≤green threshold is detected, then the flow is marked as green, institute
Stating SDN switch carries out traffic statistics(Should support that byte number and message number are counted)After report controller;When detecting speed≤Huang
During chromatic threshold value, then the flow is marked as yellow, and the SDN switch carries out priority heavy label(Drop priority), and report
SDN controllers;When detecting speed>Yellow threshold value, then the flow be marked as red, the SDN switch carries out packet loss, and on
Report SDN controllers.
In the test environment, the green threshold is 100 PPS, and the yellow threshold value is 200 PPS, and new priority level is
1.The client C is 50 PPS to the flow of server, and the flow of customer end A to server is 120 PPS, and customer end B is arrived
The flow of server is 220 PPS.
Then, the SDN controllers receive message from SDN switch, parse purpose IP and source IP, and the process will be followed
Privately owned traffic policing table.The privately owned traffic policing table includes purpose IP, source IP, green threshold, yellow threshold value and prison
Tubulose state.
The purpose IP and source IP are used for target flow;Flow rate is carried out respectively at green threshold and yellow threshold value
Compare, the SDN switch reports SDN controllers after carrying out traffic statistics;In SDN switch described in the supervision state representation
The labeled color of report message.
The specific comparison result of flow rate is in the test environment, and the flow of the client C to server is 50
PPS, the numerical value is less than the PPS of green threshold 100.
The customer end A is 120 PPS to the flow of server, and the numerical value is more than green threshold and less than yellow threshold value
200 PPS。
Customer end B is 220 PPS to the flow of server, and the numerical value is more than the PPS of yellow threshold value 200.
Subsequently, the SDN controllers receive privately owned extension Experimenter messages, parsing from SDN switch
Experimenter messages.
The form that the SDN controllers receive privately owned extension Experimenter messages from SDN switch is, described
Experimenter values are shown to be from SDN switch direction to SDN controllers for 1, and the Experimenter values are 255 needs
Organized to ONF and applied;The privately owned extension Experimenter messages report SDN and control by the SDN switch on forward-path
Device processed;The purpose IP and source IP uniquely determine a stream;The supervision state table free flow is labeled which kind of color, the supervision
State generally indicates that flow is marked as green, yellow and red three kinds of colors.
From above-mentioned steps:
The client C is marked as green to the flow of server.
The customer end A is marked as yellow to the flow of server.
Customer end B is marked as red to the flow of server.
Finally, SDN switch detects the speed of flow, and SDN controllers are reported according to detecting result.
Concrete analysis process is if that, the detecting speed≤green threshold of SDN switch, the flow is marked as green
Color, the SDN switch reports SDN controllers after carrying out traffic statistics.The traffic statistics include that byte number and message number are united
Meter.
If the detecting speed > green thresholds of SDN switch, and the detecting speed≤yellow threshold value, then the flow is marked
Note yellowly, the SDN switch carries out priority heavy label, and reports SDN controllers.The place that the priority is re-flagged
Reason mode is drop priority processing.
If the detecting speed of SDN switch>Yellow threshold value, then the flow be marked as red, the SDN switch will
Packet loss treatment is carried out, and reports SDN controllers.
Analyzed according to more than, the PPS of 50 PPS < green thresholds of flow 100 of the client C to server, the flow
Green is marked as, the SDN switch carries out traffic statistics(Should support that byte number and message number are counted)Afterwards, SDN is reported to control
Device processed.
The customer end A to server the PPS of 120 PPS > green thresholds of flow 100, and < yellow threshold values 200
PPS, then the flow be marked as yellow, the SDN switch carries out priority heavy label, i.e. the customer end A to server
The priority of flow be modified to 1(1 priority level is minimum), and report SDN controllers.
Customer end B is more than the PPS of yellow threshold value 200 to the PPS of flow 220 of server, then the flow is marked as red,
Directly abandoned by S0, and report SDN controllers.
By the setting of above-mentioned different threshold values, the SDN controllers supervision enters the specification of a certain flow of network, it
Within the scope of being limited in one reasonably, i.e., the flow to customer end A, customer end B and client C is supervised, and to super
The partial discharge for going out is carried out " punishment ", i.e., directly the data on flows of discarding customer end B and the data on flows to customer end A are carried out
Degradation treatment, finally protecting the interests of Internet resources and operator.
Traffic policing process of the present invention based on SDN frameworks is unifiedly calculated by SDN controllers, is managed concentratedly, all of stream
Amount supervision configuration all concentrates on SDN controllers, is easy to management and later stage to run, and its supervision effect is substantially better than traditional Working mould
Formula, control more convenient and efficient, its market application foreground is boundless.
It will be appreciated by those skilled in the art that accompanying drawing is a schematic diagram for preferred embodiment, unit or stream in accompanying drawing
Journey is not necessarily implemented necessary to the present invention.The embodiments of the present invention are for illustration only, do not represent embodiment
Quality.
The above embodiments are merely illustrative of the technical solutions of the present invention and it is non-limiting, reference only to preferred embodiment to this hair
It is bright to be described in detail.It will be understood by those within the art that, technical scheme can be modified
Or equivalent, without deviating from the spirit and scope of technical solution of the present invention, all should cover in scope of the presently claimed invention.