Top Ad unit 728 × 90

07: Transport layer - Reliable and connection-oriented service; windowing and stop-and-wait flow control part 2

Connection-oriented/reliable service

The Transport layer provides many services, among them establishing and tearing down virtual circuits, it is also responsible for providing mechanisms for multiplexing upper-layer application. In this lesson, I show you that the Transport layer can be either connectionless or connection-oriented and how these two types of connection are very important in data transmission.

To begin with, Connection-oriented function is also referred to as reliable connection. TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are protocols that are integral to this layer. No worries if you don’t know these protocols by now, I will explain them in detail in the forthcoming lesson. What I want you now to know is that TCP is a connection-oriented protocol and UDP is a connectionless protocol. It is called connection-oriented and reliable connection because in this type of communication, two end devices must establish a virtual circuit or session before initiating the actual transmission of data.  The process of establishing this communication session is called a ‘three way handshake’ or a ‘call setup’.  The following figure depicts the establishment of this connection.
Now, let us explain what is pictured in the above figure. First, to be called a connection-oriented communication, the sender must send the first SYN segments to the receiver requesting synchronization. It seems to ask : Are you synchronized ? the receiver replies with segments called SYN/ACK informing the sender that it is ready for establishing a connection. It looks to reply : Yes, I’m synchronized and bidirectional connection can be formed. The sender sends another segment which is ACK (acknowledgment) to inform the receiver that the connection agreement has been accepted and that the actual connection has been established. Finally, the sender and receiver are both ready for data transmission, each one can initiate its transmission. This connection is said to be reliable.

That seems very simple, but things do not always go as wanted. Sometimes during transmission, congestion may occur due to the fact that high-speed computers may generate data traffic much faster than the netwrok can handle it. Another problem is that sometimes the source computer sends a bunch of datagrams to the destination computer, this latter has got a temporary memory called ‘buffer’, when this memory is full of datagrams received from the source computer, it discards any datagrams coming until it processes the existing datagrams. The problem here is that datagrams will be lost. A fail-safe solution to this problem is something called ‘flow control’.

Flow control

Flow control is a technique for speed-matching of transmitter and receiver. It ensures that a transmitting device does not overflow a receiving device with data. Through flow control, data is no longer lost. During establishing the virtual circuit or session, the sender and receiver agree upon the way data will be transmitting, and how much data will be transmitting.  The following figure shows an example of flow control, and the simplest form of it along with protocol ‘Stop-and-Wait’. 

Stop-and-Wait flow control

In the above pictured figure, the sender PC1 sends three segments to the receiver PC2. When the destination machine receives those segments, it puts them in a temporary virtual memory called buffer. If the buffer is full the receiver sends a message to the transmitter saying stop sending ! I’m not ready, my buffer is full, after that any segments received will be discarded, for any device has got a buffer with a certain size. After the segments in the buffer are processed, the receiver sends another message now I’m ready, you can proceed with sending the next segments. All that happens in a flash. But, a problem seems to exist in ‘Stop-and-Wait’ protocol which is only few segments are transmitted at a time and that the sender has to receive an Ack message after each, as in this example, three segments. It would be so slow if the sending machine has to wait an acknowledgment message after sending each few sets of segments.


No worries ! each problem has a solution. To avoid the problem of having to wait an ACK after sending only few segments, both the sender and receiver can specify how much data to be transmitted at a time. All that is true through another sophisticated way referred to as ‘Windowing’ or ‘windows size’ ; it is also called ‘sliding window flow control’ when studying flow control in advanced levels. Consider the following figure.

 Take a glace at window size of 1, each segment sent must be acknowledged in order to send the next segment.  This way of transmission seems to be very slow, which is inefficient. On the other hand, we have window size of 3. By increasing the window size to 3, the destination machine will receive 3 segments before sending the ACK, which is much faster than the first one. Bear in mind that this size is just to give an example and make things clear, the transmission in reality is based on large numbers of bytes rather than small amount of segments. When a window size is configured to 1, the source machine has to wait for an ACK for each data segment it transmits before transmitting another one. Conversely, if a window size is set to 3 (or more), the sender is permitted to send three data segments before receiving an ACK, which is pretty better.
07: Transport layer - Reliable and connection-oriented service; windowing and stop-and-wait flow control part 2 Reviewed by BOUFTIRA on 8:05:00 AM Rating: 5

No comments:

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

Contact Form


Email *

Message *

Powered by Blogger.