0% found this document useful (0 votes)
7 views16 pages

5.Data link layer_1

The document outlines the functions and services of the data link layer in communication networks, including framing, error control, and the types of services provided to the network layer. It details methods for framing, such as byte count and flag bytes, as well as error detection and correction techniques. The data link layer plays a crucial role in ensuring reliable data transmission by encapsulating packets into frames and managing errors during communication.

Uploaded by

Fariha Tasnim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views16 pages

5.Data link layer_1

The document outlines the functions and services of the data link layer in communication networks, including framing, error control, and the types of services provided to the network layer. It details methods for framing, such as byte count and flag bytes, as well as error detection and correction techniques. The data link layer plays a crucial role in ensuring reliable data transmission by encapsulating packets into frames and managing errors during communication.

Uploaded by

Fariha Tasnim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

EECE 445: COMMUNICATION

NETWORKS
Lec. Onim
EECE, MIST
Outline:

• Functions of Data link layer and its services provided to Network


layer.
• Framing and Framing algorithms.
• Error control
Data Link Layer
“The data link layer uses the services of the physical layer to send and receive bits
over communication channels. The data link layer takes the packets it gets from the
network layer and encapsulates them into frames for transmission. Frame management
forms the heart of what the data link layer does”
Functions of Data link layer:

• The data link layer uses the services of the physical layer to send and
receive bits over communication channels.
• Providing a well-defined service interface to the network layer.
• Dealing with transmission errors
• Regulating the flow of data so that slow receivers are not swamped
by fast senders
• Encapsulates the packets into frames.
Service Provided to Network Layer:

1. Unacknowledged connectionless service

2. Acknowledged connectionless service

3. Acknowledged connection-oriented service


Unacknowledged connectionless service:
o Source machine sends independent frames to the destination machine without having the
destination machine acknowledge.

o Ethernet is a good example of a data link layer that provides this class of service.

o If a frame is lost due to noise on the line, no attempt is made to detect the loss or recover from it
in the data link layer.

o This class of service is appropriate when the error rate is very low, so recovery is left to higher
layers.
Acknowledged connectionless service:
o Each frame sent is individually acknowledged.

o Sender knows whether a frame has arrived correctly or been lost.

o If it has not arrived within a specified time interval, it can be sent again

o This service is useful over unreliable channels, such as wireless systems. 802.11 (WiFi) is a good
example of this class of service.
Framing
o To provide service to the network layer, the data link layer must use the service provided to it by

the physical layer.

o However, the bit stream received by the data link layer is not guaranteed to be error free.

o The usual approach is for the data link layer to break up the bit stream into discrete frames,

compute a short token called a checksum for each frame, and include the checksum in the frame

when it is transmitted.

o When a frame arrives at the destination, the checksum is recomputed.

o If the newly computed checksum is different from the one contained in the frame, the data link

layer knows that an error has occurred and takes steps to deal with it.
Breaking up the bit stream into frames has four methods:

1.Byte count

2. Flag bytes with byte stuffing

3. Flag bits with bit stuffing

4. Physical layer coding violations


Byte count:

o Uses a field in the header to specify the number of bytes in the frame.

o When the data link layer at the destination sees the byte count, it knows how many bytes

follow and hence where the end of the frame is.

o The trouble with this algorithm is that the count can be garbled by a transmission Error.

o It will then be unable to locate the correct start of the next frame.

o For this reason, the byte count method is rarely used.


Flag bytes with byte stuffing:

o Each frame starts and ends with special bytes called flag byte.

o Consecutive flag bytes indicate the end of one frame and the start of the next.

o If the receiver ever loses synchronization it can just search for two flag bytes to find the end

of the current frame and the start of the next frame.

o Can be problematic as it may happen that the flag byte occurs in the data.
o 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.
o Thus, a framing flag byte can be distinguished from one in the data by the absence or
presence of an escape byte before it.
o The data link layer on the receiving end removes the escape bytes before giving the data to
the network layer.
Flag bits with bit stuffing
o Each frame begins and ends with a special bit pattern, 01111110 which is the flag
o Whenever the sender’s data link layer encounters five consecutive 1s in the data, it
automatically stuffs a 0 bit into the outgoing bit stream
o When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it
automatically destuffs (i.e., deletes) the 0 bit.
Error control:
o Error control is implemented at the data-link layer to prevent the receiving node from delivering
corrupted packets to its network layer
o Error control at the data-link layer is normally very simple
o Implemented by adding a CRC to the frame header by the sender which is checked by the receiver
Two methods:
o If the frame is corrupted, it is silently discarded; if it is not corrupted, the packet is delivered to the
network layer. This method is used mostly in wired LANs such as Ethernet.
o If the frame is corrupted, it is silently discarded; if it is not corrupted, an acknowledgment is sent (for
the purpose of both flow and error control) to the sender
Error Detection

o Detect error and delete if error.


o Error detecting codes are used.

Error Correction

o Correct the error from the received codeword.


o Called forward error correction (FEC).
o Used various codes for error corrections .

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy