Topic No 3
Topic No 3
Topic No 3
Error Detection:-
Error:- A condition when the receiver’s information does not match
with the sender’s information. During transmission, digital signals
suffer from noise that can introduce errors in the binary bits travelling
from sender to receiver. That means a 0 bit may change to 1 or a 1 bit
may change to 0.
Error Detecting Codes (Implemented either at Data link layer or
Transport Layer of OSI Model):- Whenever a message is
transmitted, it may get scrambled by noise or data may get corrupted.
we use error-detecting codes which are additional data added to a
given digital message to help us detect if any error has occurred
during transmission of the message.
2
3.1 Error detection and correction techniques
• Basic approach used for error detection is the use of redundancy bits,
where additional bits are added to facilitate detection of errors.
• Following are some popular techniques for error detection :
1. Simple Parity check
2. Two-dimensional Parity check
3. Checksum
4. Cyclic redundancy check
3
3.1 Error detection and correction techniques
2. Two-dimensional
Parity check:-
Parity check bits are
calculated for each row,
which is equivalent to a
simple parity check bit.
Parity check bits are
also calculated for all
columns, then both are
sent along with the data.
At the receiving end
these are compared with
the parity bits calculated
on the received data.
3.1 Error detection and correction techniques
3. Checksum
4. In checksum error detection scheme, the data is divided into k
segments each of m bits.
5. In the sender’s end the segments are added using 1’s complement
arithmetic to get the sum. The sum is complemented to get the
checksum.
6. The checksum segment is sent along with the data segments.
7. At the receiver’s end, all received segments are added using 1’s
complement arithmetic to get the sum. The sum is complemented.
8. If the result is zero, the received data is accepted; otherwise
discarded.
3.1 Error detection and correction techniques
3.1 Error detection and correction techniques
Error Correction
Error correction can be done in two ways:
1. Backward Error Correction When the receiver detects an error in
the data received, it requests back the sender to retransmit the data
unit.
2. Forward Error Correction When the receiver detects some error
in the data received, it executes error-correcting code, which helps it
to auto-recover and to correct some kinds of errors.
Backward Error Correction, is simple and can only be efficiently used
where retransmitting is not expensive. For example, fiber optics. But in
case of wireless transmission retransmitting may cost too much. So
Forward Error Correction is used.
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.2 Framing and its types
3.3 Flow and error control
Flow Control:
When a data frame (Layer-2 data) is sent from one host to another over a
single medium, it is required that the sender and receiver should work at
the same speed. Sender sends at a speed on which the receiver can
process and accept the data. What if the speed (hardware/software) of the
sender or receiver differs? If sender is sending too fast the receiver may
be overloaded, (swamped) and data may be lost.
Two types of mechanisms can be deployed to control the flow:
1. Stop and Wait
2. Sliding Window
3.3 Flow and error control
Flow Control:
1. Stop and Wait
This flow control mechanism forces
the sender after transmitting a data
frame to stop and wait until the
acknowledgement of the data-frame
sent is received.
Advantage of Stop-and-wait
The Stop-and-wait method is simple as
each frame is checked and
acknowledged before the next frame is
sent.
3.3 Flow and error control
3. Delayed Acknowledgement:
This is resolved by introducing sequence number for acknowledgement
also.
3.3 Flow and error control
Flow Control: 2. Sliding Window
1 4
2 5
3 6
3.3 Flow and error control
Flow Control:
2. Sliding Window
7
3.3 Flow and error control
1. Go – Back – N ARQ:-
3.3 Flow and error control
1. Go – Back – N ARQ:-
3.3 Flow and error control
HDLC Frame
HDLC is a bit - oriented protocol where each frame contains up to six fields.
The structure varies according to the type of frame.
Flag − It is an 8-bit sequence that marks the beginning and the end of the
frame. The bit pattern of the flag is 01111110.
Address − It contains the address of the receiver. If the frame is sent by the
primary station, it contains the address(es) of the secondary station(s). If it is
sent by the secondary station, it contains the address of the primary station.
The address field may be from 1 byte to several bytes.
Control − It is 1 or 2 bytes containing flow and error control information.
Payload − This carries the data from the network layer. Its length may vary
from one network to another.
FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The
standard code used is CRC (cyclic redundancy code)
3.4 HDLC Protocol
3.4 HDLC Protocol
P2P Protocol:-
It stands for "Peer to Peer." In a P2P network, the "peers" are computer
systems which are connected to each other via the Internet. Files can be
shared directly between systems on the network without the need of a
central server. In other words, each computer on a P2P network becomes
a file server as well as a client.
3.5 P2P Protocol
Assignment No.3
Sub- Network Technology
Q.1. Explain the following error detection and correction
techniques in detail.
1. Simple Parity Check
2. Two Dimensional Parity check
3. Checksum
4. Cyclic Redundancy check(CRC)
Q.2. Explain Framing and its types.
Q.3. Explain character-oriented protocol and Bit-oriented
Protocol in detail.
Q.4. Explain following flow and error control method in
detail.
5. Stop and Wait
6. Sliding Window
Q.5. Explain HDLC Protocol in detail.
Q.6. Explain Point to Point Protocol in detail.