Piggybacking is a process of attaching acknowledgment with the data packet to be sent. It is an efficient solution for reducing the bandwidth utilization of the network. TCP is a full-duplex communication protocol, so piggybacking is used to transmit packets.
Introduction to Piggybacking
Piggybacking
is a process of attaching the acknowledgment with the data packet to be sent. Piggybacking concept is explained below:
Suppose there is two-way communication between two devices A and B. When the data frame is sent by A to B, then device B will not send the acknowledgment to A until B does not have the next frame to transmit. And the delayed acknowledgment is sent by the B with the data frame. The method of attaching the delayed acknowledgment with sending the data frame is known as piggybacking.
Refer to the below image for the piggybacking
Why Do We Need Piggybacking?
All other protocols such as stop and wait, Go Back N ARQ, etc. provide us a half duplex way of communication. But in real-world situations, full-duplex communication is required. So piggybacking comes in the scenario for defining the rules for full-duplex communication. TCP packets are also transmitted in the full-duplex mode. So piggybacking is also required for the TCP packet transmission.
In full duplex communication, we need both communications to be a pair of simplex communication. For sending there is a forward channel and for receiving there is a backward channel that must be there in every link.
But in the configuration explained above for each data unit transmission traffic load becomes double. Half of the data transmission is only for acknowledgment transmission.
So piggybacking is the protocol to better utilize network bandwidth. In this, we delay the acknowledgment until we do not have any data frames to transfer.
Piggybacking can be considered a better option for the efficient use of the available bandwidth. As part of this acknowledgment, transmission is delayed until we don’t have the next data frame to send. Then acknowledgment is hooked to the data frame that is transmitted. There is an ack field in the data. This ack bit field size is a few bits, while several bytes are required for the transmission of an acknowledgment frame. Thus, we have achieved our goal of reducing bandwidth in this manner.
How Piggybacking is Done?
- Suppose there are two computers, named X and Y which are connected over an IP network. And computers X and Y use SCTP(Stream Control Transmission Protocol) protocol for communication between them.
- The packet is sent by X to Y. X will wait for the acknowledgment(response) and it will send the next packet after receiving the acknowledgment.
- Same will be done by node Y for communication in the other direction.
- If piggybacking is not supported, then the sent packet response only contains the SCTP-ACK chunk.
- In the piggybacking protocol, a data packet is sent by X to the Y. And node Y before sending the acknowledgment, will wait for the user DATA, and after receiving the user packet within a time frame, both(user DATA and ACK) is sent by the Y in a single network message.
- Message is processed in two separate chunks at node X, the first one is the ACK chunk and the other one is the user DATA chunk.
- Bandwidth is saved by this but this will lead to some delay in the transmission of data.
Advantages of Piggybacking
- Efficient use of available channel bandwidth.
- Reduction in usage cost
- Data transfer latency improved
Disadvantages of Piggybacking
- There may be a possibility of delay in the transfer of the acknowledgment message so if the sender does not get the acknowledgment in a fixed time then the sender needs to resend the data.
- This technique requires additional complexity for its implementation.
Conclusion
- Piggybacking is a process of attaching the acknowledgment with the data packet to be sent.
- Piggybacking reduces the bandwidth utilization of the network.
- Piggybacking acknowledgment also contains the data while pure acknowledgment only contains the acknowledgment.
- Piggybacking requires additional complexity for its implementation.