Download presentation
Presentation is loading. Please wait.
Published byEmma Sealy Modified over 9 years ago
1
CIS 725 Data Link Layer
2
Physical Layer
3
Figure 3-1 B. Forouzan, TCP/IP Protocol Suite
4
Figure 3-2 B. Forouzan, TCP/IP Protocol Suite
5
Figure 3-3 B. Forouzan, TCP/IP Protocol Suite
6
Figure 3-5
7
Figure 3-7 B. Forouzan, TCP/IP Protocol Suite
8
Data Link Layer Physical layer provides unreliable bit stream Services provided by DLL: - framing - message corruption - message reordering - message duplication - message insertion
9
Functions of the Data Link Layer Relationship between packets and frames.
10
Services Provided to Network Layer (a) Virtual communication. (b) Actual communication.
11
Services Provided to Network Layer Placement of the data link protocol.
12
Unacknowledged connectionless service Acknowledged connectionless service Acknowledged connection oriented service
13
Framing Converting a stream to frames (1) bit-oriented (2) character-oriented
14
Framing Bit stuffing (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receiver’s memory after destuffing.
15
Framing (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing.
16
Corruption Error detection Error correction - forward error control - feedback error control
17
Error codes Parity bit Block codes Hamming distance
21
Data transmission protocol S: do avail(nl_buff) sbuff = nl_buff; deliver sbuff to PL; od R: do avail(pl_buff) rbuff = pl_buff; deliver rbuff to NL od
22
S: do avail(nl_buff) sbuff = nl_buff; R ! sbuff od R: do S ? rbuff deliver rbuff to NL od
23
Error detection protocol S: sent = false do !sent /\ avail(nl_buff) sbuff = nl_buff; R ! Sbuff; sent = true [] R ? ack sent = false [] R ? nack R ! sbuff od
24
Error detection protocol R: do S ? rbuff if error(rbuff) then S ! nack else deliver(rbuff); S ! ack od
25
Reordering Detection of reordering Correction
26
Reordering: sender S: ns = 1; do avail(nl_buff[ns]) sbuff[ns] = nl_buff[ns]; R ! (sbuff[ns],ns); ns++ od
27
Reordering: receiver R: nr = 1; do S ? (D,x) rbuff[x] = D; Recd[x] = true [] Recd[nr] deliver(rbuff[nr]); nr++ od
28
Message Loss Detection of message loss - timeout non-premature timeout: if a timeout occurs then message is indeed lost premature timeout: if a timeout occurs then a message might have been lost
29
Message Loss detection S: sbit = 0; sent = false do !sent /\ avail(nl_buff) sbuff = nl_buff; R ! (sbuff, sbit); sent = true [] timeout R ! (sbuff, sbit) [] R ? (ack,b) if b = sbit then sent = false; sbit = !sbit od Alternating Bit Protocol - Premature timeouts
30
R: rbit = 0; do S ? (rbuff, b) if (b = rbit) then deliver(rbuff); rbit = ! rbit; S ! (ack, b) od
31
d,0 a,0 d,1 d,0 a,0 rbit 0 1 0 0 sbit 0 1
32
R: rbit = 0; do S ? (rbuff, b) if (b = rbit) then deliver(rbuff); rbit = ! rbit; S ! (ack, b) od
33
Message Loss detection S: sbit = 0; sent = false do !sent /\ avail(nl_buff) sbuff = nl_buff; R ! (sbuff, sbit); sent = true [] timeout R ! (sbuff, sbit) [] R ? (ack,b) if b = sbit then sent = false; sbit = !sbit od Alternating Bit Protocol - Premature timeouts ; start timer ; cancel timer ; start timer cancel timer
34
d,0 d,1 d,0 d,1 d,0 a,1 a,0 0 sbit 1 1 a,1 d,0 FIFO channels
36
timeout 0 4 1 -d0; ST 5 +d0 3 -d1; ST 7 +d1 +d0 2 +a0 6 -a0 +a1 -a1 +d1 ABP with non-premature timeouts
38
0 1 2 3 -d0; ST +a0 -d1; ST +a1 timeout 4 5 6 7 +d0 +d1 +d0-a0 -a1 +d1 +a0 +a1 +d0 +d1 Premature Timeouts
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.