A METHOD AND A DEVICE FOR MONITORING CHANNEL SPLIT DATA PACKET TRANSMISSION

Abstract: The transfer of data packets are monitored in a line having various logical channels. For each logical channel (i) there is a count value (Li) and at the arrival of a data packet or in each time slot, when the transmission on said line is time multiplexed, i.e. for each time, when a packet could have arrived in a time multiplexed system, only said count value (Lm) for a single channel (m) is decremented. Then it is determined whether said received data paket, if there is one, is to be forwarded or is to be lost, by the comparison of a calculated value (Fn) to a threshold value (Tn) belonging to the channel (n), to which said packet belongs. In the calculation of said discrimination value (Fn) the number of those channels is used, which have not been decremented after decrementing the channel (n), to which the received packet belongs. In this way the calculated value (Fn) can be made to resemble the calculated value or level value, which is used in prior methods for handling loss of packets in a network. For each received packet this methods requires only a decrementing of one count value (Ln), implying a significant saving of time and a simplification of the circuits used for carying out the method.

Description: me o an a ev ce or on or ng anne p Data Packet Transmission FIELD OF THE INVENTION The present invention is related to a method and a device for monitoring the flow of data packets on a transmission line having several channels and in particular for prohibiting that data packets for each channel are transmitted with an intensity, which is too high and not allowed, what could also be expressed in the way that for time divided data packet traffic having several channels on a line the band width for each channel should always be preserved and not be exceeded. PRIOR ART Leaky Bucket (LB) is a prior art method for monitoring the band width for an incoming stream of data packets or cells, which for instance are forwarded in a network of the ATM type (Asynchronous Transfer Mode) , and it is described in the US patent 5,014, 260 claiming convention priority from the Swedish patent application SE 8803875-7 with publication number 462360, said documents being incorporated as references herein. Other prior art relevant to the invention appears from the patent documents EP-A1-0 381 275, EP-A1-0 275 678, WO-A1- 90/05416, US-A-4 896 316, US-A-4 993 024, EP-A1-0 310 173, EP- Al-0 387 958, EP-A2-0 384 758, EP-A1-0 383 660. In the prior algorithm counters are provided for each channel. All these counters are decreased regularly in time with a value, which is predetermined for each channel. When a data packet arrives, the identity or number of the channel is determined, to which the packet belongs, and then the counter value of this channel is checked or inspected. If the counter value is larger than a threshold value, which is predetermined for said channel, the data packet is discarded or lost and is thus not forwarded on the transmission line. Otherwise the counter value for this channel is incremented with a value particular for said channel and the data packet is forwarded on the transmission line. By means of this prior process one parameter for the channel rate or band width can be monitored, e.g. the peak rate or the mean rate. With a small threshold value the peak rate may be monitored and with a larger threshold value an upper limit of the mean rate may be monitored. By combining two processes of this kind, providing a so called Dual Leaky Bucket, the peak and mean rate for a channel can be monitored. If any one of the respective threshold values is exceeded, the present data packet is discarded or lost. In this prior method the whole process is performed in real time without any buffering of several data packets taking place. Instead there is only one register or memory unit containing one data packet each time. When the data packet has arrived to this register, it is immediately decided by the comparison described above, if the data packet is to be forwarded. When the number of channels being used on the transmission line is large, there may be difficulties of having time for the various calculations which are required in the above method. Particularly time consuming is the step of decrementing, in certain short time intervals, the count values for the various channels by a decrement value depending on each channel. If the number of channels for instance is so large as several hundreds, it may be impossible to have time for all these calculations. A possibility would then be to provide individual counter circuits for each channel, i.e. one hardware counter for each channel. For cost reasons this solution may be impossible. SUMMARY OF THE INVENTION In order to obviate the problem indicated above a method and a device are proposed according to the invention, the characteristics of which appear from the appended claims. Thus there is, like the prior art, a count value for each channel on the transmission line. On each occasion, when otherwise all these count values should be decremented, only a small portion is decremented, preferably a small number of such count values, e.g. only one value. The decrementing of the count values of the channels is performed in such a way, that said decrementing will pass the channels cyclically. Suitably there is stored in a memory unit, information identifying the channel, for which this value was latest changed. When a data packet arrives, instead a new value is calculated, the size of which corresponds to the count value which exists in the known method. This calculated value is then compared to a threshold value for the channel, in which the packet is transferred, and if the calculated value is larger than said threshold value, the data packet may be discarded and thus need not be forwarded. Otherwise the packet is always forwarded and then also said count value for the channel thereof is modified. In certain cases a packet may be forwarded, for instance if the transmission activity is small on the line, even if the packet should have been discarded according to the comparison above. In such cases a flag may be set in a signal field of the packet having the meaning that the packet can be lost or discarded. In the following only the case is treated where the packet is discarded directly, but it is understood, that the invention equally well can be used for the case where only some indication is set that the packet is allowed to be discarded or has a lower priority than other packets belonging to the same channel. For instance a loss priority flag may be set or changed in the header of the data packet, said flag indicating that the packet has a low loss priority and can be lost or discarded before other packets having a larger loss priority, when the transmission load is high somewhere in the network. BRIEF DESCRIPTION OF THE DRAWINGS The invention will now be described with reference to the accompanying drawings, on which - Fig. 1 schematically shows where a device according to the invention may be located, - Fig. 2 schematically shows a device for carrying out the invention, - Figures 3 and 4 schematically show two calculating steps according to the invention, - Figures 5 - 7 show an example made for a certain channel in the method according to the invention, where the latter two Figures show the variation of the count value and the variation of the calculated value respectively. BEST MODE OF CARRYING OUT THE INVENTION In Fig. 1 is schematically shown how a number of data packets, the channel numbers of which are indicated in the drawing symbols of the data packets, arrive to a device 1 according to the invention. In the device according to the invention certain data packets or cells are discarded (lost) or marked, as is illustrated for the packet having the channel number n in the Figure. The mark indicates, that the packet can be discarded. The device according to the invention has the purpose of prohibiting that a data network is overloaded, for instance in particular that a switch unit 3 is flooded by arriving cells. In Fig. 2 is illustrated in more detail how the device according to the invention is constructed and operates. For a transmission line 5 a buffer memory or register 7 is provided, which can contain maximally one data packet or one cell. When a data packet arrives to the buffer 7, information is fetched from said packet comprising the channel number n of the packet. This channel number n is then processed by logical circuits 9 in a monitoring unit 11. When a data packet arrives to the buffer 7 , thus a calculation loop is started inside these logical circuits 9. The monitoring unit 11 also contains several memories or registers for various items used by the logical circuits 9. In these memories or registers thus can be found the stored number n of the channel of the present data packet and a channel number m indicating the number of a channel, the first count value 1^ of which was latest changed. Further, information is provided on the total number (M) of channels, which the monitoring unit 11 is capable of treating. For each channel also a threshold value T^ is recorded, a modification value or step value D^, an increment or addition value 1^, and the count value or the first value L^. i here means the channel number and runs from 1 up to and including M. The parameters T^, D^, and 1^ are individual or particular for each channel in the general case. When a data packet arrives to the buffer 7, a signal thereof and information on the channel number n of the packet are sent to the logical circuits 9. These circuits then start the following calculation sequence. In the block 13 a value F n for the channel is calculated. This value depends on the channel number and also on the number of channels, which are left and the values of which are to be changed in steps until the value for exactly this channel shall be changed or decremented. This calculated value F n is then compared in the block 15 to a threshold value T n for the channel n and if the threshold value is smaller than this calculated value F n , the packet is discarded and a suitable signal is in the block 16 sent to the buffer 7, this signal having the meaning, that the buffer shall not forward the packet. If the comparison in the block 15 instead receives the answer NO, the packet is accepted and is to be forwarded and in the block 17 a signal thereof is sent to the buffer 7. Then the count value L n for this channel is changed in the block 19. The transmission of packets on the line 5 is supposed to be regularly divided in time in such a way, that packets are sent or arrive on fixed, regularly repeated times or in the corresponding periods between said times, that the transmission takes always place in definite time slots. The time period between these repeated times can also be termed a cell time or cell period. With a small load on the network packets do not arrive in each time slot. Further, for each time slot or cell period, in the block 21 the value of a variable m is changed, this variable indicating the number of that channel, for which the count value 1^ was latest decremented. The change can be performed for instance by incrementing m by one. When this is performed for this next channel in turn having number m, the first count value 1^ belonging thereto is modified in the block 23. When these steps have been performed, the process will await the beginning of the next cell period. For a full load on the line 5 this condition is the same as the arrival of a new data packet to the buffer 7. In Fig. 3 is illustrated in detail the calculation of F n in the block 13. In a block 25 the present number m, which indicates the number of the channel, the count value 1^ of which was latest changed, is thus compared to the channel number n of the received data packet and if this latter value n is less than or equal to the number m, in the block 27 F n is calculated as L n - D n * (m - n) . If instead the comparison receives the result NO, in the block 29 the calculation of F n is performed by means of the expression L n - D n * (M + m - n) . These two cases are necessary, since the channel number m for the channel, for which the count value has been latest decremented, for instance cyclically runs through the values 0, 1, 2, ..., M - 1. The expression inside the brackets in the blocks 27 and 29 will thereby indicate the number of channels, the count values of which remain to be decremented, before the count value of the channel having the number n belonging to the present cell is to be decremented. In Fig. 4 is illustrated in detail how the change of the count value L JJ in block 19 is performed. Here first in a block 31 it is compared, if the calculated value F n is larger than or equal to zero. If the answer from the comparison is YES, in the block 33 the count value L n is decremented with the step I n , which is stored in the monitoring unit 11. If the answer from the comparison is NO, in a block 35 the channel number m for the channel, the count value 1^ of which has been latest decremented, is compared to the channel number n of the present cell. If the former channel number m is larger than the channel number of the present cell n, the block 37 is performed, where a new count value is provided by the expression I n + D n * (m - n) , while in the opposite case the count value is given the value I n + D n * (M + m - n) in the block 39. In the latter case, when the calculated value F n thus is smaller than zero, the new values of the count value n are set in such a way, that a new value F n calculated by means of theses values is given the value zero. Below is given, formulated in pseudo code, the process which is performed each time, when a data packet arrives to the monitoring unit 3. Process begin repeat wait(Δt) if(cell arrived) begin if m >= n then F n := L n " D n*( ffi ' n ) ' The real level valu else for channel n is F n := L n - D n *(M + m - n); interpolated. if F n >= 0 then If F n < T n the cell if T n - F n >= 0 then will be accepted begin and the level value L n := L n + V is increased by the "Accept cell" value I n . end else "Discard cell" else : If F n < 0, some begin : error is present, if m >= n then : since the real leve L n := ∑ n + D n*< m " n > ' : value cannot be else : below zero. L n is L n := I n + D n *(M + m - : given a value which n); : causes that F n is "Accept cell" : given the value end : zero. end := (m + l) MOD M; : The variable m take I* : - 1^ - M*D m ; : care of the channel if LJJJ < 0 then : which is to be _ : = ° ; : decremented, m is forever : incremented in the end : channel number : order. EXAMPLE The difference between the count value 1^ and the calculated level value F n for a channel will be elucidated with an example illustrated in Figures 5 - 7. We will consider that 10 cells arrive sequentially all having the same channel number, say channel number 1, followed by 10 cells having some other channel number and thereafter further 12 cells all having the channel number 1, as appears from Fig. 5. Figures 6 and 7 show how the count value L^, which also can be termed the fictive level value, and the calculated or "real" level value F n respectively will vary, if the input signal on the line 5 is such as shown in Fig. 5. The numbers in the drawings are calculated for the following values of the variables belonging to channel 1: - M: The number of channels, which can be monitored by the device, is set to 32. In real cases the number of channels, which can be monitored by the device, will be significantly larger. - D^i The channel dependant decrement value D-^ for channel 1 is set to 19663. - 1^ The increment value 1^ is set to 28600. - ^z The threshold value is set to a very high value. The following process will then be obtained and is first illustrated in Fig. 6, showing the variation of the count value L χ , when cells arrive. The states are numbered with the channel number m for the count value L n which has been latest decreased: - m = 1, 2, ... 10: Since the threshold value T^ is very large, all of the 10 first cells will be accepted. The level count I_-L is increased by the value 1^ for each cell, which has the channel number 1 and which is accepted. After the first 10 cells have arrived, L χ has thus obtained the value 10'^ (=286000). - m = 11, 12, ..., 20: The following 10 cells have not channel number 1 and thus L 1 is not influenced. - m = 21, 22, " ..., 31, 0: When the first cell having channel number 1 arrives (m = 21) , it is discovered that the real level value F ]^ is smaller than zero (see Fig. 7) . In order to correct it in such a way, that this value F^ ^ actually will indicate a value, which corresponds to the level value in the known algorithm, L-^ is given a value (I j _ + (m - n) ' - ^) , which makes the real level value F equal to zero. After that L χ is increased by 1-^ for each cell, which arrives and has channel number 1. When the variable m again takes the value 1, channel 1, is decremented by the value VI' D^. - m = 1: When m = 1, the count value L^ ^ of channel 1 is to be decremented by M*D 1 . In Fig. 7 is shown the variation of the real or the calculated level value F 1 plotted against the number of arrived cells. The process is as follows: - m = l, 2, ..., 10: The first 10 cells are accepted by the process. For each accepted cell a value 1^ is added to L-^. At the same time the variable m is increased by one, which results in F- j^ being decreased by D^ ^ for each arriving cell. - m = 11, 12, ..., 20: These cells have not channel number 1 and thus L-L is not influenced. Instead F- is continuously decreased by the leakage value D^ - m = 21, 22, ..., 31, 0: When the first cell having channel number 1 arrives, the real value F^ is calculated. Then it is discovered, that F^ ^ has a value smaller than zero (= -107260) . By giving L^ the value I 1 + (m - n) 'D- j^ F.^ is given the value zero. - m = 1: When m = 1 L.^ is decremented by 'D^ This gives F.^ = i .

