CN101272346A - Method and device for packet flux monitoring - Google Patents

Method and device for packet flux monitoring Download PDF

Info

Publication number
CN101272346A
CN101272346A CNA2008101054501A CN200810105450A CN101272346A CN 101272346 A CN101272346 A CN 101272346A CN A2008101054501 A CNA2008101054501 A CN A2008101054501A CN 200810105450 A CN200810105450 A CN 200810105450A CN 101272346 A CN101272346 A CN 101272346A
Authority
CN
China
Prior art keywords
token
message
bucket
overdraw
token bucket
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
Application number
CNA2008101054501A
Other languages
Chinese (zh)
Other versions
CN101272346B (en
Inventor
莫大明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2008101054501A priority Critical patent/CN101272346B/en
Publication of CN101272346A publication Critical patent/CN101272346A/en
Application granted granted Critical
Publication of CN101272346B publication Critical patent/CN101272346B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for supervising the flux of messages, which pertains to the communication field. The method comprises the steps as follows: overdraft tokens are arranged in a token bucket; a message is received and the length of the message is obtained; when the length of the message is larger than the depth of the bucket, the overdraft tokens in the token bucket are checked whether overdraft; if the overdraft tokens in the token bucket do not overdraft, the overdraft tokens are obtained from the token bucket; the message is transmitted according to the tokens obtained from the token bucket; the tokens obtained include at least the overdraft tokens and are corresponding to the length of the message. The device comprises an arranging module, a receiving module, an obtaining module and a transmitting module. By virtue of the design of the overdraft tokens to the token bucket, when receiving a message and in case of insufficient positive tokens or no token in the token bucket, the message can also be conditionally and normally transmitted.

Description

A kind of method and apparatus that message is carried out traffic policing
Technical field
The present invention relates to the communications field, particularly a kind of method and apparatus that message is carried out traffic policing.
Background technology
Because the finiteness of Internet resources, load for equalizing network, for ISP (Internet Service Provider, the internet service supplier), be necessary flow and load that the user sends in the network are controlled, common way is to adopt the mode of traffic policing (Policing) to supervise and control for the flow that inserts a certain network.So-called traffic policing is meant that restriction enters the data traffic and the burst of a certain connection of a certain network; its typical effect is exactly the specification that enters a certain flow of network by supervision; it is limited within the scope of a permission; if the message flow of certain connection is excessive; with regard to dropping packets; or reset this priority of messages (such as restriction HTTP (Hypertext Transfer Protocol; HTML (Hypertext Markup Language)) message can not take and surpass 50% the network bandwidth), be without prejudice with protecting network resource and benefits of operators.
At present, traffic policing extensively adopts token bucket (Token Bucket) mechanism when specific implementation.So-called Token Bucket Policing is meant: token bucket is put into token by the speed of setting in bucket, and token bucket has the capacity (promptly bucket is dark) of setting simultaneously, and it is dark that the token quantity of token exceeds bucket in bucket, and then the token quantity in the token bucket just no longer increases.When using token bucket to handle message, if there are enough tokens can be used for sending message (a common byte correspondence is obtained a token) in the token bucket, message can be forwarded, and simultaneously, the token quantity in the token bucket is done corresponding minimizing by the length of message.When the token in the token bucket less when message can not send again, the message that then can't get access to token is dropped.Wherein, Token Bucket Policing can be divided into single token bucket again to be realized realizing with two token buckets, sees for details as follows:
Referring to Fig. 1, single token bucket schematic diagram is provided, wherein, the quantity that the BS (Bucket Size, token number) in the token bucket when initial sets for the user; When the token in the token bucket during less than the BS that sets, token bucket just injects token with IR (Information Rate, information rate) in token bucket.Obtain enough tokens if message is disposable from token bucket, then message is marked as and meets (Conformant), otherwise message is marked as and do not meet (Non-Conformant), wherein, the message that meets be allowed to by, continue to transmit; Incongruent message is dropped.The length of the message of transmitting adopt single Token Bucket Policing to realize traffic policing, if then can cause being dropped greater than the dark message of bucket greater than the BS that is provided with; And if have two message flows simultaneously, wherein, these two message flows are except the message length difference, when other feature is all identical, if the flow of small messages (length is less) is greater than token bucket when annotating bucket speed IR, can cause big message owing to have no chance to obtain token, thereby can't from token bucket, obtain enough tokens and send, and then cause this big message to be dropped.
Referring to Fig. 2, two token bucket schematic diagrames are provided, the token number of token number in two token buckets (C bucket and P bucket) when initial for setting, when the token number in two buckets during less than the value set, two buckets are respectively with CIR (CommittedInformation Rate, CIR) and the speed of PIR (Peak Information Rate, peak information rate) put into token (usually, PIR is greater than CIR) in the token bucket; After two processing of token bucket, to the packet labeling color to message.When message being transmitted when handling, message is taked the respective handling that abandons or pass through according to the color that is labeled of message.Wherein, when adopting token bucket that message is carried out the mark of color, there are two kinds of patterns:
1) COLOR-AWARE (color sensation) pattern: if incoming message be redness or message length greater than PBS, then be labeled as redness; If incoming message be yellow or message length greater than CBS, then be labeled as yellow; Otherwise, then be labeled as green;
2) COLOR-BLIND (colour blindness) pattern: if incoming message length greater than PBS, then is labeled as redness; If incoming message length greater than CBS, then is labeled as yellow; Otherwise be labeled as green.
But adopt two Token Bucket Policings to realize traffic policing, if the CBS of C bucket is (Committed Burst Size, arrange burst size) and PBS (Peak Burst Size, peak burst size) size of She Zhiing transmit less than needs message length the time, because message can't obtain enough tokens from token bucket, cause these length to be dropped greater than the dark message of bucket.
Summary of the invention
Not enough or when not having token in order to solve when the token in the token bucket, equally also can realize the with good conditionsi normal forwarding of message, the embodiment of the invention provides a kind of method and apparatus that message is carried out traffic policing.Described technical scheme is as follows:
On the one hand, provide a kind of message is carried out the method for traffic policing, described method comprises:
The overdraw token is set in token bucket;
Receive message, obtain the length of described message;
When the length of described message is dark greater than the bucket of described token bucket, judge whether the overdraw token of described token bucket is overdrawed, if being the overdraw token of described token bucket, judged result do not overdraw, then from described token bucket, obtain described overdraw token;
Transmit described message according to the token that is obtained from described token bucket, the described token that obtains comprises described overdraw token at least, and corresponding with described message length.
On the other hand, provide a kind of message is carried out the device of traffic policing, described device comprises:
Module is set, is used for the overdraw token being set at token bucket;
Receiver module is used to receive message, obtains the length of described message;
Acquisition module, be used for when the length of described message is dark greater than the bucket of described token bucket, judge whether the overdraw token of described token bucket is overdrawed, do not overdraw, then from described token bucket, obtain described overdraw token if judged result is the overdraw token of described token bucket;
Forwarding module is used for according to transmitting described message from the token that described token bucket obtained, and described token comprises described overdraw token at least, and corresponding with described message length.
The beneficial effect of the technical scheme that the embodiment of the invention provides is:
By token bucket having been adopted the design of overdraw token, when receiving message, positive token in token bucket is not enough or when not having token, message also can normally be transmitted conditionally.
Description of drawings
Fig. 1 is single token bucket schematic diagram that prior art provides;
Fig. 2 is two token bucket schematic diagrames that prior art provides;
Fig. 3 be the embodiment of the invention 1 provide message is carried out the method flow diagram of traffic policing;
Fig. 4 is single token bucket forwarding process schematic diagram that the embodiment of the invention 1 provides;
Fig. 5 be the embodiment of the invention 2 provide message is carried out the method flow diagram of traffic policing;
Fig. 6 is two token bucket forwarding process schematic diagrames that the embodiment of the invention 2 provides;
Fig. 7 be the embodiment of the invention 3 provide message is carried out the device schematic diagram of traffic policing.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
The technical scheme that the embodiment of the invention provides is by being provided with maximum facility extent to token bucket, thereby overcome the forwarding defective that prior art exists effectively, wherein, the method that message is carried out traffic policing that provides of the embodiment of the invention thes contents are as follows: the overdraw token is set in token bucket; Receive message, obtain the length of message; When the length of message is dark greater than the bucket of token bucket, judge whether the overdraw token of token bucket is overdrawed, if being the overdraw token of token bucket, judged result do not overdraw, then from token bucket, obtain the overdraw token; E-Packet according to the token that is obtained from token bucket, the token that obtains comprises the overdraw token at least, and corresponding with message length.
Wherein, the length that can E-Packet according to token bucket is provided with the overdraw token in the token bucket, and the amount of the overdraw token of setting equals the length that can E-Packet, the amount of above-mentioned overdraw token is maximum overdraw token number, thereby has guaranteed that maximum message can access forwarding in the network.Correspondingly, when be provided with the overdraw token for token bucket after, just there have been two class tokens: positive token (being common token described in the prior art) and overdraw token.
That adopts that the invention described above embodiment provides carries out the method for traffic policing to message, by token bucket having been adopted the design of overdraw token, when receiving message, the token in token bucket is not enough or when not having token, message also can normally be transmitted conditionally.
For the technical scheme that in detail embodiment of the invention is provided describes, be example at the situation of the single token bucket of common employing in the traffic policing and two token buckets respectively below, see following each embodiment for details.
Embodiment 1
Referring to Fig. 3, the embodiment of the invention provides a kind of message has been carried out the method for traffic policing, and present embodiment is that example describes to obtain token from single token bucket, sees theing contents are as follows for details:
101:, the maximum facility extent of token bucket is set according to the maximum length that E-Packets of token bucket.
Wherein, the maximum length that E-Packets of this token bucket is set to the maximum facility extent of token of self, and for example, the maximum length that this token bucket can E-Packet is 10240 bytes, and then the maximum facility extent of this token bucket is 10240 bytes.In the time can overdrawing token for token bucket being provided with, correspondingly, the value BL of the quantity of token (tj) can be negative in the token bucket, during for negative, expression has been overdrawed and has been used the overdraw token that is provided with, so, for token bucket, there are two class tokens: positive token and overdraw token, positive token is common token, it is those tokens within the facility extent scope of the setting of this token bucket that the overdraw token is then represented.
102: after receiving message, judge the whether positive token of existence in the token bucket, if then execution in step 103, otherwise, execution in step 106.
Wherein, after receiving message, correspondingly, obtain the length of this message.
103: judge whether the positive token number of the existence in the token bucket satisfies the length of message, if then execution in step 104; Otherwise, execution in step 105.
104: after message gets access to corresponding positive token number, with packet labeling for meeting Conformant.
Wherein, because the length of message and token number are corresponding relations, when the positive token number that exists in this list token bucket satisfies this message length, for example, the length of message is 20 bytes, has the positive token of 30 bytes in this list token bucket, correspondingly, obtain 20 bytes in the positive token of this 30 byte, and with packet labeling for meeting Conformant.
105: message obtains the positive token number of existence, and not enough that part of token number then obtains from the overdraw token that is provided with, then with packet labeling for not meeting Conformant.
Wherein, then from the overdraw token that is provided with, obtain for not enough that part of token in this step, be specially, from the overdraw token of single token bucket, obtain not enough that part of token, and when the overdraw token obtains this part not enough token, need judge whether to surpass the maximum amount of set overdraw token in the token bucket once more, if surpass, then with packet labeling for not meeting Non-conformant; If do not surpass, then carry out the positive token number that message is obtained existence, not enough that part of token number then obtains from the overdraw token that is provided with, and is Conformant with packet labeling then.For example, the length of message is 100 bytes, and the positive token of this list token bucket is 60 bytes, when the maximum amount of the overdraw token that is provided with is 20 bytes, then with this packet labeling for not meeting Non-conformant; When the maximum amount of the overdraw token that is provided with is 80 bytes, then according to length 100 bytes of this message, obtain positive token 60 bytes in single token bucket after, obtain 40 not enough bytes to the overdraw token.
Wherein, the length of for example receiving that E-Packets is 100 bytes, suppose that a byte message need obtain a token, positive token number in the token bucket is 60 at this moment, token number does not satisfy the length of message, the message of then remaining 40 bytes obtains from default overdraw token, promptly from the overdraw token, get access to 40 overdraw tokens, can get access to the token number that satisfies its forwarding length thereby having satisfied E-Packets, correspondingly, when this E-Packet obtain token after, the positive token number in the token bucket reduces to 0, the corresponding numerical value (promptly reducing 40) that the token number of overdrawing simultaneously reduces.
106: whether the overdraw token of judging token bucket is overdrawed, if then execution in step 107; Otherwise, execution in step 108.
107: packet labeling for not meeting non-Conformant, is finished.
108: according to the length of message, obtain corresponding overdraw token number from the overdraw token number of token bucket, and with packet labeling for meeting Conformant, finish.
Correspondingly, in the follow-up link of handling, just can message be handled according to the mark result of message to message.
Referring to Fig. 4, the embodiment of the invention provides the forwarding process schematic diagram of single token bucket, when packet labeling represents to allow this message by (promptly normally being transmitted) for meeting Conformant, otherwise, when being marked as non-Conformant, message represents this packet loss.
When what adopt that the embodiment of the invention provides message is carried out the method for traffic policing, when there being two message flows, and when the flow of small messages is annotated the speed of token more than or equal to token bucket, can so that the quality paper literary composition still have an opportunity to get access to the overdraw token the token from overdraw, realize transmitting according to the overdraw token that obtains, thereby effectively avoided big message to be in " dying of hunger " state and the problem that can not get transmitting always.
What the embodiment of the invention provided carries out the method for traffic policing to message, by being single token bucket configuration overdraw token, makes length can get access to corresponding token greater than the dark message of bucket, realizes that message transmits.
Embodiment 2
Referring to Fig. 5, the embodiment of the invention provides a kind of message has been carried out the method for traffic policing, and present embodiment is an example to obtain token from two token buckets (C bucket and P bucket), and is that the color sensation pattern is that example describes with two token buckets, sees theing contents are as follows for details:
201:, the maximum facility extent of C token bucket and P token bucket is set respectively according to the maximum length that E-Packets of each token bucket.
Wherein, when the maximum facility extent of C token bucket and P token bucket was set, its value can be the same or different, for example, the maximum length that C token bucket and P token bucket can E-Packet all is 10240 bytes, and then the maximum facility extent of C token bucket and P token bucket is 10240 bytes.
202: receive message, the value that judges whether the token number in the P token bucket for negative value or the message color that receives for red, if then execution in step 206; Otherwise, execution in step 203;
Wherein, the value of the token number in the P token bucket has been the negative value explanation overdraw token number that the P token bucket is provided with of having overdrawed, and the token number in the P token bucket returns to and do not allow the use of overdrawing again on the occasion of before.
203: the value that judges whether the token number in the C token bucket for negative value or the message color that receives for yellow, if then execution in step 204; Otherwise, execution in step 205;
Wherein, be the negative value explanation overdraw token number of C token bucket setting of having overdrawed with the value of the token number in should the C token bucket, the token number in the C token bucket returns to and does not allow the use of overdrawing again on the occasion of before.
204: with packet labeling is yellow, and the token of C token bucket does not reduce simultaneously, and the token number in the P token bucket reduces corresponding message length value, if when the positive token in this moment P token bucket is not enough, then uses the overdraw token of P bucket accordingly, finishes.
205: obtain the corresponding token in the C token bucket, and be green with packet labeling.When if the positive token number in the C token bucket is not enough, then use the overdraw token that is provided with, finish.
This step 205 has been obtained the corresponding token number in the C token bucket, and the token in the C token bucket has carried out corresponding minimizing, and the message burst flow that occurs in the traffic policing will reduce corresponding message length value simultaneously in the P token bucket.
206; With packet labeling is red, and simultaneously, the token number average in C token bucket and the P token bucket does not reduce, and finishes.
Correspondingly, to the message forwarding processing links, just can be according to message by the color of token bucket mark, message is handled, and referring to Fig. 6, the embodiment of the invention provides the forwarding process schematic diagram of two token buckets, when message has been labeled when green, carry out directly by (promptly normally being transmitted); And to mark red or yellow message, if the action of message is to transmit, then transmit, if the action of message is for abandoning, then execution abandoning.
The method of obtaining token that the embodiment of the invention provides, when adopting two token buckets to realize traffic policing, by being two token bucket configuration overdraw tokens, when the length that E-Packets during greater than the dark PBS of bucket of bucket dark CBS or the P bucket of C bucket, message still can successfully get access to token, thereby realize to transmit, solved effectively that message can not get token and the problem that is in " dying of hunger " state, can not get transmitting.
Embodiment 3
Referring to Fig. 7, the embodiment of the invention provides a kind of message has been carried out the device of traffic policing, and device comprises:
Module is set, is used for the overdraw token being set at token bucket;
Receiver module is used to receive message, obtains the length of message;
Acquisition module is used for judging whether the overdraw token of token bucket is overdrawed when the length of message is dark greater than the bucket of token bucket, does not overdraw if judged result is the overdraw token of token bucket, then obtains the overdraw token from token bucket;
Forwarding module is used for according to E-Packeting from the token that token bucket obtained, and token comprises the overdraw token at least, and corresponding with message length.
When traffic policing, common have single Token Bucket Policing of employing and two Token Bucket Policings, and the situation at above-mentioned single token bucket and two token buckets describes respectively below:
1) under the situation of single token bucket, correspondingly, the device that message is carried out traffic policing that the embodiment of the invention provides specifically comprises:
Module is set, is used for the length that can E-Packet, the overdraw token is set according to single token bucket; The amount of the overdraw token that is provided with equals the length that can E-Packet.
Receiver module is used to receive message, obtains the length of message;
Acquisition module if be used for the length that the positive token number of positive token of the existence of token bucket and existence satisfies message, then obtains corresponding positive token, and with packet labeling for meeting; If the positive token that exists in the token bucket does not satisfy the length of message, then according to the length of message, obtain the positive token of existence and obtain the overdraw token of token bucket, the token that obtains is corresponding with message length, and with packet labeling for meeting; If there is not the overdraw token of the positive token and the token bucket of not overdrawing in the token bucket, then obtain the overdraw token of token bucket, and with packet labeling for meeting; If token bucket do not have a positive token, and the overdraw token of the token bucket of having overdrawed, then with packet labeling for not meeting.
Processing module is used for the mark result according to acquisition module, handles message.When being labeled as when meeting, E-Packet; When being labeled as when not meeting dropping packets.
2) under the situation with two token buckets that C token bucket and P token bucket form, the device that message is carried out traffic policing that the embodiment of the invention provides specifically comprises:
Module is set, is used for the length that can E-Packet separately, the overdraw token of C token bucket and P token bucket is set respectively according to C token bucket and P token bucket; , the amount of the overdraw token of setting equals the length that can E-Packet separately.
Receiver module is used to receive message, obtains the length of message;
Acquisition module is if the overdraw token of the P token bucket that has been used for overdrawing then is red with packet labeling; Otherwise,, and be yellow with packet labeling if the overdraw token in the C token bucket of having overdrawed then obtains the token of P token bucket; Otherwise, obtain the token of C token bucket, and be green packet labeling; And, reduce the token number in the P token bucket according to the token number that obtains to the C token bucket;
Processing module is used for the mark result according to acquisition module, handles message.Wherein, when message be labeled as green the time, E-Packet; Otherwise, when the action of message for transmitting, E-Packet, when the action of message for abandoning dropping packets.
Wherein, above-mentioned acquisition module specifically can comprise:
First acquiring unit is if the overdraw token of the P token bucket that has been used for overdrawing then is red with packet labeling
Second acquisition unit is if the overdraw token of the C token bucket that has been used for overdrawing judges whether the positive token in the P token bucket satisfies the length of message, if obtain positive token; Otherwise, according to the length of message, obtaining behind the positive token and obtain the overdraw token of P token bucket, the token that obtains is corresponding with message length;
The 3rd acquiring unit is used for judging whether the positive token of C token bucket satisfies the length of message, if obtain positive token; Otherwise, according to the length of message, obtaining behind the positive token and obtain the overdraw token of C token bucket, the token that obtains is corresponding with message length.
When this pair token bucket was operated in the color sensation pattern, correspondingly, the acquisition module that message is carried out in the device of traffic policing that the embodiment of the invention provides also was used for:
If the message that receives for red, then is red with packet labeling; Otherwise,, and be yellow with packet labeling if the message that receives for yellow, then obtains the token of P token bucket; Otherwise, obtain the token of C token bucket, and be green packet labeling; And, reduce the token number in the P token bucket according to the token number that obtains to the C token bucket.
What the embodiment of the invention provided carries out the device of traffic policing to message, and by token bucket having been adopted the design of overdraw token, when receiving message, the positive token in token bucket is not enough or when not having token, message also can normally be transmitted conditionally.For example, because message can obtain the overdraw token from the overdraw token, thereby solved for two different message flows of length, if the flow of small messages greater than the token bucket speed of injecting token cause big message because can not get token is marked as Non-Conformant or redness, big message is forwarded the problem that handling process abandons; And when the dark length less than message of the token bucket bucket of configuration, message be owing to can't obtain token from token bucket, causes being labeled as Non-Conformant or when red, being forwarded the problem that handling process abandons by token bucket.
Those skilled in the art can be known, adopt the thought of overdraw token, not only can be applied to can also be applied in all data communication data stream be carried out the occasion of speed limit in the token bucket.
Part steps in the embodiment of the invention can utilize software to realize that corresponding software programs can be stored in the storage medium that can read, as CD or hard disk etc.
The above only is specific embodiments of the invention;, for those skilled in the art, not all under the prerequisite that does not break away from the principle of the invention in order to restriction the present invention; any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (13)

