Wednesday, March 24, 2010

Acknowledgment / TCP

Acknowledgment
11.1.6 This page will discuss acknowledgments and the sequence of segments.


Reliable delivery guarantees that a stream of data sent from one device is delivered through a data link to another device without duplication or data loss. Positive acknowledgment with retransmission is one technique that guarantees reliable delivery of data. Positive acknowledgment requires a recipient to communicate with the source and send back an ACK when the data is received. The sender keeps a record of each data packet, or TCP segment, that it sends and expects an ACK. The sender also starts a timer when it sends a segment and will retransmit a segment if the timer expires before an ACK arrives.

Figure shows a sender that transmits data packets 1, 2, and 3. The receiver acknowledges receipt of the packets with a request for packet 4. When the sender receives the ACK, it sends packets 4, 5, and 6. If packet 5 does not arrive at the destination, the receiver acknowledges with a request to resend packet 5. The sender resends packet 5 and then receives an ACK to continue with the transmission of packet 7.

TCP provides sequencing of segments with a forward reference acknowledgment. Each segment is numbered before transmission. At the destination, TCP reassembles the segments into a complete message. If a sequence number is missing in the series, that segment is retransmitted. Segments that are not acknowledged within a given time period will result in a retransmission.

The next page will describe TCP in more detail.

TCP
11.1.7 This page will discuss the protocols that use TCP and the fields included in a TCP segment.


TCP is a connection-oriented transport layer protocol that provides reliable full-duplex data transmission. TCP is part of the TCP/IP protocol stack. In a connection-oriented environment, a connection is established between both ends before the transfer of information can begin. TCP breaks messages into segments, reassembles them at the destination, and resends anything that is not received. TCP supplies a virtual circuit between end-user applications.

The following protocols use TCP:

• FTP
• HTTP
• SMTP
• Telnet

The following are the definitions of the fields in the TCP segment:

• Source port – Number of the port that sends data
• Destination port – Number of the port that receives data
• Sequence number – Number used to ensure the data arrives in the correct order
• Acknowledgment number – Next expected TCP octet
• HLEN – Number of 32-bit words in the header
• Reserved – Set to zero
• Code bits – Control functions, such as setup and termination of a session
• Window – Number of octets that the sender will accept
• Checksum – Calculated checksum of the header and data fields
• Urgent pointer – Indicates the end of the urgent data
• Option – One option currently defined, maximum TCP segment size
• Data – Upper-layer protocol data

The next page will define UDP.

No comments:

Post a Comment