Network Errors
Chapter 7
There are several errors which occur during Data Transmission
in computer networks. These errors are sorted out internally
within the networks or with the help of the System
Administrator
Some of the approaches taken by computer networks to
address the issue of errors include
Framing
Error and Flow Control
Error Detection And Correction (Error Detection And
Correction Codes)
Framing
To provide service to the Network Layer, The Data Link Layer must
use the service provided to it by the physical layer.
What the physical layer does is accept a raw bit stream and attempt
to deliver it to the destination.
This bit stream is not guaranteed to be error free. The number of bits
received may be less than, equal to, or more than the number of bits
transmitted, and they may have different values. It is up to the data
link layer to detect and, if necessary, correct errors
The usual approach is for the Data Link Layer to break the bit stream
up into discrete frames
It provides a way for a sender to transmit a set of bits that are
meaningful to the receiver. Frames have headers that contain
information such as error-checking codes.
There are three different types of Framing, each of which
provides a way for the sender to tell the receiver where the
block of data begins and ends:
Character count
Flag bytes with byte stuffing
Starting and ending flags, with bit stuffing.
Physical layer coding violations.
Character Count
In this method, a field in the header is used to specify the number of
characters in the frame. When the data link layer at the destination
sees the character count, it knows how many characters follow and
hence where the end of the frame is.
This number helps the receiver to know the number of characters in
the frame following this count.
The disadvantage of this method is that, an error can change the
character count.
If the wrong character count number is received then the receiver
will get out of synchronization and will be unable to locate the start of
next frame. The character count method is rarely used in practice.
Flag Bytes With Byte Stuffing
Computer data is normally stored as Alphanumeric Characters that are
encoded with a combination of 8 bits (1 byte). This type of framing
differentiates one byte from another.
It is an older style of framing that was used in the terminal/mainframe
environment
The second framing method gets around the problem of resynchronization
after an error by having each frame start and end with special bytes.
In the past, the starting and ending bytes were different, but in recent
years most protocols have used the same byte, called a Flag Byte
A serious problem occurs with this method when binary data, such as
object programs or floating-point numbers, are being transmitted. It may
easily happen that the flag byte's bit pattern occurs in the data
One way to solve this problem is to have the sender's data link layer insert
a special escape byte (ESC) just before each ''accidental'' flag byte in the
data. The data link layer on the receiving end removes the escape byte
before the data are given to the network layer. This technique is called
Byte Stuffing
Starting and Ending Flags, With Bit Stuffing.
This type of framing allows the sender to transmit a long string of bits
at one time
Most LANs use bit-oriented framing. There is usually a maximum
frame size. For example, Ethernet has a maximum frame size of
1,526 bytes. The beginning and end of a frame is signaled with a
special bit sequence
If no data is being transmitted, this same sequence is continuously
transmitted so the end systems remain synchronized.
BM's SDLC (Synchronous Data Link Control) and HDLC (High-level
Data Link Control) are examples of bit-oriented protocols.
Physical Layer Coding Violations.
This method of framing is applicable only to the networks in which
the encoding on the physical medium contains some redundancy.
Some LANs encode each bit of data using two physical bits.
Normally a 1 bit is encoded into a 10 pair and a O bit is encoded into
a 01 pair
This use of invalid physical code is a part of 802 LAN standards.
Error and Flow Control
Network is responsible for transmission of data from one device to
another device.
The end to end transfer of data from a transmitting application to a
receiving application involves many steps, each subject to error. With
the error control process, we can be confident that the transmitted
and received data are identical. Data can be corrupted during
transmission. For reliable communication, error must be detected and
corrected.
Types of Errors include
Single Bit Error : The term single bit error means that only one bit
of the data unit was changed from 1 to 0 and 0 to 1
Burst Error : In term burst error means that two or more bits in the
data unit were changed. Burst error is also called packet level
error, where errors like packet loss, duplication, reordering.
Error Detection
Error detection is the process of detecting the error during the
transmission between the sender and the receiver.
Types of error detection
Parity Checking
Cyclic Redundancy Check (CRC)
Checksum
Parity Checking
Parity adds a single bit that indicates whether the number of 1 bits in
the preceding data is even or odd.
If a single bit is changed in transmission, the message will change
parity and the error can be detected at this point.
Parity checking is not very robust, since if the number of bits changed
is even, the check bit will be invalid and the error will not be
detected.
Types include :
Single Bit Parity
Two Dimension Parity
Moreover, parity does not indicate which bit contained the error, even
when it can detect it.
The data must be discarded entirely, and re-transmitted from scratch.
On a noisy transmission medium a successful transmission could take
a long time, or even never occur. Parity does have the advantage,
however, that it's about the best possible code that uses only a single
Cyclic Redundancy Check
CRC is a very efficient redundancy checking technique.
It is based on binary division of the data unit, the remainder of which
(CRC) is added to the data unit and sent to the receiver.
The Receiver divides data unit by the same divisor. If the remainder is
zero then data unit is accepted and passed up the protocol stack,
otherwise it is considered as having been corrupted in transit, and the
packet is dropped.
Checksum
Check sum is the third method for error detection mechanism.
Checksum is used in the upper layers, while Parity checking and CRC
is used in the physical layer. Checksum is also on the concept of
redundancy.
A checksum of a message is a modular arithmetic sum of message
code words of a fixed word length (e.g., byte values).
The sum may be negated by means of a ones'-complement operation
prior to transmission to detect errors resulting in all-zero messages.
Checksum schemes include
Parity Bits,
Check Digits
Longitudinal Redundancy Checks.
Error Correction
Network designers have developed two basic strategies for dealing
with errors.
One way is to include enough redundant information along with each
block of data sent, to enable the receiver to deduce what the
transmitted data must have been.
The other way is to include only enough redundancy to allow the
receiver to deduce that an error occurred, but not which error, and
have it request a retransmission
Some of the error correction strategies include :
Hamming Distance
Backward Error Correction
Forward Error Correction
Hamming Distance
It is a single bit error correction method using redundant bits.
In this method redundant bits are included with the original data.
Now, the bits are arranged such that different incorrect bits produce
different error results and the corrupt bit can be identified.
Once the bit is identified, the receiver can reverse its value and
correct the error. Hamming code can be applied to any length of data
unit and uses the relationships between the data and the redundancy
bit
The number of bit positions in which two code words differ is called
the Hamming distance (Hamming, 1950). Its significance is that if two
code words are a Hamming distance d apart, it will require d single-
bit errors to convert one into the other
Backward Error Correction
Backward Error Correction, also known as an “Automatic Repeat
Request” is an error correction technique in which a receiving device
sends a request to the source device to re-send information.
Backward Error Correction is used in situations where some of the
transmitted data has been lost or corrupted during transit and the
transmitting device must resend the information in order for the
receiving device to understand the transmission
Backward Error Correction is often used instead of Forward Error
Correction because it requires less bandwidth.
However, because Backward Error Correction requires the receiving
device to receive a signal before it requests redundant information, it
requires more time than Forward Error Correction and may even use
more bandwidth for individual transfers due to constant messaging
between the two devices.
Forward Error Correction
In the simplest form of FEC, each character is sent twice. The receiver
checks both instances of each character for adherence to the protocol
being used.
If conformity occurs in both instances, the character is accepted. If
conformity occurs in one instance and not in the other, the character
that conforms to protocol is accepted.
If conformity does not occur in either instance, the character is
rejected and a blank space or an underscore (_) is displayed in its
place.
Flow Control
Flow Control is one important design issue for the Data Link Layer
that controls the flow of data between sender and receiver.
In Communication, there is communication medium between sender
and receiver. When Sender sends data to receiver than there can be
problem in below case where Sender sends data at higher rate and
receive is too sluggish to support that data rate.
To solve the above problem, Flow Control is introduced in Data Link
Layer. It also works on several higher layers.
The main concept of Flow Control is to introduce Efficiency in
Computer Networks.
Approaches of Flow Control
Feed Back Based Flow Control
Rate Based Flow Control
Feed Back Based Flow Control
The receiver sends back information to the sender giving it
permission to send more data or at least telling the sender how the
receiver is doing.
It provides unidirectional flow of data from sender to receiver.
The Communication channel is assumed to be error free.
In this Protocol the Sender simply sends data and waits for the
acknowledgment from Receiver. That's why it is called Stop-and-Wait
Protocol.
This type is not so much efficient, but it is simplest way of Flow
Control.
Rate Based Flow Control
The protocol has a built-in mechanism that limits the rate at which
senders may transmit data, without using feedback from the receiver
Feed back based Flow Control is used in Data Link Layer and Rate
based Flow Control is used in Network Layer.