1 / 85

Data Link Level Design Issues

Data Link Level Design Issues. Services provided to Network Layer Framing Error control Flow control. Services provided to Network Layer. Host 1. Host 2. Layer 4. Layer 4. Layer 3. Layer 3. Actual Data Path. Layer 2. Virtual Data Path. Layer 2. Layer 1. Layer 1.

arien
Download Presentation

Data Link Level Design Issues

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. Data Link Level Design Issues • Services provided to Network Layer • Framing • Error control • Flow control

  2. Services provided to Network Layer Host 1 Host 2 Layer 4 Layer 4 Layer 3 Layer 3 Actual Data Path Layer 2 Virtual Data Path Layer 2 Layer 1 Layer 1 Physical Medium

  3. Most Common Services • Unacknowledged connectionless service • Very low error rate • Voice traffic • Acknowledged connectionless service • Frame arrived safely • Good for wireless (unreliable) channels • Acknowledged connection oriented service • Reliable stream of ordered frames • Three phases -connection, data flow, disconnect

  4. Placement of Data Link Protocol ROUTER Routing Processor Link Layer Processor 2 Data link protocol 2 2 2 2 2 3 3 Frames Packets Transmission line to a router

  5. Framing • Character count - obsolete • Starting and ending characters, with character stuffing (see next slide) • Starting and ending flags, with bit stuffing(see following slide) • Physical layer coding violations

  6. Character Stuffing (Transparency to User) Stuffed character Actual data sequence Beginning of frame End of frame DLE STX DLE DLE ETX DLE ETX User data Frame The first of two DLE characters is always a stuff-delete

  7. Bit Stuffing (Transparency to User) Stuffed bit Beginning of frame Actual data sequence End of frame 01111110 01111110 011111010 User data Frame A “0” following five “1’s” is always deleted

  8. Error control Physical layer coding violations

  9. Error Control • Automatic Repeat Request (ARQ) • Error detecting codes • Positive acknowledgement(ACK) • Negative acknowledgement(NACK) • Timeout • Delay sensitivity • Forward Error Correction • Error correcting codes • Delay insensitive • Much more overhead required

  10. Link-by-Link vs End-to-End Error Control There’s a tradeoff

  11. N links p = Probability of error on a single link M = Single message transmission time Link-by-line acknowledgement Average no. link retransmissions=1/(1-p) Average message transmission time per link=M/(1-p) Average message transmission time N links = NM/(1-p) End-to-end acknowledgement Probability no error end-to-end=(1-p)N Probability at least one error end-to-end=q=1- (1-p)N Average no. end-to-end retransmissions=1/(1-q)= (1-p)-N Average transmission time, end-to-end = M (1-p)-N Assumption of negligible propagation delay

  12. Link-by-link 3 links Link-by-link 10 links End-to-end 3 links End-to-end 10 links Normalized transmission time Link error probability

  13. Flow control • Closed loop controls • Sliding window • Open loop • Leaky bucket

  14. Redundancy Encoding • Block codes • (n,k) code n= codeword length, k=Information bits • ASCII (8,7) code • Parity bits • ASCII “e” 10100110 Parity bit • Hamming distance-number of different places • Convolutional Codes • Difference in path lengths • Viterbi decoding

  15. (7,4) Hamming Code

  16. Augmented Hamming Code extra parity bit over all other bits

  17. Hamming Distance and Error Correction Number of places codewords differ Example-six bit codewords Hamming Distance Two Codeword 1- 001101 Codeword 2- 101001

  18. n bit codeword - vertex on an n dimensional cube Number of edges tranversed from one point to another =Hamming distance between codewords Codewords Intermediate vertices Distance = 5

  19. Distances and error correction and detection Single Error Detecting Code-Distance two Codewords Vertex Single-error correcting or double-error detecting Distance three Single-error correcting and double-error detecting Distance four

  20. Distance and Correcting and Detecting Capability D=Number of detectable errors C=Number of correctable errors m = Minimum distance between codewords Received n bits not a codeword Received n bits closest to one codeword Examples: (7,4) Hamming code m =3 D= 2 and C=1 Augmented Hamming (8,4) code m =4, D=3 and C =1

  21. Forward Error Correction Pe=P(Single bit in error) Independence from bit to bit

  22. Trade between data rate and error correcting power

  23. Code Efficiency n bit codeword - vertex on an n dimensional cube An efficient code packs the code “densely” Code point n nearest neigbors

  24. Code point n-1 nearest neighbors of adjacent point

  25. Packing the cube efficiently Number of vertices at distance I from a codeword Number of vertices at distance C or less Vertices belong to codeword Number of code points Lower bound on number of vertices Equality for Perfect code

  26. Implementation of Coding and Decoding In digital hardware, naturally Cyclic codes-every codeword a cyclic shift of another eg Hamming code codewords 1,3,4,6,8,10 and cyclic shifts 3 - 0011010 13 - 1101000 Cyclic codes represented by a polynomial Each code has a unique generator polynomial-G(x) e.g. For (7,4) Hamming, G(x)=

  27. Quotient Divisor Remainder

  28. Forming a codeword from k information bits 1) D(x) - k-1 degree polynomial representing data 2) Form xn-kD(x) (n-1 degree) 3) Divide xn-kD(x) by G(x) , save remainder R(x) 4) Form codeword C(x)= xn-kD(x) +R(x) Mathematical justification Codeword is a multiple of G(x) If not an error has occurred.

  29. Example 1110(14) to be transmitted-D(x)= x3+ x2+ x Multiplication by x3 gives x6+ x5+ x4 Remainder after division by x3+ x2+1 is x C(x)=x6+ x5+ x4+ x1110010(14) Error in transmission channel error 1111010 Received x6+ x5+ x4+ x3 + x /x3+ x2+1R(x)= x3

  30. Divider circuit

  31. Encoder Implementation Divider Circuit Remainder - R(x) D(x) Input Sequence n-k tic delay D(x)+ R(x) D(x)

  32. Generating Polynomials of Cyclic Codes Standards for Error Detection

  33. Burst Error Capabilities of CRC Codes Transmitted C(x) Received C(x) + E(x) Channel error E(x) Because of error C(x) + E(x) is not divisible by G(x) E(x)/G(x)=R(x) ModG(x)

  34. If (x+1) a factor of G(x) odd number of errors • All double errors • All bursts of length < r+1

  35. Interleaving for Burst Errors k2 codewords each (n1 k1) n1 n1 n1 (n2 - k2 )parity bits n1 Imagined rearrangement n1 Error burst Additional Storage and Processing n2 -k2 n2 -k2 Turbo codes n2 -k2

  36. Convolutional codes Example(3,1) code + output input 110100 T T 111 100 010 110 011 001 000 +

  37. Trellis Representations State Input Next state 00 01 10 11 000 111 00 01 10 11 001 110 011 100 010 101

  38. Viterbi Algorithm-shortest path shortest path-Hamming distance Trellis codes-Euclidian distance

  39. Configurations conv encoder block encoder block decoder VA CHAN Correction block encoder Error detection CHAN NACK Detection

  40. Data Link Prototcols A B

  41. Unrestricted Simplex Transmitter Packet from Network Layer Form Frame Data Link Layer Source Machine Physical Layer

  42. Elementary Data Link Protocols(3.3) Basic Link Level Frame Flag Frame Header Info CKSM Flag Frame header Three fields User Data Formed into a Packet and Passed to Network Layer Kind Seq ACK

  43. Dealing with an Unreliable Channel • Timeout routines • Sequence number in Frames

  44. Unrestricted Simplex Receiver • Wakeup • Remove frame from Physical level buffer • Form packet and Pass to Network Layer • Go back to sleep

  45. Simplex Stop-and Wait Flow Control Problem • Infinite processor speed or infinite buffer not needed • Inserting maximum delay too conservative • ACK to sender is solution (Data in one direction only) • Transmitter • Fetch packet from network level • Form frame • Frame stored in transmit buffer until ACK received • Transmitted after ACK • Receiver • Remove frame from Physical level buffer • Form packet and Pass to Network Layer • Return ACK

More Related