Download presentation
Presentation is loading. Please wait.
Published byLinette Chase Modified over 9 years ago
1
5-1 Business Data Communications and Networking, 6 th ed. FitzGerald and Dennis
2
5-2 Copyright © 1999 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976 United States Copyright Act without the express written permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for redistribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein.
3
5-3 Data Link Layer Chapter 5
4
5-4 Objectives of Chapter 5 Understand u the role of the data link layer, u three common error detection and correction methods. Become familiar with… u two basic approaches to controlling access to the media, u common sources of error and its prevention, u several commonly used data link protocols.
5
5-5 INTRODUCTION
6
5-6 Introduction The data link layer sits between the physical layer and the network layer. The data link layer accepts messages from the network layer and controls the hardware that actually transmits them. Both the sender and receiver have to agree on the rules or protocols that govern how their data link layers will communicate with each other.
7
5-7 Introduction A data link protocol provides three functions: u Controls when computers transmit (media access control). u Detects and corrects transmission errors (error control). u Identifies the start and end of a message (message delineation).
8
5-8 MEDIA ACCESS CONTROL
9
5-9 Media Access Control Media access control (MAC) refers to the need to control when devices transmit. MAC becomes important when several computers share the same communications circuit to ensure no two devices attempt to transmit data at the same time.
10
5-10 Controlled Access Most computer networks managed by a host mainframe computer use controlled access. u X-ON/X-OFF is one of the oldest MAC protocols dating back to the days of the teletype. The X-ON signal indicates a system ready to receive messages, the X-OFF signal indicates a system too busy to receive.
11
5-11 Controlling Access Polling is the process of sending a signal to a client that gives it permission to transmit or to ask it to receive. There are several types of polling. u Roll call polling, the FEP works consecutively through a list of clients, first 1, then 2 etc. until all are polled. u Hub go-ahead polling (a.k.a. token passing) One computer starts the poll and passes it to the next system on the multipoint circuit, which sends its message or passes it to the next system, and so on.
12
5-12 Contention Contention is the opposite of controlled access. Computers wait until the circuit is free and then transmit whenever they have data to send. Requires a technique to handle situations when two devices try to transmit at the same time (Collision)
13
5-13 Relative Performance In general, contention approaches work better than controlled approaches for small networks that have low usage. In high volume networks, many devices want to transmit at the same time, and a well- controlled circuit prevents collisions.
14
5-14 ERROR CONTROL IN NETWORKS
15
5-15 Error Control in Networks There are two types of errors associated with networks. Human errors Network errors There are two categories of network errors. Corrupted data (that have been changed) Lost data
16
5-16 What are Network Errors? Network errors are a fact of life in data communications networks. Normally errors occur in bursts. In a burst error, more than one data bit is changed by the error-causing condition. Errors are not uniformly distributed, regardless of error rate statistics. Dial-up lines are more prone to errors because they have less stable parameters.
17
5-17 What Causes Errors? Line noise and Distortion cause errors. Source of Error What Causes It How to Prevent It. Line Outages White Noise Impulse Noise Cross-Talk Echo Attenuation Intermodulation Noise Jitter Harmonic Distortion Storms, Accidents Movement of electrons Sudden increases in electricity (e.g. lightening) Multiplexer guardbands too small, or wires too close together Poor connections Graduate decrease in signal over distance Signals from several circuits combine Analog signals change phase Amplifier changes phase Increase signal strength Shield or move the wires Increase the guardbands, or move or shield the wires Fix the connections, or tune equipment Use repeaters or amps Move or shield the wires Tune equipment
18
5-18 Error Prevention There are many ways to prevent errors: u Shielding (adding insulation) u Moving cables away from noise sources u Changing multiplexing type (FDM TDM) u Tuning transmission equipment and improving connection quality u Using amplifiers and repeaters u Equalization u Leasing conditioned circuits
19
5-19 Error Detection It is possible to develop data transmission methodologies that vibe very high error detection and correction performance. The only way to do error detection and correction is to send extra data with each message. In general, the larger the amount of error detection data sent, the greater the ability to detect an error.
20
5-20 Error Detection There are three common error detection methods. Parity Checking Longitudinal redundancy checking Polynomial checking v Checksum v Cyclic Redundancy
21
5-21 Parity Checking One of the oldest and simplest method, parity checking adds 1 additional bit to each byte in the message. The value of this parity bit is dependent on the number of 1’s in each byte transmitted. Even parity causes the sum of all bits (including the parity bit) to be even. Odd parity causes the sum to be odd. Unfortunately if two bits are erroneous, the parity checking will fail. Parity checking results in about a 50% reliability rate.
22
5-22 Parity Checking Assume we are using even parity with 7-bit ASCII. The letter V in 7-bit ASCII is encoded as 0110101. Because there are four 1s (an even number), parity is set to zero. This would be transmitted as: 01101010. Assume we are using odd parity with 7-bit ASCII. The letter W in 7-bit ASCII is encoded as 0001101. Because there are three 1s (an odd number), parity is set to one. This would be transmitted as: 00011011.
23
5-23 Longitudinal Redundancy Checking (LRC) LRC was developed to overcome the problem with parity’s low probability of detection. LRC adds one additional character, called the block check character (BCC) to the end of the entire message or packet of data. The value of the BCC is calculated much like the Parity bit, but for the entire message. Results in a 98% reliability rate.
24
5-24 Longitudinal Redundancy Checking ASCII 1000100 1000001 1010100 1000001 1101111 Letter D A T A BCC Parity bit 1 0 1 For example, suppose we were to send the message “DATA” using odd parity and LRC with 7-bit ASCII: (Note that the parity bit in the BCC is determined by parity, not LRC.)
25
5-25 Polynomial Checking Like LRC, polynomial checking adds 1 or more characters to the end of the message based on a mathematical algorithm. With checksum, 1 byte is added to the end of the message. It is obtained by summing the message values,and dividing by 255. The remainder is the checksum. (95% effective) With CRC, 8, 16, 24 or 32 bits are added, computed by calculating a remainder to a division problem. (99.969% with 8-bit, 99.99% with 16 bit).
26
5-26 Error Correction via Retransmission The simplest, most effective, least expensive, and most commonly used method for error correction is retransmission. A receiver that detects an error simply asks the sender to retransmit the message until it is received without error. (called Automatic Repeat reQuest (ARQ)).
27
5-27 Error Correction via Retransmission With Stop and Wait ARQ the sender stops and waits for a response from the receiver after each message or data package. Responses are: Acknowledgement (ACK) Negative acknowledgement (NAK) With Continuous ARQ the sender does not wait for acknowledgement before sending next message. If it receives an NAK, it retransmits the needed messages.
28
5-28
29
5-29
30
5-30 Forward Error Correction Forward error correction uses codes containing sufficient redundancy to prevent errors by detecting and correcting them at the receiving end without retransmission of the original message. u Hamming code u Hagelbarger code (corrects up to 6 consecutive bit errors) u Bose-Chaudhuri code
31
5-31
32
5-32 DATA LINK PROTOCOLS
33
5-33 Data Link Protocols ProtocolSizeError DetectionRetransmissionMedia Access File Transfer Protocols XMODEM1328-bit ChecksumStop-and-wait ARQControlled Access XMODEM-CRC1328-bit CRCStop-and-wait ARQControlled Access X-MODEM-1K10288-bit CRCStop-and-wait ARQControlled Access YMODEM102916-bit CRCStop-and-wait ARQControlled Access ZMODEM*32-bit CRCContinuous ARQControlled Access KERMIT*24-bit CRCContinuous ARQControlled Access Synchronous Protocols SDLC*16-bit CRCContinuous ARQControlled Access HDLC*16-bit CRCContinuous ARQControlled Access Token Ring*32-bit CRCStop-and-wait ARQControlled Access Ethernet*32-bit CRCStop-and-wait ARQContention Asynchronous Transmission 1ParityContinuous ARQFull Duplex SLIP*None Full Duplex PPP*16-bit CRCContinuous ARQFull Duplex
34
5-34 Asynchronous Transmission Asynchronous Transmission is often referred to as start-stop transmission because the transmitting device can transmit a character whenever it is convenient, and the receiving device will accept that character. Each character is transmitted independently of all other characters. To accomplish this a start bit (0), and a stop bit (1) are added to each character. The recognition of the start and stop of each message is called synchronization.
35
5-35 Asynchronous Transmission
36
5-36 Asynchronous File Transfer Protocols In general, microcomputer file transfer protocols are used on asynchronous point- to-point circuits, typically across telephone lines via a modem. XMODEM v XMODEM-CRC (CRC-8) v XMODEM-1K (CRC+1K blocks) YMODEM(CRC-16) ZMODEM (CRC-32) KERMIT (CRC-24)
37
5-37 Asynchronous FTP STX Packet# Checksum 1 byte compliment 1 byte 1 byte Message 128 bytes XMODEM FORMAT Packet # 1 byte
38
5-38 Synchronous Transmission With Synchronous Transmission all the letters or data in one group of data is transmitted at one time as a block of data called a frame or packet. The start and end of each packet sometimes is marked by establishing by adding synchronization characters (SYN) at the start of each packet, called
39
5-39 Synchronous Transmission There are many protocols for synchronous transmission that fall into three broad categories: Byte-oriented Bit-oriented Byte-count
40
5-40 Synchronous Transmission u Synchronous Data Link Control (SDLC) is a mainframe protocol developed by IBM in 1972. It is a bit-oriented protocol, because the data contained in the frame do not have to be in 8-bit bytes. u High-level Data Link Control (HDLC) is a formal standard developed by ISO, and is essentially the same as SDLC except that the address and control fields can be longer.
41
5-41 Synchronous Transmission SDLC format Flag Address Control Message Frame Flag 8 bits variable 2 bits variable check 8 bits sequence 16 or 32 bits
42
5-42 Synchronous Transmission Token Ring (IEEE 802.5) was developed by IBM in the early 1980s, and later became a formal standard of the IEEE. It uses a controlled access media access protocol. Ethernet (IEEE 802.3) is a byte-count protocol, because instead of using special characters or bit patterns to mark the end of a packet it includes a field that specifies the length of the message portion of the packet.
43
5-43 Synchronous Transmission Start Frame Destination Source Message End delimiter control address address variable delimiter Token Ring format AccessFrame control check sequence 1 byte4 bytes Ethernet format Destination Source Length Message CRC-32 address address 2 bytes variable 4 bytes 6 bytes
44
5-44 Synchronous Transmission u Serial Line Internet Protocol (SLIP) is a byte- oriented protocol designed to connect two computers using Internet protocols over a point-to-point telephone line. Compressed SLIP (CSLIP) uses compression to reduce the amount of data transmitted. u Point-to-Point Protocol (PPP) is a byte- oriented protocol developed as a replacement for SLIP. It includes error control and supports other network layer protocols.
45
5-45 Synchronous Transmission PPP packet layout Flag Address Control Message CRC-16 Flag 1 byte 1 byte 1 byte variable 2 bytes 1 byte SLIP packet layout End Message End 1 byte variable 1 byte
46
5-46 TRANSMISSION EFFICIENCY
47
5-47 Transmission Efficiency One objective of a data communications network is to move the highest possible volume of accurate information through the network. Each communication protocol uses some bits or bytes to delineate the start and end of each message and for error control and has both information bits (to convey the user’s meaning) and overhead bits (for error checking, and marking the start and end of characters and packets).
48
5-48 Transmission Efficiency Transmission efficiency is defined as the total number of information bits divided by the total number of bits in transmission. u In Asynchronous transmission only 70% of the data rate is available to the user (7 bit ASCII). u In Synchronous (SDLC) efficiency is approximately 99.2% (100 info characters with 8 bit code = 800 info bits)
49
5-49 Transmission Efficiency ZMODEM is more efficient than YMODEM which is more efficient than XMODEM. The general rule is that the larger the message field, the more efficient the protocol. In designing a protocol, there is a trade-off between large and small packets. Small packets are less efficient, but are less likely to contain errors and are less costly in terms of circuit capacity to retransmit if there is an error.
50
5-50 Transmission Efficiency
51
5-51 Transmission Efficiency Throughput is the total number of information bits received per second, after taking into account the overhead bits and the need to retransmit packets containing errors.
52
5-52 Throughput (TRIB) Calculating the actual throughput of data communication is complex. The use of a shared multipoint circuit, rather than a dedicated point-to-point circuit will affect throughput, because the total capacity in the circuit must now be shared among several computers.
53
5-53 Throughput (TRIB) The term transmission rate of information bits (TRIB) describes the effective rate of data transfer. TRIB = Number of information bits accepted Total time required to get the bits accepted
54
5-54 Throughput (TRIB) TRIB = Number of information bits accepted Total time required to get the bits accepted TRIB = K(M - C)(1 - P) MIR - T where:K = information bits per character M = block length in characters R = modem transmission rate in characters per second C = average # of non-information bits per block P = probability that a block will require retrans because of error T = time between blocks in seconds, such as modem delay/turnaround time on half duplex, echo suppression delay on dial- up, and propagation delay on satellite transmission. This is the time required to reverse the direction of transmission from send to receive or receive to send on a half duplex (HDX) circuit. It can be obtained from the modem specification book and may be referred to as re- clocking time.
55
5-55 Throughput (TRIB) The following TRIB example shows the calculation of throughput assuming a 4800 bits per second half-duplex circuit. 7(400-10)(1-0.01) (400/600) + 0.025 where:K = 7 bits per character (information) M = 400 characters per block R = 600 characters per second (derived from 4800 bps divided by 8 bits/character) C = 10 control characters per block P = 0.01 (10 -2 ) or one retransmission out of 100 blocks transmitted 1% T = 25 milliseconds (0.025) turnaround time TRIB= = 3908 bits per second
56
5-56 Throughput (TRIB) 7(400-10)(1-0.01) (400/600) + 0.025 If all factors in the calculation remain constant except for the circuit, which is changed into full duplex (no turnaround time delays, T=0) then the TRIB increases to 4054 bps. Look at the equation where the turnaround value (T) is 0.025. If there is a further propagation delay time of 475 milliseconds (0.475), this figure changes to 0.500. For demonstrating how a satellite channel affects TRIB, the total delay time is now 500 milliseconds. Still using the figures above (except for the new 0.500 delay time), we reduce the TRIB for our half-duplex, satellite link to 2317 bps, which is almost one-half for the full-duplex (no turnaround time) 4054 bps. TRIB= = 3908 bits per second
57
5-57 Next Day Air Service
58
5-58 End of Chapter 5
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.