1 / 54

Protocol Strategies

Protocol Strategies. Idle RQ (Stop-and-Wait). Transmission Initiated. Ack Received Send Next. Send N+1. Send N. Fig 1.23. Message is lost. Repeat N. Send N+1. Send N. Fig 1.23. Ack is lost. Repeat N. Send N+1. Send N. Fig 1.23. Message Propagates.

vianca
Download Presentation

Protocol Strategies

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. Protocol Strategies

  2. Idle RQ (Stop-and-Wait) Transmission Initiated Ack Received Send Next Send N+1 Send N Fig 1.23

  3. Message is lost Repeat N Send N+1 Send N Fig 1.23

  4. Ack is lost Repeat N Send N+1 Send N Fig 1.23

  5. Message Propagates First bit of message arrives at receiver -> Propagation delay Fig 1.24

  6. Message Transmission Transmission time SAME Transmission time Fig 1.24

  7. Message Transmission Plus Propagation Transmission + Propagation time Fig 1.24

  8. Receiver Processes Turnaround time Fig 1.24

  9. Receiver Send Ack Short time to transmit ACK Fig 1.24

  10. ACK Propagates First bit of ACK arrives at receiver -> Propagation delay… same as before Fig 1.24

  11. Continuous RQ Sender continues sending, eventually acks arrive from the receiver At the same rate as they depart from the transmitter No Errors Idealistic Fig 1.26

  12. Aggressive Sending Strategy but messages are lost What is the strategy being used by the receiver when receiving messages out of sequence? Receiver recognizes Sender knows N+1 problem Sends in next slot Fig 1.27

  13. Now ACK is lost! Fig 1.27

  14. A different retransmissionstrategy Information frame lost Fig 1.28

  15. Again ACK is Lost Fig 1.28

  16. Strategies • Idle RQ -> Stop and Wait • Continuous RQ-> • Selective Repeat • Go-Back-N

  17. Idle RQ • Send a message • Do not send the next until ACK is received • Messages and ACKS numbered 0/1/0/1/…. • If “a” is large, • capacity of link may be severely underutilized • Overall user delay may be excessive (why wait)

  18. Selective repeat • Aggressive sending • Multiple outstanding messages (w/o ACK) • If error at receiver • Receiver keeps later messages buffered at a lower level and only passes them up when the missing frames arrive • Sender only resends error messages • Extra management effort required at receiver

  19. Go-Back-N • Aggressive sending • Multiple outstanding messages (w/o ACK) • If error at receiver • Receiver REJECTs out of order messages • Sender only resends ALL messages from point of error • Simple management effort required at receiver

  20. How do you number frames? Fig 1.29

  21. SIZE not NAMES Fig 1.29

  22. This Shows How To Name Fig 1.30

  23. N=4, K=3 (will lead to a problem) Sender Receiver Send M1, M2 and M3 Recv M1, M2 and M3 ACK M1, M2 and M3 Recv ACK M1, M2 and M3 Send M4, M1* and M2* time

  24. N=4, K=3 ACKs are lost Sender Receiver Send M1, M2 and M3 Recv M1, M2 and M3 ACK M1, M2 and M3 Recv ACK M1, M2 and M3 ReSend M1, M2 and M3 time

  25. N=7, K=3 (NO problems) Sender Receiver Send M1, M2 and M3 Recv M1, M2 and M3 ACK M1, M2 and M3 Recv ACK M1, M2 and M3 Send M4, M5 and M6 time

  26. N=7, K=3 ACKs lost.. No problems Sender Receiver Send M1, M2 and M3 Recv M1, M2 and M3 ACK M1, M2 and M3 Recv ACK M1, M2 and M3 ReSend M1, M2 and M3 time

  27. Naming… A summary Fig 1.30

  28. What about 2-way traffic?

  29. PiggyBacked ACKs • Traffic frequently going in the reverse direction • No send to send an entire new frame with additional overhead. • Typically, a message contains the name of the message in transit AND the name of the ack message, message expected in the other direction

  30. What if nothing in the other driection? • Set a timer waiting for return travel • If no return travel before the timer goes off, • Send a separate ACK when the timer expires. • ELSE • Piggyback on return traffic.

  31. What about reverse traffic • Discussion only focuses on traffic in one direction • Problem is symmetric. • Software is tricky but the send and receive code are integrated into the same process.

  32. Protocol Designand Software Development

  33. Link Layer Complexity Link SubLayers Fig 1.31

  34. Link Layer Complexity Timer to alert sender to resend Fig 1.31

  35. Events From Side From Above From Below Fig 1.32

  36. State Diagram event action state change Fig 1.33

  37. State Machine and Events Figs 1.32 and 1.33

  38. Actions Create Outgoing Events(Events at the receiver) Figs 1.32 and 1.33

  39. These Outgoing Events Are INCOMING to the receivervia MAC layer sender receiver Figs 1.33 and 1.34

  40. One more time Ls_User Creates LdataReq TxFrame to destination iRCVD from MAC_provider to destination

  41. Focus on State Machines

  42. Three Ways = Same State Transition Diagram Program Event-State Table

  43. Event-State Table Fig 1.33

  44. Program Choose -action -next State based on -current state -event Main Loop Fig 1.33

  45. An Example : HDLC

  46. 1-Connect 2- Data 3-Disconnect 1 2 3

  47. network link physical physical link network network link link network

  48. 1-Connect 2- Data 3-Disconnect 1 2 3

  49. HDLC Frame Format

  50. Frame Types

More Related