I N THE N AME OF G OD C OMPUTER N ETWORKS C HAPTER 3: T HE D ATA L INK L AYER ( PART 3) Dr. Shahriar Bijani Shahed University March 2014
References: Computer Networks A. S. Tanenbaum and D. J. Wetherall, Computer Networks (5th Edition), Pearson Education, the book slides, 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, Mc Graw Hill, Data Link Layer,
D ATA L INK P ROTOCOLS Elementary Data Link Protocols Utopian Simplex Protocol Simplex Stop-and-Wait Protocol Error-Free Channel Simplex Stop-and-Wait Protocol Noisy Channel Sliding Window Protocols 3
E LEMENTARY D ATA L INK P ROTOCOLS Implementation of the physical, data link, and network layers. 4
E LEMENTARY D ATA L INK P ROTOCOLS Some definitions needed in the protocols to follow. These definitions are located in the file protocol.h.... 5
E LEMENTARY D ATA L INK P ROTOCOLS Some definitions needed in the protocols to follow. These definitions are located in the file protocol.h.... 6
E LEMENTARY D ATA L INK P ROTOCOLS Some definitions needed in the protocols to follow. These definitions are located in the file protocol.h. 7
U TOPIAN S IMPLEX P ROTOCOL (1) A utopian simplex protocol.... 8
U TOPIAN S IMPLEX P ROTOCOL (2) A utopian simplex protocol. 9
10 SenderReceiver Frame ACK Timeout Frame Timeout Frame S TOP AND W AIT Simplest form of reliability Example: Bluetooth Problems? Utilization Can only have one frame in flight at any time
S IMPLEX S TOP - AND -W AIT P ROTOCOL FOR A N OISY C HANNEL (1) A simplex stop-and-wait protocol
S IMPLEX S TOP - AND -W AIT P ROTOCOL FOR A N OISY C HANNEL (2) 12 A simplex stop-and-wait protocol.
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
S LIDING W INDOW P ROTOCOLS 14 Allow multiple outstanding, un-ACKed frames Number of un-ACKed frames is called the window Made famous by TCP Sender Receiver Frames ACKs Window
S LIDING W INDOW P ROTOCOLS (1) A positive acknowledgement, unidirectional with retransmission protocol
S LIDING W INDOW P ROTOCOLS (2) A positive acknowledgement with retransmission protocol
S LIDING W INDOW P ROTOCOLS (3) A positive acknowledgement with retransmission protocol. 17
S LIDING W INDOW P ROTOCOLS (4) A sliding window of size 1, with a 3-bit sequence number. (a) Initially. (b) After the first frame has been sent. 18
S LIDING W INDOW P ROTOCOLS (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
O NE -B IT S LIDING W INDOW P ROTOCOL (1) A bidirectional 1-bit sliding window protocol
O NE -B IT S LIDING W INDOW P ROTOCOL (2) A bidirectional 1-bit sliding window protocol.
O NE -B IT S LIDING W INDOW P ROTOCOL (3) 22 A bidirectional 1-bit sliding window protocol.
O NE -B IT S LIDING W INDOW P ROTOCOL (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
P ROTOCOL U SING G O -B ACK -N (1) Pipelining and error recovery. Effect of an error when (a) receiver’s window size is 1 24 Go-back-N
P ROTOCOL U SING G O -B ACK -N (2) Pipelining and error recovery. Effect of an error when (b) receiver’s window size is large. 25 Selective-repeat
P ROTOCOL U SING G O -B ACK -N (3) A sliding window protocol using go-back-n
P ROTOCOL U SING G O -B ACK -N (4) A sliding window protocol using go-back-n
P ROTOCOL U SING G O -B ACK -N (5) A sliding window protocol using go-back-n
P ROTOCOL U SING G O -B ACK -N (6) A sliding window protocol using go-back-n
P ROTOCOL U SING G O -B ACK -N (7) A sliding window protocol using go-back-n
P ROTOCOL U SING G O -B ACK -N (8) A sliding window protocol using go-back-n
P ROTOCOL U SING G O -B ACK -N (9) A sliding window protocol using go-back-n. 32
P ROTOCOL U SING G O -B ACK -N (10) Simulation of multiple timers in software. (a) The queued timeouts (b) The situation after the first timeout has expired. 33
P ROTOCOL U SING G O -B ACK -N (11) Send window for Go-Back-N ARQ 34
P ROTOCOL U SING G O -B ACK -N (12) Receive window for Go-Back-N ARQ 35
P ROTOCOL U SING G O -B ACK -N (13) A Design of Go-Back-N ARQ 36
P ROTOCOL U SING S ELECTIVE R EPEAT (1) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (2) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (3) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (4) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (5) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (6) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (7) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (8) A sliding window protocol using selective repeat
P ROTOCOL U SING S ELECTIVE R EPEAT (9) A sliding window protocol using selective repeat. 45
P ROTOCOL U SING S ELECTIVE R EPEAT (10) Send window for Selective Repeat ARQ (above) Receive window for Selective Repeat ARQ (bellow) 46
P ROTOCOL U SING S ELECTIVE R EPEAT (11) a) Initial situation with a window of size7 b) After 7 frames sent and received but not acknowledged. c) Initial situation with a window size of 4. d) After 4 frames sent and received but not acknowledged. 47
E XAMPLE D ATA L INK P ROTOCOLS 1. Packet over SONET 2. ADSL (Asymmetric Digital Subscriber Loop) 48