Sequence number

From Computer History Wiki
Jump to: navigation, search

A sequence number is a unique identifier applied to each element of an ordered array of data items. They are most often found in data networks, but can also be used outside communication contexts, e.g. in magnetic tape records, to help detect and avoid I/O errors.


In a packet switching network, a sequence number is given to even byte or packet (different systems have made different choices on this point) which is sent from one entity to another. This allows each item to be uniquely acknowledged after it has been sent.

In the TCP/IP protocol suite, the initial sequence number used on any given connection is random. This was initially intended to guard against old packets left circulating in the internet, but it later turned out that systems which did not pick the number randomly were vulnerable to attacks based on being able to predict sequence numbers.