You are on page 1of 38

DESIGN ISSUES OF

DATA LINK LAYER


 Providing a well defined service interface to the N/W

 Deals with the transmission errors

 Regulating the flow control of data, so that slow receivers


are not swamped by fast senders.
DATA LINK LAYER
DATA LINK LAYER

Design Issues :
Design Issues of Data link layer are :
1. Service Provided to the Network Layer
2. Framing
3. Error Detection and Correction
4. Flow Control
SERVICE PROVIDED TO THE NETWORK LAYER

Data link layer provides three services to the network layer

i ) Un acknowledged Connectionless Service

ii ) Acknowledged Connection less Service

iii ) Acknowledged Connection Oriented Service


A. Virtual Comm. B. Actual Comm.
SERVICE PROVIDED TO THE NETWORK LAYER
I ) UN ACKNOWLEDGED CONNECTIONLESS SERVICE
 Source sends independent frames to the destination with out any acknowledgement .
 Not a reliable service .
 Used in the systems where error rate is low. Ex : LANS, Voice over IP
II ) ACKNOWLEDGED CONNECTIONLESS SERVICE
 Source sends independent frames to the destination with an acknowledgement .
 Reliable service .
 Used in Unreliable channels . Ex : Wireless Systems
III ) ACKNOWLEDGED CONNECTION – ORIENTED SERVICE
 Here source and destination establish a connection before any data is transferred and send
an acknowledgement to the source after receiving each frame in order .
 Most reliable service and Used in more noisy channels .Ex : Video
2. FRAMING :

 Framming is a function of DLL which provides way for a


sender to transmit a set of bits that are meaningful to the
receiver.
 Grouping the bits together from the physical layer and
constructing a frame is called framing .
 The frames are created by the adding a header and trailer to
the packet which specify the source and destination
addresses .
FRAMING - DLL
FRAMING IS OF TWO TYPES

1. Fixed size framing or static framing


- Size of frame is fixed
- No need to specify the start of the frame .

2. Variable size framing or Dynamic


- Size of the frames changed .
- It is necessary to specify the start of each frame .
DATA LINK LAYER

Four methods can be used to mark the start and end of


each Frames .
1. Character Count
2. Character Stuffing or Byte Stuffing
3. Bit Stuffing
4. Physical Layer Coding Violations .
1. CHARACTER COUNT

 Here a field in the header ,Specifies the number of characters


in the frame .
 Data link layer at the destination looks the character count
and deside the end of frame
 The main draw back of this method is if any count is garbled
by a transmission error then the destination is unable to
decide the frames .
CHARACTER COUNT

Fig : Character Count a) With out Errors b) With Errors


CHARACTER STUFFING OR BYTE STUFFING

 Each frame start and end with special bytes – Flag byte

 If the flag byte occurs in the frame, stuff an extra escape


byte (ESC)

 Point to point protocol


CHARACTER STUFFING OR BYTE STUFFING
CHARACTER STUFFING OR BYTE STUFFING
BIT STUFFING OR BIT ORIENTED

 In this method each frame starts and ends with a special bit
pattern like 0111110 called a flag byte .
 When the sender data link layer encounters a five consecutive
ones in the data it automatically stuffs a 0 bit into the out going
bit stream .
 When the receiver sees five consecutive 1’s followed by a 0 bit
it automatically destuffs the 0 bit and send data to network
layer .
BIT STUFFING
ERROR CONTROL

 After solving the marking of the frame with start and end the data
link layer has to handle eventual errors in transmission or
detection. Ensuring that all frames are delivered to the network
layer at the destination and in proper order.
 Unacknowledged connectionless service:
It is OK for the sender to output frames regardless of its reception.
 Reliable connection-oriented service:
It is NOT OK.
ERROR DETECTION AND CORRECTION

Two basic strategies to deal with errors:


 Include enough redundant information to enable the receiver to
deduce what the transmitted data must have been Error
correcting codes.
 Include only enough redundancy to allow the receiver to deduce
that an error has occurred (but not which error). Error detecting
codes.
1. REDUNDANCY

 To detect the errors we use a mechanism called redundancy

 Group of bits adding to end of data unit


REDUNDANCY
 To detect the errors we use a mechanism called redundancy .
 It involves the transmission of each data unit twice .
 Same data unit is not received twice in succession a transmission error occurred
 The disadvantage of this system is slow and if an error occurred at the same position of
both data units .
 To avoid the disadvantage of this method a shorter group of bits added to the end of
each data unit ,this technique is called redundancy
 Data unit is passed through a generating unit and it adds an appropriate redundancy
check bits .
 This data unit send to the receiver and receiver puts the entire stream into a checking
function .
 If there is no error data is accepted other wise rejected .
REDUNDANCY
2. EXACT COUNT ENCODING

 The number of 1’s in the data unit are received same.

 In the destination side it count the number of 1’s received


same or not determine the transmission error.
ERROR CORRECTION

 When the error is discovered, the receiver ask the sender


to retransmit the same data.

 Receiver can use an error correcting codes to detect and


correct errors.
ERROR DETECTION AND CORRECTION
 A reliable system must have the mechanism to detect and correct the errors .
Types of Errors
There are three types of Errors :
1. Single Bit
- one bit of a data unit is changed from 0 to 1 and 1 to 0.
Example :
ERROR DETECTION AND CORRECTION

2. Multiple Bit
Two or more non consecutive bits in data unit have changed from
1 to 0 or 0 to1 .
Example :
ERROR DETECTION AND CORRECTION
3. Burst Errors
 Two or more consecutive bits in the data unit have changed
from 1 to 0 and 0 to 1 .
ERROR DETECTION AND CORRECTION TECHNIQUES

ERROR DETECTION
1.Parity Checker
2. Check Sum
3. Cyclic Redundancy Check

ERROR CORRECTION
1. Hamming Code
1.PARITY CHECKER
 In the given word including the parity bit should It is the simplest
technique for detecting and correcting errors.
 The MSB of an 8-bits word is used as the parity bit and the
remaining 7 bits are used as data or message bits.
 The parity of 8-bits transmitted word can be either even parity or
odd parity.
Even parity: Even parity means the number of 1's in the given
word including the parity bit should be even (2,4,6,....).
Odd parity: Odd parity means the number of 1's be odd (1,3,5,....).
1.PARITY CHECKER
1.PARITY CHECKER
1.PARITY CHECKER

Example :

Drawbacks
 It does not detect all types of errors .
 Not suitable for multiple bit errors .
DISADVANTAGES

 Single Parity check is not able to detect even no. of bit error.
 For example, the Data to be transmitted is 101010. Codeword
transmitted to the receiver is 1010101 (we have used even parity).
Let’s assume that during transmission, two of the bits of code word
flipped to 1111101.On receiving the code word, the receiver finds the
no. of ones to be even and hence no error
2. CHECK SUM
 In checksum error detection scheme, the data is divided into N
segments each of M bits.
 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
 Now, checksum segment is sent along with the data segment
 At receivers end, all received segment are added using 1’s
complement arithmetic to get the sum. The sum is complemented.
 If the result 0 data is accepted otherwise rejected.
2. CHECK SUM
DISADVANTAGES

 Ifone or more bits of a segment are damaged and the


corresponding bit or bits of opposite value in a second
segment are also damaged.

You might also like