A kind of method of multiplexing residual bandwidth and the network equipment
Technical field
The present invention relates to the communications field, particularly relate to a kind of method and network equipment of multiplexing residual bandwidth.
Background technology
The leakage barrel technology has widely-used in router, Ethernet switch, can realize by software or hardware, is used for flow restriction and mark when network traffic congestion.The typical effect of traffic policy is flow and the burst that restriction enters a certain connection of a certain network, when message satisfies certain condition, message flow as certain connection is excessive, supervision just can take different processing to move to this message, for example dropping packets or reset priority of messages etc.Common usage is to use CAR (Committed Access Rate, committed access rate) to limit the flow of certain class message, and CAR utilizes token bucket to carry out flow control.
CAR utilizes basic process that token bucket carries out flow control as shown in Figure 1, if the message behind the traffic classification does not have the specified flow flow characteristic just directly to continue to send, and need be through the processing of token bucket; If need carry out the message of flow control, then can enter in the token bucket and handle, if there are enough tokens can be used for sending message in the token bucket, then allow message to pass through, message can be continued to send; Message is dropped if the token in the token bucket does not satisfy the transmission condition of message, so just can control the flow of certain class message.
Leakage barrel technology commonly used has single barrel of single-rate, single-rate twin-tub etc.Following elder generation describes leaking parameter relevant in the bucket:
CIR (Committed Information Rate, committed rate) leaks a kind of speed that bucket injects token;
CBS (Committed Burst Size, Committed Burst Size) leaks the capacity that bucket holds token;
EBS (Excess Burst Size, Maximum Burst Size) in the single-rate twin-tub, leaks the capacity that bucket E holds token.
Fig. 2 is the schematic diagram of single barrel of single-rate, and this technology is injected token bucket with fixing speed (CIR) with token, if token full (surpassing CBS) in the token bucket, then the token that will overflow abandons.When message arrives, the length of token quantity in the token bucket and message self need be compared, if the token quantity in the token bucket less than the length of message, then message can't be obtained enough tokens, causes packet loss; The corresponding token if the length of message smaller or equal to the quantity of leaking token in the bucket, is then leaked down from leak bucket passes through message.
For token bucket, exist to inject token and leak down independently process of two of tokens.The quantity that injects token was directly proportional with the time, because the speed of injecting is fixed, the time of multiply by then is the token quantity that injects.The quantity of token of leaking down equals the total length by the message byte.If inject the Mean Speed of the speed of token greater than the token that leaks down, then leaking bucket can be full, overflows then.In the speed of injecting token during less than the speed of the token that leaks down, leak that token will consume gradually in the bucket, cause message to pass through, the token that do not leak down when message does not pass through, token can be saved bit by bit like this, passes through up to reaching a message.
Fig. 3 is the schematic diagram of single-rate twin-tub, and single-rate twin-tub technology is expanded for single barrel single-rate, and this technology has used two to leak bucket, is respectively C bucket and E bucket, and it holds the token capacity is respectively CBS and EBS.The token charge velocity of single-rate twin-tub is CIR, and token injects to the C bucket.For the single bucket algorithm of single-rate, the token that overflows will directly abandon, and for single-rate twin-tub technology, the token that the C bucket overflows will be transferred to the E bucket.If E bucket token also overflows, then the token that will overflow abandons.The E bucket can only receive the token that the C bucket overflows thus, and when the E bucket is full, unnecessary token is abandoned.
Because the twin-tub technology has two token buckets, therefore can also marker color except can limiting speed (in data communication field, the color ordinary representation message of message abandons grade under congestion situation).Marker color can be considered the primitive color of message, also can ignore the primitive color of message, carries out mark again.The color of message represents that loss priority successively from low to high in that data communication field usefulness sanctified by usage is green, yellow, red.If the twin-tub technology is considered the primitive color of message when message is carried out mark, then be called look responsive mode, if do not consider the primitive color of message, then be called the colour blindness mode.
For the look sensitive mode, red packet has been the message of the lowest class, does not therefore handle; For the message of green, judge earlier the token quantity of C bucket, if token quantity more than or equal to the length of message, then the message color is maintained green, simultaneously the C bucket token of respective numbers that leaks down.If the token quantity of C bucket is less than the length of message, the C bucket token that do not leak down then, the color of message is reduced to yellow simultaneously, and it is handled according to the message of yellow; For yellow packet, whether the quantity of judging token in the E bucket more than or equal to the length of message, if more than or equal to the length of message, the E bucket token of respective numbers that leaks down then, the message color is maintained yellow simultaneously, the token otherwise the E bucket does not leak down, and the color of message is reduced to redness.Before the single-rate twin-tub processing of carrying out under the look sensitive mode, need to distinguish earlier the color of message.The single-rate twin-tub technology of colour blindness pattern is consistent with the basic principle of look responsive mode, if the message of handling is all thought green packet, then the look sensitive mode has just become the colour blindness pattern.Therefore before the single-rate twin-tub processing of carrying out under the look sensitive mode, bar none message is considered as green packet, handles getting final product then according to look responsive mode.Through obtaining the color of message after the processing of single-rate twin-tub, the processing of shades of colour correspondence can be provided with, such as, green and yellow passes through, and red packet loss.
IP network operator need insert the user by the router or the Ethernet switch of Access Layer or tether layer.Operator often need carry out bandwidth constraints for the user who inserts, and the SLA (Service Level Agreement, service level agreements) that signs between user and the operator is depended in the restriction of bandwidth.SLA can be understood as between client and the operator contract and the agreement about service quality, among the SLA except may stipulating total bandwidth that the user can enjoy, also may stipulate the amount of bandwidth that the flow of each grade of user is enjoyed respectively, below some examples be adopt to leak the application case that barrel technology can be resolved: 1. such as total bandwidth 500Kbps, speech business 100Kbps wherein, video traffic 200Kbps, data service 200Kbps.At this SLA, the bandwidth constraints that can come respectively voice, video and data service to be carried out 100Kbps, 200Kbps, 200Kbps by single barrel of module of three single-rate, total like this bandwidth can ensure and be 500Kbps.
2. total bandwidth 500Kbps and for example wherein distinguishes the voice-and-data business, and voice can take whole bandwidth, and data can only be used the bandwidth of speech residual, and this requirement then can solve by the single-rate twin-tub technology of look sensitive mode.With phonetic symbol is green, and data markers is yellow.Green packet speed is during more than or equal to CIR, and the C bucket does not have unnecessary token to be transferred to the E bucket, and the E bucket does not just have token and leaks down, and therefore yellow message can't pass through; Green packet speed is during less than CIR, and the token that the C bucket can will slowly be saved bit by bit and finally overflow is transferred to the E bucket, and Huang Se message can access the token that partly leaks down like this, and passes.During the still not enough message length of token quantity, yellow packet will be downgraded to red packet.Behind the two leakage buckets of single-rate, be labeled as red message and directly abandon.
But for following business demand, single barrel of single-rate of the prior art and single-rate twin-tub technology can't realize:
Total bandwidth is restricted to 500Kbps, and wherein speech business limits 100Kbps, video traffic restriction 200Kbps, data service restriction 200Kbps.Priority to business sorts, and voice priority is the highest, video secondly, data are minimum.When certain professional underfed limiting bandwidth, then remaining bandwidth is preferentially seized by the business of a low grade.For example, the bandwidth of voice actual flow has only 10Kbps, the 90Kbps bandwidth of speech residual can be utilized by the flow of video traffic above limiting bandwidth 200Kbps so, if the also not enough 200Kbps of the bandwidth of video traffic, then the voice and video remaining bandwidth can be used by data service.Single barrel technology is realized if this demand is used single-rate, can't realize that then bandwidth seizes, and the single-rate twin-tub also can't address this problem.
Above this demand actual using value is arranged, the bandwidth that the user buys is not always wished waste, therefore to the delineation of activities grade, carrying out in order multiplexing according to grade remaining bandwidth is a rational requirement.
Because do not support characteristics such as flow queue cascade, the hard-wired function of NP (Network Processor, network processing unit) is limited, improving of hardware capability means the complexity of realization and the significantly increase of cost simultaneously.
Summary of the invention
The invention provides a kind of method of multiplexing residual bandwidth, the multiplexing residual bandwidth that realize more flexibly, cost is lower.
The invention provides a kind of network equipment, realize more flexibly, multiplexing residual bandwidth cheaply.
A kind of method of multiplexing residual bandwidth may further comprise the steps: network traffics are carried out traffic classification with the differentiation different business, and with the traffic differentiation grade, respectively at each traffic limits bandwidth,
Leak in the bucket toward each and to inject token with committed rate CIR, wherein: described leakages bucket is more than one, the business of the corresponding different brackets of difference,
When the token in leaking bucket surpassed its Committed Burst Size CBS, the token of injection overflowed, and with the described token that overflows in the bucket that leaks, was injected in order in the professional corresponding leakage bucket of other grades by the grade of business.
Wherein, the token that high-grade professional corresponding leakage bucket overflows is injected in the leakage bucket of a low-grade professional correspondence, when overflowing token in the described low-grade professional corresponding leakage bucket, is re-introduced into than in the low more professional corresponding leakage bucket of its grade.
Wherein, when the professional corresponding leakage bucket of the lowest class overflows, abandon the token that overflows.
Wherein, adopt timer trigger method or message method of driving to inject token to described a plurality of leakage buckets.
A kind of network equipment, comprise the multiplexing residual bandwidth device, described multiplexing residual bandwidth device comprises a plurality of leakage buckets, these a plurality of corresponding different brackets, the process traffic classification respectively business of bucket of leaking, when described leakage bucket overflowed token, the token that overflows was injected in the professional corresponding leakage bucket of other grades in order by the grade of business.
Wherein, the described token that overflows in the bucket that leaks is injected in the professional corresponding leakage bucket of next grade, when overflowing token in the professional corresponding leakage bucket of described next grade, is re-introduced in the professional corresponding leakage bucket of next next grade.
Wherein, described a plurality of leakage buckets have committed rate CIR respectively, are used to limit each professional bandwidth, and the bandwidth of a certain grade business is minimum to be 0, and maximum bandwidth is the summation that grade is not less than all professional limiting bandwidths of this grade of service.
Wherein, further comprise flow classifier, be used for flow is classified, to distinguish different business.
Wherein, this network equipment is switch or router.
Beneficial effect of the present invention is as follows:
In the present invention, when leaking the bandwidth constraints of bandwidth constraints that barrel technology realizes that the user is total and miscellaneous service, miscellaneous service limiting bandwidth rest parts can according to priority other just shares use for other business, realized the multiplexing in order of bandwidth, solved the deficiency of traditional leakage barrel technology, the lower bandwidth constraints of more flexible and cost and multiplexing is provided.
Description of drawings
Fig. 1 is the schematic diagram of existing token bucket technical finesse process;
Fig. 2 is the schematic diagram of single barrel of prior art single-rate;
Fig. 3 is the schematic diagram of prior art single-rate twin-tub;
Fig. 4 is the high-level schematic functional block diagram of communication network;
Fig. 5 is the schematic diagram of the network equipment of the present invention;
Fig. 6 injects flow chart for the token that timer of the present invention triggers.
Embodiment
The present invention is the flow to multiple business, with the traffic differentiation priority level, on the basis of difference limiting bandwidth, leak barrel technology by using, remaining bandwidth offered successively above the professional institute of other grades of limiting bandwidth use, thus the orderly statistic multiplexing between the realization different business flow.In the present invention, remaining bandwidth can be arranged to be followed successively by above next grade of limiting bandwidth is professional and use, and perhaps is arranged to be followed successively by above a last grade of limiting bandwidth is professional and uses, and depends primarily on the SLA that signs between user and the operator.Among the following embodiment, be followed successively by above the professional use of the inferior grade of limiting bandwidth with the remaining bandwidth of high-grade business and be example, elaborate technical scheme of the present invention.
Figure 4 shows that communication network, user 12 is by edge router 14 accesses network, and this edge router 14 is collected flow and this flow is multiplexed in the backbone network from user 12, and this backbone network comprises a plurality of interconnective router/switch 16.By using suitable agreement and exchange, data can exchange between different user 12, and perhaps user 12 can be visited and pass through to resource.The method and apparatus of the multiplexing residual bandwidth in the embodiment of the invention can be used in edge router 14, router/switch 16 or other the network element on the communication network.
Before network traffics are carried out the technical finesse of technical solution of the present invention, at first to adopt flow classifier to carry out traffic classification, to distinguish different business.The traffic classification method can adopt simple traffic classification, also can adopt complex traffic classification, all belongs to the prior art content, does not therefore do concrete introduction.Following content all default stream classification is finished, and different business distinguish.
As shown in Figure 5, the network equipment of the present invention comprises multiplexing residual bandwidth device 100, this multiplexing residual bandwidth device 100 comprises a plurality of leakages bucket 30, wherein should a plurality ofly leak bucket 30 dissimilar business of correspondences respectively, such as distinguishing corresponding speech business, video traffic or data service etc.And these a plurality of leakage bucket 30 corresponding service have different priority levels.These a plurality of speed of leaking bucket 30 injection tokens are respectively CIR1, CIR2, and CIR3...CIRn, wherein CIR1 to CIRn is user's miscellaneous service limiting bandwidth separately.In addition, each leaks bucket 30 CBS that have respectively separately.Defined parameters CIR=CIR1+CIR2+...+CIRn, wherein, CIR is total limiting bandwidth of user, except can stipulating total bandwidth that the user can enjoy, can also stipulate the amount of bandwidth that the various types of business of user are enjoyed respectively like this.
For professional i (professional i is for leaking bucket i corresponding service), bandwidth is minimum to be 0, can both ensure with interior flow at CIRi and pass through; Its maximum bandwidth is CIR1+CIR2+......+CIRi, and promptly grade is not less than the summation of all traffic limits bandwidth of professional i, and prerequisite is that the actual bandwidth of the grade business that is higher than professional i all is 0.
With Fig. 5 is example, and the operation principle of multiplexing residual bandwidth device 100 in the present embodiment is described.Among the figure, each leaks the CIRi injection token that bucket is all pressed correspondence, if the corresponding bucket that leaks overflows, then the token that will overflow is injected in the leakage bucket that hangs down a grade of service in turn.Each business is all got token from leakage bucket separately, promptly message only reads the token number that once leaks in the bucket.If leak token quantity in the bucket less than message length, then packet loss, otherwise message passes through.For business 1, when the flow that surpasses CIR1 can not get enough tokens, message will be dropped.If professional 1 flow is lower than CIR1, then leaking bucket 1 can overflow, and the token that overflows injects and leaks bucket 2.This hourglass bucket 2 also has the bucket of leakage 1 token that overflows except the token charge velocity of self, therefore professional 2 can take professional 1 remaining bandwidth.In like manner, professional 3 can take professional 1 and professional 2 remaining bandwidth; Professional n can take professional 1 remaining bandwidth to professional (n-1).
The injection process of token can adopt distinct methods such as timer triggering, message driving.The method for implanting that adopts message to drive by logging timestamp, multiply by the token quantity that injection rate calculates injection with twice time interval.In the leakage barrel technology that the present invention describes, the injection process of token adopts way regularly, promptly injects token every several milliseconds to leaking bucket.The cyclic injection process of its token as shown in Figure 6, among the figure, i represents to leak the bucket numbering, value is [1, n], token_leak represents the token number that overflows from the leakage bucket of i-1; Token_cir represents to be injected into the speed of CIRi the token number of corresponding leakage bucket i.
The token number token_leak that A, calculating are overflowed.
Be numbered 1 leakage bucket, the token_leak=0 that it receives is numbered the token_leak=that the leakage bucket of i receives and leaks the token that bucket i-1 overflows.The token that overflows is injected in the professional corresponding leakage bucket of next grade successively.
B, calculate in the time interval regularly the token number that should inject by CIRi speed.
The token that C, token_leak and token_cir addition obtain is injected in the corresponding leakage bucket.
D, judge whether token overflows, if token overflows, the token that overflows of token_leak=then; If token does not overflow, token_leak=0 then.
E, repeat above A-D step.
It is fairly simple that message arrives the operation of being carried out the back, directly judges the token quantity deposited in the corresponding token bucket whether less than the length of message, if less than packet loss, otherwise message passes through, with the leak down token of respective numbers of hourglass bucket.
In the present invention, when leaking the bandwidth constraints of bandwidth constraints that barrel technology realizes that the user is total and miscellaneous service, miscellaneous service limiting bandwidth rest parts can according to priority other just shares use for other business, realized the multiplexing in order of bandwidth, solved the deficiency of traditional leakage barrel technology, bandwidth constraints and multiplexing more flexibly is provided.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.