123 NUMBERING BYTES CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 9 NUMBERING BYTES 12.3
Numbering Bytes TCP uses the following two fields to track the segments Sequence number Acknowledgment number These two fields use byte number, not the segment number CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 10 Numbering Bytes • TCP uses the following two fields to track the segments – Sequence number – Acknowledgment number • These two fields use byte number, not the segment number
Byte Numbers TCP numbers all the data transmitted in a connection Numbering is independent in each direction The numbering does not necessarily start from 0: it starts randomly The random number is between 0 and 232-1 For flow and error control CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 11 Byte Numbers • TCP numbers all the data transmitted in a connection • Numbering is independent in each direction • The numbering does not necessarily start from 0; it starts randomly • The random number is between 0 and 232 -1 • For flow and error control
Sequence number After bytes numbered TCP assigns a sequence number to each segment The sequence number for each sequence is the number of the first byte in that segment CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 12 Sequence Number • After bytes numbered, TCP assigns a sequence number to each segment • The sequence number for each sequence is the number of the first byte in that segment
Example 1 Imagine a TCP connection is transferring a file of 6000 bytes The first byte is numbered 10010. What are the sequence numbers for each segment if data is sent in five segments with the first four segments carrying 1, 000 bytes and the last segment carrying 2,000 bytes? CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 13 Example 1 Imagine a TCP connection is transferring a file of 6000 bytes. The first byte is numbered 10010. What are the sequence numbers for each segment if data is sent in five segments with the first four segments carrying 1,000 bytes and the last segment carrying 2,000 bytes?