1 / 28

THE DATA LINK LAYER

THE DATA LINK LAYER. Chapter 3. Hybrid Model. The hybrid reference model to be used in this book. Functions of the Data Link Layer. Data Link Layer Design Issues. Services Provided to the Network Layer Framing (Packetizing) Physical addressing Error Control Flow Control Access control.

Download Presentation

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. THE DATA LINK LAYER Chapter 3

  2. Hybrid Model • The hybrid reference model to be used in this book.

  3. Functions of the Data Link Layer

  4. Data Link Layer Design Issues • Services Provided to the Network Layer • Framing (Packetizing) • Physical addressing • Error Control • Flow Control • Access control.

  5. Services Provided to Network Layer • Unacknowledged connectionless service. No acknowledgement, no logical connection, used in very low error rate channel and real-time traffic. • Acknowledged connectionless service. each frame acknowledged,used in unreliable channel • Acknowledged connection-oriented service a connection established, frames are numbed.reliable transmission guaranteed.

  6. For the data link layer, break the bit stream up into discrete frames and computer the checksum for each frame (error control). Four methods are used to break the bit stream. • Character count. (rarely used) • Flag bytes with byte stuffing • Starting and ending flags, with bit stuffing. • Physical layer coding violations.

  7. Framing (packetizing)

  8. Framing (2) (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing.

  9. Framing (3) Bit stuffing (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receiver’s memory after destuffing.

  10. Flow Control • Ensuring the sending entity does not overwhelm the receiving entity • Feedback-based flow control • Rate-based flow control (network layer)

  11. Stop and Wait • Only one frame at a time can be in transit. • Source transmits frame • Destination receives frame and replies with acknowledgement(if it is correct, otherwise send NAK.) • Source waits for ACK before sending next frame • Destination can stop flow by not send ACK • Source can retransmit if got a NAK. • Works well for a few large frames • Inefficient line utilization for small frames

  12. Sliding Window Protocols • Allow multiple frames to be in transit • Receiver has buffer W long • Transmitter can send up to W frames without ACK • Each frame is numbered • ACK includes number of next frame expected • Sequence number bounded by size of field (k) • Frames are numbered modulo 2k

  13. Example Sliding Window

  14. Sliding Window Protocols (2) Duplex communication: each station needs to maintain two windows Piggyback: num of frame and num of ack are included in one frame. Sliding-window flow control is more efficient than stop-and-wait flow control.

  15. ERROR CONTROL Detection and correction of errors • Lost frames: a frame failed to arrived to the other side. • Damaged frames: some bits are in error. Automatic repeat request • Error detection • Positive acknowledgment • Retransmission after timeout • Negative acknowledgement

  16. ERROR DETECTION AND ERROR CORRECTION • Additional bits added by transmitter for error detection and/or error correction code • Error detection is more often used in protocol with ARQ. High code rate, high reliability. • Error correction is used in specific situation. (no reverse channel) • Hybrid ARQ: combination of error detection and correction.

  17. ERROR CONTROL SCHEME

  18. STOP-AND –WAIT ARQ Source transmits single frame Wait for ACK If received frame damaged, discard it Transmitter has timeout If no ACK within timeout, retransmit If ACK damaged, transmitter will not recognise it, Transmitter will retransmit Receive gets two copies of frame Use ACK0 and ACK1 Simple but Inefficient

  19. Go Back N • Based on sliding window • If no error, ACK as usual with next frame expected • Use window to control number of outstanding frames • If error, reply with rejection • Discard that frame and all future frames until error frame received correctly • Transmitter must go back and retransmit that frame and all subsequent frames

  20. SELECTIVE REJECT (RETRANSMISSION) • Only rejected frames are retransmitted • Subsequent frames are accepted by the receiver and buffered • Minimizes retransmission • Receiver must maintain large enough buffer to reordering. • More complex login in transmitter

  21. Example Data Link Protocols • HDLC – High-Level Data Link Control • The Data Link Layer in the Internet

  22. High-Level Data Link Control Frame format for bit-oriented protocols.

  23. High-Level Data Link Control (2)

  24. The contents of an HDLC frame are shown in the following table:

  25. The Data Link Layer in the Internet PPP (Point-to-point protocol) handles error detection, supports multiple protocols, allows IP addresses to be negotiated at connection time.

  26. PPP – Point to Point Protocol The PPP full frame format for unnumbered mode operation.

  27. Performance of ARQ Stop-and-Wait Flow Control The total time to send the data as T = n(2tprop + tframe) The utilization, or efficiency, of the line is It is useful to define the parameter a = tprop/tframe . Then

  28. Error-free sliding-window flow control where W is window size

More Related