03-DataLink
03-DataLink
Deals with the design and procedures The data link layer packs bits into
for communication between two frames, so that each frame is
adjacent
j nodes ((node-to-node distinguishable
g from another.
communication) The data link layer adds a sender
Data link control functions include address and a destination address to
{ framing the frames.
{ flow control
{ error control
MH 3 MH 4
1
Bit-Oriented Protocols Flow Control
The data section of a frame is a
sequence of bits to be interpreted by Flow control refers to a set of
the upper layer as text, image, audio, procedures used to restrict the amount
video etc.
video, etc of data that the sender can send before
waiting for acknowledgment
Most protocols use a special 8-bit
pattern flag 01111110 as the delimiter Ensuring the sending entity does not
to define the frame boundaries overwhelm the receiving entity
{ Preventing buffer overflow (giving ample time
to the processor to process)
MH 7 MH 8
2
Simplest Method Stop-and-Wait
MH 15 MH 16
MH 17 MH 18
3
Stop and Wait ARQ Operation of Stop and Wait
MH 21 MH 22
MH 23 MH 24
4
Piggybacking Go-back-N ARQ
In bidirectional transmission both parties keep record
of sent and expected frame numbers Stop-and-Wait ARQ is simple but inefficient
Piggybacking To improve efficiency multiple frames should
saves be in transition while waiting for ACK
bandwidth T
Transmitter
itt can send d W frames
f without
ith t ACK
(reduces A copy of each frame is kept until ACK arrives
overheads
like CRC,
Each frame is numbered
addresses, Sequence number bounded by size of field
etc.) { If frame header allows m bits for sequence
number, number range will be 0 to 2m - 1
MH 25 MH 26
MH 27 MH 28
5
Operation of Go-back-N 1. Normal Operation
MH 31 MH 32
MH 33 MH 34
MH 35 MH 36
6
Selective Repeat ARQ Sender and Receiver windows
Control variables same as Go-back-N
Go-back-N ARQ Window size at most half of 2m (W <= 2m-1)
{ simplifies the process at receiver site
Receiver expects a “range” of frames
{ very inefficient for a noisy channel
-ve ACK (NAK) reports the sequence number
(resending many frames when only one
of the damaged frame
was damaged)
Selective Repeat ARQ
{ Processing at receiver is complex
{ More efficient for noisy links (resends
damaged frames only)
MH 37 MH 38
Lost frame
Sender and Receiver windows
MH 39 MH 40
MH 41 MH 42
7
Bandwidth-Delay Product Example
In a Stop-and-Wait ARQ system, the bandwidth of the line
is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What
Efficiency of an ARQ system can be is the bandwidth-delay product? If the system data frames
measured by the product of bandwidth are 1000 bits in length, what is the utilization percentage of
the link?
((bps)
p ) and round-trip
p delay
y ((sec))
Solution
It is a measure of the number of bits
The bandwidth-delay product is
that can be sent out of a system while
1 × 106 × 20 × 10-3 = 20,000 bits
waiting for ACKs
The system can send 20,000 bits during the time it takes for the data to
go from the sender to the receiver and then back again. However, the
system sends only 1000 bits. We can say that the link utilization is only
1000/20,000, or 5%. For this reason, for a link with high bandwidth or long
MH 43 delay,
MH use of Stop-and-Wait ARQ wastes the capacity of the link. 44
Example HDLC
What is the utilization percentage of the link in the
previous example if the link uses Go-Back-N ARQ Configurations and Transfer Modes
with a 15-frame sequence? Frame Format
Solution Frame Types
The bandwidth-delay product is still 20,000. The
Examples
system can send up to 15 frames or 15,000 bits during Data Transparency
a round trip. This means the utilization is
15,000/20,000, or 75 percent. Of course, if there are
damaged frames, the utilization percentage is much
less because frames have to be resent.
MH 45 MH 46
MH 47 MH 48
8
Configurations & Transfer Modes Frame Format
2. ABM – Asynchronous Balanced Mode
Each frame in HDLC may contain up
{ Station configuration is balanced
{ Point-to-point link
to 6 fields
{ Each station can function as primary and
secondary
MH 49 MH 50
Control Field
{ 1 or 2 bytes for flow and error control
Information Field
{ Contains user data from network layer or
network management information
FCS Field
{ Contains 2 or 4 byte ITU-T CRC
MH 53 MH 54
9
I-frame (Information) S-frame (Supervisory)
Carries user data from network layer Used for flow and error control whenever
Can carry flow and error control information piggybacking can not be used
(piggybacking) Code field defines whether RR, RNR, REJ
or SREJ
MH 55 MH 56
Example 1 Example 2
In previous example,
suppose frame 1 sent
from station B to station
A has an error. Station A
informs station B to
resend frames 1 and 2
(the system is using the
Go-Back-N mechanism).
Station A sends a reject
supervisory frame to
announce the error in
frame 1.
MH 59 MH 60
10