Data link layer (LLC).

Slides:



Advertisements
Similar presentations
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Advertisements

EIE325: Telecommunication TechnologiesMaciej J. Ogorza ł ek, PolyU, EIE Telecommunication Technologies Week 8 Flow Control Error Control.
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Chapter 7 – Data Link Control Protocols
Data Link Control Protocols Data link control protocol Provides a layer of control between systems on a transmission medium referred to as data link. DLC.
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Data Link Control Protocols
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Chapter 3 THE DATA LINK LAYER
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Review:. Chapter 3: The Data Link Layer –achieve reliable, efficient communication between two physically connected machines. –Example problems to be.
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
Data Link Layer : Services, Framing, Error Detection and Correction2.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
1 FIT1005 Topic 6 - Data Link Layer Reference: Chapter 7 -Stallings.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Data and Computer Communications Data Link Control Protocols.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
Data Link Layer.
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
Data Link Control. The two main functions of the data link layer are data link control and media access control. The first, data link control, deals with.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
PROTOCOL BASICS. 2 Introduction In chapter 3: Circuits and techniques can be employed to transmit a frame of information between 2 DTEs Error detection.
The Data Link Layer RIS 251 Dr. ir. S.S. Msanjila.
24/11/1013-Datalink1 The Data Link Layer Role Services Functions –Framing –Encapsulation –Addressing –Connection Control –Ordered Delivery –Flow Control.
Data Link Control Protocols  need layer of logic above Physical  to manage exchange of data over a link frame synchronization frame synchronization flow.
Coding and Error Control
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Chapter 3 The Data Link Layer.
MODULE I NETWORKING CONCEPTS.
Chapter 9: Data Link Control
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Part III Datalink Layer 10.
Data and Computer Communications
Net 221D : Computer Networks Fundamentals
Data Link Layer.
B. R. Chandavarkar CSE Dept., NITK Surathkal
Chapter 3 The Data Link Layer
Chap. 4 Data link layer 2.
Instructor Mazhar Hussain
Data Link Layer What does it do?
CIS 321 Data Communications & Networking
Subject Name: Computer Communication Networks Subject Code: 10EC71
Flow Control.
Data Link Layer: Data Link Control
Chapter 10 Data Link Control
Rivier College CS575: Advanced LANs Chapter 6: Logical Link Control
Flow and Error Control.
Overview Jaringan Komputer (2)
Protocol Basics.
CS412 Introduction to Computer Networking & Telecommunication
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Chapter 9: Data Link Control
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Data link layer (LLC)

Data Link Layer Second layer in OSI reference model Functions of Data link layer receives the data (Packets) from the network layer & divide it into manageable units called frames

Function (Contd..) Provides the addressing information by adding header to each frame. Physical addresses of source & destination machines are added to each frame.

Function (Contd..) Provide flow control mechanism Provides error control mechanism Access Control When two or more devices are attached to the same link, data link layer protocols determine which device has control over the link at any given time. Providing a well- define service interface to the network layer

Sub-layer of Data link layer Logical Link Control Sub-Layer (LLC) Established and control the logical links between local devices on a network Provides services to the network layer above it and hides the rest of the details of the data link layer to allow different technologies to work seamlessly with the higher layer Medium Access Control Sub-Layer (MAC) Refers to the procedure used by devices to control access to the network medium Example: Ethernet uses the CSMA/CD method of media access control, Token Ring uses token passing

Services Provided To Network Layer (LLC service) The principal service provided by the data link layer to the network layer is the transmission of data from the source network layer to destination network layer. This can be accomplished in 3 ways using LLC which are explained below. Unacknowledged connectionless service Acknowledged connectionless service Connection oriented service

Unacknowledged connectionless service In this type of service source machine sends frames to destination machine but the destination machine does not send any acknowledgement of these frames back to the source. Hence it is called unacknowledged service. There is no connection establishment between source and destination machine before data transfer or release after data transfer. Therefore it is known as connectionless service. There is no error control i.e. if any frame is lost due to noise on the line; no attempt is made to recover it. This type of service is used when error rate is low. It is suitable for real time traffic such as speech.

Acknowledged Connectionless Service In this service, the source machine transmits data with-out establishing connection to the intendant recipient. When the sender sends the data frames to destination, destination machine sends back the acknowledgement of these frames. This type of service provides additional reliability because source machine retransmit the frames if it does not receive the acknowledgement of these frames within the specified time. This service is useful over unreliable channels, such as wireless systems.

Acknowledged Connection - Oriented Service This service is the most sophisticated service provided by data link layer to network layer. It is connection-oriented. It means that connection is establishment between source & destination before any data is transferred. In this service, data transfer has three distinct phases:- Connection establishment Actual data transfer Connection release Here, each frame being transmitted from source to destination is given a specific number and is acknowledged by the destination machine. All the frames are received by destination in the same order in which they are send by the source.

Framing It divides the stream of bits received from the network layer into manageable data units called frames, known as framing. Framing in the data link layer separates a message from one source to a destination, or from other messages to other destinations, by adding a sender address and a destination address. The destination address defines where the packet is to go; the sender address helps the recipient acknowledge the receipt. Detecting Frame (variable size frame) boundaries by receiver can be achieved by using one of the following Method (How receiver recognizes start and end of frames?):- Character Count Method Flag byte with byte stuffing Starting and ending flags with bit stuffing Physical layer coding violation