Claims: CLAIMS 1. A method for prohibiting that on any of a number (M) of channels on a common transmission line data packets are sent in an intensity, which is larger than a value predetermined for said channel, characterized in that to each channel (i) belongs a first value (L^) and a second predetermined value (T^ , that for regular first time periods (Δt) at least one of the said first values (L^) or a portion of said first values (L^) are changed in a first direction, for instance increased, for each first time interval (Δt) , each such change being performed by a first predetermined step (M*D^) and in such a way, that these changes are performed, for successive time periods, in a cyclic order for the first values (L^) of all channels, and that for each arrived data packet it is determined, to which channel (n) said packet belongs, and a third value (F n ) is calculated based on the first value (L R ) for this channel and also based on the number of data packets, which have arrived on the transmission line after the first value for this channel was latest changed, or if the transmission on the line is time divided in regular second time periods, in such a way, that the transmission of packets always are performed during such a second time period, also based on the number of said second time periods, which have elapsed, after the first value for this channel was latest changed, whereafter said calculated third value (F n ) is compared to the second predetermined value (T n ) for the channel and depending on the result of said comparison, one of the following steps is performed - the data packet is discarded or marked in order to possibly be discarded, if further conditions are fulfilled, or - the data packet is preserved and is forwarded. 2. A process according to claim l, characterized in that the first regular time intervals (Δt) are the time intervals, when data packets arrive sequentially on the transmission line in such a way, that the change by the first predetermined step (M'D^ is performed for each arrival of a data packet on the transmission line, or the first regular time periods are the same as the second regular time intervals. 3. A process according to claim 1, characterized in that in the calculation of the third value (F n ) for a channel n it is given a value, which is a change of the first value (L n ) of said channel in a second direction, which is opposite to the first direction and for instance is a decrease. 4. A process according to claim 1, characterized in that the predetermined first step (M*D m ) for the change of the first value (L JJJ ) for a channel (m) is individual for each channel (m) . 5. A process according to claim 1, characterized in that for each second time interval the first value (L n ) is changed for only one channel (m) each time by the predetermined first step and that as the predetermined first step (M*D m ) for the change of the first value (L j ,) for a channel (m) the product is calculated of the number (M) of channels and a fourth predetermined value (D m ) , which can be individual for each channel (m) . 6. A process according to claim 1, characterized in that when a change of a first value (L^) by the predetermined first step (M * D^) should have caused, that this first value (L^) would have changed its sign, said first value (L j^ ) is set equal to zero in such a way, that all said first values (L^) always have the same sign and/or are equal to zero. 7. A process according to claim l, characterized in that in the calculation of the third value (F j^ ) also a fourth predetermined value (D^) is used, which may be individual for each channel. 8. A process according to claim 1, characterized in that the third value (F n ) for a channel (n) is calculated as the difference between or the sum of the first value (L n ) for this channel and the predetermined function of the number of data packets, which have arrived on the transmission line, after the first value (1^) for this channel n was latest changed, or the number of second time intervals respectively, which has elapsed, after the first value (1^) for this channel (n) was latest changed. 9. A process according to claim 8, characterized in that the predetermined function is the product of a fourth predetermined value (D n ) , which may be individual for this channel (n) . 10. A process according to claim 1, characterized in that in the cases when a data packet belonging to a channel (n) is preserved, the first value (1^) is changed for this channel by a second predetermined step (I n ) , which may be individual for this channel (n) . 11. A process according to claim 10, characterized in that the first predetermined step (M*D n ) and the second predetermined step (I n ) have different signs. 12. A process according to claim 1, characterized in that when, in the calculation of the third value (F n ) for a channel (n) a value is obtained, which is given an opposite sign compared to the sign of the first value (L n ) for this channel, the first value (L n ) for this channel is changed in such a way, that in a new calculation of the third value (F n ) by means of this modified first value (L n ) the third value (F n ) is given a value equal to zero. 13. A device for prohibiting that on any of a number (M) of channels on a common transmission line data packets are sent in a larger intensity than a value predetermined for said channel, characterized in that for each channel means are provided for storing a first value (L^) and for storing a second predetermined value (T^) , that control circuits comprising changing means are provided for changing, in regular first time intervals (Δt) and in a first direction, for instance in an increasing direction, at least one of said first values (L^) or a portion of said first values (L^) , the changing means being arranged to perform at each first time interval (Δt) each change with a first predetermined step (M'D^) and to perform these changes in a cyclic order for all said first values (L^) , and that the control circuits further are arranged to decide for each arrived data package the channel (n) , to which said packet belongs, and that the control circuits further comprise calculating means for calculation of a third value (F n ) based on the first value (L n ) for this channel and also based on the number of data packets, which have arrived on the transmission line, after the first value for this channel was latest changed, or, if the transmission on said line is time divided in regular second time intervals in such a way, that the transmission of packets is always performed during such a second time interval, also based on the number of second time intervals which have elapsed, after the first value for this channel was latest changed, said control circuits further comprising comparison means to compare the calculated third value (F n ) to the second predetermined value (T n ) for the channel and that said control circuits comprise means arranged to perform, depending on the result of the comparison, one of the following steps - that said data packet is discarded or marked in order to be possibly discarded, if further conditions are satisfied, or - that the data packet is preserved and is forwarded. 14. A device according to claim 13, characterized in that the changing means are arranged to use as the regular first time intervals (Δt) those times, when data packets arrive sequentially on the transmission line in such a way, that the change by the first predetermined step (M*D^) is performed for each arrival of a data packet on the transmission line, or to use as the first regular time intervals (Δt) the second regular time intervals, respectively. 15. A device according to claim 13, characterized in that said calculating means are arranged, in the calculation of the third value (F„) , to give it a value as a change of the corresponding first value (1^) in a second direction, which is opposite to the first direction, for instance a decrease. 16. A device according to claim 13, characterized in that storing means are arranged for storing for each channel (m) a predetermined first step (M*D m ) for the change of the first value (L j n). 17. A device according to claim 13, characterized in that said changing means are arranged to change, at the first time intervals, the first value (1^) for only one channel (m) at each time by the predetermined first step and that the changing means further are arranged in such a way, that the predetermined first step for the change of the first value (1^) for a channel (m) is the product of the number (M) of channels and a fourth predetermined value (D m ) , which is stored in storing means for each channel (m) . 18. A device according to claim 13, characterized in that said changing means are arranged in such a way, that when a change of a first value (1^) by this predetermined first step (M*D m ) would have caused, that this first value (1^) would have changed its sign, this first value (1^) is set equal to zero in such a way, that the first values (1^) always have the same sign and/or are equal to zero. 19. A device according to claim 13, characterized in that said calculating means are arranged to use, in the calculation of the third value (F n ) , also a fourth predetermined value (D n ) , which for each channel (n) is stored in storing means. 20. A device according to claim 13, characterized in that said calculating means are arranged to calculate the third value (F n ) for a channel (n) as the difference between or the sum of the first value (1^) for this channel and a predetermined function of the number of data packets, which have arrived on the transmission line, after the first value (L n ) for this channel (n) was latest changed, or the number of second time intervals respectively, which have elapsed, after the first value (L n ) for this channel (n) was latest changed. 21. A device according to claim 20, characterized in that said calculating means are arranged to use, as the predetermined » function, the product of a fourth predetermined value (D n ) stored in storing means for this channel (n) . 22. A device according to claim 13, characterized in that said control circuits further contain changing means to change, in those cases when a data packet belonging to a channel (n) is preserved, the first value (L n ) for this channel by a second predetermined step (I n ) , which is stored in a storing means. 23. A device according to claim 22, characterized in that the first predetermined step (M * D n ) and the second predetermined step (I n ) have different signs. 24. A device according to claim 13, characterized in that when in the calculation of the third value (F n ) a value is obtained, which is given an opposite sign compared to the sign of the first value, said first value (L n ) is changed for this channel in such a way, that in a new calculation of the third value (F n ) by means of this modified first value (L n ) the third value (F n ) is given a value equal to zero.

Inventors: LARSSON LEIF MIKAEL, SAELLBERG HANS KRISTER MIKAEL, LARSSON, LEIF, MIKAEL, SAELLBERG, HANS, KRISTER, MIKAEL
Applicants: ERICSSON TELEFON AB L M, TELEFONAKTIEBOLAGET LM ERICSSON
Application year: 1993
Main classification: H04L12
IPC codes: H04L12, H04Q11