NOTE: Using software to mass-download the site degrades the server and is prohibited. Custom Search TCP Data Handling and Processing: Streams, Segments and Sequence Numbers (Page 3 of 3) TCP Data Identification: Sequence Numbers The fact that TCP treats data coming from an application as a stream of octets has a couple of very significant implications on the operation of the protocol. The first is related to data identification. Since TCP is reliable, it needs to keep track of all the data it receives from an application so it can make sure it is all received by the destination. Furthermore, it must make sure the data is received in the order it was sent, and must retransmit any lost data. If data were conveyed to TCP in block-like messages, it would be fairly simple to keep track of the data by adding an identifier to each message. Since TCP is stream-oriented, however, that identification must be done for each byte of data! This may seem surprising, but it is actually what TCP does, through the use of sequence numbers. Each byte of data is assigned a sequence number which is used to keep track of it through the process of transmission, reception and acknowledgment (though in practice, blocks of many bytes are managed using the sequence numbers of bytes at the start and end of the block). These sequence numbers are used to ensure that data sent in segments is reassembled into the original stream of data transmitted by the sending application. They are required to implement the sliding window system that enables TCP to provide reliability and data flow control. Key Concept: Since TCP works with individual bytes of data rather than discrete messages, it must use an identification scheme that works at the byte level to implement its data transmission and tracking system. This is accomplished by assigning each byte TCP processes a sequence number.The Need For Application Data Delimiting The other impact of TCP treating incoming data as a stream is that data received by an application using TCP is unstructured. For transmission, a stream of data goes into TCP on one device, and on reception, a stream of data goes back to the application on the receiving device. Even though the stream is broken into segments for transmission by TCP, these segments are TCP-level details that are hidden from the application. So, when a device wants to send multiple pieces of data, TCP provides no mechanism for indicating where the “dividing line” is between the pieces, since TCP doesn't examine the meaning of the data at all. The application must provide a means for doing this. Consider for example an application that is sending database records. It needs to transmit record #579 from the Employees database table, followed by record #581 and record #611. It sends these records to TCP, which treats them all collectively as a stream of bytes. TCP will package these bytes into segments, but in a manner the application cannot predict. It is possible that each will end up in a different segment, but more likely they will all be in one segment, or part of each will end up in different segments, depending on their length. The records themselves must have some sort of explicit markers so the receiving device can tell where one record ends and the next starts.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) � Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Which layer is responsible for segmentation and reassembly?Explanation. The transport layer performs the SAR. Data is broken down into segments when sent, then reassembled in the transport layer on the receiver.
What layer reassembles the segmented packet into the whole data?The transport layer segments the messages into packets of acceptable sizes and performs the reassembly at the destination.
Which OSI layer uses the header information to reassemble the data segments into streams?The protocols at the transport layer describe how the transport layer header information is used to reassemble the data pieces into in-order data streams to be passed to the application layer. To pass data streams to the proper applications, the transport layer must identify the target application.
Which of the following can sequence a received set of segments correctly to reassemble a data stream?TCP. Because networks may provide multiple routes that can have different transmission rates, data can arrive in the wrong order. By NUMBERING and sequencing the segments, TCP can ensure that these segments are reassembled into the proper order.
|