1 / 30

Chapter 11

Chapter 11. Data Link Control and Protocols. Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment.

Download Presentation

Chapter 11

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 LinkControland Protocols

  2. Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Error control in the data link layer is based on automatic repeat request (ARQ), which is the retransmission of data. Flow and Error Control

  3. Flow and Error Control Mechanisms Flow and Error control Mechanisms Stop-AND-WAIT ARQ Go-BACK-N ARQ SELECTIVE REPEAT ARQ

  4. Keep a copy of the frame until ACK is received. Frame 0 is acknowledged by ACK 1 and vice-versa. Lost and corrupted frames are considered as same and No ACK is sent. Sender’s control variable S = holds number of recently sent frame Receiver’s control variable R = holds number of the next frame expected Sender starts a timer when it sends a frame. If an ack does not arrive within an allotted time period, sender assumes that packet is corrupted or lost. Sender will resend the same packet. Stop-and-Wait ARQ

  5. OperationofStop-and-Wait ARQ • Normal Operation • Frame is lost • Acknowledgment is lost • Acknowledgment is delayed

  6. OperationofStop-and-Wait ARQ Frame is lost

  7. lost ACK frame In Stop-and-Wait ARQ, numbering frames prevents the retaining of duplicate frames. Operation of Stop-and-Wait ARQ

  8. The value of R at the receiver site is still 1, which means the receiver expects to see frame 1. Numbered acknowledgments are needed if an acknowledgment is delayed and the next frame is lost. Stop-and-Wait ARQ, delayed ACK

  9. Bidirectional transmission Method to combine a data frame with an acknowledgement. Piggybacking

  10. Sending multiple frames at a time. Keep the copy of the frames before ACK is received. Sequence number is included in each frame in the header. If there are m bits for sequence number then we can have maximum 2m – 1. Sender Sliding Window Window size is fixed here. Go-back-N ARQ

  11. Size of window at receiver site is always 1. Receiver is always looking for a specific frame to arrive in a specific order. Receiver sliding window

  12. S = Sequence number of the recently sent frame SF = Sequence number of first frame in the window SL = Sequence number of last frame in the window Window Size = SL – SF + 1 If sequence number of received frame is same as R, accept it. Control variables

  13. Timers The sender set timer for each frame Receiver has no timer. Acknowledgment Resending Frames When a frame is lost or damaged, sender send a block of frames. This block starts from one that has lost or damaged up to the current frame sent. More Important Variables

  14. Go-Back-N ARQ, normal operation

  15. Frame 2 is lost. When the receiver receives frame 3, it is discarded because the receiver is expecting frame 2, not frame 3 (according to its window) Acknowledgements are cumulative Go-Back-N ARQ, lost frame

  16. Two cases are possible ACK arrives before the expiry of the timer No need to resend the frames ACK arrives before the expiry of the timer Resend all the frames starting with one for which timer has expired to the last one sent. Delayed ACK Go-Back-N ARQ, Lost Acknowledgment

  17. If size of window is less than 2m, and all three ACK are lost, the frame 0 timer expires and all three frames are resent. Receiver discards them as duplicate. If size of window is equal to 2m, and all three ACK are lost, sender will send the duplicate frame 0 but receiver will accept it as next frame as it expects that Go-Back-N ARQ: sender window size

  18. Go-back-N resends multiple frames and its inefficient in noisy links. Sender and receiver window size is at most one-half of the value 2m. Specifies the range of accepted frames. Receiver reports the damaged frame using negative ACK (NAK) Selective Repeat ARQ, sender and receiver windows

  19. Selective Repeat ARQ, lost frame

  20. Size of window is 2 and all acknowledgements are lost, the timer for frame 0 expires and frame 0 is resent. Receiver is expecting frame 2, not frame 0, so this duplicate frame is correctly discarded. Size of window is 3 and all acknowledgements are lost, the sender sends a duplicate of frame 0. Receiver expects 0 as part of window and so accepts it. Selective Repeat ARQ, sender window size

  21. Example 1 In a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What is the bandwidth-delay product? If the system data frames are 1000 bits in length, what is the utilization percentage of the link? Solution The bandwidth-delay product is 1  106 20  10-3 = 20,000 bits The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and then back again. However, the system sends only 1000 bits. We can say that the link utilization is only 1000/20,000, or 5%. For this reason, for a link with high bandwidth or long delay, use of Stop-and-Wait ARQ wastes the capacity of the link.

  22. Example 2 What is the utilization percentage of the link in Example 1 if the link uses Go-Back-N ARQ with a 15-frame sequence? Solution The bandwidth-delay product is still 20,000. The system can send up to 15 frames or 15,000 bits during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged frames, the utilization percentage is much less because frames have to be resent.

  23. A new task is taken before the last task finished is known as pipelining. Stop-and-Wait ARQ Not a pipelined case. Go-Back-N ARQ and Selective Repeat are examples of pipelining. Pipelining

  24. HDLC HDLC (High-level Data Link Control) is an actual protocol designed to support both half-duplex and full-duplex communication over point-to-point and multipoint links. NRM- Normal Response Mode ABM- Asynchronous Balanced Mode I-Frame (Information frame): Used to transport user data and control information relating to user data (piggybacking). S-frame (Supervisory frame): Used only to transport control information. U-frame (Unnumbered frame): Reserved for system management.

  25. HDLC frame types I-Frame has sequence and ACK numbers S-frame contains the code for Receive Ready, Receive Not Ready, Reject, Selective Reject. U-frame is used for session management and control information

  26. 11.22Example 3

  27. Example 4 In Example 3, suppose frame 1 sent from station B to station A has an error. Station A informs station B to resend frames 1 and 2 (the system is using the Go-Back-N mechanism). Station A sends a reject supervisory frame to announce the error in frame 1. Figure 11.23 shows the exchange.

  28. 11.23Example 4

  29. Bit stuffing and removal Data field can not have the field reserved for the flag field. Bit stuffing is the process of adding one extra 0 whenever there are five consecutive 1s in the data so that the receiver does not mistake the data for a flag.

  30. Bit stuffing in HDLC

More Related