Background technology
Various protocol stacks such as ICP/IP protocol often wait and realize by processor such as POWER PC processor, fpga chip.As shown in Figure 1, processor can receive the various messages of automatic network, adopts allocated bandwidth to realize that device carries out the management and the distribution of bandwidth to the message that comes automatic network usually.The main cause of carrying out Bandwidth Management and distribution is:
1, the disposal ability of processor is limited;
2, prevent hacker attacks;
3, processor should distribute different bandwidth to various messages according to the importance rate of message.
Prior art generally realizes simple control to all from the message of network destined processor: within a certain period of time, set and allow the message amount passed through or the traffic threshold of bit number.That is: in a time period TimeLength, it is Threshold that the message flow thresholding that passes through is set.The size of Threshold is relevant with the ability of processor.In TimeLength, when the message flow that passes through when reality surpasses the Threshold that sets, the message that then abandons into; Otherwise allow message to pass through.The shortcoming of this method is:
1, do not have to treat with a certain discrimination according to the type of message of coming in from network;
2, when flow surpassed thresholding, important message also can be dropped;
3, can not prevent the big flow attacking of certain message effectively.
The another kind of processing method of prior art is on the basis of above-mentioned technology, increases the function of distinguishing type of message, and as shown in table 1 is the correspondence table of type of message and bandwidth thereof, and message is divided into the n class according to certain specification, and n is the integer greater than 1.Message for important provides more bandwidth, otherwise gives this message less bandwidth.Every class message in the time period, all has the bandwidth threshold of oneself at TimeLength, and thresholding is according to the importance of message and difference.The summation of each bandwidth threshold is the receptible maximum bandwidth of processor.When certain type message in the time, when actual flow surpasses thresholding, then abandons such message at TimeLength.And at this moment for other messages, if surpass corresponding thresholding, then can continue to pass through.
Table 1
Sequence number |
Type |
Bandwidth |
1 |
Class1 |
Thresholding 1 |
2 |
Type 2 |
Thresholding 2 |
…… |
…… |
…… |
n |
Type n |
Thresholding n |
|
|
Thresholding and be total bandwidth |
This method can be treated the dissimilar message of coming in from network with a certain discrimination, and the message that importance rate is high is given higher bandwidth, can resist the big flow malicious attack of certain message.But still there is following shortcoming in this method:
1, various messages can not shared bandwidth, causes bandwidth utilization low;
2, important message can not be seized the bandwidth of inessential message, can't accomplish that the high message of priority preferentially obtains bandwidth, does not embody the priority of messages treatment principle.
Summary of the invention
Technical problem to be solved by this invention is: it is low to overcome the prior art bandwidth availability ratio, the message that priority is high can't preferentially obtain the shortcoming of bandwidth, the allocation process method of bandwidth in a kind of communication network or buffer memory is provided, further improve bandwidth or buffer memory utilance, and make high message of priority or cell preferentially obtain bandwidth or buffer memory.
The present invention solves the problems of the technologies described above the technical scheme that is adopted to be:
The allocation process method of bandwidth in this communication network may further comprise the steps:
Various message/cells in the network are divided into important message/cell and general message/cell, to the maximum bandwidth thresholding in general message/cell setup certain hour, the minimum of important message/cell setup in the described time guaranteed bandwidth threshold, and the minimum of described important message/cell guarantees that the bandwidth threshold and the maximum bandwidth thresholding sum of general message/cell are interior total bandwidth of described time;
The flow of important message/cell surpasses the minimum assurance bandwidth threshold that sets in the described time, and when actual total flow surpasses described total bandwidth, important message/cell and other message/cell competition remaining bandwidth obtains remaining bandwidth earlier by the message that arrives first/cell.
Be further optimization, important message/cell is also set maximum bandwidth thresholding in the described time, the maximum bandwidth thresholding sum of all message/cells is greater than the total bandwidth in the described time; When minimum that the flow of important message/cell in the described time is setting guarantees between bandwidth threshold and the maximum bandwidth thresholding, and when actual total flow surpasses described total bandwidth, important message/cell and other message/cell competition remaining bandwidth, obtain remaining bandwidth earlier by the message that arrives first/cell, till the actual bandwidth of important message/cell arrives the maximum bandwidth thresholding.
Total bandwidth in the described certain hour is set according to the total flow of the receptible message/cell of processor, when the actual flow of all message/cells surpasses total bandwidth, new message/cell is abandoned.
Message/cell is divided into three major types: signaling message/cell, data message/cell and maintenance packet/cell; Signaling message/cell and maintenance packet/cell are important message/cells, and data message/cell is as general message/cell.
Message/the cell that comprises bandwidth fixed in described general message/cell, if the actual flow of this general message/cell does not reach the maximum bandwidth thresholding that it is set in the described time, and the flow of important message/cell surpasses that it is minimum when guaranteeing bandwidth threshold, and the remaining bandwidth that important message/cell is competed does not comprise the remaining bandwidth of the message/cell of described bandwidth fixed.
The allocation process method of buffer memory in corresponding a kind of communication network may further comprise the steps:
Various message/cells in the network are divided into important message/cell and general message/cell, to the largest buffered thresholding in general message/cell setup certain hour, the minimum of important message/cell setup in the described time guaranteed buffer threshold, and the minimum of described important message/cell guarantees that the buffer threshold and the largest buffered thresholding sum of general message/cell are interior total buffer memory of described time;
The flow of important message/cell surpasses the minimum assurance buffer threshold that sets in the described time, and when actual total flow surpasses described total buffer memory, important message/cell and other message/cell competition remaining cache obtains remaining cache earlier by the message that arrives first/cell.
Be further optimization, important message/cell is also set largest buffered thresholding in the described time, the largest buffered thresholding sum of all message/cells is greater than the total buffer memory in the described time; When minimum that the flow of important message/cell in the described time is setting guarantees between buffer threshold and the largest buffered thresholding, and when actual total flow surpasses described total buffer memory, important message/cell and other message/cell competition remaining cache, obtain remaining cache earlier by the message that arrives first/cell, till the real cache of important message/cell arrives the largest buffered thresholding.
Total buffer memory in the described certain hour is set according to the total flow of the receptible message/cell of processor, when the actual flow of all message/cells surpasses total buffer memory, new message/cell is abandoned.
Message/cell is divided into three major types: signaling message/cell, data message/cell and maintenance packet/cell; Signaling message/cell and maintenance packet/cell are important message/cells, and data message/cell is as general message/cell.
Comprise message/cell that buffer memory is fixing in described general message/cell, if the actual flow of this general message/cell does not reach the largest buffered thresholding that it is set in the described time, and the flow of important message/cell surpasses that it is minimum when guaranteeing buffer threshold, and the remaining cache that important message/cell is competed does not comprise the remaining cache of message/cell that described buffer memory is fixing.
Beneficial effect of the present invention is: the allocation process method that the invention provides bandwidth in a kind of communication network or buffer memory, make various messages or cell in certain scope, compete remaining bandwidth or the buffer memory of sharing, important message or cell are when surpassing the traffic threshold of oneself, can seize the bandwidth or the buffer memory of inessential message or cell, for remaining bandwidth or buffer memory, different messages or cell can be competed acquisition, and bandwidth or buffer memory distribute flexibly, and utilance improves.
The message or the cell that also can comprise bandwidth fixed in general message or the cell, if the actual flow of this message or cell does not reach its maximum bandwidth that sets or buffer threshold in the described time, it is minimum when guaranteeing bandwidth or buffer threshold and the flow of important message or cell surpasses, remaining bandwidth that important message or cell are competed or buffer memory can not comprise the message that described bandwidth/buffer memory is fixing or the remaining bandwidth/buffer memory of cell, further make the distribution of bandwidth or buffer memory more flexible.
The present invention has made full use of the ability of processor, and under the certain situation of processor ability, the big flow message or the cell that use this scheme can solve between processor and the network transmit, and have reduced packet loss.Simultaneously also can resist the big flow malicious attack of certain message or cell effectively, and make high message of priority or cell preferentially obtain bandwidth or buffer memory, embody the processed principle better.
Embodiment
With embodiment the present invention is described in further detail with reference to the accompanying drawings below:
The allocation process method of bandwidth in the communication network of the present invention, various messages in the network are divided into important message and general message, to the maximum bandwidth thresholding in the general message setting certain hour, the minimum that important message was set in the described time guarantees bandwidth threshold, important message is also set maximum bandwidth thresholding in the described time, and the minimum of important message guarantees that the maximum bandwidth thresholding sum of bandwidth threshold and general message is the total bandwidth in the described time; The maximum bandwidth thresholding sum of all messages is greater than the total bandwidth in the described time; When minimum that the flow of important message in the described time is setting guarantees between bandwidth threshold and the maximum bandwidth thresholding, and when actual total flow surpasses described total bandwidth, important message and other message competition remaining bandwidth, obtain remaining bandwidth earlier by the message that arrives first, till the actual bandwidth of important message arrives the maximum bandwidth thresholding.
Total bandwidth is set according to the total flow of the receptible message of processor, when the actual flow of all messages surpasses total bandwidth, with new packet loss.In real network, message can be divided into three major types: signaling message, data message and maintenance packet; Signaling message and maintenance packet are important messages, and data message is as general message.
Describe with instantiation below:
As shown in table 2, the message of coming in from network is divided into the n class according to certain rule, n is the integer greater than 1.Every class message is at TimeLength in the time period, the maximum bandwidth thresholding that oneself is all arranged, as the maximum bandwidth thresholding of setting the Type1 type message is MaxThreshold1, the maximum bandwidth thresholding of Type2 type message is Threshold2 ... total bandwidth is TotalBand, the thresholding of bandwidth is relevant with the importance rate of message, and the maximum bandwidth thresholding sum of all messages is greater than total bandwidth.Wherein, important message such as Type1 also are provided with the minimum bandwidth threshold that guarantees, the minimum of important message guarantees that the bandwidth threshold and the maximum bandwidth thresholding sum of general message are total bandwidth.
Table 2
Sequence number |
Type |
Bandwidth |
1 |
Type1 |
MaxThreshold1 |
2 |
Type2 |
Threshold2 |
…… |
…… |
…… |
n |
Typen |
Thresholdn |
Total bandwidth is |
|
TotalBand |
Be without loss of generality, suppose n=2, will be divided into 2 classes from the message of network destined processor, wherein a kind of is the important high message of grade, and another kind is the general message of importance, and the time period is defined as TimeLength.As shown in table 3:
Table 3
Sequence number |
Type |
Importance rate |
Bandwidth |
1 |
Type1 |
Important |
MaxThreshold1 |
2 |
Type2 |
Generally |
Threshold2 |
Total bandwidth is |
|
|
TotalBand |
Wherein:
TotalBand: be illustrated in TimeLength within the time, the flow metric that the receptible message of processor is total;
MaxThreshold1: be illustrated in TimeLength within the time, the message maximum stream flow metric of the receptible Type1 type of processor;
Threshold2: be illustrated in TimeLength within the time, the message maximum stream flow metric of the receptible Type2 type of processor;
The relation of above-mentioned parameter is:
MaxThreshold1+Threshold2>TotalBand
For the message of the high Type1 type of grade, it can seize the bandwidth of Type2 type message, and the amount of bandwidth of seizing is:
CompeteBand=MaxThreshold1+Threshold2-TotalBand
MaxThreshold1-CompeteBand is that the minimum of the Type1 type message that can guarantee guarantees bandwidth threshold.As shown in Figure 2, the bandwidth range of two kinds of messages is as follows:
Type1 message bandwidth range: [MaxThreshold1:MaxThreshold1-CompeteBand];
Type2 message bandwidth range: [Threshold2:Threshold2-CompeteBand].
The actual flow of definition of T ype1 message is Type1ActualBand; The actual flow of the message of definition of T ype2 type is Type2ActualBand.When Type1ActualBand surpasses MaxThreshold1-CompeteBand, and Type2ActualBand is during less than Threshold2, two kinds of messages of Type1 and Type2 are just competed remaining bandwidth: Threshold2-Type2ActualBand so, this time, who arrives first for two kinds of messages, who just obtains bandwidth, uses up up to remaining bandwidth, i.e. Type1ActualBand+Type2ActualBand=TotalBand.
Reach the minimum bandwidth of assurance when the actual flow of Type1 message, when being Type1ActualBand=MaxThreshold1-CompeteBand, if this moment, Type2 message actual flow reached max threshold Threshold2, be Type2ActualBand=Threshold2, remaining bandwidth is 0, and at this time the Type1 message is also just no longer seized the bandwidth of Type2 message.
Be illustrated in figure 3 as the process chart of the important message of the present invention, step is as follows:
1, calculates the actual flow of important message (Type1 message);
2, calculate the actual flow of general message (Type2 message);
3, ask all types message actual flow and;
4, judge the actual flow of all types message and whether surpass total bandwidth, if, if not, then enter next step then with new packet loss;
5, whether the flow of judging important message is greater than its minimum bandwidth threshold (being the poor of maximum bandwidth thresholding and preemptible bandwidth) that guarantees, if not, then current message obtains bandwidth; If then enter next step;
6, whether the actual flow of judging general message reaches its maximum bandwidth thresholding, or not, then current message obtains bandwidth; If, then with new packet loss.
Be illustrated in figure 4 as the process chart of the general message of the present invention, step is as follows:
1, calculates the actual flow of important message (Type1 message);
2, calculate the actual flow of general message (Type2 message);
3, ask all types message actual flow and;
4, judge the actual flow of all types message and whether surpass total bandwidth, if, if not, then enter next step then with new packet loss;
5, whether the actual flow of judging general message reaches its maximum bandwidth thresholding, or not, then current message obtains bandwidth; If, then with new packet loss.
The present invention has made full use of the ability of processor, under the certain situation of processor ability, uses this scheme can solve big flow message transmissions between processor and the network, has reduced packet loss.The present invention has improved bandwidth availability ratio simultaneously, the bandwidth threshold sum that can dispose each type message in the bandwidth setting is greater than total bandwidth, important message can be seized the bandwidth of inessential message, for remaining bandwidth, different messages can be competed acquisition, allocated bandwidth is flexible, the big flow malicious attack that also can resist certain message effectively simultaneously.
The message that also can comprise bandwidth fixed in the general message of the present invention, if the actual flow of this message does not reach the maximum bandwidth thresholding that it is set in the described time, and the flow of important message surpasses that it is minimum when guaranteeing bandwidth threshold, and the remaining bandwidth that important message is competed does not comprise the remaining bandwidth of the message of described bandwidth fixed.For example the present invention can be divided into the n kind to message, and n is the integer greater than 1.Wherein can be divided into the importance message of several grades and the unessential message of several grades.For n kind message, can mark off several messages, their bandwidth fixed do not go to seize the bandwidth of other messages, do not allow other messages seize its bandwidth yet.
Owing to need carry out buffer memory to message equally in the network, and then scheduling.The present invention goes for the allocation process to buffer memory in the network equally, to the largest buffered in the general message setting certain hour, the minimum that important message was set in the described time guarantees buffer memory, important message is also set largest buffered in the described time, and the minimum of important message guarantees that the largest buffered sum of buffer memory and general message is the total buffer memory in the described time; The largest buffered sum of all messages is greater than the total buffer memory in the described time; When minimum that the flow of important message in the described time is setting guarantees between buffer memory and the largest buffered, and when actual total flow surpasses described total buffer memory, important message and other message competition remaining cache, obtain remaining cache earlier by the message that arrives first, up to the real cache of important message till the largest buffered.
The message of the present invention in being applied in IP network, go for the cell in the atm network equally, be used for the cell of different PVC (permanent virtual circuit) is carried out allocated bandwidth or buffer memory distribution.When realizing, identical with the implementation method of above-mentioned message, various cells in the network are divided into important cell and general cell, to the maximum bandwidth thresholding in the general cell setup certain hour, the minimum of important cell setup in the described time guaranteed bandwidth threshold, and the minimum of described important cell guarantees that the bandwidth threshold and the maximum bandwidth thresholding sum of general cell are interior total bandwidth of described time; The flow of important cell surpasses the minimum set and guarantees bandwidth threshold in the described time, and actual total flow is when surpassing described total bandwidth, and important cell and other cell competition remaining bandwidth are by the cell that arrives first acquisition remaining bandwidth earlier.
Important cell is also set maximum bandwidth thresholding in the described time, and the maximum bandwidth thresholding sum of all cells is greater than the total bandwidth in the described time; When minimum that the flow of important cell in the described time is setting guarantees between bandwidth threshold and the maximum bandwidth thresholding, and when actual total flow surpasses described total bandwidth, important cell and other cell competition remaining bandwidth, obtain remaining bandwidth earlier by the cell that arrives first, till the actual bandwidth of important cell arrives the maximum bandwidth thresholding.
Total bandwidth in the described certain hour is set according to the total flow of the receptible cell of processor.Cell can be divided into three major types: signaling cell, cell of data and maintenance cell; Signaling cell and maintenance cell are important cells, and cell of data is as general cell.The cell that can comprise bandwidth fixed in the general cell equally, if the actual flow of this cell does not reach the maximum bandwidth thresholding that it is set in the described time, and the flow of important cell surpasses that it is minimum when guaranteeing bandwidth threshold, and the remaining bandwidth that important cell is competed does not comprise the remaining bandwidth of bandwidth fixed cell.
The method of cell being carried out the buffer memory allocation process repeats no more with above-mentioned that message is carried out the method for buffer memory allocation process is identical herein.Those skilled in the art do not break away from essence of the present invention and spirit, can there be the various deformation scheme to realize the present invention, the above only is the preferable feasible embodiment of the present invention, be not so limit to interest field of the present invention, the equivalence that all utilizations specification of the present invention and accompanying drawing content are done changes, and all is contained within the interest field of the present invention.