Presentation is loading. Please wait.

Presentation is loading. Please wait.

5-1 Business Data Communications and Networking, 6 th ed. FitzGerald and Dennis.

Similar presentations


Presentation on theme: "5-1 Business Data Communications and Networking, 6 th ed. FitzGerald and Dennis."— Presentation transcript:

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 Data Link Layer ©Jaana Porra APPLICATION NETWORK DATA LINK PHYSICAL APPLICATION NETWORK DATA LINK PHYSICAL Software produces the message, passes it on to the network layer Addresses the message, routes it, passes it on to the data link layer Formats the message, decides when to transmit, detects and corrects errors, passes data on to the physical layer Transports the data

7 5-7 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.

8 5-8 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).

9 5-9 The OSI Reference Model Continued ©Jaana Porra APPLICATION PRESENTATION SESSION TRANSPORT NETWORK DATA LINK PHYSICAL Manages the communication between applications Adds structure to the exchanged data units Adds control mechanisms to exchanged data Transfers and multiplexes data reliably across the network Transfers data over the network independent of media and topology of sub-networks Transfers data over a single communications link, does framing and error control Responsible for the electro-mechanical interface to the communications media A letter mailed and received The envelope layout Address, return address postage on envelope The US Postal Service The Postal Service ground and air transportation network A mail truck from post office to airport The truck ©Jaana Porra

10 5-10 The OSI model revisited ©Jaana Porra u Physical layer: transmits data bits (0,1) over a circuit according to rules such as voltages of electricity, timing, full duplex/half duplex, connector cable standards u Data Link Layer: manages the transmission and looks for error free circuits; solves problems caused by damaged, lost or duplicated message frames (levels above assume error free transmission) sometimes divided into two sub-levels v Media Access Control (MAC) performs most of the Data Link Layer functions v Logical Link Control (LLC) is an interface between MAC and Network Layer (cf., middleware = changing MAC does not change the Network Layer; e.g., IEEE802.2

11 5-11 MEDIA ACCESS CONTROL

12 5-12 The OSI Reference Model Continued ©Jaana Porra APPLICATION PRESENTATION SESSION TRANSPORT NETWORK DATA LINK PHYSICAL Media Access Control (MAC) Logical Link Control (LLC) While MAC performs most of the data link layer functions, LLC is just an interface between the MAC layer and software in the network layer

13 5-13 Media Access Control (MAC) ©Jaana Porra u Media Access Control (MAC) performs most of the data link layer functions u MAC refers to the need of control when devices transmit asynchronous transmission has no MAC (transmission when key is pressed) MAC is important when several devices share the same circuit (e.g., point-to- point line with half duplex requires taking turns) u Two approaches to MAC: 1.Controlled access (mainframe or its front end processor controls the circuit and determines which device can access the media at what time) v X-ON/X-OFF v Polling (sending a signal to the terminal giving it a permission to transmit or asking it to receive) –hub go-ahead polling –roll call polling (with or without priority; time- out) 2. Contention (sending when ever)

14 5-14 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.

15 5-15 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.

16 5-16 ERROR CONTROL IN NETWORKS

17 5-17 Error Control in Networks ©Jaana Porra u Computer network errors can be v human errors or v network errors u Human errors are usually controlled through the application program u Networks errors (e.g., those occurring during transmissions) are controlled by the network software and hardware u Network errors can be: corrupted data lost data

18 5-18 What are Network Errors? ©Jaana Porra u Network errors “are a fact of life” u They occur every second, minute, or hour depending on the noise on the lines u No network can eliminate all errors but most errors can be prevented, detected, and corrected by proper design. u Normally, errors appear in bursts u In a burst error, more than one data bit is changed by the error causing condition (errors are not uniformly distributed in time) u compare: error rate = number of bits in error / number of bits transmitted u (-) Errors in xxxxx (bursts) are more xiffixult xo recoxer thax evexly distributed errors.

19 5-19 What are Network Errors? ©Jaana Porra u (+) When errors occur in bursts there are long, error free periods in the transmission u the error rate in transmissions sent over the dial-up network (telephone company’s public circuits) varies from one circuit to another. u Dial-up lines are more prone to errors than private dedicated lines because they have less stable transmission parameters (higher speeds are more error prone)

20 5-20 What Causes Errors? ©Jaana Porra u Line noise on electrical media (e.g., coaxial cable and twisted pair) consists of unwanted electrical signals u Line noise on optical media (e.g., fiber optic cable) consists of undesirable light) u Noise is introduced by equipment or by natural disturbances u Noise degrades the performance of a communications line u Noise manifests itself as missing bits, extra bits, or bits whose states have been flipped (0 is changed into 1 and vise versa)

