Method and system to measure data packet jitter

A first data packet is sent through a system under measurement (SUM) from a sender side to a receiver side. A time distance d between the first data packet and a second data packet consecutive thereto in a packet flow is observed on the sender side. A value of d is written into a payload of the second data packet. The second data packet is sent through the SUM. The first data packet and the second data packet are received on the receiver side. A time difference D between the first data packet and the second data packet is observed on the receiver side. The value of d is extracted, at the receiver side, from the payload of the second data packet. The jitter is determined based on the value of d extracted from the payload of the second data packet and the value of the time difference D.

FIELD OF THE INVENTION

The present disclosure relates to methods and systems for measuring data packet jitter.

DESCRIPTION OF THE RELATED ART

Jitter is an important performance indicator of network devices or network implementation. However, many current test equipment networks and test equipment vendors do not provide jitter measurement functionality in their equipment.

DETAILED DESCRIPTION OF THE DRAWINGS

Disclosed herein are embodiments of a method to measure packet delay jitter in data networks. The method works with same-size and variable-size packet flows. Methods of dealing with packet loss and packet out-of-sequence scenarios are also disclosed herein.

FIG. 1is a block diagram of an embodiment of a system to measure packet delay jitter. The system comprises a sender10which transmits a flow of data packets to a receiver12through a system under measurement (SUM)14. The SUM may comprise a single network device, such as a router from Cisco Systems, Inc., or multiple network devices such as a network implemented therewith. The sender10may comprise a device separate from the SUM14, or may be part of the SUM14such as an interface of the SUM14. Similarly, the receiver12may comprise a device separate from the SUM14, or may be part of the SUM14such as another interface of the SUM14.

The data packets in the flow are ordered by an index i such that the first packet is indicated by i=1, the second packet is indicated by i=2, the third packet is indicated by i=3, and so on. In general, the index is ordered such that a packet(i+1)(indicated by reference numeral16) is transmitted after a packeti(indicated by reference numeral20) and is consecutive to the packeti20in the packet flow.

A time difference diis defined as a distance in time between the packeti20and the packet(i+1)16as observed by the sender10side of the SUM14. A time difference Diis defined as a distance in time between the packeti20and the packet(i+1)16as observed by the receiver12side of the SUM14. By definition, the jitter Jibetween the packeti20and the packet(i+1)16in this flow, which is introduced by the SUM14, is Ji=|Di−di|.

The receiver12comprises a memory22which is to store packet sequence numbers, divalues, first-bit-receiving timestamps, last-bit-receiving timestamps and packet state values for up to n previously-received packets. In one embodiment, the memory22stores the last n packet sequence numbers, divalues, first-bit-receiving timestamps, last-bit-receiving timestamps and packet state values in a fixed-length, first-in first-out (FIFO) queue. The value of n can be determined based on the upper limits of jitter of the SUM14.

Embodiments of methods to measure the packet data jitter are described with reference toFIG. 2, which is a flow chart of an embodiment of a method performed by the sender10, andFIG. 3, which is a flow chart of an embodiment of a method performed by the receiver12.

As indicated by block25, the method comprises sending a first packet in the packet flow, namely packet1, through the SUM14from the sender10side to the receiver12side.

The remainder of the method inFIG. 2is illustrated for a general value i of the index, and thus is initially performed for a starting index value of 1 (block26), and repeated as i is incremented (block28) for each subsequent packet in the packet flow. The method can be used to measure packet jitter in data flows including, but not limited to, Internet Protocol (IP) packet flows and MultiProtocol Label Switching (MPLS) packet flows.

As indicated by block30, the method comprises writing a value of the time difference diinto a payload of the packet(i+1)16at a fixed offset. The act of writing is performed at the sender10side of the SUM14. To enable a measurement of jitter in the case of packet fragmentation (i.e. the SUM14breaks the packet(i+1)16into a plurality of smaller packets), multiple copies of the divalue may be written into the payload of the packet(i+1)16at multiple offsets.

As indicated by block40, the method comprises sending the packet(i+1)16through the SUM14from the sender10side to the receiver12side.

The index i is incremented in block28, and flow of the method is directed back to block30to process a subsequent packet.

Referring now toFIG. 3, the method comprises receiving a packet at the receiver12, as indicated by block42. Without loss of generality, consider the packet(i+1)16being received in this act. The packet(i+1)16may be received either in sequence (i.e. the packeti20was the most recent packet received before receiving the packet(i+1)16), out-of-sequence (i.e. the SUM14causes the packet20not to be the most recent packet received before receiving the packet(i+1)16), or in fragments (i.e. the SUM14breaks the packet(i+1)16into a plurality of smaller packets). The following acts of processing the received packets is adaptive to handle out-of-sequence packets and packet loss.

As indicated by blocks44and46, if the index i is equal to zero, which is the case when the packet1is received in block42, then data associated with the packet1is stored in the queue. The data comprises a value of 1 associated with a packet sequence number, a value of zero associated with a sending time difference d because there is no value of d associated with the packet1, a first-bit-receiving timestamp1, a last-bit-receiving timestamp1, and a state value R.

