Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.

Similar presentations


Presentation on theme: "Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent."— Presentation transcript:

1 Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent machines –Error control –between adjacent machines The last two functions are provided for wireless LANs & in transport layer between host machines Other layers may also contain error & flow control –Modems today include error control

2 Chapt 3 Data Link Layer2 Services to network layer Unacknowledged connectionless service –Wired LANs use this because they have low error rate If frame must be corrected, transport layer will handle it Multimedia is better lost than late –We assume all frames are sent on same path for LANs Acknowledged connectionless service –If no ack is received, frame is resent Cheaper to correct at lower layer for unreliable media Acknowledged connection-oriented service –Connection established; state maintained

3 Chapt 3 Data Link Layer3 Framing –Frame delimiting Stop (0)/start (1) bits Beginning delimiter + character count Starting and ending characters –Character (byte) stuffing –Start (STX -00000010) and end (ETX) flags for delimiting –ESC stuffed if encountered internally Starting and ending flags –01111110 delimiter with bit stuffing after 5 internal 1s Code violations

4 Error Detecting Codes Parity bits – perhaps one bit for each byte –Odd/ even parity –Detects only an odd number of incorrect bits –Not appropriate for burst errors Arrange data by columns –Compute parity bits at the end of each column –Detects errors perhaps.95% of the time (depending on channel) Chapt 3 Data Link Layer4

5 5 Error Detecting Codes (cont.) Backward Error Control (BEC) –Burst and random errors assumed CRC (cyclic redundancy code) »e.g., CRC-CCITT (16 bits) 10001000000100001 Example p.214 »1101011111 by 10011 –Sender must resend incorrect frame Does receiver send NAK and/or does sender time-out and resend –Timer needed because NAK may be lost –Is this appropriate for multimedia applications? Delay! –At what layer and for what applications is BEC used?

6 Chapt 3 Data Link Layer6 Error Control Forward Error Control (FEC) –Enough redundancy is transmitted to correct errors that occur Codewords and Hamming distance Applications – ATM header, military use, space exploration, cellular phones –Note that ATM is defined for fiber, typically one bit errors, FEC is more appropriate P. 213

7 Chapt 3 Data Link Layer7 Flow control Stop sender from flooding receiver- frames may be lost If ack is part of protocol, frame can be discarded –Sender will time-out and resend –But this will cause additional traffic –Sender and Receiver agree to buffer size Option negotiation –Receiver sends signal for more frames May be after each frame or after group of frames

8 Chapt 3 Data Link Layer8 Flow control (cont.) ARQ –Window size of 1 (stop and wait) –Sender sends a frame and waits for receiver’s acknowledgement Error and flow control are integrated Frame and ack must be numbered 0 or 1 (1 bit sequence number) –Time-out and resend if ack is not received

9 Chapt 3 Data Link Layer9 Utilization of the channel This is a percentage, always less than 1 –U = good stuff / total stuff –We compute in terms of time U = transmission time of frame transmission time of (frame + ack) + 2T p –Increasing window size can increase utilization

10 Efficiency of Stop and Wait Assume use of stop and wait flow control for GEOs; 36 *10 6 meters high with transmission rate of 100Mbps; frame size of 1000 bits T x = 1000 bits /1000Mbps = 1 millionth of a sec. T p = 36 *10 6 meters/ 3 * 10 8 meters/sec =12/100 sec uplink and downlink propagation is.024 sec. Utilization of channel = T x =.000001 = 1 T x +2T p.000001 +.048 480001 Chapt 3 Data Link Layer10

11 Chapt 3 Data Link Layer11 Flow control (cont.) For greater efficiency, allow multiple frames on the channel at the same time (fill the pipe) ARQ go back N –Windows size > 1 Sender size 2 bits in sequence number - 1 Receiver – window size of 1 ARQ selective reject –Window sizes of sender and receiver sum to –2 bits in sequence number

12 Chapt 3 Data Link Layer12 Sample Protocol - HDLC Framing – bit stuffing CRC Control field –Information frames Sequence Number Acknowledgment number –Supervisory frames for REJ, RR, RNR –Unnumbered frames

13 Chapt 3 Data Link Layer13 Sample Protocol – PPP Based on HDLC –RFC 1661,1662,1663 –Used for user-to-ISP, router-to-router –No address or control field may be necessary Can be left off –Character stuffing instead of bit stuffing –Protocol field to work with different protocols –Control field of 00000011 (unnumbered)

14 Chapt 3 Data Link Layer14 Frame Relay & ATM Developed for fiber –Connection oriented –no ARQ –ATM dropped error control (except forward error control on header) and flow control – basically no data link coverage


Download ppt "Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent."

Similar presentations


Ads by Google