21 5-21 Eleven Categories of Line Noise ©Jaana Porra u 1. White noise or Gaussian noise (background hiss or static on radios and telephones) is caused by the thermal agitation of electrons and therefore is inescapable. is treated by increasing the strength of the electrical signal = increasing the signal noise ratio u 2. Impulse noise (also called spikes) is the primary source of errors in data communications is heard as a click or a crackling noise can last as long as 1/100 of a second does not affect voice communications but can cause a burst error in data transmission

22 5-22 Eleven Categories of Line Noise ©Jaana Porra u Some sources for Impulse noise are voltage changes in adjacent lines telephone switching equipment at the exchange branch offices arching of the relays at older telephone exchange offices tones used by network signaling maintenance equipment used for line testing lightning flashes during thunderstorms fluorescent lights poor electrical connections in the data communications equipment.

23 5-23 Eleven Categories of Line Noise ©Jaana Porra u 3. Cross-talk occurs when a circuit picks up signals in another (e.g., hearing another telephone conversation in the background) occurs v between line pairs that are carrying separate signals, v in multiplexed links carrying many discrete signals, v in microwave links in which one antenna picks up a minute reflection from another antenna v in any telephone circuits that are too close to each other or are not electrically balanced cross talk increases with v increased communication distance v increased proximity of the two wires v increased signal strength v higher frequency signals

24 5-24 Eleven Categories of Line Noise ©Jaana Porra u 4. Intermodulation noise (a special type of cross talk) The signals from two circuits intermodulate and form a new signal that falls into a frequency band different from those reserved for the two signals (in multiplexing) u Echoes and echo suppression can cause errors. an echo suppressor causes a change in the electrical balance of a circuit, which may reflect signals back down the circuit when echo suppressors are dismissed as in data transmission, echoes may cause errors normally, however, echoes have such a low signal rate that they are not bothersome

25 5-25 Eleven Causes for Line Noise ©Jaana Porra u 5. Attenuation is the loss of power a signal suffers as it travels from the transmitting device to the receiving device. as the signal becomes weaker the receiving device has less and less change correctly interpreting the data u 6. Attenuation distortion refers to the fact that high frequencies lose power more rapidly than low frequencies during transmission (unequal loss of component frequencies) u 7. Delay distortion refers to the distortion that occurs because different frequencies travel at slightly different speeds (bits transmitted at one frequency will travel slightly faster than bits transmitted at another frequency)

26 5-26 Eleven Causes of Line Noise ©Jaana Porra u 8. Jitter may affect the accuracy of the data being transmitted because minute variations in amplitude, phase and frequency always occur u 9. Harmonic Distortion is usually caused by an amplifier on a circuit that does not correctly represent its output with what was delivered to it on the input side u 10. Phase hits are short- term shifts “out of phase,” with the possibility of a shift back to phase u 11. Line outages are a catastrophic causes of errors and incomplete transmissions (e.g., caused by telephone-end office equipment, storms, loss of carrier signal)

27 5-27 Error Prevention ©Jaana Porra u Shielding means protecting wires by covering them with an insulating coating u shielding is one of the best ways to prevent impulse noise and cross-talk u the greater the shielding the more expensive the cable and more difficult to install u Moving Cables means relocating cables away from sources of noise (especially power sources but also from lights and heavy machinery) u moving cables can reduce impulse noise and cross-talk u Changing Multiplexing Techniques often cures cross-talk and intermodulation (e.g., changing from FDM to TDM or changing the frequencies or size of the guardbands in frequency division multiplexing can help)

