1 / 22

Chapter 4 Data Link Layer

Chapter 4 Data Link Layer. MIS 430. Data Link Layer Functions. Media access control – when computers can transmit Detects and corrects transmission errors Identifies the start and end of messages. I. Media Access Control.

Télécharger la présentation

Chapter 4 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 4 Data Link Layer MIS 430 Chapter 4

  2. Data Link Layer Functions • Media access control – when computers can transmit • Detects and corrects transmission errors • Identifies the start and end of messages Chapter 4

  3. I. Media Access Control • Def’n – method to control when computers can transmit on same circuit (not needed with full duplex circuit) • Controlled Access • XON/XOFF: • if ready to receive, sends XON character • If not ready, sends XOFF character • Hardware: DTR line in serial port Chapter 4

  4. Media Access Control, contd • Polling: send a signal to a client that allows it to transmit • Roll-call: server works consecutively through the clients • Hub polling (aka token passing): a computer starts the poll, sends it message, then passes the token to next computer; can transmit only if it holds the token Chapter 4

  5. Media Access Control, contd • Contention • Wait until free, then broadcast • 802.3 (Ethernet) uses contention • Can have collisions • Relative performance: response time • Contention better for small networks (~20) • Polling better for larger networks with more transmissions • See Fig 4.1 p. 118 for comparison chart Chapter 4

  6. II. Error Control • Human errors • Control thru the application program • Network errors • Corrupted data • Lost data • Networks should prevent, detect, and correct corrupted data • Prevention is much preferred! Chapter 4

  7. Source of Errors • Line noise/distortion • Line outages: cuts! Faulty equipment • White noise: background hiss • Impulse noise: spikes • Cross-talk: signal picked up in another circuit • Echo: poor connections • Attenuation: loss of signal power over distance • Intermodulation: several circuits combine • Jitter: phase changes can cause volume fluctuation • Harmonic distortion: amp doesn’t reproduce Chapter 4

  8. Error Prevention • Shielding • Move cables away from noise • Change mux technology (crosstalk) • Replace repeater/amplifier or put closer together • Purchase conditioned circuit (better quality lines) from common carrier Chapter 4

  9. Error Detection • Send extra data with each packet so that receiving side checks message received with message sent • Parity checking • Make number of ones an even or odd number by adding another bit to byte (50% accuracy) • LRC: longitudinal redundancy checking • Add block check character to packet • Similar to parity through packet • 98% error detection rate Chapter 4

  10. Error Detection • Polynomial Checking • Based on mathematical algorithm • CRC: Cylic Redundancy Check adds 8, 16, 24, or 32 bits to message • CRC-16: 99.998% error detection • CRC-32: 99.99999998% error detection! • For example, see next slide.. Chapter 4

  11. UPC Code: CRC Check Digit • UPC: 12345 67890 + check digit • 12345 = is manufacturer code • 67890 = is product code for that manufacturer • Algorithm: • Starting from right, add odd digits • Multiply sum by 3 • Starting from right, add even digits • Add to previous number • Check digit is ten’s complement of 1s digit Chapter 4

  12. UPC Example: checksum • Suppose UPC is: 12345 67890 • 0+8+6+4+2=20 • 20*3=60 • 9+7+5+3+1=25 • 60+25=85 • 10-5=5 which is the check digit added to end • Scan product, calculate check digit • If same as with packet, OK • If not same as with packet, need to rescan Chapter 4

  13. Correction: Retransmission • If error is detected, correction occurs when packet is retransmitted • ARQ – Automatic Repeat reQuest • Stop and Wait ARQ: ACK/NAK • Continuous ARQ: send next packet unless get a NAK • Both of these are flow control techniques Chapter 4

  14. Forward Error Correction • Add redundant bits to correct errors without retransmitting packet • Hamming Code (corrects 1-bit errors) • Reed-Solomon (corrects longer errors) • RAID: redundant array of inexpensive disks uses forward error correction • RAID 5: 3 drives = 2 drives (18+18+18=36 GB with redundancy) Chapter 4

  15. III. Data Link Protocols • Asynchronous transmission • Start-stop: each character sent independently of other characters • Start bit, 7 data bits, stop bit, parity or 10 bits per character (2/8 overhead) • Asynchronous file transfer protocols • Xmodem: CRC-8 with 132 char packets • Kermit: CRC-24 with 1000 char packets Chapter 4

  16. Data Link Protocols • Synchronous Transmission • Message sent in a block (packet) w/ checksum • Less overhead – sync characters at start and end of packet rather than for each character • SDLC: Synchronous Data Link Control – IBM 3270 standard • Bit-oriented protocol for 3270 terminals • 3270 represents IBM mainframe connection • PC can do this with 3270/IRMA card Chapter 4

  17. Synchronous Transmission • HDLC: High-level data link control • ISO standard, very similar to SDLC • Ethernet (802.3) • Similar to SDLC but length is carried along with other signal characters • CRC-32 plus up to 1492 byte packets: Dest Addr|Source Addr|Length|Control|…message…|CRC-32 Chapter 4

  18. Synchronous Transmission • PPP: Point to Point Protocol • 1990s: dial-up networking to ISP • CRC-16 plus packet up to 1,500 bytes: Flag|Address|Control|Protocol|…message…|CRC-16|Flag Chapter 4

  19. IV. Transmission Efficiency • How many overhead bits are needed beyond the information bits? • TE=total # information bits/total # bits • Ex: 7-bit ASCII asynchronous • 3 overhead bits, 7 data bits • TE=7/10=70% • Thus V.90 56K maximum is 43.6 Kbps Chapter 4

  20. Improving Efficiency • Increase size of message in packet • Decrease number of overhead bits • But CRC will detect errors • Problem:If a much longer packet has an error and must be retransmitted, this reduces efficiency! Chapter 4

  21. TRIB Calculation • TRIB=K(M-C)(1-P) (M/R)+T K=information bits/character 7 M=packet length in characters 400 R=data transmission rate in char/sec 600 C=avg number of noninformation char/block 10 P=probability that a block will require retransmission .01 T=time between in blocks in seconds .025 sec Example using values above: TRIB=7(400-10)(1-.01)/[400/600+.025]=3,908 bps Chapter 4

  22. Mgt Focus 4-2: Packet Size • Standard Commercial tested packet size from 500 to 32,000 bytes • 32,000 byte more 44% more efficient but response time delays occurred • Ideal packet size was between 4,000 and 8,000 bytes • However, this depends on the application and message pattern Chapter 4

More Related