Business Data Communications Chapter Three Data Link Layer
Business Data Communications Chapter Three Data Link Layer Fundamentals Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall Chapter Three 1
Primary Learning Objectives n n n n Understand the function of the data link layer Distinguish Logical Link Control from Media Access Control Describe the two types of flow control Explain line discipline Define the components of error control Recognize two methods of delineating data in a bit stream Identify devices and components associated with the data link layer Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 2
The Data Link Layer – Its Function n Sits above the physical and below the Network Layers Formats data bits into frames Has two components: n n n Logical Link Control – 802. 2 Media Access Control – 802. 3 for Ethernet Is responsible for: n n n Line discipline Flow control Error control Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 3
Components of the Data Link Layer Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 4
Logical Link Control (LLC) n n Designated by the IEEE as 802. 2 and sits above the Media Access Control Provides three types of frame delivery service using protocol data units: n n n Type 1 – connectionless without acknowledgement, the most used delivery service Type 2 – connection-oriented with acknowledgement Type 3 – connectionless with acknowledgement Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 5
Logical Link Control (LLC) n LLC supports three types of frames: n I – Information n n S – Supervisory n n manages the Information frames U – Unnumbered n n is connection-oriented used by connectionless services and terminates -oriented services connection Only Type 2 delivery service uses all three types of frames Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 6
Logical Link Control (LLC) Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 7
Media Access Control (MAC) n Has various IEEE designations, with the most common being 802. 3 for Ethernet n Determines how devices share a common circuit n Falls into one of two categories: n n Contention (802. 3, Ethernet, for example) Controlled access (802. 5, Token Ring, for example) n FDDI, another form of controlled access, is an ANSI/ITU-T standard Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 8
Media Access Control – 802. 3 Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 9
Media Access Control – 802. 5 Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 10
Media Access Control (MAC) n Standard 802. 3 networks using hubs and bridges can suffer from significant collision impairment under high traffic: n n Modern 802. 3 networks using switching technology have greatly eased this problem Switches do not change the underlying 802. 3 architecture Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 11
Media Access Control (MAC) Format of a MAC Protocol Data Unit (PDU) Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 12
Flow Control n Prevents a sender from overwhelming a receiver with traffic: n A sender and receiver each have a memory area in which they can store frames n n n This memory is sometimes referred to as a buffer A sender can overwhelm, or overflow, a receiver’s memory buffer without proper flow control If an overflow occurs, data would likely be lost Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 13
Flow Control n Two common forms of flow control are: n Stop-and-wait n n Each single frame sent requires receipt of one acknowledgement Sliding windows n The sending of multiple frames requires a single acknowledgement returned Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 14
Flow Control n Stop-and-wait: n n n Most efficient for messages containing a few large frames that traverse short links Requires one acknowledgement for each frame sent Sliding windows: n n Most efficient for messages containing many small frames that traverse long links Allows for one acknowledgement for multiple frames Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 15
Stop-and-Wait Flow Control Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 16
Sliding Windows Flow Control Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 17
Line Discipline n n Can be viewed as a “polite” means of controlling a conversation between communicating devices Associated with two types of network environments: n n Point-to-point between communicating devices using half - or full-duplex circuits Multipoint with communicating devices going through a central controlling device n The central control device is often a mainframe with connected terminals Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 18
Error Control n n n No system is perfect; errors should be expected Errors can result when data is lost, corrupted, or damaged, making error control critical Error control has two components: n n n Error Detection Error Correction The two components are equally important Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 19
Error Detection n Common error-detection methods include: n Parity checking n n Longitudinal redundancy checking n n 98% probability of detection Checksum checking n n 50% probability of detection 99. 6% probability of detection Cyclical redundancy checking n 99. 9%+ probability of detection Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 20
Parity Checking n An extra parity bit is added to the byte n Assuming even parity: n 10000010 – data sent 10000110 - data received n n 10000010 – data sent 10011010 – data received n n Error detected on receiver side (single bit) No error detected on receiver side (multiple bit) Simple parity detects only single bit errors Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 21
Longitudinal Redundancy Checking -LRC n n Longitudinal literally means “lengthwise” The sender, for each byte in the message, calculates a parity value, creating an additional block check character or BCC n n As with parity checking, the parity value is odd or even The BCC is added to the end of the message block The receiver performs the same lengthwise LRC computation If the receiver’s calculated BCC does not equal the sender’s calculated BCC, the receiver assumes a transmission error Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 22
Longitudinal Redundancy Checking 01000010 01011001 010101000101 – Before BCC Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 23
Longitudinal Redundancy Checking 01000010 01011001 010101000101 00001010 – After BCC The BCC added to the end of the data block. Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 24
Checksum Checking – CC n The message sender: n n n Evaluates each binary byte in the message to its decimal value Totals the decimal values of all bytes Divides the total by 255, creating a remainder Using the remainder for the CC, adds the CC to the end of the message block The message receiver: n n n Performs the same byte-by-byte calculation and creates his own CC Compares his calculated CC to the sender’s Assumes a transmission error if the two CC values differ Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 25
Checksum Checking – CC Decimal Equivalent Char Col 1 Col 2 Col 3 Col 4 Col 5 Col 6 Col 7 Col 8 B 0 1 0 66 Y 0 1 1 0 0 1 89 T 0 1 0 1 0 0 84 E 0 1 0 0 0 1 69 TOTAL 308 / 255 = 1. 21 CC = 21 Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 26
Error Control n The most common error correction technique is to simply retransmit the data in error n n Easy, but requires time for the retransmission A second error correction technique is called forward error correction: n n n The core message is sent along with redundant data bits The redundant data bits can, if necessary, be used by the receiving device to correct errors on site without retransmission However, forward error correction results in inefficient use of a circuit if too many redundant data bits are sent and not used Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 27
Data Delineation n n A transmitted bit stream contains not only the core message but control information as well Control information could include: n n n Source address Destination address Length of message field Error control data Other “non-core” information Data delineation differentiates between core and other data Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 28
Data Delineation n Two key methods providing data delineation are: n n n Asynchronous protocols: n n n Asynchronous data link protocols Synchronous data link protocols Are used mostly by mainframes and their connected terminals Provide byte-by-byte delineation Synchronous protocols: n n Are used in LANs, BNs, MANs, and WANs Provide delineation for groups of bytes Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 29
Data Delineation n Popular asynchronous protocols include: n n n XModem YModem ZModem Kermit Asynchronous protocols require that every data byte have a start and stop bit before and after it n Generally less efficient than synchronous protocols Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 30
Asynchronous Transmission Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 31
Data Delineation n n Synchronous protocols are either bit- or byte-oriented Bit-oriented protocols are more flexible: n n They do not require a predetermined “byte” character format, such as EBCDIC or ASCII They are more complicated n n n Bit stuffing may be required HDLC is a formalized bit-based protocol Byte-oriented protocols: n n Are based upon known “byte” based data Ethernet is a very common byte-based protocol Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 32
Simple Synchronous Transmissions Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 33
Data Link Layer Devices and Components n A Network Interface Card is: n n n Bridges: n n n A component rather than device Essential to connect a device to a network Link segments of the same logical network Filter traffic, and so can improve network performance Switches: n n n Offer more functionality than hubs and bridges Provide point-to-point connections to devices plugged into them Have transformed how standard Ethernet is configured Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 34
A 3 Com Network Interface Card (NIC) n n n NICs have a physical address NIC addresses must be unique NIC addresses can be bypassed, or overridden, by software, but care must be taken when doing this to avoid address duplication Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 35
A Linksys Wireless Bridge n Bridges filter network traffic Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 36
A Bridge Filtering Traffic Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 37
A standard Cisco Switch n Switches have mostly replaced hubs in modern Ethernet networks Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 38
In Summary n The data link layer: n n n Is stacked above the physical and below the network layers Formats data bits into units called frames Is composed of two stacks, the logical link and the media access controls Performs error control Has devices such as bridges and switches with which it is particularly associated Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice Hall 39
- Slides: 39