Upload
walter-danson
View
227
Download
0
Tags:
Embed Size (px)
Citation preview
6-1
Data Link Layer (cont’d)
Elementary data link protocols an unrestricted simplex protocol
– simplex
– error-free channel
– infinitely high processing capability of the receiver
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
...
6-2
Data Link Layer (cont’d)
Elementary data link protocols (cont’d) a simplex stop-and-wait protocol
– simplex
– error-free channel
– at most one outstanding frame at a time
– ACK’s are used (automatic repeat request, ARQ)1 2 3
ACK ACK ACK
6-3
Data Link Layer (cont’d)
Elementary data link protocols (cont’d) a simplex protocol for a noisy channel
– simplex
– frames may be lost or damaged
– ACK and time-out mechanism are used
– sequence numbers are used to avoid duplicates
1 2
ACK ACK ACKACK
time-out 1 1 1
duplicate
Example 1 Example 2
6-4
Data Link Layer (cont’d)
Sliding window protocols bidirectional piggybacking is used frames may be lost or damaged ACK and time-out mechanism are used sequence numbers are used
6-5
Data Link Layer (cont’d) Sliding window protocols (cont’d)
sending window (SW): a set of sequence numbers for frames sent out but not yet ack’ed
receiving window (RW): a set of sequence numbers for frames the receiver is permitted to accept
Fig. 3-12, p.204
6-6
Data Link Layer (cont’d) Sliding window protocols (cont’d)
one-bit sliding window protocols – one bit for sequence numbers (0 and 1)– max. SW size = max. RW size =1– stop-and-wait protocol
Fig. 3-14, p. 207
6-7
Data Link Layer (cont’d)
Sliding window protocols (cont’d) a protocol using go-back-n
– pipelining is used (multiple outstanding frames)
– single resequencing buffer (RW size = 1)
– only the in-sequence frame is accepted by the receiver
– SW size is Max_Seq
6-8
Data Link Layer (cont’d) Sliding window protocols (cont’d)
a protocol using go-back-n (cont’d)– effect of receiver buffer size
Fig. 3-15, p. 208
6-9
Data Link Layer (cont’d) Sliding window protocols (cont’d)
a protocol using go-back-n (cont’d)– SW size is Max_Seq
– example with Max_Seq = 7 and SW size = 8 but not 7 The sender sends frames 0 through 7. The piggybacked ACK’s for frames 0 through 7 are lost. The sender resends frames 0 through 7 after time-out. The receiver accepts duplicate frames 0 through 7.
6-10
Data Link Layer (cont’d) Sliding window protocols (cont’d)
a protocol using selective repeat– the same as go-back-n except that the receiving buffer
size > 1 [= (Max_Seq+1)/2]– max. SW size = (Max_Seq+1)/2– NAK’s are used when frame errors or out-of-sequence
frames are detected to request the retrans. of such frames
Fig. 3-19, p. 218
6-11
Data Link Layer (cont’d)
Sliding window protocols (cont’d) remarks
– NAK’s can also be used in go-back-n protocols
– NAK’s can speed up retransmissions
– typically SW size + RW size = Max_Seq + 1
– the above three sliding window protocols differ among themselves in terms of efficiency, complexity and buffer requirement
6-12
Data Link Layer (cont’d)
Protocol specification and verification finite state machines for protocol modeling components of a finite state machine
– states (including one particular initial state)– transitions (event driven)
reachability analysis for protocol correctiveness– incompleteness– deadlock– extraneous transition
6-13
Data Link Layer (cont’d) Protocol specification and verification (cont’d)
example– 2 states for the sender and the receiver respectively– 4 states for the channel (sending 0, 1, ACK frame or idle)– 10 system states [(000) as initial] & 9 kinds of transitions
(Fig. 3-20, p. 221)