1. one kind is carried out the method for traffic policing to message, it is characterized in that described method comprises:
The overdraw token is set in token bucket;
Receive message, obtain the length of described message;
When the length of described message is dark greater than the bucket of described token bucket, judge whether the overdraw token of described token bucket is overdrawed, if being the overdraw token of described token bucket, judged result do not overdraw, then from described token bucket, obtain described overdraw token;
Transmit described message according to the token that is obtained from described token bucket, the described token that obtains comprises described overdraw token at least, and corresponding with described message length.
2. as claimed in claim 1 message is carried out the method for traffic policing, it is characterized in that the described overdraw token that is provided with is specially in token bucket:
According to the length that token bucket can E-Packet, the overdraw token is set, the amount of the overdraw token of described setting equals the described length that E-Packets.
3. as claimed in claim 1 message is carried out the method for traffic policing, it is characterized in that when described token bucket was single token bucket, described method was specially:
Length according to described single token bucket can E-Packet is provided with the overdraw token; The amount of the overdraw token of described setting equals the described length that E-Packets.
Receive message, obtain the length of described message;
If exist the positive token of positive token and existence to satisfy the length of described message in the token bucket, then obtain corresponding positive token, and with described packet labeling for meeting;
If the positive token that exists in the described token bucket does not satisfy the length of message, then obtain the overdraw token that obtains described token bucket behind the positive token of described existence, and with described packet labeling for meeting;
If there is not the overdraw token of the positive token and the described token bucket of not overdrawing in the described token bucket, then obtain the overdraw token of described token bucket, and with described packet labeling for meeting;
If described token bucket do not have a positive token, and the overdraw token of the described token bucket of having overdrawed, then with described packet labeling for not meeting;
According to the mark of message, described message is handled, be labeled as when meeting when described, transmit described message; Be labeled as when not meeting when described, abandon described message.
4. as claimed in claim 1 message is carried out the method for traffic policing, it is characterized in that, when described token bucket was specially the two token bucket of C and P, described method was specially:
According to the length that described C token bucket and P token bucket can E-Packet separately, the overdraw token of described C token bucket and P token bucket is set respectively; The amount of the overdraw token of described setting equals the length that described C token bucket and P token bucket can E-Packet separately.
Receive message, obtain the length of described message;
Overdraw token if overdrawed in the described P token bucket then is red with described packet labeling;
Otherwise,, and be yellow with packet labeling if the overdraw token in the described C token bucket of having overdrawed then obtains the token of described P token bucket;
Otherwise, obtain the token of described C token bucket, and be green, and, reduce the token number in the described P token bucket according to the described token number that obtains to described C token bucket with described packet labeling.;
According to the mark of message, described message is handled, when described message be labeled as green the time, transmit described message; Otherwise,, transmit described message when the action of described message is to transmit; When the action of described message for abandoning, abandon described message.
5. as claimed in claim 4 message is carried out the method for traffic policing, it is characterized in that the described token that obtains described P token bucket is specially:
Judge whether the positive token in the described P token bucket satisfies the length of described message, if obtain described positive token; Otherwise, according to the length of described message, obtaining behind the described positive token and obtain the overdraw token of described P token bucket, the positive token that obtains is corresponding with described message length with the sum of overdraw token.
6. as claimed in claim 4 message is carried out the method for traffic policing, it is characterized in that the described token that obtains described C token bucket is specially:
Judge whether the positive token in the described C token bucket satisfies the length of described message, if obtain described positive token; Otherwise, according to the length of described message, obtaining behind the described positive token and obtain the overdraw token of described C token bucket, the positive token that obtains is corresponding with described message length with the sum of overdraw token.
7. as claimed in claim 4 message is carried out the method for traffic policing, it is characterized in that, the overdraw token in the described described P token bucket of having overdrawed, can also for:
The described message that receives is for red.
8. as claimed in claim 4 message is carried out the method for traffic policing, it is characterized in that, the overdraw token in the described described C token bucket of having overdrawed, can also for:
The described message that receives is for yellow.
9. one kind is carried out the device of traffic policing to message, it is characterized in that described device comprises:
Module is set, is used for the overdraw token being set at token bucket;
Receiver module is used to receive message, obtains the length of described message;
Acquisition module, be used for when the length of described message is dark greater than the bucket of described token bucket, judge whether the overdraw token of described token bucket is overdrawed, do not overdraw, then from described token bucket, obtain described overdraw token if judged result is the overdraw token of described token bucket;
Forwarding module is used for according to transmitting described message from the token that described token bucket obtained, and described token comprises described overdraw token at least, and corresponding with described message length.
10. as claimed in claim 9 message is carried out the device of traffic policing, it is characterized in that when described token bucket was single token bucket, described device specifically comprised:
Module is set, is used for the length that can E-Packet, the overdraw token is set according to described single token bucket; The amount of the overdraw token of described setting equals the described length that E-Packets.
Receiver module is used to receive message, obtains the length of described message;
Acquisition module if be used for the length that positive token number that token bucket exists positive token and existence satisfies described message, then obtains corresponding positive token, and with described packet labeling for meeting; If the positive token that exists in the described token bucket does not satisfy the length of message, then according to the length of described message, obtain the positive token of described existence and obtain the overdraw token of described token bucket, the described token that obtains is corresponding with described message length, and with described packet labeling for meeting; If there is not the overdraw token of the positive token and the described token bucket of not overdrawing in the described token bucket, then obtain the overdraw token of described token bucket, and with described packet labeling for meeting; If there is not positive token in described token bucket, and the overdraw token of the described token bucket of having overdrawed, then with described packet labeling for not meeting.
Processing module is used for the mark result according to described acquisition module, handles described message.
11. as claimed in claim 9 message is carried out the device of traffic policing, it is characterized in that when described token bucket was specially the two token bucket of C and P, described device specifically comprised:
Module is set, is used for the length that can E-Packet separately, the overdraw token of described C token bucket and P token bucket is set respectively according to described C token bucket and P token bucket; , the amount of the overdraw token of described setting equals the length that can E-Packet separately.
Receiver module is used to receive message, obtains the length of described message;
Acquisition module is if the overdraw token of the described P token bucket that has been used for overdrawing then is red with described packet labeling; Otherwise,, and be yellow with packet labeling if the overdraw token in the described C token bucket of having overdrawed then obtains the token of described P token bucket; Otherwise, obtain the token of described C token bucket, and be green described packet labeling; And, reduce the token number in the described P token bucket according to the described token number that obtains to described C token bucket;
Processing module is used for the mark result according to described acquisition module, handles described message.
12. as described as described in the claim 11 message is carried out the device of traffic policing, it is characterized in that described acquisition module specifically comprises:
First acquiring unit is if the overdraw token of the described P token bucket that has been used for overdrawing then is red with described packet labeling;
Second acquisition unit is if the overdraw token of the described C token bucket that has been used for overdrawing judges whether the positive token in the described P token bucket satisfies the length of described message, if obtain described positive token; Otherwise, according to the length of described message, obtaining behind the described positive token and obtain the overdraw token of described P token bucket, the described token that obtains is corresponding with described message length;
The 3rd acquiring unit is used for judging whether the positive token of described C token bucket satisfies the length of described message, if obtain described positive token; Otherwise, according to the length of described message, obtaining behind the described positive token and obtain the overdraw token of described C token bucket, the described token that obtains is corresponding with described message length.
13. as claimed in claim 11 message is carried out the device of traffic policing, it is characterized in that described acquisition module also is used for:
If the described message that receives for red, then is red with described packet labeling; Otherwise,, and be yellow with packet labeling if the described message that receives for yellow, then obtains the token of described P token bucket; Otherwise, obtain the token of described C token bucket, and be green described packet labeling; And, reduce the token number in the described P token bucket according to the described token number that obtains to described C token bucket.
CN2008101054501A 2008-04-29 2008-04-29 Method and device for packet flux monitoring Expired - Fee Related CN101272346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101054501A CN101272346B (en) 2008-04-29 2008-04-29 Method and device for packet flux monitoring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101054501A CN101272346B (en) 2008-04-29 2008-04-29 Method and device for packet flux monitoring

