Top Ad unit 728 × 90

07: Transport layer - Acknowledgment and connection termination part 3


During the Transport layer lesson, you came across the term ‘ACK’, which stands for acknowledgment, but you do not know its real meaning besides its function. This lesson elucidates Acknowledgment and its role in data transmission as well as connection termination which occurs after data transmission is finished.

As you have seen in the previous lessons, data is segmented when it arrives at the Transport layer, and each of the segments are assigned a sequence number, which is shown in the next figure, so that if the segments arrive at the destination machine in an disorderly way, they will automatically be arranged on the grounds that data segments may take different routes when traveling across the network. Thus, sequence number helps in reordering data segments when arriving at the receiving machine in a disorderly way ; all that is accomplished through the number the segment takes, see the following figure.

The chief reason behind using ACK in data transmission is to guarantee that data will not be duplicated or lost while making it to the destination. To avoid duplicating or losing data, something called positive acknowledgment with retransmission is involved in the process of data transfer. It is a technique that requires the receiving machine to communicate back with transmitting source by sending an ACK message this latter when data is successfully received.

The acknowledgment process occurs as follow : After the sender transmits a bunch of segments, it documents each single segment it sent with a view to receive an ACK for each. Once the segments are acknowleged by the receiver, the sender proceeds with sending the rest segments. As soon as the sender sends data segments, see the above figure, it starts a timer ; then each segment is not acknowleged before the timer expires, it will be retransmitted.

The above figure shows that PC1 transmits segment 1, 2, and 3, after that the PC2 acknowledges  it has received them by requesting segment number 4 ( window size here is set to 3). The sender transmits segment 4, 5, and 6, as soon as it receives ACK. But now, at this juncture, an error occurs (connection lost) and segment 5 is not successfully received, it is lost. The receiver, in this case, will send an acknowledgment requesting segment 5 (informing the sender that segment 5 did not make it to the destination) to be sent.  After segment 5 is then received, the receiver will ask for the next segments, which are 7, 8, and 9, by sending ACK.

In a nutshell, each data segment sent from the sender to the receiver must be acknowledged in order to move to the transfer of the next segments. If the timer expires and the sender receives no ACK, it will automatically transmit the segment again. Simply put, the sender must receive ACK within a specific period of time, otherwise it will send the same data segment again. In case data is already existed in the receiver’s buffer or received at the buffer of the receiver, this latter will drop it and ask for the next segment.

N.B. all the techniques we have covered until now, including thee-way handshake, sequencing, stop-and-wait, windowing or window size, acknowledgment are part of flow control. The whole process is referred to as flow control which is a characteristic and essential part of reliable connection. A session to be considered connection-oriented is to comprise the aforementioned protocols and techniques. TCP is regarded  reliable protocol by virtue of using all of those mentioned above.

Connection/session termination

We said that a connection between two nodes is established through three-way handshake, but what is about terminating the conection !  to terminating a connection already established, the following steps are undergone.

The above figure reveals a typical process of tearing down a connection. To tear down the connection, 1) the sender sends FIN (finish) to the receiver. The message informs the receiver that the connection is about to be terminated. 2) The receiver sends ACK/FIN saying to the sender OK you can tear down the connection, then it sends another message FIN implying that the connection is torn down on my part . 3) finally, the sender sends ACK/FIN to completely terminate the connection.
07: Transport layer - Acknowledgment and connection termination part 3 Reviewed by BOUFTIRA on 8:06:00 AM Rating: 5

No comments:

All Rights Reserved by Computer Networks For All © 2015 - 2017

Contact Form


Email *

Message *

Powered by Blogger.