28 5-28 Error Prevention ©Jaana Porra u Improving Connection Quality (Many types of noise such as echoes, white noise, jitter, harmonic distortion can be caused by poorly maintains equipment or poor connections) u solution: return the communications equipment and redo the connections u Amplifiers are used on telephone lines to avoid attenuation throughout their length (analog: also noise gets amplified when the signal is amplified) u Repeaters are used on digital circuits. (digital: a repeater receives the incoming signal, translates it into a digital message, and retransmits the message ==> noise is not repeated)

29 5-29 Error Prevention ©Jaana Porra u Equalization means compensating attenuation and distortion (loss of power during transmission; high frequencies lose power more rapidly than lower frequencies) u Conditioning means that the circuit is certified by the carrier to have fewer errors (many of the above techniques employed).

30 5-30 Error Detection ©Jaana Porra u The only way to do error detection and correction is to send extra data with each message. u These error detection data are added to each message by the data link layer of the sender based on some mathematical calculations performed on the message u The receiver performs the same mathematical calculations on the message it receives and matches its results against the error detection data that were transmitted with the message. u If the two match, the message is assumed to be correct u If they don’t match, an error has occurred

31 5-31 Error Detection ©Jaana Porra u In general the greater the amount of error detection data sent, the greater the error protection achieved. u However, as this protection is increased the throughput of useful data is reduced u ==> efficiency of data throughput varies inversely as the amount of error detection and correction is increased u Parity Checking means adding one additional bit to each byte in order to make the total number of ones in the byte either an even number or an odd number V = 0110101 (because there is an even number of 1s a 0 is added) ==> V= 01101010 The probability of detecting an error is about 50%

32 5-32 Error Detection ©Jaana Porra u Longitudinal Redundancy Checking (LRC) adds one additional character, called the block check character, to the end of the entire message or packet of data u The value of the BCC is determined in the same manner as the parity bit, but counting longitudinally through the message, rather u than by counting vertically through each character Letter Parity bit D 1000100 1 A 1000001 1 T 1010100 0 A 1000001 1 BCC 1101111 1 Example: odd parity and LRC with 7-bit ASCII

33 5-33 Error Detection ©Jaana Porra u Polynomial Checking adds a character or series of characters to the end of the message based on a mathematical algorithm u A Checksum is calculated by adding the decimal value of each character in the message, dividing the sum by 255, and using the remainder as the checksum that is transmitted to the other end of the communication circuit u The receiving end calculates its own checksum. If the two are equal the message is presumed to be correct u The checksum gets close to 95% of the errors

34 5-34 Error Correction via Retransmission ©Jaana Porra u The simplest, most effective, and most commonly used method of error correction is retransmission u With retransmission the receiver simply asks the sender to retransmit the message until it is received without error u (= Automatic Repeat reQuest (ARQ)).

35 5-35 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.

36 5-36

37 5-37

38 5-38 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

39 5-39

40 5-40 DATA LINK PROTOCOLS

41 5-41 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

42 5-42 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.

43 5-43 Asynchronous Transmission

44 5-44 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)

45 5-45 Asynchronous FTP STX Packet# Checksum 1 byte compliment 1 byte 1 byte Message 128 bytes XMODEM FORMAT Packet # 1 byte

46 5-46 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

47 5-47 Synchronous Transmission There are many protocols for synchronous transmission that fall into three broad categories: Byte-oriented Bit-oriented Byte-count

48 5-48 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.

49 5-49 Synchronous Transmission SDLC format Flag Address Control Message Frame Flag 8 bits variable 2 bits variable check 8 bits sequence 16 or 32 bits

50 5-50 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.

51 5-51 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

52 5-52 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.

53 5-53 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

54 5-54 TRANSMISSION EFFICIENCY

55 5-55 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).

56 5-56 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)

57 5-57 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.

58 5-58 Transmission Efficiency

59 5-59 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.

60 5-60 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.

61 5-61 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

62 5-62 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.

63 5-63 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

64 5-64 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

65 5-65 Next Day Air Service

66 5-66 End of Chapter 5

67 5-67 Happy Valentine’s Day on February 14th! © 2001 Jaana Porra University of Houston


Download ppt "5-1 Business Data Communications and Networking, 6 th ed. FitzGerald and Dennis."

Similar presentations


Ads by Google