Piggybacking in Data Link Protocols
1. Concept and Motivation
In full-duplex communications, data flows simultaneously in both directions between Station A and Station B.
If Station B sends a dedicated, standalone acknowledgment (ACK) frame for every data frame received from Station A, a tremendous amount of network bandwidth is wasted on packet header overhead (MAC headers, IP/TCP headers, preamble, and CRC checksums) just to deliver a tiny acknowledgment number.
Piggybacking solves this problem by attaching the acknowledgment for received data into the header of an outgoing data frame that is already waiting to be transmitted:
WITHOUT PIGGYBACKING (Separate ACK Frames - Bandwidth Wasted):
Station A Station B
| |
|=========== Data Frame (Seq = 0) =================>|
| |
|<========== Standalone ACK Frame (ACK = 1) ========| <-- Overhead!
| |
|<========== Data Frame (Seq = 0) ==================|
| |
|=========== Standalone ACK Frame (ACK = 1) =======>| <-- Overhead!
WITH PIGGYBACKING (ACK Attached to Outgoing Data - High Efficiency):
Station A Station B
| |
|=========== Data (Seq = 0, ACK = 0) ==============>|
| |
|<========== Data (Seq = 0, ACK = 1) ===============| <-- Piggybacked ACK 1!
| |
|=========== Data (Seq = 1, ACK = 1) ==============>| <-- Piggybacked ACK 1!
2. Frame Structure with Piggybacking
To support piggybacking, every transmitted frame header contains two distinct sequence fields:
+-----------+-----------+----------+---------------+---------+
| Seq No | ACK No | Control | Data Payload | FCS |
| (Data) | (ACK) | Flags | (User data) | (CRC32) |
+-----------+-----------+----------+---------------+---------+
- Sequence Number (Seq): Identifies the serial order of the outgoing data payload enclosed in this frame.
- Acknowledgment Number (ACK): Contains the sequence number of the next frame expected from the other station (acknowledging all earlier received frames).
3. The Delayed ACK Timer
A practical engineering challenge arises:
What if Station B receives data from Station A and must acknowledge it, but Station B has no outgoing data of its own to send at that moment?
If Station B waits indefinitely for outgoing data to become available, Station A's retransmission timer will expire, causing Station A to unnecessarily retransmit duplicate frames!
The Solution: Delayed ACK Timer:
Frame received from remote host
|
v
Is outgoing data ready?
/ \
(Yes)/ \(No)
v v
Piggyback ACK Start Delayed ACK Timer (e.g., 50 ms)
immediately |
Does outgoing data arrive before timeout?
/ \
(Yes)/ \(No: Timeout!)
v v
Piggyback ACK Transmit Standalone ACK
- When a frame is received, if no outgoing data is queued, the receiver starts a Delayed ACK Timer (typically ).
- If the local application generates outgoing data before the timer expires, the ACK is piggybacked onto that data frame and transmitted immediately.
- If the timer expires and no data has been generated, the receiver immediately transmits a standalone ACK frame to prevent sender timeout.
4. Advantages and Drawbacks
Advantages:
- Bandwidth Optimization: Dramatically reduces the number of transmitted frames, conserving channel capacity.
- Lower Channel Contention: Fewer frames competing on shared media (like Wi-Fi or Ethernet) lowers the probability of collisions.
- Reduced Hardware Interrupts: Eliminates redundant frame processing at network adapters.
Drawbacks & Complexities:
- Requires dual sequence management in frame headers.
- If the delayed ACK timer is configured too aggressively (too long), it triggers premature retransmission timeouts at the remote sender.
5. Key Exam Questions & Takeaways
- What is Piggybacking?
- The technique of temporarily delaying an outgoing acknowledgment so that it can be hooked into the header of the next available outgoing data frame rather than transmitting an independent ACK frame.
- Explain the role of the Delayed ACK Timer in piggybacking.
- It sets a bounded time limit for waiting for outgoing data. If outgoing data appears before the timer fires, the ACK is piggybacked; if the timer expires with no data ready, a standalone ACK is dispatched immediately to avoid sender timeout.
- Where is piggybacking implemented in the TCP/IP suite?
- Extensively in TCP (Transmission Control Protocol) at the Transport Layer, where every TCP header carries both a 32-bit
Sequence Numberand a 32-bitAcknowledgment Number.
- Extensively in TCP (Transmission Control Protocol) at the Transport Layer, where every TCP header carries both a 32-bit