Tuesday, January 5, 2016

WHAT IS PIGGYBACKING IN THE COMPUTER NETWORK?

Piggybacking means to ride over something.  In a real example, if someone is about to start travel towards a destination, with his bike. At the same time, you also have a plan to go to the same place. You can ask for the lift. If someone not traveling, then you use your own bike for the ride.

In the example, there are many advantages, saving fuel, less traffic on the road, lesser pollution, etc.

A similar concept is used in computer networks for more optimized communication.  In piggybacking, a sender sends a user data packet with the acknowledgment (ACK), if an ACK is about to go to the same destination. 

Reliable communication has an acknowledgment from the receiver.  SCTP protocol is one of the examples of a reliable transport layer protocol in the OSI model. SCTP supports piggybacking by sending a DATA chunk with the ACK.  It optimizes the underlying network bandwidth.

 With piggybacking, you will see a single message (DATA + ACK)  over the wire in place of two separate messages. 


How piggybacking is done?

Here we will explain the concept with an example.

  • There are two computers, named A and B over an IP network.  They are communicating with each other using a reliable SCTP protocol. 
  • A sends a packet to B and waits for the response (ACK), before sending the next packet. 
  • Node B does the same to communicate in another direction.
  • If there is no piggybacking supported, then the response of a sent packet will contain an SCTP-ACK chunk only.
  • In piggybacking, if A sends the packet to B. B waits (for a small-time) for a user DATA packet before sending the ACK. Once the user packet is received within a time frame,  B sends both ( ACK  and user DATA) in a single network message. 
  • On A, the message is processed as two separate chunks, one is ACK and the other is the user DATA.
  • This saves the bandwidth of the network but adds a little delay. 

What are the Advantages and disadvantages of piggybacking?

This network optimization technique has some advantages and disadvantages as similar to most of the other things. The main disadvantage is, blocking of ack for some time. This may cause a connection to go down or may cause a service problem if the delay is more than expected. To avoid problems, piggybacking uses a very small duration timer.

On the advantage side, better use of bandwidth.  The underlying cable and intermediate switches, router, etc, will be less loaded.  If someone is paying the cost to utilize a network based on messages, then the cost will also be reduced.

OR

A technique called piggybacking is used to improve the efficiency of the bidirectional protocols. When a frame is carrying data from A to B, it can also carry control information about arrived (or lost) frames from B; when a frame is carrying data from B to A, it can also carry control information about the arrived (or lost) frames from A.

  • The major advantage of piggybacking is better use of available channel bandwidth.
  • The major disadvantage of piggybacking Additional complexity  and If the data link layer waits too long before transmitting the acknowledgement, then re-transmission of frame would take place.

OR

In reliable full - duplex data transmission, the technique of hooking up acknowledgments onto outgoing data frames is called piggybacking.

Why Piggybacking?

Communications are mostly full – duplex in nature, i.e. data transmission occurs in both directions. A method to achieve full – duplex communication is to consider both the communication as a pair of simplex communication. Each link comprises a forward channel for sending data and a reverse channel for sending acknowledgments.

However, in the above arrangement, traffic load doubles for each data unit that is transmitted. Half of all data transmission comprise of transmission of acknowledgments.

So, a solution that provides better utilization of bandwidth is piggybacking. Here, sending of acknowledgment is delayed until the next data frame is available for transmission. The acknowledgment is then hooked onto the outgoing data frame. The data frame consists of an ack field. The size of the ack field is only a few bits, while an acknowledgment frame comprises of several bytes. Thus, a substantial gain is obtained in reducing bandwidth requirement.

Working Principle

Suppose that there are two communication stations X and Y. The data frames transmitted have an acknowledgment field, ack field that is of a few bits length. Additionally, there are frames for sending acknowledgments, ACK frames. The purpose is to minimize the ACK frames.

The three principles governing piggybacking when the station X wants to communicate with station Y are −

  • If station X has both data and acknowledgment to send, it sends a data frame with the ack field containing the sequence number of the frame to be acknowledged.

  • If station X has only an acknowledgment to send, it waits for a finite period of time to see whether a data frame is available to be sent. If a data frame becomes available, then it piggybacks the acknowledgment with it. Otherwise, it sends an ACK frame.

  • If station X has only a data frame to send, it adds the last acknowledgment with it. The station Y discards all duplicate acknowledgments. Alternatively, station X may send the data frame with the ack field containing a bit combination denoting no acknowledgment.

Example

The following diagram illustrates the three scenario −



No comments:

Post a Comment