Error Control in Computer Networks
Error Control refers to mechanisms used in computer networks to ensure the reliable and accurate transmission of data over a network. Since data transmission is prone to errors due to noise, signal degradation, and other factors, error control protocols are crucial to detect, correct, or handle these errors effectively.
Error control involves both error detection and error correction strategies and is essential for maintaining the integrity of data during communication.
Types of Errors in Data Transmission
- Single-bit errors: Occur when a single bit in a data unit (e.g., a byte or packet) is flipped due to noise or interference during transmission.
- Burst errors: Involve the flipping of two or more bits in a data unit, usually caused by transient noise or signal distortion over a network.
Error Control Mechanisms
Error control is typically divided into two main components:
- Error Detection
- Error Correction
1. Error Detection
Error detection involves techniques to identify whether errors have occurred during the transmission of data. These methods work by adding extra data, often called redundant bits, to the transmitted message. The receiver can then use these bits to check whether the received data is the same as what was sent.
Common Error Detection Methods:
-
Parity Bit:
- A parity bit is an additional bit added to a data unit to make the number of 1-bits either even (even parity) or odd (odd parity).
- Even Parity: The number of 1-bits in the data, including the parity bit, is even.
- Odd Parity: The number of 1-bits, including the parity bit, is odd.
- Limitation: Parity checking can detect only single-bit errors, and it cannot detect errors in bursts of two bits or more.
- Example: If the original data is "1011001", a parity bit could be added to make the total number of 1's even or odd.
-
Checksums:
- Checksum is a method where the sender calculates a checksum value by summing the values of all the data units (like bytes or words) and sending the result as a checksum.
- The receiver then calculates the checksum from the received data and compares it with the transmitted checksum.
- Limitation: It can detect errors in the data but might not detect all types of errors (especially if there’s an error in the checksum itself).
-
Cyclic Redundancy Check (CRC):
- CRC is a more powerful error detection technique used to detect burst errors. It involves treating the data as a large binary number and dividing it by a predetermined polynomial divisor.
- The remainder of this division becomes the CRC value, which is sent along with the data. The receiver performs the same division and compares the remainder with the received CRC.
- CRC can detect multiple-bit errors, making it widely used in protocols like Ethernet and CDs.
-
Hamming Code:
- Hamming Code is a method of adding redundant bits to the data in such a way that single-bit errors can be detected and corrected.
- The sender adds extra parity bits to the data at specific positions, and the receiver can use these bits to detect and correct errors.
2. Error Correction
While error detection helps identify the presence of errors, error correction techniques are used to recover the original data or to retransmit the data without requiring external intervention. There are two main categories of error correction techniques:
Error Correction Methods:
-
Automatic Repeat Request (ARQ):
- ARQ is an error control method in which the receiver sends an acknowledgment (ACK) for successfully received data, and a negative acknowledgment (NAK) for erroneous or missing data. If the sender does not receive an ACK, it will retransmit the data.
There are several types of ARQ:
-
Stop-and-Wait ARQ:
- After sending a frame, the sender waits for an acknowledgment from the receiver before sending the next frame.
- If no acknowledgment is received within a specified timeout, the frame is retransmitted.
- Simple but inefficient for high-latency or high-error networks.
- Example: Used in older protocols like HDLC (High-Level Data Link Control).
-
Sliding Window ARQ:
- In Sliding Window ARQ, multiple frames can be sent before receiving an acknowledgment.
- The sender maintains a window of frames that are allowed to be unacknowledged. As the receiver sends back acknowledgments, the sender slides the window to allow new frames to be transmitted.
- This method increases efficiency compared to Stop-and-Wait ARQ by allowing for multiple frame transmissions while waiting for acknowledgments.
- Example: TCP (Transmission Control Protocol) uses a form of sliding window for error control.
-
Forward Error Correction (FEC):
- FEC involves adding redundant data to the transmitted message so that the receiver can detect and correct errors without needing to request a retransmission.
- FEC is widely used in real-time communications, where retransmissions are not feasible (e.g., video streaming or VoIP).
- Common FEC techniques include Hamming Code, Reed-Solomon Codes, and Turbo Codes, which can correct errors based on the extra redundant bits included in the transmission.
- Example: FEC is often used in satellite communications and multimedia streaming.
Error Control in Networking Protocols
Different network protocols implement error control mechanisms to ensure reliable data transmission.
-
TCP (Transmission Control Protocol):
- Error Detection: Uses a checksum for error detection in each segment.
- Error Correction: Uses ARQ (specifically Selective Acknowledgment (SACK) and retransmission techniques) to request retransmissions of lost or corrupted segments. TCP provides reliable data transmission by ensuring that all packets are received correctly and in the correct order.
-
HDLC (High-Level Data Link Control):
- Uses Stop-and-Wait ARQ or Sliding Window ARQ for error correction and retransmission of data frames.
- HDLC employs cyclic redundancy check (CRC) for error detection.
-
Ethernet:
- Ethernet uses CRC (Cyclic Redundancy Check) for error detection in frames, and if a frame contains an error, it is discarded. Higher-layer protocols, like TCP, handle retransmissions.
-
Wireless Communication (Wi-Fi, Cellular Networks):
- Wireless networks often use FEC (Forward Error Correction) to ensure data integrity over the air, where retransmissions might be difficult due to signal degradation or bandwidth constraints.
- Wi-Fi and cellular networks might also use ARQ mechanisms, such as Hybrid Automatic Repeat reQuest (HARQ), which combines ARQ and FEC.
Key Concepts in Error Control
- Redundancy: Adding extra bits or data to facilitate error detection and correction.
- Acknowledgment (ACK): A signal sent by the receiver to indicate successful receipt of data.
- Negative Acknowledgment (NAK): A signal sent by the receiver to indicate that the received data is erroneous or missing.
- Retransmission: The process of sending data again when errors are detected or acknowledgment is not received.
- Sliding Window: A technique used to control the flow of data and handle multiple frames before acknowledgment in ARQ-based systems.
- Forward Error Correction (FEC): A method that allows the receiver to correct errors without requiring retransmission of data.
Conclusion
Error control is a vital aspect of reliable data communication in computer networks. By using techniques like error detection (e.g., CRC, checksums, parity bits) and error correction (e.g., ARQ, FEC), networks can ensure that data is delivered accurately even in the presence of errors caused by noise or interference. Different protocols implement these techniques in varying ways, depending on the network's needs, application requirements, and performance constraints.