Publications (2)

Publication Number Publication Date
CN101272346A true CN101272346A (en) 2008-09-24
CN101272346B CN101272346B (en) 2010-12-08

Family

ID=40006042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101054501A Expired - Fee Related CN101272346B (en) 2008-04-29 2008-04-29 Method and device for packet flux monitoring

Country Status (1)

Country Link
CN (1) CN101272346B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834786A (en) * 2010-04-15 2010-09-15 华为技术有限公司 Queue scheduling method and device
CN102932272A (en) * 2012-11-23 2013-02-13 迈普通信技术股份有限公司 Message forwarding method and forwarding device based on flow capacity
CN105763475A (en) * 2014-12-15 2016-07-13 中兴通讯股份有限公司 Access control method and device
WO2017118009A1 (en) * 2016-01-07 2017-07-13 中兴通讯股份有限公司 Data packet transmission control method and device
WO2020019743A1 (en) * 2018-07-27 2020-01-30 华为技术有限公司 Traffic control method and device
CN111163015A (en) * 2019-12-24 2020-05-15 北京百卓网络技术有限公司 Message sending method and device and convergence and diversion equipment
CN111385220A (en) * 2018-12-29 2020-07-07 北京华为数字技术有限公司 Method and device for transmitting message
CN115174486A (en) * 2022-06-01 2022-10-11 湖南天冠电子信息技术有限公司 Message transmission method, system and storage medium
CN116016356A (en) * 2021-09-30 2023-04-25 迈普通信技术股份有限公司 Message processing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426738C (en) * 2005-03-16 2008-10-15 华为技术有限公司 Realizing method of data stream constraint control
CN100574278C (en) * 2006-12-26 2009-12-23 华为技术有限公司 The method of refreshing token bucket and device in the flow limiting technology
CN101094180B (en) * 2007-07-20 2012-05-23 杭州华三通信技术有限公司 Method and device for watching and controlling compressed flux

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834786A (en) * 2010-04-15 2010-09-15 华为技术有限公司 Queue scheduling method and device
CN102932272A (en) * 2012-11-23 2013-02-13 迈普通信技术股份有限公司 Message forwarding method and forwarding device based on flow capacity
CN102932272B (en) * 2012-11-23 2016-05-11 迈普通信技术股份有限公司 Message forwarding method based on uninterrupted and forwarding unit
CN105763475A (en) * 2014-12-15 2016-07-13 中兴通讯股份有限公司 Access control method and device
CN105763475B (en) * 2014-12-15 2019-10-25 南京中兴新软件有限责任公司 Connection control method and device
WO2017118009A1 (en) * 2016-01-07 2017-07-13 中兴通讯股份有限公司 Data packet transmission control method and device
WO2020019743A1 (en) * 2018-07-27 2020-01-30 华为技术有限公司 Traffic control method and device
CN110768913A (en) * 2018-07-27 2020-02-07 华为技术有限公司 Flow control method and device
CN111385220A (en) * 2018-12-29 2020-07-07 北京华为数字技术有限公司 Method and device for transmitting message
CN111385220B (en) * 2018-12-29 2023-04-18 北京华为数字技术有限公司 Method and device for transmitting message
CN111163015A (en) * 2019-12-24 2020-05-15 北京百卓网络技术有限公司 Message sending method and device and convergence and diversion equipment
CN111163015B (en) * 2019-12-24 2023-05-09 北京百卓网络技术有限公司 Message sending method and device and convergence and distribution equipment
CN116016356A (en) * 2021-09-30 2023-04-25 迈普通信技术股份有限公司 Message processing method and device
CN115174486A (en) * 2022-06-01 2022-10-11 湖南天冠电子信息技术有限公司 Message transmission method, system and storage medium
CN115174486B (en) * 2022-06-01 2024-05-28 湖南天冠电子信息技术有限公司 Message transmission method, system and storage medium

