1 / 13

Chapter 3: The Data Link Layer

Chapter 3: The Data Link Layer to achieve reliable, efficient communication between two physically connected machines. Design issues: services interface to the network layer how to group bits into frames (framing) how to deal with errors (error control).

dima
Télécharger la présentation

Chapter 3: The Data Link Layer

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 3: The Data Link Layer • to achieve reliable, efficient communication between two physically connected machines. • Design issues: • services interface to the network layer • how to group bits into frames (framing) • how to deal with errors (error control). • how to deal with speed mismatch (flow control).

  2. Framing (break the bit stream into frames) • Why framing? • How to do framing? • Character count • Starting and ending characters with character stuffing • starting and ending flags with bit stuffing • physical level code violation. • Error Control • Flow Control

  3. Sender get a packet from the network layer Add frame header, send the frame to the physical layer. Receiver get a frame from the physical layer strip the header pass the packet to the network layer. Data link layer protocols: P0 - Nothing

  4. Sender get a packet from the network layer Add frame header, send the frame to the physical layer. Wait for ACK Receiver get a frame from the physical layer strip the header pass the packet to the network layer. Send ACK. P1: Stop and wait (flow control)Assumption: no lost packets

  5. Sender get a packet from the network layer Add frame header (seq), send the frame to the physical layer. Wait for ACK till timeout If timeout, resend the packet, back to waiting Receiver get a frame from the physical layer strip the header if (seq = expected) pass to the network layer. Send ACK Else send ACK P2 (PAR): stop and wait + timeout + sequence number (flow control + error control )

  6. Compute the data rate that can be achieved by the PAR protocol on a 20kbps duplex link with the following assumptions: Data frame size = 1000 bits Acknowledgement frame size = 32 bits One-way propagation delay =5 ms What about when the the link data rate is 1Mbps?

  7. Protocol 3+: Sliding window protocol. • What is bad about protocol 2 (PAR)? • How to improve? • Allowing pipelining, more outstanding frames. • Maintaining a window of outstanding frames at the sender (sender window) • All packets that are sent but not ACKed. • Maintaining the sender window: • increase the upper bound when a new packet arrives. • Increase the lower bound when an ACK of the lower bound frame arrives.

  8. Protocol 3.1: Go back n sliding window. • Allow the sender to have multiple (N > 1) outstanding frames. • Sender winder = N (>1) • receiver winder = 1. • Sender: maintain the sender window (buffering all outstanding frames), maintain timeout for all outstanding frames. • Receiver: same as protocol 2. • What happens when an transmission error occurs? • GO BACK N to resend.

  9. How can we further improve the performance of the Go back n sliding window protocol? • When no errors, go back n can achieve the best communication performance (fully exploit the pipeline communication). • When an error occurs, the go back n protocol needs to resend everything. • How can we do better than that?

  10. The receiver maintains a window of packets that has been accepted by not acked. • Maintaining the receiver window: • discard frames outside the window. • When receiving the frame whose sequence number = lower bound, ACK and advance the window (the ACK sequence number may jump) • Can use NAK to speedup retransmission.

  11. Protocol 3.2: Selected repeat sliding window. • Allow the sender to have multiple (N > 1) outstanding frames. • Allow the receiver to receive multiple (M>1) frames. • Sender winder = N (>1) • receiver winder = M (> 1). • Sender: maintain the sender window (buffering all outstanding frames), maintain timeout for all outstanding frames. • Receiver: maintain the receiver window (buffer out of order packets for in order delivery), properly send ACK. • What happens when an transmission error occurs? • No need to resend everything.

  12. Example: Let one way delay equal to the time for sending 1 packets. Timeout time = round trip time + time for 1 packets. Let the sender sends 10 packets and the third packet gets lost. • Using go-back-N with sender window size = 8. • Using selected repeated with sender window size and receiver window size = 8 but without NAK • Using selected repeated with NAK. • How should you set the minimum sender window size?

  13. Piggybacking • Used in duplex channel • Combined data and ACK message • When no data? • Wait some time and ACK anyway.

More Related