Let us bring some light into the ‚transmissions tunnel‘ of digital data (whereas also music streaming belongs to).
The techniques used in IP data transmission are the product of decades of research in computer science, electrical engineering, and information theory. In summary: various techniques are employed to detect, correct, or avoid errors that may result from interference, dropouts, or other issues in the network. The basic problem (that bits sent by the sender aren‘t the same as received by the receiver) is solved. Period! (I loved the example about electronic banking).
Following the most important main techniques with more explanations:
- Error Detection Techniques
These help identify whether an error has occurred in a data packet.
Checksums: Used in IPv4 headers and TCP/UDP segments. A checksum is a simple mathematical calculation over the data; the receiver can recompute it to check for corruption.
Cyclic Redundancy Check (CRC): Common in lower layers (e.g., Ethernet frames). CRC uses polynomial division to detect burst errors effectively.
Parity Bits (less common in IP): Used more in older or simpler communication systems; adds a bit to indicate even or odd parity.
- Error Correction Techniques
These go beyond detection by allowing the receiver to correct errors.
Forward Error Correction (FEC): Common in wireless or real-time applications (e.g., video streaming, VoIP). Redundant data is sent so that errors can be corrected at the receiver without retransmission (e.g., Reed-Solomon codes, convolutional codes).
- Retransmission Strategies
Used in reliable protocols like TCP to recover lost or corrupted data.
Acknowledgements (ACKs): The receiver acknowledges receipt of packets. If not received in time, the sender retransmits.
Sequence Numbers: Allow detection of missing or out-of-order packets.
Timeouts and Retransmissions: If an ACK isn’t received in time, the sender assumes the packet was lost and resends it.
Selective Acknowledgment (SACK): TCP option that allows the receiver to inform the sender about all the segments that have been received successfully, so only the missing parts are retransmitted.
- Interleaving and Redundancy
Used especially in multimedia streaming and wireless communications.
Interleaving: Data is rearranged before transmission so that burst errors affect non-consecutive parts. This improves FEC effectiveness.
Redundant Packets: Extra packets may be sent so that if one is lost, the receiver can reconstruct the missing data.
- Congestion Control and Avoidance
These mechanisms reduce the chance of packet loss due to overloaded networks.
TCP Congestion Control: Algorithms like Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery dynamically adjust transmission rates based on perceived network conditions.
- Link Layer Reliability
The data link layer (like Ethernet, Wi-Fi, or cellular links) often includes:
Automatic Repeat reQuest (ARQ): Frames with errors are detected (via CRC) and retransmitted upon request.
Quality of Service (QoS): Prioritizes certain traffic (e.g., voice, video) to reduce latency and packet loss.
Hope that helps for the discussion.