8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 1/23
DATA LINK
CONTROL
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 2/23
Functions of Data Link
Layer• The two main functions of the data link layer
are data link control and media access control.
• Data link control deals with the design and
procedures for communication between two
adjacent nodes: node-to-node communication.
• The second function of the data link layer is
media access control, or how to share the link
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 3/23
• Data link control functions include framing,flow and error control, and software
implemented protocols that provide smooth and
reliable transmission of frames between nodes.
• To implement data link control, we need
protocols. rotocols are set of rules that need to
be implemented in a software and run by two
nodes involoved in data e!change at the data
link layer.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 4/23
Framing
• Data transmission in the physical layer meansmoving bits in the form of a signal from thesource to the destination.
• The physical layer provides bitsynchroni"ation to ensure that the sender andreceiver use the same bit durations and timing.
• The data link layer packs bits into frames, sothat each frame is distinguishable fromanother.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 5/23
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 6/23
Fixed Size Framing
• 'n fi!ed-si"e framing, there is no need for defining
the boundaries of the frames.• The si"e itself can be used as a delimiter.
• (n e!ample of this type of framing is the (T) wide-
area network, which uses frames of fi!ed si"e called
cells.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 7/23
aria!"e#Size Framing
•
revalent in local area networks.• 'n variable-si"e framing, we need a way to
define the end of the frame and the beginning
of the ne!t.• Two approaches were used for this purpose: a
character-oriented approach and a bit-oriented
approach.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 8/23
arac er# r en e%rotoco"s
• *haracter-oriented protocol, data to be carried are+-bit characters from a coding system such as
(*''.
• The header normally carries the source and
destination addresses and other control
information, and the trailer carries error detection
or error correction redundant bits, are multiples of
+ bits.• To separate one frame from the ne!t, an +-bit flag
is added at the beginning and the end of a frame
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 9/23
•*haracter-oriented framing was popular to e!change
te!t by the data link layers.
•The flag could be selected to be any character not
used for te!t communication.•(ny pattern used for the flag could also be part of the
information. 'f this happens, the receiver thinks it has
reached the end of the frame as it encounters this
pattern in the middle of the data
•To fi! this problem, a byte-stuffing strategy was
added to character-oriented framing.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 10/23
• 'n byte stuffing or character stuffing, a special byteis added to the data section of the frame when there is
a character with the same pattern as the flag.
• The data section is stuffed with an e!tra byte. This
byte is usually called the escape character /*,which has a predefined bit pattern.
• 0yte stuffing is the process of adding 1 e!tra byte
whenever there is a flag or escape character in the
te!t.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 11/23
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 12/23
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 13/23
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 14/23
• This flag can create the same type of problem we sawin the byte-oriented protocols.
• 'f the flag pattern appears in the data, we need tosomehow inform the receiver that this is not the endof the frame.
• %e do this by stuffing 1 single bit instead of ' byteto prevent the pattern from looking like a flag, called
bit stuffing.
• 'n bit stuffing, if a 4 and five consecutive 1bits are
encountered, an e!tra 4 is added• This e!tra stuffed bit is eventually removed from the
data by the receiver.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 15/23
&it Stu'ng
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 16/23
F"o( and )rror Contro"
• The most important responsibilities of the data link layerare flow control and error control.
• #low control coordinates the amount of data that can besent before receiving an acknowledgment.
•#low control, a set of procedures, that tells the senderhow much data it can transmit before receiving anacknowledgment from the receiver.
• /rror control is both error detection and error correction.
•'t allows the receiver to inform the sender of any frameslost or damaged in transmission and coordinates theretransmission of those frames by the sender.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 17/23
%rotoco"s
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 18/23
Noiseless Channels
• The first protocol does not use flow control$the second is the one that does.
• 5either has error control because we have
assumed that the channel is a perfect noiselesschannel.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 19/23
Simplest Protocol
•
6nidirectional protocol in which data framesare travelling in only one direction-from the
sender to receiver.
•
The receiver can immediately handle anyframe it receives with a processing time that is
small enough to be negligible*
•
5o need for flow control in this scheme.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 20/23
• The data link layer at the sender gets data from itsnetwork layer, makes a frame out of the data, andsends it.
• The data link layer at the receiver site receives aframe from its physical layer, e!tracts data from theframe, and delivers the data to its network layer.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 21/23
F"o( Diagram
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 22/23
Sto+#and#,ait %rotoco"
• 'f data frames arrive at the receiver site fasterthan they can be processed, the frames must bestored until their use.
• 'n stop and wait protocol the sender sends one
frame, stops until it receives confirmation fromthe receiver okay to go ahead, and then sendsthe ne!t frame.
• %e still have unidirectional communication for
data frames, but (*7 frames (cknowledgmentframe travel from the other direction.
• %e need a half-duple! link.
8/16/2019 Data Link Control Presentation
http://slidepdf.com/reader/full/data-link-control-presentation 23/23
Flow diagram