1 / 22

ELEN 602 Lecture 5

Review of last lecture Error Detection -- parity/CRC etc. Automatic Retransmission Request (ARQ) Reading: Chap 5.1-5.2. ELEN 602 Lecture 5. 3. 3. 2. 2. 2. 2. 2. 2. 1. 1. 1. 1. Medium. 2. 1. 1. 1. Peer-to-peer protocol across a single hop. Packets. Packets. (a). Data link

rory
Download Presentation

ELEN 602 Lecture 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Review of last lecture Error Detection -- parity/CRC etc. Automatic Retransmission Request (ARQ) Reading: Chap 5.1-5.2 ELEN 602 Lecture 5

  2. 3 3 2 2 2 2 2 2 1 1 1 1 Medium 2 1 1 1 Peer-to-peer protocol across a single hop Packets Packets (a) Data link Layer Data link Layer Frames A B Physical Layer Physical Layer (b) B A 1 Physical layer entity Network layer entity 3 2 Data link layer entity

  3. Peer-to-peer across a network -- Protocol stack View Messages Messages Segments Transport Layer Transport Layer Network Layer Network Layer Network Layer Network Layer Data link Layer Data link Layer Data link Layer Data link Layer End system a End system B Physical Layer Physical Layer Physical Layer Physical Layer Network

  4. ACK/NAK 1 2 3 4 5 Data Data Data Data End-to-end versus Hop-by-hop Approaches End-to-end Hop-by-hop Data Data Data Data 1 2 3 4 5 ACK/NAK ACK/NAK ACK/NAK ACK/NAK

  5. Header Basic elements of ARQ Error-free packet sequence Information frames Packet sequence Transmitter Receiver Station B Station A Control frames CRC CRC Header Control frame Information packet Information Frame

  6. In parts (a) and (b) transmitting station A acts the same way, but part (b) receiving station B accepts frame 1 twice. Possibilities with Unnumbered Frames (a) Frame 1 lost Time-out time A frame 0 frame 1 frame 1 frame 2 ACK ACK B (b) ACK lost Time-out time A frame 0 frame 1 frame 1 frame 2 ACK ACK ACK B

  7. Transmitting station A misinterprets duplicate ACKs Unnumbered Acks time-out time A frame 0 frame 0 frame 2 frame 1 ACK ACK B

  8. System State Information in Stop-and-Wait ARQ 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Rnext Slast Timer Slast Receiver Transmitter Rnext Station B Station A Error-free frame 0 arrives at receiver (0,0) (0,1) Global State: (Slast, Rnext) ACK for frame 0 arrives at transmitter ACK for frame 1 arrives at transmitter Error-free frame 1 arrives at receiver (1,0) (1,1)

  9. Stop-and-wait ARQ Enquiry Frame Time-out (a) Frame 1 lost time A frame 0 frame 1 ENQ frame 1 ACK 1 ACK 1 B (b) ACK for frame 1 lost Time-out time A frame 0 frame 1 frame 0 ENQ ACK 0 ACK 0 ACK 1 B

  10. Basic Go-back-N ARQ 4 frames are outstanding; so go back 4 Go-Back-4: time fr 0 fr 1 fr 2 fr 3 fr 4 fr 5 fr 3 fr 4 fr 5 fr 6 fr 6 fr 7 fr 8 fr 9 A B Out-of-sequence frames ACK1 ACK2 ACK4 ACK5 ACK3 ACK7 ACK6 ACK9 ACK8 error

  11. Go-back-N ARQ vs. Stop-and-wait ARQ Time-out expires Stop-and-Wait time fr 0 fr 0 fr 1 A B ACK1 error 4 frames are outstanding; so go back 4 Go-Back-N time fr 0 fr 1 fr 2 fr 3 fr 0 fr 1 fr 2 fr 3 fr 4 fr 5 fr 6 A B ACK2 ACK6 ACK4 ACK3 ACK1 ACK5 Out-of-sequence frames error

  12. Go-Back-N ARQ Transmitter Receiver Send Window Receive Window ... Frames transmitted and ACKed Slast Srecent Slast+Ws-1 frames received Buffers Rnext Slast Timer Slast+1 The receiver will only accept a frame that is error-free and that has sequence number Rnext Timer ... Srecent Timer ... Slast+Ws-1

  13. Window with fixed number of bits Transmitter goes back 4 M =22 = 4, Go-Back - 4: time fr 0 fr 2 fr 3 fr 1 fr 1 fr 2 fr 3 fr 0 A B ACK2 ACK3 ACK4 ACK1 Receiver has Rnext=0, but it does not know whether its ACK for frame 0 was received, so it does not know whether this is the old frame 0 or a new frame 0 M=22=4, Go-Back-3: Transmitter goes back 3 time fr 0 fr 2 fr 1 fr 2 fr 0 fr 1 A B ACK2 ACK3 ACK1 Receiver has Rnext=3 , so it rejects the old frame 0

  14. NAK Error Recovery Transmitter goes back to frame 1 Go-Back-7: time fr 0 fr 1 fr 2 fr 3 fr 4 fr 5 fr 1 fr 2 fr 3 fr 4 fr 5 fr 6 fr 7 fr 0 A B ACK2 ACK6 ACK3 ACK4 ACK1 ACK7 ACK5 Out-of-sequence frames NAK1 error

  15. “A” Receive Window “B” Receive Window RAnext RBnext Station B Station A SArecent RAnext Receiver Transmitter Transmitter Receiver SBrecent RBnext ACKs are piggybacked in headers “A” Send Window “B” Send Window ... ... SAlast SBlast SAlast+WAs-1 SBlast+WBs-1 Buffers Buffers SAlast SBlast Timer Timer SAlast+1 SBlast+1 Timer Timer ... ... SArecent Timer Timer SBrecent ... ... SAlast+WAs-1 SBlast+WBs-1 Timer Timer

  16. How large a Timeout? Tout Tproc Tprop Tf Tprop Tf

  17. Receive Window Frames received Rnext Rnext +Wr-1 Slast Timer Slast+1 Timer ... Srecent Timer ... Slast+Ws-1 Selective Repeat ARQ Transmitter Receiver Send Window ... Frames transmitted and ACKed Slast Srecent Slast+Ws-1 Buffers Buffers Rnext+1 Rnext+2 ... Rnext+Wr-1

  18. Error Recovery in Selective Repeat ARQ time fr 0 fr 1 fr 2 fr 3 fr 4 fr 5 fr 2 fr 7 fr 8 fr 6 fr 9 fr 10 fr 11 fr 12 A B ACK2 NAK2 ACK2 ACK2 ACK7 ACK8 ACK9 ACK10 ACK11 ACK12 ACK1 ACK2 error

  19. Maximum Window size in Selective Repeat ARQ M=22=4, Selective Repeat: Send Window = Receive Window = 3 Frame 0 resent time fr 0 fr 2 fr 1 fr 0 A B ACK2 ACK3 ACK1 {3,0,1} Receive Window Send Window = Receive Window = 2 Frame 0 resent time fr 0 fr 0 fr 1 A B ACK2 ACK1 frame 0 rejected Receive Window {2,3}

  20. Delay Components in Stop-and-Wait ARQ • t0 A tproc B frame tftime tprop tprop tproc tack

  21. Transmission Efficiency of ARQ Protocols  Selective Repeat Go-Back-N Stop & Wait p

  22. Optimum Frame Size  Selective Repeat Go-Back-N 17 32 62 10 6 3 3 Stop &Wait 3 nf

More Related