Character Count Method uses a field in the header to specify the number of characters in the frame. When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is. Problem There is a chance of count being garbled by a transmission error. If so, the destination will be out of synchronization and will be unable to locate the start of the next frame.

Character Count Method

Flag bytes with byte stuffing In this method, same byte (Special byte), called a flag byte, is used as both starting and ending delimiter In this way, if the receiver ever loses synchronization, it can just search for the flag byte to find the end of the current frame. Two consecutive flag bytes indicate the end of one frame and start of the next one. Problem When binary data, such as object programs or floating-point numbers, are being transmitted, there may be a chance of occurring flag byte's bit pattern in the data. This situation will interfere with the framing. Solution This problem is solved by inserting a special escape byte (ESC) just before each ''accidental'' flag byte in the data at sender by data link layer which is then removed at receiver by data link layer before the data are given to the network layer. This technique is called byte stuffing or character stuffing. Thus, a framing flag byte can be distinguished from one in the data by the absence or presence of an escape byte before it.

Contd..

Contd.. What happens if an escape byte occurs in the middle of the data? The answer is that it is stuffed with an escape byte. Thus, any single escape byte is part of an escape sequence, where as a doubled one indicates that a single escape occurred naturally in the data.

Flag Bytes with bit stuffing In this, Bit stuffing use reserved bit patterns to indicate the start and end of a frame.

Physical layer coding violation This method of framing is only applicable to networks in which the encoding on the physical medium contains some redundancy. For example, some LANs encode 1 bit of data by using 2 physical bits. Normally, a 1 bit is a high-low pair and a 0 bit is a low-high pair. The scheme means that every data bit has a transition in the middle, making it easy for the receiver to locate the bit boundaries. The combinations high-high and low-low are not used for data but are used for delimiting frames.

Error In digital transmission systems, an error occurs when a bit is altered between transmission and reception; that is, a binary 1 is transmitted and a binary 0 is received, or a binary 0 is transmitted and a binary 1 is received. Two general types of errors can occur: Single bit error Burst errors

Single-bit errors If only one bit of a given data unit is changed from 1 to 0 or 0 to 1, such type error is called single-bit error. For example: 0110110 is transmitted and is received as 0010110 where only one bit is changed.

Burst errors If 2 or more bits in the given data unit have changed then such type error is called burst errors. For example: 0110110 is transmitted and is received as 1001110 where more than 1 bit is changed.

Flow Control Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Thus, flow control assures that a transmitting entity does not over-whelm a receiving entity with data. Protocols used for Flow control are: Stop and Wait Flow Control Sliding Window Flow Control

Stop and Wait Flow Control Assumptions Data transmission in one direction only. Channel is error free In this Stop-and-Wait Protocol, the sender sends one frame, stops until it receives confirmation from the receiver (okay to go ahead), and then sends the next frame. Disadvantages At a time only one frame can be transmitted. No full utilization of the particular channel. Single message is send in different frames so there is the higher chances of error. If only one frame collides then again whole frame has to be retransmitted.

Sliding Window Flow Control Unlike Stop and wait flow control, multiples frame can be transmitted at same time in sliding window flow control. Advantage Greater Efficiency can be achieved by transmitting multiple frames at a time. Disadvantage This system is very complex.

Contd..

Error Control Mechanisms to detect and correct errors that occur in the transmission of frames. Data / Information are sent as a sequence of frames; frames arrive in the same order in which they are sent and each transmitted frame suffers an arbitrary and potentially variable amount of delay before reception. In addition, there may be the possibility of two types of errors: Lost frame Damaged frame

Contd.. The most common techniques for error control are based on some or all of the following ingredients: Error detection Positive acknowledgment Retransmission after timeout Negative acknowledgment and retransmission Collectively, these mechanisms are all referred to as automatic repeat request (ARQ); the effect of ARQ is to turn an unreliable data link into a reliable one. Three versions of ARQ have been standardized: Stop-and-wait ARQ Go-back-N ARQ Selective-reject ARQ

Stop-and-wait ARQ Based on the stop-and-wait flow control technique. The source station transmits a single frame and then must await an acknowledgment (ACK). No other data frames can be sent until the destination station’s reply arrives at the source station. Two sorts of errors may occur. First, the frame that arrives at the destination could be damaged. The second sort of error is a damaged acknowledgment. Advantage Simplicity Disadvantage Inefficient

Contd..

Go Back N ARQ In this method, a station may send a series of frames sequentially numbered modulo some maximum value ie. 2m, where m is the size of that sequence number field in bits. The number of unacknowledged frames outstanding is determined by window size, using the sliding-window flow control technique. While no errors occur, the destination will acknowledge incoming frames as usual (or piggybacked acknowledgment). If the destination station detects an error in a frame, it may send a negative acknowledgment for that frame. The destination station will discard that frame and all future incoming frames until the frame in error is correctly received. Thus, the source station, when it receives a REJ(reject ACK), must retransmit the frame in error plus all succeeding frames that were transmitted in the interim. Example: If the receiver detects error in frame f1 then the transmitter gets the rejection (rej 1) after the rejection the future incoming frames are not received by the receiver. The incoming frames discard by the receiver. Then the transmitter must retransmit the frame and also the all other subsequent frames.

Contd..

Selective Reject ARQ Go Back N, resending all frames slows down the transmission (so inefficient) In selective repeat ARQ, re-send only damaged frames. Sender window size and receiver window size is same Processing at receiver is more complex Advantage More efficient then go back N ARQ because it minimizes the amount of retransmission. Disadvantage Receiver must maintain large buffer size

Contd..