Chapter 3: Data Link Layer
Chapter 3: Data Link Layer
Data Link layer Design Issues, Link layer services, Framing, error
control and Flow control, DLL protocols: Elementary Data Link
Protocols, Sliding Window protocols: Protocols Verification models
Introduction
• Host and routers are as nodes.
• Communication channels that
connect adjacent nodes along global ISP
communication path, its called links.
• Wired links
• Wireless links
• LANs
• In this layer, Packet is form of frame
from encapsulate datagram.
• This layer has responsibility of
transferring datagram from one
node to physically adjacent node
over a link.
The data link layer transforms the physical layer, a raw transmission facility, to
a link responsible for node-to-node (hop-to-hop) communication. Specific
responsibilities of the data link layer include framing, addressing, flow control,
error control, and media access control.
Link Layer Services
• Framing
• Encapsulate datagram into frame.
• Adding header and trailer.
• Link Access
• “MAC” addresses used in frame headers to identify source and destination. It is
different from IP address.
• Reliable delivery
• If this layer protocol provides reliable delivery service, it guarantees to move each
network-layer datagram across the link without error.
• A link-layer reliable delivery service can be achieved with acknowledgments and
retransmissions.
• Flow Control
• Pacing between adjacent sending and receiving nodes.
Link Layer Services – Cont…
• Error Detection & Correction
• Errors caused by signal attenuation and noise.
• Receiver detects presence of errors.
• Sender send signal for retransmission or drops frame.
• Receiver identifies and corrects bit error(s) without resorting to retransmission.
DLL DESIGN ISSUES
• Flow Control
Prevent a fast sender from overwhelming a slower receiver.
FRAMING
DLL translates the physical layer's raw bit stream into discrete
units (messages) called frames.
How can frame be transmitted so the receiver can
detect frame boundaries? That is, how can the
receiver recognize the start and end of a frame?
Character Count
Flag byte with Byte Stuffing
Starting and ending flag with bite stuffing
Encoding Violations
7
FRAMING – CHARACTER COUNT
The first framing method uses a field in the header 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.
11
The trouble with this algorithm is that the count can be garbled by a
transmission error.
FRAMING – Bit Stuffing
Various Flow Control schemes uses a common protocol that contains well-
defined rules about when a sender may transmit the next frame. These rules
often prohibit frames from being sent until the receiver has granted permission,
either implicitly 20 or explicitly.
ERROR CORRECTION AND DETECTION
It is physically impossible for any data recording or transmission medium to be 100%
perfect 100% of the time over its entire expected useful life.
In data communication, line noise is a fact of life (e.g., signal attenuation, natural
phenomenon such as lightning, and the telephone repairman).
As more bits are packed onto a square centimeter of disk storage, as communications
transmission speeds increase, the likelihood of error increases-- sometimes
geometrically.
Thus, error detection and correction is critical to accurate data transmission, storage
and retrieval.
1. Single bit error : It means only one bit of data unit is changed from 1 to 0 or from 0 to 1.
2. Burst error : It means two or more bits in data unit are changed from 1 to 0 from 0 to 1. In burst error, it
is not necessary that only consecutive bits are changed. The length of burst error is measured from first
changed bit to last changed bit
19
Error Detection & Correction Technique
• Techniques for error detection
• Parity Check
• Checksum Method
• Cyclic Redundancy Check