Open In App

Piggybacking in Computer Networks

Last Updated : 13 May, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-Requisite: Transmission Mode in Computer Networks

Piggybacking is the technique of delaying outgoing acknowledgment and attaching it to the next data packet. 

When a data frame arrives, the receiver waits and does not send the control frame (acknowledgment) back immediately. The receiver waits until its network layer moves to the next data packet. Acknowledgment is associated with this outgoing data frame. Thus the acknowledgment travels along with the next data frame. This technique in which the outgoing acknowledgment is delayed temporarily is called Piggybacking.

In this article, we will cover the overview of networking communication and mainly focus on the concept of piggybacking in networks. And we will also discuss the advantages and disadvantages of using piggybacking in networks. Finally, we will see the conclusion. Let’s discuss them one by one.

Networking Communication

Sliding window algorithms are methods of flow control for network data transfer. The data link layer uses a sender to have more than one acknowledgment packet at a time, which improves network throughput. Both the sender and receiver maintain a finite-size buffer to hold outgoing and incoming packets from the other side. Every packet sent by the sender must be acknowledged by the receiver. The sender maintains a timer for every packet sent, and any packet unacknowledged at a certain time is resent. The sender may send a whole window of packets before receiving an acknowledgment for the first packet in the window. This results in higher transfer rates, as the sender may send multiple packets without waiting for each packet’s acknowledgment. The receiver advertises a window size that tells the sender not to fill up the receiver buffers.

How To Increase Network Efficiency?

Efficiency can also be improved by making use of the Full-duplex transmission mode. Full Duplex transmission is a two-way directional communication simultaneously which means that it can communicate in both directions, just like we are using two half-duplex transmission nodes. It provides better performance than simple transmission modes and half-duplex transmission modes.

Full Duplex Transmission

Full Duplex Transmission

Why Piggybacking?

Efficiency can also be improved by making use of full-duplex transmission. Full Duplex transmission is a transmission that happens with the help of two half-duplex transmissions which helps in communication in both directions. Full Duplex Transmission is better than both simplex and half-duplex transmission modes.

There are two ways through which we can achieve full-duplex transmission:

1. Two Separate Channels: One way to achieve full-duplex transmission is to have two separate channels with one for forwarding data transmission and the other for reverse data transfer (to accept). But this will almost completely waste the bandwidth of the reverse channel.

2. Piggybacking: A preferable solution would be to use each channel to transmit the frame (front and back) both ways, with both channels having the same capacity. Assume that A and B are users. Then the data frames from A to B are interconnected with the acknowledgment from A to B. and can be identified as a data frame or acknowledgment by checking the sort field in the header of the received frame.

One more improvement can be made. When a data frame arrives, the receiver waits and does not send the control frame  (acknowledgment) back immediately. The receiver waits until its network layer moves to the next data packet.

Acknowledgment is associated with this outgoing data frame. Thus the acknowledgment travels along with the next data frame. 

Working of Piggybacking

Working of Piggybacking

Working of Piggybacking

As we can see in the figure, we can see with piggybacking, a single message (ACK + DATA)  over the wire in place of two separate messages. Piggybacking improves the efficiency of the bidirectional protocols.

  • If Host A has both acknowledgment and data, which it wants to send, then the data frame will be sent with the ack field which contains the sequence number of the frame.
  • If Host A contains only one acknowledgment, then it will wait for some time, then in the case, if it finds any data frame, it piggybacks the acknowledgment, otherwise, it will send the ACK frame.
  • If Host A left with only a data frame, then it will add the last acknowledgment to it. Host A can send a data frame with an ack field containing no acknowledgment bit.

Advantages of Piggybacking

  1. The major advantage of piggybacking is the better use of available channel bandwidth. This happens because an acknowledgment frame needs does not to be sent separately.
  2. Usage cost reduction.
  3. Improves latency of data transfer.
  4. To avoid the delay and rebroadcast of frame transmission, piggybacking uses a very short-duration timer.

Disadvantages of Piggybacking

  1. The disadvantage of piggybacking is the additional complexity.
  2. If the data link layer waits long before transmitting the acknowledgment (blocks the ACK for some time), the frame will rebroadcast.

Conclusion

There is a dispute as to whether this is a legal or illegal activity, but piggybacking is still a dark side of Wi-Fi. Cyber-terrorist attacks in India are a clear reminder that we cannot control incidents occurring anywhere in the world or control unsecured Wi-Fi networks. So it is the responsibility of the owner and administrator to secure their wireless connection.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads