Data Link Control Presentation

23
8/16/2019 Data Link Control Presentation http://slidepdf.com/reader/full/data-link-control-presentation 1/23 DATA LINK CONTROL

Transcript of Data Link Control Presentation

Page 1: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 1/23

DATA LINK

CONTROL

Page 2: Data Link Control Presentation

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 

Page 3: Data Link Control Presentation

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.

Page 4: Data Link Control Presentation

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.

Page 5: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 5/23

Page 6: Data Link Control Presentation

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.

Page 7: Data Link Control Presentation

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.

Page 8: Data Link Control Presentation

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

Page 9: Data Link Control Presentation

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.

Page 10: Data Link Control Presentation

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.

Page 11: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 11/23

Page 12: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 12/23

Page 13: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 13/23

Page 14: Data Link Control Presentation

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.

Page 15: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 15/23

&it Stu'ng

Page 16: Data Link Control Presentation

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.

Page 17: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 17/23

%rotoco"s

Page 18: Data Link Control Presentation

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.

Page 19: Data Link Control Presentation

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.

Page 20: Data Link Control Presentation

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.

Page 21: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 21/23

F"o( Diagram

Page 22: Data Link Control Presentation

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.

Page 23: Data Link Control Presentation

8/16/2019 Data Link Control Presentation

http://slidepdf.com/reader/full/data-link-control-presentation 23/23

Flow diagram