The Data Link Layer- part 3

Download Report

Transcript The Data Link Layer- part 3

IN THE NAME OF GOD
COMPUTER NETWORKS
CHAPTER 3:
THE DATA LINK LAYER
(PART3)
Dr. Shahriar Bijani
Shahed University
March 2014

References:




A. S. Tanenbaum and D. J. Wetherall, Computer
Networks (5th Edition), Pearson Education, the
book slides, 2011.
Chapter 6, Data Communications and Computer
Networks: A Business User's Approach, 6th
Edition
B. A. Forouzan, Data Communications and
Networking, 5th Edition, Behrouz A. Forouzan,
McGraw Hill, lecture slides, 2012.
Mc Graw Hill, Data Link Layer, 2004.
2
DATA LINK PROTOCOLS
 Elementary


Utopian Simplex Protocol
Simplex Stop-and-Wait Protocol


Data Link Protocols
Error-Free Channel
Simplex Stop-and-Wait Protocol

Noisy Channel
 Sliding
Window Protocols
3
ELEMENTARY DATA LINK PROTOCOLS
Implementation of the physical, data link, and
network layers.
4
ELEMENTARY DATA LINK PROTOCOLS
Some definitions needed in the protocols to follow.
These definitions are located in the file protocol.h.
...
5
ELEMENTARY DATA LINK PROTOCOLS
Some definitions needed in the protocols to follow.
These definitions are located in the file protocol.h.
...
6
ELEMENTARY DATA LINK PROTOCOLS
Some definitions needed in the protocols to follow.
These definitions are located in the file protocol.h.
7
UTOPIAN SIMPLEX PROTOCOL (1)
A utopian simplex protocol.
8
...
UTOPIAN SIMPLEX PROTOCOL (2)
A utopian simplex protocol.
9
STOP AND WAIT
Receiver
Timeout Timeout
Simplest form of reliability
 Example: Bluetooth
 Problems?

Sender
Utilization
 Can only have one frame in flight
at any time

10
SIMPLEX STOP-AND-WAIT PROTOCOL
FOR A NOISY CHANNEL (1)
A simplex stop-and-wait protocol.
11
...
SIMPLEX STOP-AND-WAIT PROTOCOL
FOR A NOISY CHANNEL (2)
A simplex stop-and-wait protocol.
12

ARQ (Automatic Repeat reQuest) or PAR
(Positive Acknowledgement with
Retransmission): Protocols in which the sender
waits for a positive acknowledgement before
advancing to the next data
13
SLIDING WINDOW PROTOCOLS
Allow multiple outstanding, un-ACKed frames
 Number of un-ACKed frames is called the window
Window


Sender
Made famous by TCP
Receiver
14
SLIDING WINDOW PROTOCOLS (1)
A positive acknowledgement, unidirectional with
retransmission protocol.
...
15
SLIDING WINDOW PROTOCOLS (2)
A positive acknowledgement with retransmission
protocol.
...
16
SLIDING WINDOW PROTOCOLS (3)
A positive acknowledgement with retransmission
protocol.
17
SLIDING WINDOW PROTOCOLS (4)
A sliding window of size 1, with a 3-bit sequence
number.
(a) Initially. (b) After the first frame has been sent.
18
SLIDING WINDOW PROTOCOLS (5)
A sliding window of size 1, with a 3-bit sequence number
(c) After the first frame has been received. (d) After the first
acknowledgement has been received.
19
ONE-BIT SLIDING WINDOW PROTOCOL (1)
...
A bidirectional 1-bit sliding window protocol.
20
ONE-BIT SLIDING WINDOW PROTOCOL (2)
...
21
A bidirectional 1-bit sliding window protocol.
ONE-BIT SLIDING WINDOW PROTOCOL (3)
22
A bidirectional 1-bit sliding window protocol.
ONE-BIT SLIDING WINDOW PROTOCOL (4)
Two scenarios for protocol 4. (a) Normal case. (b) Abnormal
case. The notation is (seq, ack, packet number). An asterisk (*)
indicates where a network layer accepts a packet
23
PROTOCOL USING GO-BACK-N (1)
Pipelining and error recovery. Effect of an error when
(a) receiver’s window size is 1
Go-back-N
24
PROTOCOL USING GO-BACK-N (2)
Pipelining and error recovery. Effect of an error when
(b) receiver’s window size is large.
Selective-repeat
25
PROTOCOL USING GO-BACK-N (3)
A sliding window protocol using go-back-n.
...
26
PROTOCOL USING GO-BACK-N (4)
A sliding window protocol using go-back-n.
...
27
PROTOCOL USING GO-BACK-N (5)
A sliding window protocol using go-back-n.
...
28
PROTOCOL USING GO-BACK-N (6)
A sliding window protocol using go-back-n.
...
29
PROTOCOL USING GO-BACK-N (7)
A sliding window protocol using go-back-n.
...
30
PROTOCOL USING GO-BACK-N (8)
A sliding window protocol using go-back-n.
...
31
PROTOCOL USING GO-BACK-N (9)
A sliding window protocol using go-back-n.
32
PROTOCOL USING GO-BACK-N (10)
Simulation of multiple timers in software.
(a) The queued timeouts
(b) The situation after the first timeout has expired.
33
PROTOCOL USING GO-BACK-N (11)
Send window for Go-Back-N ARQ
34
PROTOCOL USING GO-BACK-N (12)
Receive window for Go-Back-N ARQ
35
PROTOCOL USING GO-BACK-N (13)
36
A Design of Go-Back-N ARQ
PROTOCOL USING SELECTIVE REPEAT (1)
A sliding window protocol using selective repeat.
...
37
PROTOCOL USING SELECTIVE REPEAT (2)
A sliding window protocol using selective repeat.
...
38
PROTOCOL USING SELECTIVE REPEAT (3)
A sliding window protocol using selective repeat.
...
39
PROTOCOL USING SELECTIVE REPEAT (4)
A sliding window protocol using selective repeat.
...
40
PROTOCOL USING SELECTIVE REPEAT (5)
A sliding window protocol using selective repeat.
...
41
PROTOCOL USING SELECTIVE REPEAT (6)
A sliding window protocol using selective repeat.
...
42
PROTOCOL USING SELECTIVE REPEAT (7)
A sliding window protocol using selective repeat.
...
43
PROTOCOL USING SELECTIVE REPEAT (8)
A sliding window protocol using selective repeat.
...
44
PROTOCOL USING SELECTIVE REPEAT (9)
A sliding window protocol using selective repeat.
45
PROTOCOL USING SELECTIVE REPEAT (10)
Send window for Selective Repeat ARQ (above)
Receive window for Selective Repeat ARQ (bellow)
46
PROTOCOL USING SELECTIVE REPEAT (11)
a)
b)
c)
d)
Initial situation with a window of size7
After 7 frames sent and received but not acknowledged.
Initial situation with a window size of 4.
After 4 frames sent and received but not acknowledged.
47
EXAMPLE DATA LINK PROTOCOLS
1. Packet
over SONET
2. ADSL (Asymmetric Digital Subscriber Loop)
48