CN105991456A - OpenFlow switch, network system and bandwidth sharing method - Google Patents
OpenFlow switch, network system and bandwidth sharing method Download PDFInfo
- Publication number
- CN105991456A CN105991456A CN201510063448.2A CN201510063448A CN105991456A CN 105991456 A CN105991456 A CN 105991456A CN 201510063448 A CN201510063448 A CN 201510063448A CN 105991456 A CN105991456 A CN 105991456A
- Authority
- CN
- China
- Prior art keywords
- flow
- main frame
- stream table
- time
- calculate
- 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.)
- Granted
Links
Abstract
The invention discloses an OpenFlow switch, a network system and a bandwidth sharing method. The OpenFlow switch is serially connected between a user network and an exit gateway, and the OpenFlow switch comprises a switching unit and a control unit. When the port flow D of the switching unit is judged to exceed a preset flow threshold D0, the control unit calculates the average flow of hosts and the sum of flow to be abandoned, for the hosts exceeding the average flow, the number of packet bytes to be abandoned is calculated in proportion, flow table modification information is issued to the switching unit, and the operation on the flow table is changed to abandoning, wherein the proportion is the proportion of the difference between the data forwarding size of the host and the average flow to the sum of flow to be abandoned, and the port flow is the downlink port flow or the uplink port flow. According to the invention, online users are enabled to fairly sharing the network bandwidth when network congestion happens.
Description
Technical field
The present invention relates to data communication field, particularly to a kind of OpenFlow switch, net
Network system and bandwidth sharing method.
Background technology
The multiple users share network bandwidth is caused network congestion processing method to be usually by existing network
Selecting random loss technology, due to part, excess user occupies a large amount of network bandwidth, no matter causes
Bandwidth traffic size (such as Web, P2P download, video, mail etc.) all can cause
Application runs slowly, causes the Consumer's Experience (example that normal users is applied especially with low bandwidth
Such as Web) poor.Such as, Intranet often occurs congested, causes certain customers
Networking speed is slow, and bandwidth cannot be shared by Dynamic Fairness.
Software defined network (Software Defined Network, SDN) is a kind of Novel net
Network innovation framework, its core technology is by network by agreements such as OpenFlow (open flows)
Equipment chain of command is separated with data surface, utilizes SDN controller programmable software to realize right
The flexible management of network and control.
Summary of the invention
One of present invention solution technical problem is that: when network occurs congested, Internet user is not
Can the Fairshare network bandwidth.
According to the first aspect of the invention, it is provided that a kind of OpenFlow switch, including:
Crosspoint, for forwarding the data of each main frame based on stream table;Control unit, for when judging
The port flow D of described crosspoint exceedes default flow threshold values D0Time, calculate each main frame
Average discharge and the flow summation that should abandon, for pressing beyond the main frame of described average discharge
Ratio calculates needs the packet byte quantity that abandons, and issues the amendment of stream table to described crosspoint and disappear
Breath;Wherein, described ratio is that main frame forwards size of data to account for institute with the difference of described average discharge
State the ratio of the flow summation that abandon;Described port flow be downlink port flow or on
Row port flow.
Further, described control unit includes: acquisition module, for every setting time t0Read
Take the port flow D of crosspoint.
Further, described control unit includes: computing module, is used for calculating the described stream table of acquisition
The time-to-live t abandoning actioni, and by described time-to-live tiIt is issued to described crosspoint.
Further, described control unit also includes: stream table modified module, for touching according to amendment
The operation of stream table accordingly is revised as normal forwarding state by abandoning action by messaging;Wherein,
Described crosspoint reaches corresponding time-to-live t in the time abandoning flowiTime, to described control
Unit processed sends described amendment and triggers message.
Further, described computing module calculates and obtains packet byte quantity dd that each main frame needs to abandoni
The stream table forwarding rate v corresponding with each main framei, and calculate the corresponding time-to-live and be
Wherein, described stream table modified module is by ddi> 0 the stream table handling corresponding to main frame be revised as losing
Abandon.
Further, described acquisition module reads uplink port stream table quantity m of described crosspoint;
Described computing module calculates and obtains host numberDescribed acquisition module is read from each stream table
Take forwarding size of data f of corresponding each main framei;Described computing module calculates each main frame and forwards number
According to size sumAnd average dischargeAdd up each main frame repeating data
More than average discharge fmFlow, be designated as (fb1, fb2..., fbq), wherein q >=1 and be
Integer;Calculate described forwarding size of data sum and exceed the flow D of flow threshold valuesC=f-D0, meter
The flow summation that should abandon described in SuaningNeed to abandon with each main frame
Packet byte quantityAnd the stream table calculating each main frame of acquisition corresponding turns
Send out speed viFor
According to the second aspect of the invention, it is provided that a kind of network system, including: as previously mentioned
OpenFlow switch.
According to the third aspect of the invention we, it is provided that a kind of bandwidth sharing method, including: when sentencing
The port flow D of disconnected crosspoint exceedes default flow threshold values D0Time, calculate each main frame
Average discharge and the flow summation that should abandon, for the main frame beyond described average discharge in proportion
Calculate the packet byte quantity needing to abandon, and revise stream table;And forward based on amended stream table
Data;Wherein, described ratio is that main frame forwards size of data to account for institute with the difference of described average discharge
State the ratio of the flow summation that abandon;Described port flow be downlink port flow or on
Row port flow.
Further, default flow threshold values D is exceeded at the port flow D judging crosspoint0
Before, also include: every setting time t0Read the port flow D of crosspoint.
Further, also include: calculate the time-to-live t abandoning action obtaining described stream tablei,
And by described time-to-live tiIt is issued to described crosspoint.
Further, also include: trigger message by the operation of stream table accordingly by abandoning according to amendment
Action is revised as normal forwarding state;Wherein, described crosspoint reached in the time abandoning flow
To corresponding time-to-live tiTime, send described amendment and trigger message.
Further, the time-to-live t abandoning action of the described stream table of acquisition is calculatediStep include:
Calculate and obtain packet byte quantity dd that each main frame needs to abandoniThe stream table corresponding with each main frame forwards
Speed vi, and calculate the corresponding time-to-live and beWherein, by ddi> 0 main frame institute
Corresponding stream table handling is revised as abandoning.
Further, the step of the average discharge calculating each main frame includes: read described crosspoint
Uplink port stream table quantity m, calculate obtain host numberAnd from each stream table
Read forwarding size of data f of corresponding each main framei;Calculate each main frame and forward size of data sum And average discharge
Further, packet byte quantity dd that each main frame of acquisition needs to abandon is calculatediWith each main frame pair
The stream table forwarding rate v answerediStep include: add up each main frame repeating data more than mean flow
Amount fmFlow, be designated as (fb1, fb2..., fbq), wherein q >=1 and be integer;Calculate
Described forwarding size of data sum exceedes the flow D of flow threshold valuesC=f-D0, calculating is described should
The flow summation abandonedThe packet byte number abandoned with each main frame needs
AmountAnd calculate the stream table forwarding rate v that each main frame of acquisition is correspondingiFor
In the present invention, between user network and egress gateways, concatenate OpenFlow switch,
This OpenFlow switch includes: crosspoint and control unit;When judging crosspoint
Port flow (such as downlink port flow or uplink port flow) D exceedes default flow
Threshold values D0Time, the average discharge that control unit calculates each main frame and the flow summation that should abandon,
For calculating the packet byte quantity needing to abandon in proportion beyond the main frame of average discharge, and to exchange
Unit issues stream table amendment message, is revised as abandoning action by the operation of stream table;Wherein, described ratio
Example is that main frame forwards the difference of size of data and average discharge to account for the ratio of the flow summation that abandon
Example.Present invention achieves when network occurs congested, Internet user's Fairshare network bandwidth.
Further, when network occur congested time, the present invention can not waste the network bandwidth,
Do not affect under major part normal users price bidding, for abnormal user flow scheduling, to excess
The flow of user carries out suitable restriction, it is ensured that making full use of of the network bandwidth, thus dynamically
Realize Internet user's Fairshare network bandwidth.
By detailed description to the exemplary embodiment of the present invention referring to the drawings, the present invention
Further feature and advantage will be made apparent from.
Accompanying drawing explanation
The accompanying drawing of the part constituting description describes embodiments of the invention, and together with saying
Bright book is together for explaining the principle of the present invention.
Referring to the drawings, according to detailed description below, the present invention can be more clearly understood from,
Wherein:
Fig. 1 is to illustrate the network of OpenFlow switch according to some embodiments of the invention even
Connect schematic diagram.
Fig. 2 is to illustrate OpenFlow protocol architecture figure according to some embodiments of the invention.
Fig. 3 is the structural representation illustrating control unit according to some embodiments of the invention.
Fig. 4 is the flow chart illustrating bandwidth sharing method according to some embodiments of the invention.
Fig. 5 is the flow chart illustrating the bandwidth sharing method according to other embodiments of the present invention.
Detailed description of the invention
The various exemplary embodiments of the present invention are described in detail now with reference to accompanying drawing.It should be noted that
Arrive: unless specifically stated otherwise, the parts illustrated the most in these embodiments and the phase of step
Layout, numerical expression and numerical value are not limited the scope of the invention.
Simultaneously, it should be appreciated that for the ease of describing, the chi of the various piece shown in accompanying drawing
Very little is not to draw according to actual proportionate relationship.
Description only actually at least one exemplary embodiment is illustrative below, certainly
Not as to the present invention and application thereof or any restriction of use.
May not make in detail for technology, method and apparatus known to person of ordinary skill in the relevant
Thin discussion, but in the appropriate case, described technology, method and apparatus should be considered to authorize to be said
A part for bright book.
Shown here with in all examples discussed, any occurrence should be construed as merely
Exemplary rather than conduct limits.Therefore, other example of exemplary embodiment can have
There is different values.
It should also be noted that similar label and letter expression similar terms in following accompanying drawing, therefore,
The most a certain Xiang Yi accompanying drawing is defined, then need not it is carried out in accompanying drawing subsequently
Discussed further.
Fig. 1 is to illustrate the network of OpenFlow switch according to some embodiments of the invention even
Connect schematic diagram.As it is shown in figure 1, OpenFlow switch 100 includes: crosspoint 102
With control unit 101;Crosspoint 102 for forwarding the data of each main frame based on stream table;Control
Unit 101 processed is for when judging that the port flow D of crosspoint exceedes default flow threshold values
D0Time, the average discharge calculating each main frame and the flow summation that should abandon, for beyond average
The main frame of flow calculates the packet byte quantity needing to abandon in proportion, and issues stream table to crosspoint
Amendment message;Wherein, described ratio be main frame forward the difference of size of data and average discharge to account for should
The ratio of the flow summation that this abandons;Described port flow is downlink port flow or upstream ends
Mouth flow.
In this embodiment it is possible in user network and the egress gateways (outlet of such as enterprise network
Gateway) between, concatenate OpenFlow switch, when the downlink port stream judging crosspoint
Amount or uplink port flow exceed default flow threshold values D0Time, control unit calculates each main frame
Average discharge and the flow summation that should abandon, for the main frame pro rata beyond average discharge
Calculate the packet byte quantity needing to abandon, and issue stream table amendment message to crosspoint, by stream table
Operation is revised as abandoning action so that crosspoint abandons flow in proportion, thus when network is sent out
When life is congested, it is possible to do not wasting the network bandwidth, do not affecting major part normal users price bidding
Under, for abnormal user flow scheduling, the flow of excess user is carried out suitable restriction, protect
Making full use of of the card network bandwidth, thus dynamically realize Internet user's Fairshare network bandwidth.
Certainly, it will be understood by those skilled in the art that OpenFlow switch can be physics
Switch, it is also possible to be virtual switch.If virtual switch, then need void
Intend switch OVS (Open vSwitch, open virtual switch standard) and based on SDN
The bandwidth sharing module that controller DLL realizes is installed on computer, and this computer
With two network interface cards (or two logic interfacings of a network interface card).
Fig. 2 is to illustrate OpenFlow protocol architecture figure according to some embodiments of the invention.Its
In, in Fig. 2, " controller " is similar with " control unit " in Fig. 1.As in figure 2 it is shown,
In each stream table of Openflow agreement, each stream entry includes three parts: (1) mates
Match (i.e. header field), including: inbound port (ingress port), packet header (packet header)
And the metadata (metadata) that previous stream table (flow table) passes over;(2) meter
Number device (counter), for counting the bag that the match is successful;(3) operation
(instruction), it is used for revising behavior aggregate (action set) or pipeline processes
(pipeline processing).OpenFlow specification is pointed out, each stream table, stream entry,
Port, queue, group and bucket (accumulation body) all can have enumerator.Operational order
Including: application action (apply-action), empty action (clear-action), write
Make (write-action), write metadata (write metadata) and go to action (goto),
In addition, operational order also includes: abandon (Drop) action.
Such as, as shown in Figure 1, it is assumed that external network server data asked by the main frame 1 in LAN,
Wherein Port1 and Port2 is two ports of OpenFlow switch.Number in LAN
Input according to by Port1, export from Port2, in order to ensure the normal of host data in LAN
Sending and receive, control unit (such as SDN controller) needs to issue stream to crosspoint
Table.The data structure of stream table is referred to shown in Fig. 2.
Under normal circumstances, when in LAN, certain main frame 1 sends data, through OpenFlow
Switch Port1 inputs, and exports from Port2, and stream table is as shown in table 1.
The stream table example one of table 1 OpenFlow switch
When the data traffic of main frame 1 is excessive, by control unit issuing message
FLOW_MOD (stream table amendment message) flows the operation of table to crosspoint with amendment, stream
The operation of table is revised as abandoning (i.e. Drop), and amended stream table is as shown in table 2.Amendment
Afterwards, the data that main frame 1 sends will be dropped.
The stream table example two of table 2 OpenFlow switch
In this embodiment, it is revised as losing by the operation of the stream table of crosspoint by control unit
Abandon, the data that main frame excessive for data traffic sends abandoned, thus reduces the flow of this main frame,
Realize the flow of excess user is carried out suitable restriction, it is ensured that making full use of of the network bandwidth,
Thus dynamically realize Internet user's Fairshare network bandwidth.
Fig. 3 is the structural representation illustrating control unit according to some embodiments of the invention.Its
In, control unit 30 is similar with the control unit 101 in Fig. 1.
In an embodiment of the present invention, control unit 30 includes: acquisition module 301;Wherein,
Acquisition module 301 is for every setting time t0Read the port flow D (example of crosspoint
Such as descending port flow or uplink port flow).In one embodiment, in control unit
In be provided with intervalometer (not shown in Fig. 3), set time interval t0, control unit every
Setting time t0Read the port flow D (the such as flow of port Port2) of crosspoint,
Such as, control unit can obtain port flow by getPort () method.Such as, control
Unit processed, when calling getPort (), first sends port type requests message
STATS_Request returns STATS_REPLY packet to crosspoint, crosspoint,
Control unit extracts enumerator Counter from the packet returned, owing to Counter can deposit
It is in each stream table, stream entry, port, queue, group and bucket, port Counter
With the uninterrupted of read port, thus downlink port flow or uplink port flow can be obtained.
In an embodiment of the present invention, control unit under obtaining after (on or) row port flow,
Relatively (on or) row port flow and the size of flow threshold values under this.Row end (on or) under if
Mouth flow is less than flow threshold values, then acquisition module continues every setting time t0Under reading (or
On) row port flow;If under, (on or), row port flow more than flow threshold values, then flows
Amount controls.
In an embodiment of the present invention, control unit 30 includes: computing module 302;Wherein,
Computing module obtains time-to-live (lifetime) t abandoning action of stream table for calculatingi, and
By time-to-live tiIt is issued to crosspoint.
Owing to control unit is after being revised as abandoning by the operation of crosspoint, corresponding main frame is sent out
The data sent will be dropped, but after shared by the flow of this main frame, bandwidth meets the requirements, can be by
This abandons action and is revised as normal forwarding state, and therefore this abandons action when needing certain survival
Between.Therefore, " abandon " here and refer to that the transmission of main frame within the time-to-live and reception data are
Zero, i.e. flow is zero.In this embodiment, at a period of time (tiIn), it is derived from or arrives
The flow of this main frame is zero, until at tm(tm>ti, tmComprise ti) data are down to put down in the time
Average, it is ensured that the bandwidth that each main frame takies is relatively average, the use Netowrk tape that each main frame can be fair
Wide.
In an embodiment of the present invention, control unit 30 also includes: stream table modified module 303;
This stream table modified module is for triggering message by dynamic by abandoning for the operation of stream table accordingly according to amendment
Make an amendment as normal forwarding state;Wherein, crosspoint reaches corresponding in the time abandoning flow
Time-to-live tiTime, send amendment to control unit and trigger message, thus recover corresponding main
The forwarding of the data of machine.Certainly, the operation of stream table can also be revised as losing by stream table modified module
Abandon action, or be revised as other actions.
In an embodiment of the present invention, computing module can calculate and obtain what each main frame needs abandoned
Packet byte quantity ddiThe stream table forwarding rate v corresponding with each main framei, and calculate corresponding survival
Time isWherein, stream table modified module is by ddi> 0 the stream table corresponding to main frame behaviour
Make an amendment as abandoning.
In this embodiment, the packet byte quantity that control unit abandons by calculating each main frame to need
ddiThe stream table forwarding rate v corresponding with each main framei, and then calculate the acquisition time-to-live;Wherein,
Control unit is by excess traffic ddi> 0 the stream table handling corresponding to main frame be revised as abandoning, and
For ddiThe stream table handling that the main frame of≤0 is corresponding does not makes an amendment, i.e. ddiThe data of the main frame of≤0
To normally forward.
In an embodiment of the present invention, acquisition module reads the uplink port stream table number of crosspoint
Amount m;Computing module calculates and obtains host numberAcquisition module reads from each stream table
Forwarding size of data f of corresponding each main framei(the forwarding size of data of such as downstream table);
Computing module calculates each main frame and forwards size of data sumAnd average dischargeAdd up each main frame repeating data more than average discharge fmFlow, be designated as (fb1,
fb2..., fbq), wherein q >=1 and be integer;Calculate and forward size of data sum to exceed stream
The flow D of amount threshold valuesC=f-D0, calculate the flow summation that abandonThe packet byte quantity abandoned with each main frame needsAnd calculate the stream table forwarding rate v that each main frame of acquisition is correspondingiForSuch that it is able to calculate time-to-live ti。
Request/response is all there is, it is desirable to have 2 stream tables just can complete net due to major applications
The transmission of network data and reception, the flow of these application account for major part in a network, although can
Way flow table record can be there is, but owing to way flow table applies the flow occupied few, as extensively
Broadcast the packet of character, therefore can pass throughCalculate acquisition host number n, wherein
M is uplink port stream table quantity, and certainly, the most calculated host number n is approximation
Value.
In one embodiment, control unit can read crosspoint by getFlow ()
Uplink port stream table quantity m, such as, as it is shown in figure 1, main frame exists in LAN
The input port of OpenFlow switch is Port1, and control unit is calling getFlow
Time (), it is intended that port title, then send stream table type requests message STATS_Request
To crosspoint, then crosspoint returns stream table type STATS_REPLY packet,
Control unit extracts enumerator Counter from the packet returned, due to OpenFlow specification
In point out, each stream table, stream entry, port, queue, group and bucket all can have
There are Counter, stream table Counter can to obtain such that it is able to read with the stream table number of read port
Obtain the uplink port stream table quantity of crosspoint.
In another embodiment, control unit can determine according to the IP number of addresses in net
Host number.It is (transmission) main frame owing to mailing to the stream table record matching field source address of outer net
Address, destination address is then usually wildcard (i.e. outer net arbitrary address);Receive from outer net
Stream table record matching field source address then be usually wildcard, destination address is then (reception)
Host address.Control unit issues and records and flows table record accordingly, and can judge accordingly this two
Bar record is for a main frame, in therefore control unit can be according to finding how many nets
IP address, i.e. may determine that how many main frames.
In one embodiment, control unit can utilize getByte () in each stream table
Read forwarding size of data f of main framei.Such as, as it is shown in figure 1, in LAN main frame exist
The input port of OpenFlow switch is Port1, and control unit is calling getByte
Time (), it is intended that stream table numbering, then send data type request message STATS_Request
To crosspoint, crosspoint returns STATS_REPLY packet, and control unit is from returning
The packet returned extracts enumerator Counter, owing to pointing out in OpenFlow specification, each
Stream table, stream entry, port, queue, group and bucket all can have Counter,
Stream table Counter can read size of data, and therefore control unit can utilize getByte ()
Read forwarding size of data f of main framei。
In an embodiment of the present invention, user accesses outer net, and its first packet can be to control unit (example
Such as controller) send the request of triggering, control unit correspondingly configures 2 streams in crosspoint
Table realizes the normal access of user, has n user accordingly, then have 2n forwarding flow token
Record.Control unit inquires about port flow in timing (can be second level) mode by get order
Amount statistics, when port flow exceedes flow threshold values, obtains institute by get order the most further
There is the traffic statistics situation of user's correspondence stream table record, and the user beyond average dose is calculated
Need the packet byte quantity abandoned in proportion so that total bandwidth just drop to flow threshold values with
Under, converse the corresponding time further, and stream table record corresponding in crosspoint is carried out
Amendment, is revised as abandoning by its action, and the time-to-live is set to the time value calculated accordingly.Reach
During to the time-to-live, crosspoint sends message to control unit, and trigger control unit makes control
The operation of stream table is revised as normally forwarding by unit processed again, such that it is able to guarantee that user is the most public
Flat shared bandwidth.In this embodiment, by automatically processing abnormal flow in network, suppression is led
Cause the improper flow of network congestion, equilibrium assignment network traffics, it is ensured that Internet user's justice is altogether
Enjoy the network bandwidth, thus optimize network bandwidth utilization factor, it is provided that stable network service, it is ensured that
The Consumer's Experience of normal users, carries out suitable suppression to the user of excess.
Present invention also offers a kind of network system (the most as shown in Figure 1), including: as front
Described OpenFlow switch.
Fig. 4 is the flow chart illustrating bandwidth sharing method according to some embodiments of the invention.
In step S41, when the port flow D judging crosspoint exceedes default flow threshold values
D0Time, the average discharge calculating each main frame and the flow summation that should abandon, for beyond average
The main frame of flow calculates the packet byte quantity needing to abandon in proportion, and revises stream table.Wherein,
It is total that described ratio is that main frame forwards size of data and the difference of average discharge to account for the flow that abandon
The ratio of sum;Described port flow is downlink port flow or uplink port flow.
In step S42, forward data based on amended stream table.
In this embodiment, when downlink port flow or the uplink port flow judging crosspoint
Exceed default flow threshold values D0Time, the average discharge calculating each main frame and the flow that should abandon
Summation, for calculating the packet byte quantity needing to abandon in proportion beyond the main frame of average discharge, and
Amendment stream table, and forward data based on amended stream table.Due to by the operation amendment of stream table
For abandoning action, therefore OpenFlow switch is when forwarding data based on amended stream table,
Abandon flow in proportion, thus when network occurs congested, it is possible to do not waste the network bandwidth,
Do not affect under major part normal users price bidding, for abnormal user flow scheduling, to excess
The flow of user carries out suitable restriction, it is ensured that making full use of of the network bandwidth, thus dynamically
Realize Internet user's Fairshare network bandwidth.
In an embodiment of the present invention, exceed default at the port flow D judging crosspoint
Flow threshold values D0Before, bandwidth sharing method also includes: every setting time t0Read exchange single
The port flow D (such as downlink port flow or uplink port flow) of unit.
In an embodiment of the present invention, under obtaining after (on or) row port flow, this is compared
Under the size of (on or) row port flow and flow threshold values.Row port flow (on or) under if
Less than flow threshold values, then continue every setting time t0Row port flow (on or) under reading;
If under, (on or), row port flow more than flow threshold values, then carries out flow-control.
In an embodiment of the present invention, bandwidth sharing method also includes: calculates and obtains losing of stream table
Abandon the time-to-live t of actioni, and by this time-to-live tiIt is issued to crosspoint.
In an embodiment of the present invention, bandwidth sharing method also includes: trigger message according to amendment
The operation of stream table accordingly is revised as normal forwarding state by abandoning action;Wherein, exchange is single
Unit reaches corresponding time-to-live t in the time abandoning flowiTime, send amendment and trigger message.
In an embodiment of the present invention, the time-to-live t abandoning action of acquisition stream table is calculatedi's
Step includes: calculates and obtains packet byte quantity dd that each main frame needs abandoniCorresponding with each main frame
Stream table forwarding rate vi, and calculate the corresponding time-to-live and beWherein, by ddi>0
The stream table handling corresponding to main frame be revised as abandoning.
In an embodiment of the present invention, the step of the average discharge calculating each main frame includes: read
Uplink port stream table quantity m of crosspoint, calculates and obtains host numberAnd from
Each stream table reads forwarding size of data f of corresponding each main framei(the such as forwarding of downstream table
Size of data);Calculate each main frame and forward size of data sumAnd average discharge
In an embodiment of the present invention, packet byte quantity dd that each main frame of acquisition needs to abandon is calculatedi
The stream table forwarding rate v corresponding with each main frameiStep include: add up each main frame repeating data
More than average discharge fmFlow, be designated as (fb1, fb2..., fbq), wherein q >=1 and be
Integer;Calculate the flow D forwarding size of data sum to exceed flow threshold valuesC=f-D0, calculating should
The flow summation that this abandonsThe packet byte abandoned with each main frame needs
QuantityAnd calculate the stream table forwarding rate v that each main frame of acquisition is correspondingi
For
Fig. 5 is the flow chart illustrating the bandwidth sharing method according to other embodiments of the present invention.
In step S501, Internet user initiates online request.
In step S502, first packet triggers asks to control unit, and control unit issues stream table.Should
Stream table is bidirectional flow table, is issued to crosspoint.
In step S503, intervalometer is set.I.e. set time t0。
In step S504, obtain crosspoint port flow (such as downlink port flow or up
Port flow).
In step S505, it is judged that port flow (such as downlink port flow or uplink port flow)
Whether more than flow threshold values.If it is, step enters S507, otherwise enter S506.
In step S506, crosspoint normally forwards data.
In step S507, follow the steps below:
(1) read crosspoint uplink port stream table quantity m by getFlow (), calculate
Host number N=m/2;
(2) in every stream table, utilize the forwarding of the downstream table of getByte () reading main frame
Size of data, calculates forwarding size of data sum and the mean flow of the downstream table of All hosts
Amount;
(3) the downstream table of statistics main frame forwards the data flow more than average discharge;
(4) calculating downstream table forwards size of data sum to exceed the flow of flow threshold values;
(5) calculate the excess traffic summation that each main frame should abandon, then calculate each main frame needs
The packet byte quantity (abandoning the excess traffic of each main frame the most in proportion) abandoned;
(6) the stream table forwarding rate v that each main frame is corresponding is obtainedi, calculate each main frame and abandon the stream that exceeds the quata
The time t of amounti。
In step S508, by the main frame corresponding to all excess traffics at OpenFlow switch
Being set to abandon action, what this main frame was corresponding abandon, and the time-to-live of action is time ti。
In step S509, abandon flow-time and reach time tiAfter, crosspoint is to control unit
Send amendment and trigger message.
In step S510, the action that abandons of stream table is revised as normal forwarding state by control unit.
In this embodiment, user accesses outer net, and its first packet (such as can control to control unit
Device) send the request of triggering, control unit correspondingly configures 2 stream tables in crosspoint and realizes
The normal access of user, has n user accordingly, then has 2n forwarding flow table record.Control
Unit processed is added up by get order inquiry port flow in timing (can be second level) mode,
When port flow exceedes flow threshold values, obtain all users couple by get order the most further
The traffic statistics situation of table record should be flowed, and the user's calculating beyond average dose is needed in proportion
Packet byte quantity to be abandoned, so that total bandwidth drops under flow threshold values just, further
Converse the corresponding time, and stream table record corresponding in crosspoint is modified, by it
Action is revised as abandoning, and the time-to-live is set to the time value calculated accordingly.Reach the time-to-live
Time, crosspoint sends message to control unit, and trigger control unit makes the control unit will stream
The operation of table is revised as normally forwarding again, such that it is able to guarantee user's dynamically Fairshare band
Wide.By automatically processing abnormal flow in network, suppression causes the improper flow of network congestion,
Equilibrium assignment network traffics, it is ensured that Internet user's Fairshare network bandwidth, thus optimize network
Bandwidth availability ratio, it is provided that stable network service, it is ensured that the Consumer's Experience of normal users, to super
The user of amount carries out suitable suppression.
So far, the present invention is described in detail.In order to avoid covering the design of the present invention, do not have
Details more known in the field are described.Those skilled in the art as described above, completely
It can be appreciated how implement technical scheme disclosed herein.
The method and system of the present invention may be achieved in many ways.Such as, can pass through software,
Hardware, firmware or software, hardware, any combination of firmware realize the present invention method and
System.For the said sequence of step of described method merely to illustrate, the present invention's
The step of method is not limited to order described in detail above, unless specifically stated otherwise.
Additionally, in certain embodiments, the present invention also can be embodied as the journey recorded in the recording medium
Sequence, these programs include the machine readable instructions for realizing the method according to the invention.Thus,
The present invention also covers the record medium of the storage program for performing the method according to the invention.
Although some specific embodiments of the present invention being described in detail by example,
But it should be appreciated by those skilled in the art, above example is not merely to illustrate, and not
It is to limit the scope of the present invention.It should be appreciated by those skilled in the art, can without departing from
In the case of scope and spirit of the present invention, above example is modified.The model of the present invention
Enclose and be defined by the following claims.
Claims (14)
1. an OpenFlow switch, it is characterised in that including:
Crosspoint, for forwarding the data of each main frame based on stream table;
Control unit, for when judging that the port flow D of described crosspoint exceedes default stream
Amount threshold values D0Time, the average discharge calculating each main frame and the flow summation that should abandon, for super
The main frame going out described average discharge calculates the packet byte quantity needing to abandon in proportion, and to described friendship
Change unit and issue stream table amendment message;
Wherein, described ratio is that main frame forwards size of data to account for described with the difference of described average discharge
The ratio of the flow summation that should abandon;Described port flow is downlink port flow or up
Port flow.
OpenFlow switch the most according to claim 1, it is characterised in that
Described control unit includes:
Acquisition module, for every setting time t0Read the port flow D of crosspoint.
OpenFlow switch the most according to claim 1 or claim 2, it is characterised in that
Described control unit includes:
Computing module, for calculating the time-to-live t abandoning action obtaining described stream tablei, and
By described time-to-live tiIt is issued to described crosspoint.
OpenFlow switch the most according to claim 3, it is characterised in that
Described control unit also includes:
Stream table modified module, for triggering message by the operation of stream table accordingly by losing according to amendment
Abandon action and be revised as normal forwarding state;
Wherein, described crosspoint reaches corresponding time-to-live t in the time abandoning flowiTime,
Send described amendment to described control unit and trigger message.
OpenFlow switch the most according to claim 3, it is characterised in that
Described computing module calculates and obtains packet byte quantity dd that each main frame needs to abandoniWith each master
The stream table forwarding rate v that machine is correspondingi, and calculate the corresponding time-to-live and be
Wherein, described stream table modified module is by ddi> 0 the stream table handling corresponding to main frame amendment
For abandoning.
OpenFlow switch the most according to claim 5, it is characterised in that
Described acquisition module reads uplink port stream table quantity m of described crosspoint;
Described computing module calculates and obtains host number
Described acquisition module reads forwarding size of data f of corresponding each main frame from each stream tablei;
Described computing module calculates each main frame and forwards size of data sumAnd it is average
FlowAdd up each main frame repeating data more than average discharge fmFlow, be designated as
(fb1, fb2..., fbq), wherein q >=1 and be integer;Calculate described forwarding size of data
Sum exceedes the flow D of flow threshold valuesC=f-D0, calculate described in the flow summation that should abandonThe packet byte quantity abandoned with each main frame needsAnd calculate the stream table forwarding rate v that each main frame of acquisition is correspondingiFor
7. a network system, it is characterised in that including: institute as arbitrary in claim 1 to 6
State OpenFlow switch.
8. a bandwidth sharing method, it is characterised in that including:
When the port flow D judging crosspoint exceedes default flow threshold values D0Time, calculate
The average discharge of each main frame and the flow summation that should abandon, for beyond described average discharge
Main frame calculates the packet byte quantity needing to abandon in proportion, and revises stream table;And
Data are forwarded based on amended stream table;
Wherein, described ratio is that main frame forwards size of data to account for described with the difference of described average discharge
The ratio of the flow summation that should abandon;Described port flow is downlink port flow or up
Port flow.
Bandwidth sharing method the most according to claim 8, it is characterised in that judging exchange
The port flow D of unit exceedes default flow threshold values D0Before, also include:
Every setting time t0Read the port flow D of crosspoint.
Bandwidth sharing method the most according to claim 8 or claim 9, it is characterised in that also wrap
Include:
Calculate the time-to-live t abandoning action obtaining described stream tablei, and by the described time-to-live
tiIt is issued to described crosspoint.
11. bandwidth sharing methods according to claim 10, it is characterised in that also include:
Trigger message according to amendment and the operation of stream table accordingly is revised as normal turning by abandoning action
Hair-like state;
Wherein, described crosspoint reaches corresponding time-to-live t in the time abandoning flowiTime,
Send described amendment and trigger message.
12. bandwidth sharing methods according to claim 10, it is characterised in that calculate and obtain
The time-to-live t abandoning action of described stream tableiStep include:
Calculate and obtain packet byte quantity dd that each main frame needs to abandoniThe stream table corresponding with each main frame
Forwarding rate vi, and calculate the corresponding time-to-live and be
Wherein, by ddi> 0 the stream table handling corresponding to main frame be revised as abandoning.
Bandwidth sharing method described in 13. according to Claim 8 or 12, it is characterised in that calculate
The step of the average discharge of each main frame includes:
Read uplink port stream table quantity m of described crosspoint, calculate and obtain host number And
Forwarding size of data f of corresponding each main frame is read from each stream tablei;Calculate each main frame to turn
Send out size of data sumAnd average discharge
14. according to bandwidth sharing method described in claim 13, it is characterised in that calculates and obtains
Each main frame needs packet byte quantity dd abandonediThe stream table forwarding rate v corresponding with each main framei's
Step includes:
Add up each main frame repeating data more than average discharge fmFlow, be designated as (fb1,
fb2..., fbq), wherein q >=1 and be integer;Calculate described forwarding size of data sum to surpass
The flow D of inflow-rate of water turbine threshold valuesC=f-D0, calculate described in the flow summation that should abandonThe packet byte quantity abandoned with each main frame needsAnd calculate the stream table forwarding rate v that each main frame of acquisition is correspondingiFor
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510063448.2A CN105991456B (en) | 2015-02-06 | 2015-02-06 | A kind of OpenFlow interchanger, network system and bandwidth sharing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510063448.2A CN105991456B (en) | 2015-02-06 | 2015-02-06 | A kind of OpenFlow interchanger, network system and bandwidth sharing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105991456A true CN105991456A (en) | 2016-10-05 |
CN105991456B CN105991456B (en) | 2019-04-05 |
Family
ID=57037506
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510063448.2A Active CN105991456B (en) | 2015-02-06 | 2015-02-06 | A kind of OpenFlow interchanger, network system and bandwidth sharing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105991456B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395451A (en) * | 2017-06-19 | 2017-11-24 | 中国移动通信集团江苏有限公司 | Surfing flow abnormal processing method, device, equipment and storage medium |
CN107995127A (en) * | 2017-12-13 | 2018-05-04 | 深圳乐信软件技术有限公司 | A kind of method and device for overload protection |
CN109981409A (en) * | 2019-03-26 | 2019-07-05 | 新华三技术有限公司 | Message forwarding method, device and forwarding device |
CN110601989A (en) * | 2019-09-24 | 2019-12-20 | 锐捷网络股份有限公司 | Network traffic balancing method and device |
CN113347107A (en) * | 2020-03-02 | 2021-09-03 | 中国移动通信集团浙江有限公司 | Flow scheduling method and device based on uplink message and computing equipment |
CN114900470A (en) * | 2022-06-17 | 2022-08-12 | 中国联合网络通信集团有限公司 | Flow control method, device, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103428094A (en) * | 2013-08-12 | 2013-12-04 | 杭州华三通信技术有限公司 | Method and device for packet transmitting in Open Flow system |
US20140241353A1 (en) * | 2013-02-28 | 2014-08-28 | Hangzhou H3C Technologies Co., Ltd. | Switch controller |
CN104158753A (en) * | 2014-06-12 | 2014-11-19 | 南京工程学院 | Dynamic flow dispatch method and system based on software definition network |
CN104243240A (en) * | 2014-09-23 | 2014-12-24 | 电子科技大学 | SDN (self-defending network) flow measuring method based on Open Flow |
-
2015
- 2015-02-06 CN CN201510063448.2A patent/CN105991456B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140241353A1 (en) * | 2013-02-28 | 2014-08-28 | Hangzhou H3C Technologies Co., Ltd. | Switch controller |
CN103428094A (en) * | 2013-08-12 | 2013-12-04 | 杭州华三通信技术有限公司 | Method and device for packet transmitting in Open Flow system |
CN104158753A (en) * | 2014-06-12 | 2014-11-19 | 南京工程学院 | Dynamic flow dispatch method and system based on software definition network |
CN104243240A (en) * | 2014-09-23 | 2014-12-24 | 电子科技大学 | SDN (self-defending network) flow measuring method based on Open Flow |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395451A (en) * | 2017-06-19 | 2017-11-24 | 中国移动通信集团江苏有限公司 | Surfing flow abnormal processing method, device, equipment and storage medium |
CN107995127A (en) * | 2017-12-13 | 2018-05-04 | 深圳乐信软件技术有限公司 | A kind of method and device for overload protection |
CN109981409A (en) * | 2019-03-26 | 2019-07-05 | 新华三技术有限公司 | Message forwarding method, device and forwarding device |
CN110601989A (en) * | 2019-09-24 | 2019-12-20 | 锐捷网络股份有限公司 | Network traffic balancing method and device |
CN113347107A (en) * | 2020-03-02 | 2021-09-03 | 中国移动通信集团浙江有限公司 | Flow scheduling method and device based on uplink message and computing equipment |
CN114900470A (en) * | 2022-06-17 | 2022-08-12 | 中国联合网络通信集团有限公司 | Flow control method, device, equipment and storage medium |
CN114900470B (en) * | 2022-06-17 | 2023-10-31 | 中国联合网络通信集团有限公司 | Flow control method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN105991456B (en) | 2019-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Noormohammadpour et al. | Datacenter traffic control: Understanding techniques and tradeoffs | |
CN105991456A (en) | OpenFlow switch, network system and bandwidth sharing method | |
AU2003278942B2 (en) | Per user per service traffic provisioning | |
EP3029896B1 (en) | Qos implementation method, apparatus and system in openflow network | |
CN101023633B (en) | System and method for enhancing network quality of service | |
EP2575329B1 (en) | Proportional bandwidth sharing of the excess part in a MEF Traffic Profile | |
US20070242675A1 (en) | Dual scheduling for efficient network traffic management | |
CN103999414B (en) | A kind of method and apparatus of attribution for the congestion contribution of the shared resource of relative users register | |
CN1985482B (en) | Network devices and traffic shaping methods | |
CN112600684B (en) | Bandwidth management and configuration method of cloud service and related device | |
Cho | Managing Traffic with ALTQ. | |
CN113225253B (en) | Message forwarding method and device | |
CN108337184A (en) | Flow equalization dispatching method and device | |
CN110290072A (en) | Flow control methods, device, the network equipment and storage medium | |
CN109995608B (en) | Network rate calculation method and device | |
Buzhin et al. | Evaluation of Telecommunication Equipment Delays in Software-Defined Networks | |
CN109379163A (en) | A kind of message forwarding rate control method and device | |
WO2021052382A1 (en) | Cloud service bandwidth management and configuration methods and related device | |
CN107409059B (en) | Volume-based online charging in hybrid networks | |
Agache et al. | Oh Flow, Are Thou Happy?{TCP} Sendbuffer Advertising for Make Benefit of Clouds and Tenants | |
Vila-Carbó et al. | Analysis of switched Ethernet for real-time transmission | |
Kim | Deterministic service guarantees in IEEE 802.12 networks. I. The single-hub case | |
US10075380B2 (en) | Probabilistic metering | |
Luo et al. | FlowStar: Fast Convergence Per-Flow State Accurate Congestion Control for InfiniBand | |
Zhang | Burst Forwarding 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 |