1 / 44

Data Link Control Protocols at OSI Layer - Stop-and-Wait and Sliding Window

Learn about data link protocols governing communication at the OSI model's layers with a focus on error control mechanisms like Stop-and-Wait and Sliding Window. Understand the advantages and challenges of bidirectional transmission.

lesniak
Download Presentation

Data Link Control Protocols at OSI Layer - Stop-and-Wait and Sliding Window

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. Chapter 11 – Data Link Control and Protocols CIS 321Data Communications & Networking

  2. University of South Alabama Computer and Information Sciences Introduction Protocol – set of rules governing communication specific to one or more layers of the OSI model Data link protocols define the rules devices use to implement data link layer functions Contain rules for line discipline, flow control, and error control

  3. University of South Alabama Computer and Information Sciences Data Link Layer Functions

  4. University of South Alabama Computer and Information Sciences Flow Control Coordinates amount of data sent before receiving acknowledgement Purpose: prevent overwhelming receiver Buffer overflow

  5. University of South Alabama Computer and Information Sciences Error Control Error detection and error correction Receiver informs sender of any frames lost or damaged and coordinates retransmission of those frames by the sender Usually handled via automatic repeat request (ARQ)

  6. University of South Alabama Computer and Information Sciences Flow and Error Control Mechanisms Stop-and-Wait ARQ Go-back-N ARQ Selective-Repeat ARQ

  7. University of South Alabama Computer and Information Sciences 11.2 Stop-and-Wait ARQ Sender keeps copy of last frame sent and waits for ACK for that frame Next frame cannot be sent until ACK has been received Frames are numbered alternately 0 and 1 Damaged or lost frames are resent Repeats until EOT is sent

  8. University of South Alabama Computer and Information Sciences Stop-and-Wait Normal Operation

  9. University of South Alabama Computer and Information Sciences Lost or Damaged Frame

  10. University of South Alabama Computer and Information Sciences Lost Acknowledgement

  11. University of South Alabama Computer and Information Sciences Delayed Acknowledgement

  12. University of South Alabama Computer and Information Sciences Stop-and-Wait Advantage: simplicity; each frame is checked and ACK’d before next frame is sent Numbering of frames prevents duplication Disadvantage: inefficiency; slow Frame and ACKs use entire bandwidth If distance is long between devices, time spent waiting can be significant

  13. University of South Alabama Computer and Information Sciences Bidirectional Transmission Possible if two parties have separate channels for full-duplex transmission or share same channel for half-duplex transmission

  14. University of South Alabama Computer and Information Sciences Piggybacking Method of combining data frame and acknowledgement Saves bandwidth due to less overhead from separate data frame and ACK frame into one frame

  15. University of South Alabama Computer and Information Sciences Piggybacking

  16. University of South Alabama Computer and Information Sciences Sliding Window Sender may transmit several frames before needing an ACK Much more efficient; receiver may use a single ACK to confirm multiple frames Sliding window refers to upper and lower limit on number of frames that may be transmitted before ACK is required Frames must be numbered to allow receiver to identify which frame is acknowledged

  17. University of South Alabama Computer and Information Sciences 11.3 Go-Back-N ARQ Allows for more efficient transmission – send multiple frames before requiring an ACK Specify a window or range of sequence numbers of frames that may be received

  18. Sliding Window • Receiver includes number of next frame it expects to receive in ACK • Sender then knows all previous frames through that number have been received University of South Alabama Computer and Information Sciences

  19. Sender Window • Window contains 0to2m -1 frames • Window shrinks as frames are sent out • Once ACK arrives, window expands equal to number of frames acknowledged by ACK University of South Alabama Computer and Information Sciences

  20. Receiver Window • Size of window is always 1 • Receiver expects the next ordered frame (must always be in order) • Any frame arriving out of order is discarded University of South Alabama Computer and Information Sciences

  21. Control Variables • Sender : S – sequence number of recently sent frame; SF - sequence number of first frame in window; SL – sequence number of last frame in window • Window size is W = SL - SF + 1 • Receiver :R – sequence number of next frame expected University of South Alabama Computer and Information Sciences

  22. University of South Alabama Computer and Information Sciences Go-Back-N Operation Timers: sender sets a timer for each frame (none for receiver) Acknowledgement – receiver sends positive ACK; silent on damaged or out of order frames Resending Frames – sender sends set of frames from damaged up to last one sent and ACK’d

  23. University of South Alabama Computer and Information Sciences 11.4 Selective Repeat ARQ Go-Back-N less efficient since all out of order or damaged frames must be resent in order Selective Repeat is a more efficient method, yet required more processing

  24. University of South Alabama Computer and Information Sciences Sender and Receiver Windows Sender window and control variables are same as Go-Back-N Receiver window is same size; looks for range of sequence numbers Requires two control variables to define window boundaries: RFand RL Also defines a negative acknowledgement (NAK) to report sequence number of damaged frame

  25. University of South Alabama Computer and Information Sciences Selective Repeat ARQ

  26. University of South Alabama Computer and Information Sciences Selective Repeat ARQ, Lost Frame

  27. University of South Alabama Computer and Information Sciences Comparisons between Go-back-n and Selective-Reject Sending only specific damaged or lost frames requires complexity of sorting and more storage is required in select-reject Go-back-n is typically used due to simplicity

  28. University of South Alabama Computer and Information Sciences 11.5 HDLC High-level Data Link Control – protocol supporting half-duplex and full-duplex communication over point-to-point and multipoint links

  29. University of South Alabama Computer and Information Sciences HDLC Modes of Communication Relationship between two devices involved in an exchange Defines who controls the link Two modes: Normal response mode (NRM) Asynchronous balanced mode (ABM)

  30. University of South Alabama Computer and Information Sciences Normal Response Mode Refers to standard primary-secondary relationships Used for all exchanges in unbalanced configurations Primary can issues commands Secondary must have permission from primary before responding or sending data

  31. University of South Alabama Computer and Information Sciences NRM

  32. Asynchronous Balanced Mode • All stations are equal • Stations in point-to-point configurations act as both primary and secondary University of South Alabama Computer and Information Sciences

  33. University of South Alabama Computer and Information Sciences HDLC Frames Three types; each functions as an envelope to transmit a specific type of message Information frames (I-frames) – transports user data and control info relating to user data Supervisory frames (S-frames) – used to transport control info for data link layer flow and error controls Unnumbered frames (U-frames) – used for system mgmt and link mgmt

  34. University of South Alabama Computer and Information Sciences HDLC Frame

  35. University of South Alabama Computer and Information Sciences Flag Field Marks the beginning and end of frame and provides synchronization with 01111110

  36. University of South Alabama Computer and Information Sciences Address Field Contains address of secondary station that is originator or destination of the frame If created by primary, contains a to address If created by secondary, contains a from address May be one byte or several bytes long

  37. University of South Alabama Computer and Information Sciences Control Field One- or two-byte segment for flow management Fields differ depending on frame type First or first and second bits identify type of frame All three frame types contain a poll/final (P/F) bit; used to identify whether frame was sent by primary to a secondary or from secondary to primary

  38. Information Field • Contains user’s data in an I-frame; network management in a U-frame; not included in an S-frame • Often used in a data frame to acknowledge receipt of another separate frame – called piggybacking University of South Alabama Computer and Information Sciences

  39. FCS Field • Error detection field • Stores either two- or four-byte CRC University of South Alabama Computer and Information Sciences

  40. University of South Alabama Computer and Information Sciences Different Control Frames I-frame – used for user information and transport and piggyback acknowledgements S-frame – used for acknowledgement, flow control, and error control when piggybacking is not appropriate U-frame – used to exchange session management and control information between devices

  41. University of South Alabama Computer and Information Sciences Data Transparency To address the possibility that a bit pattern may match flag field indicator and be misinterpreted, bit stuffing may be used Anytime 5 consecutive 1s are encountered, a redundant 0 is inserted Identifies that the current sequence is not a flag

  42. University of South Alabama Computer and Information Sciences Bit Stuffing and Removal

  43. University of South Alabama Computer and Information Sciences Coming Up… Ch 12 Point-to-Point Access: PPP (brief)

  44. University of South Alabama Computer and Information Sciences Credits All figures obtained from publisher-provided instructor downloads Data Communications and Networking, 3rd edition by Behrouz A. Forouzan.  McGraw Hill Publishing, 2004

More Related