Data Link Control and Protocols
Data Link Control and Protocols
Data Link Control and Protocols
Control
and
Protocols
Data Link Control
Deals with design & procedure for
communication between two adjacent
nodes: node-to-node communication
Include framing, flow & error control
Software implemented protocols that
provide smooth & reliable transmissions of
frames between nodes
Framing
DLL needs to pack bits into frames, so that each
frame is distinguishable from another
Separates a message from one source to a
destination, or from other messages to other
destinations, by adding sender address &
destination address
Very Large frame makes flow & error control
very inefficient & even single bit error would
require the retransmission of the whole message
Types of Framing
Fixed sized framing
* No need for defining the boundaries
of the frames; size itself is used as
delimiter e.g ATM wide area network
Variable size framing
* Prevalent in LAN ,need a way to
define the end of the frame & the
beginning of the next frame
Character oriented Protocols
Also known as byte oriented protocols
frame or packet is interpreted as a series of
characters
Data are 8-bit characters encoded in ASCII.
An 8-bit flag is added at the beginning & the end
of a frame
Byte stuffing is the process of adding 1 extra
byte whenever there is a flag or escape character
in the text
Are not as efficient as bit-oriented protocols and
therefore one now seldom used
Bit-oriented protocol
frame of packet is interpreted as a series
of bits to be interpreted by the upper layer
as text, graphics, audio, video, etc
can pack more information into shorter
frames and avoid the transparency
problem of character-oriented protocol
Bit-oriented protocols provide full-duplex
operation and are more efficient and
reliable.
Bit-Stuffing
Most protocols use 8-bit pattern flag
01111110 as the delimiter to define
the beginning & end of the frame
Stuff 1 bit to prevent the pattern from
looking like a flag
If a 0 and five consecutive 1 bits are
encountered, an extra 0 is added
Flow and Error Control
Flow Control
Error Control
Flow control refers to a set of
procedures used to restrict the
amount of data that the
sender can send before
waiting for acknowledgment.
Error control in the data
link layer is based on
automatic repeat request,
which is the
retransmission of data.
Stop-and-Wait ARQ
Operation
Bidirectional Transmission
Stop and Wait
Source transmits single frame
Wait for ACK
If received frame damaged, discard it
Transmitter has timeout
If no ACK within timeout, retransmit
If ACK damaged,transmitter will not
recognize it
Transmitter will retransmit
Receive gets two copies of frame
Use ACK0 and ACK1
Normal operation
Sequence Number
Resending Frames
Operation
Sequence Number(SeqN)
Frames from sending station are
numbered sequentially
If header of the frame allows m-bits for
the sequence number,the SeqN range
from 0 to 2m -1
Sender sliding window
Reciever
expecting
frame 2
Operation
Bidirectional Transmission
Pipelining
Selective Repeat ARQ
For noisy link frame has higher probability
of damage,which means resending
multiple frames,so bandwidth is utilized
and slow transmission
For noisy links,only damaged frame is
resent.
But processing at the reciver side is more
complex
Selective Repeat ARQ, sender and receiver windows
Solution
The bandwidth-delay product is
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
delay, use of Stop-and-Wait ARQ wastes the capacity of the link.
Example 2
What is the utilization percentage of the link in Example 1 if the link uses Go-
Back-N ARQ with a 15-frame sequence?
Solution
The bandwidth-delay product is still 20,000. The system can send up to 15
frames or 15,000 bits during 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.
Data Link Control Protocols
Interface standards provide means for which a stream of
data can be transmitted but do not include function of
error control and flow control
A data link control protocol handles error control and flow
control
Examples of data link protocols
HDLC – High Level Data Link Control
LAPB- Link Access Procedure Balanced
Connect devices to packet switched networks
LAPF- Link Access Procedure for Frame
Frame relay
HDLC
Frames
Frame Format
Examples
Data Transparency
HDLC
Accepts user data from higher level
software and delivers across link to
another device
On other side HDLC accepts user data and
send it to application
Both HDLC modules exchange control
information to provide:
Flow control
Error control
HDLC Station Types
Primary station
Controls operation of link
Frames issued are called commands
Maintains separate logical link to each
secondary station
Secondary station
Under control of primary station
Frames issued called responses
Combined station
May issue commands and responses
HDLC Link Configurations
Unbalanced
One primary and one or more secondary
stations
Supports full duplex and half duplex
Balanced
Two combined stations
Supports full duplex and half duplex
NRM (Normal Response Mode)
HDLC Transfer Modes (1)
Normal Response Mode (NRM)
Unbalanced configuration
Primary initiates transfer to secondary
Secondary may only transmit data in response
to command from primary
Used on multi-drop lines
Host computer as primary
Terminals as secondary
ABM
HDLC Transfer Modes (2)
Asynchronous Balanced Mode (ABM)
Balanced configuration
Either station may initiate transmission
without receiving permission
Most widely used
No polling overhead
HDLC frame
Flag
Used for synchronization
Beg and end of frame
Address
Address of secondary stations
Point to point or multidrop
Control
Identifies purpose and function of frame
Information
User Data
Frame Check Sequence
16 or 32 bit CRC
Flag Fields
Delimit frame at both ends
01111110
May close one frame and open another
Receiver hunts for flag sequence to synchronize
Bit stuffing used to avoid confusion with data
containing 01111110
0 inserted after every sequence of five 1s
If receiver detects five 1s it checks next bit
If 0, it is deleted
If 1 and seventh bit is 0, accept as flag
If sixth and seventh bits 1, sender is indicating abort
Address Field
Identifies secondary station that sent or will
receive frame
Usually 8 bits long
May be extended to multiples of 7 bits
LSB of each octet indicates that it is the last octet (1)
or not (0)
All ones (11111111) is broadcast
Control Field
Different for different frame type
Information - data to be transmitted to user
(next layer up)
Flow and error control piggybacked on information
frames
Supervisory - ARQ when piggyback not used
Unnumbered - supplementary link control
First one or two bits of control filed
identify frame type
HDLC frame types
Information Frames
I frame
Carries user data
Can also carry flow control and error control
Supervisory Frames
S Frames
Flow control and error control
Unnumbered frames
Link set – up and disconnection
No acknowledgement information
Control Field Diagram
I-frame