As indicated by block50, the method comprises determining if a packet immediately prior to the currently-received packet in the sequence has already been received. Since the currently-received packet is the packet(i+1)16, it is determined whether or not the packeti20has already been received. In one embodiment, this act comprises determining if the sequence number immediately prior to the sequence number (i+1), which is sequence number i, is stored in the queue.

If a match on sequence number i is found in the queue, the receiver12performs an act of determining a time difference Dibetween receiving the current packet and the packet sent immediately prior thereto, as indicated by block52. Since the current packet is the packet(i+1)16, the time difference Dibetween receiving the packeti20and the packet(i+1)16is determined. The time difference Diis the difference between the first-bit-receiving timestamp of the packet(i+1)16and the last-bit-receiving timestamp of the packeti20. The last-bit-receiving timestamp corresponding to the packeti20is retrieved from the queue.

As indicated by block54, the method comprises the receiver12extracting the d value from the payload of the current packet. Since the current packet is the packet(i+1)16, the Divalue is retrieved from the payload of the packet(i+1)16. If the packet(i+1)16has been fragmented by the SUM14, one of the multiple copies of the divalue that exist in the fragment may be extracted by the receiver12.

As indicated by block56, the method comprises determining the jitter J based on a difference between D and d, e.g. J=|D−d|. Since the current packet is the packet(i+1)16, the jitter Jiis determined based on a difference between Diand di, e.g. Ji=|Di−di|. In this way, the jitter Jiis determined at the receiver12side of the SUM14based on the value of Dias measured by the receiver12and the value of Dias separately measured by the sender10. Beneficially, the measurement of jitter Jican be determined regardless of whether the size of packets20is the same as or differs from the size of the packet(i+1)16.

As indicated by block60, the method comprises updating queue data for the packeti20. This act comprises setting a stateito a value of L if the original stateihas a value of N. This act also comprises deleting, from the queue, the data for the packet sent immediately prior to the current packet if the original state of the immediately prior packet has a value of R. Since the current packet is the packet(i+1)16, the packeti20is deleted from the queue if original statei=R.

As indicated by block62, the method comprises determining if a packet immediately after the currently-received packet in the sequence has already been received. Since the currently-received packet is the packet(i+1)16, it is determined whether or not the packet(i+2)has already been received. In one embodiment, this act comprises determining if the sequence number immediately after the sequence number (i+1), which is sequence number (i+2), is stored in the queue.

If a match on sequence number i+2 is found in the queue, the receiver12performs an act of determining a time difference D between receiving the current packet and the packet sent immediately after, as indicated by block64. Since the current packet is the packet(i+1)16, the time difference Di+1between receiving the packet(i+1)16and the packet(i+2)is determined. The time difference Di+1is the difference between the first-bit-receiving timestamp of the packet(i+2)and the last-bit-receiving timestamp of the packet(i+1)16. The first-bit-receiving timestamp corresponding to the packet(i+2)is retrieved from the queue.

As indicated by block66, the method comprises the receiver12retrieving the d(i+1)value from queue data for the packet(i+2).

As indicated by block70, the method comprises determining the jitter Ji+1based on a difference between Di+1and di+1, e.g. Ji+1=|Di+1−di+1|.

As indicated by block72, the method comprises updating queue data for the packet(i+2). This act comprises setting a statei+2to a value of R if its original statei+2has a value of N. This act also comprises deleting, from the queue, the data for the packet(i+2)if its original statei+2has a value of L.

As indicated by block74, a value of a statei+1is set for the packet(i+1). It is noted that an alternative flow path to this act occurs if a match on sequence number i+2 was not found in the queue in block62.

The statei+1is set to R if the packetihas been received but the packet(i+2)has not been received. The statei+1is set to L if the packet(i+2)has been received but the packets has not been received. The statei+1is set to N if neither the packetinor the packet(i+2)have been received. The statei+1is set to B if both the packets and the packet(i+2)have been received.

As those having ordinary skill will appreciate, any four different values can be used to indicate four different states, which in the herein-disclosed implementation are indicated by values of R, L, N or B.

As indicated by blocks76and80, the method comprises storing, in the queue, data for the current packet(i+1)16if the statei+1has any value but B (i.e. the statei+1has a value of R, L or N). The data comprises a value of (i+1) associated with a packet sequence number, the sending time difference di, a first-bit-receiving timestampi+1, a last-bit-receiving timestampi+1, and a value of the statei+1. This act may comprise pushing the aforementioned data to the queue. If an overflow of the queue occurs, the jitter for the discarded head packet has exceeded the upper limit.

Flow of the method is directed back to block42wherein another packet is received and processed to measure another jitter value.

As previously stated, the herein-described jitter measurement method is transparent to packet sizes. Another benefit is that the method is transparent to interface speed. For example, the sender10and the receiver12may be different types of interfaces operating at different line speeds. The herein-described jitter measurement method is easy to implement, and modest resources are used on either the sender10or the receiver12sides of the SUM14. Further, if the clocks on the sender and receiver sides of the SUM have suitable resolution and precision, the herein-described jitter measurement method provides accurate measures of jitter even if the clocks are not synchronized.