0% found this document useful (0 votes)
129 views23 pages

Chapter 3: Data Link Layer

The data link layer transforms the physical layer into a link layer responsible for node-to-node communication. It is responsible for framing, addressing, flow control, error control, and media access control. Specific functions include encapsulating datagrams into frames, using MAC addresses for identification, providing reliable delivery through acknowledgments and retransmissions, and flow control to prevent faster senders from overwhelming slower receivers. Error detection techniques include parity checks, checksums, and cyclic redundancy checks to detect errors, while error correction can correct bit errors without retransmission.

Uploaded by

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

Chapter 3: Data Link Layer

The data link layer transforms the physical layer into a link layer responsible for node-to-node communication. It is responsible for framing, addressing, flow control, error control, and media access control. Specific functions include encapsulating datagrams into frames, using MAC addresses for identification, providing reliable delivery through acknowledgments and retransmissions, and flow control to prevent faster senders from overwhelming slower receivers. Error detection techniques include parity checks, checksums, and cyclic redundancy checks to detect errors, while error correction can correct bit errors without retransmission.

Uploaded by

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

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

• Services Provided to the Network Layer


The network layer wants to be able to send packets to its neighbors without worrying
about the details of getting it there in one piece.
• Framing
Group the physical layer bit stream into units called frames. Frames are nothing more
than "packets" or "messages". By convention, we use the term "frames" when
discussing DLL.
• Error Control
Sender checksums the frame and transmits checksum together with data. Receiver re-
computes the checksum and compares it with the received value.

• 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

• In a bit-oriented protocol, the data to send is a series of bits.


• In order to distinguish frames, most protocols use a bit pattern of 8-bit length
(01111110) as flag at the beginning and end of each frame.
• Here also cause the problem of appearance of flag in the data part to deal
with this an extra bit added.
• This method is called bit stuffing.
• If a 0 and five successive 1 bits are encountered, an extra 0 is added.
• The receiver node removes the extra-added zero.
Bit Stuffing - Example
Bit Stuffing - Example
FRAMING – Byte Stuffing

• Problem of resynchronization by having each frame start and end with


special bytes.
• A flag byte is used to separate the frame as both the starting and ending
delimiter.
• This technique is called byte stuffing or character stuffing.
• In this way, if the receiver ever loses synchronization, it can just search for
the flag byte to find the end of the current frame.
• Two consecutive flag bytes indicate the end of one frame and start of the
next one.
Byte Stuffing - Example
• 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.
Error control
 Error control is concerned with insuring that all frames are eventually delivered (possibly
in order) to a destination. How? Three items are required.

Acknowledgements: Typically, reliable delivery is achieved using the “acknowledgments


with retransmission" paradigm, whereby the receiver returns a special acknowledgment
(ACK) frame to the sender indicating the correct receipt of a frame.
In some systems, the receiver also returns a negative acknowledgment (NACK) for
incorrectly-received frames. This is nothing more than a hint to the sender so that
it can retransmit a frame right away without waiting for a timer to expire.
 Timers: One problem that simple ACK/NACK schemes fail to address is recovering from
a frame that is lost, and as a result, fails to solicit an ACK or NACK. What happens if an
ACK or NACK becomes lost?
Retransmission timers are used to resend frames that don't produce an ACK. When
sending a frame, schedule a timer to expire at some time after the ACK should have
been returned. If the timer goes o, retransmit the frame.
 Sequence Numbers: Retransmissions introduce the possibility of duplicate frames. To
suppress duplicates, add sequence numbers to each frame, so tha1t 9a receiver can
distinguish between new frames and old copies.
Flow control
 Flowcontrol deals with throttling the speed of the sender to
match that of the receiver.
 Two Approaches:
 feedback-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
 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.

 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.

 Detecting and correcting errors requires redundancy -- sending additional


information along with the data.
TYPES OF
ERRORS
 There are two main types of errors in transmissions:

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

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