July 21-24 overheads


Sequence numbers

The segments into which a bit stream is divided are identified by the number of the first octet in the segment. This number is derived from the octet's position in the stream by adding to it the initial ("random") number associated with the connection. The choice of this number has to guarantee that this or a future connection between the same pair of hosts will not receive a segment with the same sequence number but from a different session. The mechanism to achive this random initial numbering is through a counter ("clock") whose value is used as the initial sequence number upon opening a connection. There is always a danger of a "phantom" segment cycling in the network that appears at the receiver with all the right identifications, including the sequence number, but belonging to some previously transmitted bit stream.

The following diagram indicates the importance of preserving the proper ratio between the clock frequency and the data rate in the bit stream.

The double life time of a segment, T, defines a forbidden region for certain sequence numbers that can be confused by the receiver (if a new connection were to be established). There are two extreme situations:

In TCP, the sequence number initialization problem is resolved by using a 16-bit counter which is incremented by (an equivalent of) 1 every 4 microseconds and does not "recycle" numbers for over four hours.




andrzej@cs.uoregon.edu