Also Published As

Publication number Publication date
CN101272346B (en) 2010-12-08

Similar Documents

Publication Publication Date Title
CN101272346B (en) Method and device for packet flux monitoring
CN101227410A (en) Flow monitoring method and flow monitoring equipment
CN101616097B (en) Method and system for managing output port queue of network processor
CN100384157C (en) Method for multiplexing residual bandwidth and network equipment
EP2068511B1 (en) Controlling congestion in a packet switched data network
US8451730B2 (en) Apparatus and method for implementing multiple high speed switching fabrics in an ethernet ring topology
CN101789880B (en) Method for realizing uplink QoS (Quality of Service) based on IP access network and multi-service access gateway
CN100384156C (en) Method for multiplexing residual bandwidth and network equipment
CN104836743B (en) A kind of jamming control method and device
CN102056227A (en) Donor evolved node B, relay node and communication method thereof
EP2999168B1 (en) Collaboration method and system in a drni,distributed resilient network interconnect, system
CN101595679A (en) Realize the device and method of Flow Control on the MSTP equipment based on rate limit
CN102227137A (en) Network digital set top box and method for realizing multiple network access
CN102932272B (en) Message forwarding method based on uninterrupted and forwarding unit
CN105141637A (en) Transmission encryption method taking flows as granularity
KR102455886B1 (en) Service Feature Chaining Congestion Feedback
CN107659464A (en) A kind of router realizes the method and system of traffic monitoring
EP1704491B1 (en) A method and systems for resource bunlding in a communications network
CN101212467A (en) MPLS network service scheduling method
CN107749798A (en) Communications network system, diverter device and its method for accessing transmitted in both directions network
CN109995664A (en) A kind of method, apparatus and system sending data flow
CN101304380A (en) Traffic transmission method of elastic packet loop and elastic packet loop node
CN100550829C (en) By the monitoring link status port re-enabling
CN106411780A (en) Message control method and device
CN207083114U (en) A kind of data one-way transmission apparatus between two security domain networks

Legal Events

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

Granted publication date: 20101208

Termination date: 20160429