Computer Networks Chapter 11 – Data Link Control and Protocols.

Slides:



Advertisements
Similar presentations
Chapter 3 The Data Link Layer.
Advertisements

The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Network Operations & administration CS 4592 Lecture 15 Instructor: Ibrahim Tariq.
William Stallings Data and Computer Communications 7th Edition
Data Link Control We want to minimize the amount of error correcting and detecting we need to do.
Data and Computer Communications Updated: 2/9/2009.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Data Link Control Slide 1 Data Link Control Chapter 7.
Chapter 6 Errors, Error Detection, and Error Control.
Chapter 7 – Data Link Control Protocols
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
The Data Link Layer Chapter 3. Position of the data-link layer.
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.
Chapter 9: Data Link Control Business Data Communications, 4e.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 5 - Encoding and Data Link Basics.
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 Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
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
CSC 311 Chapter Eight FLOW CONTROL TECHNIQUES. CSC 311 Chapter Eight How do we manage the large amount of data on the network? How do we react to a damaged.
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
Review:. Chapter 3: The Data Link Layer –achieve reliable, efficient communication between two physically connected machines. –Example problems to be.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
THE DATA LINK LAYER Chapter 3 1. H YBRID M ODEL The hybrid reference model to be used in this book. 2.
The Data Link Layer Goal –As reliable as possible, efficient communication Point-to-Point –single connection –bits arrive in order sent Not necessarily.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
Chapter 11 Data Link Control
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.
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
Chapter Two Fundamentals of Data and Signals Data Communications and Computer Networks: A Business User's Approach Eighth Edition.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
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 CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Chapter 9: Data Link Control Business Data Communications, 4e.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
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.
24/11/1013-Datalink1 The Data Link Layer Role Services Functions –Framing –Encapsulation –Addressing –Connection Control –Ordered Delivery –Flow Control.
Computer Communication & Networks
Chapter 9: Data Link Control
Data Link Layer Flow Control.
Part III Datalink Layer 10.
Data link layer (LLC).
Instructor Mazhar Hussain
Data Link Layer What does it do?
CIS 321 Data Communications & Networking
Flow Control.
Transport Layer Unit 5.
Data Link Layer: Data Link Control
Flow and Error Control.
Overview Jaringan Komputer (2)
CS412 Introduction to Computer Networking & Telecommunication
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Objectives of Today’s Lecture
Objectives of Today’s Lecture
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
Presentation transcript:

Computer Networks Chapter 11 – Data Link Control and Protocols

Spring 2006Computer Networks2 Flow Control  Flow control – controling the sender not to overflow the receiver  Buffers – temporary memory where the receiver stores data sent by the sender before it process them  Buffers can be filled in with data when  sender is running on the fast (or lightly loaded machine) and the reciever is running on a slow (or highly loaded) machine  In case no buffers are available, data can be lost.  Therefore protocols need to control the sender not to overflow the reciever  Protocols for flow control can exist at the data-link layer or the upper layers

Spring 2006Computer Networks3 Error Control  Errors can appear due to:  Impairments of transmission media  Loss of data because of limitted buffer space  Other unpredictable circumastances  It is necessary that the receiver has mechanisms to discover the occurence of errors  When the error is detected, the receiver can ask the sender to retransmit data.

Spring 2006Computer Networks4 How to Ask for Retransmission?  Two possibilities  When the frame is recieved without errors, the receiver can send an acknowledgement (ACK)  When there are errors in the frame, the receiver can send a negative acknowledgement (NACK)  ACKs are used in data communication  It is easier to detect lost frames when ACKs are used  Any time error is detected the data are retransmitted  The process is called ARQ (Automated Repeated reQuest)

Spring 2006Computer Networks5 How long to wait for ACK?  When a frame is sent the sender starts a timer  The timer is used to detect frame loss or acknowledgement loss  When the timer expires, the sender knows that it needs to send the frame again  The sender keeps a copy of the frame in its sending buffers  For frame identification sequence number are used  Sequence numbers are carried as a part of the header

Spring 2006Computer Networks6 Protocols for Flow and Error Control  Stop-and-Wait  A single frame is sent at a time  Inefficient with respect to the use of the available bandwidth  Sliding window  Several frames are sent at a time and after each ACK is received a new frame is sent  Effitiency is increased, but complexity is increased, too

Spring 2006Computer Networks7 Stop-and-Wait ARQ  The sending device keeps a copy of the last frame until it receives an acknowledgement for that frame  Keeping this copy allows the sender to retransmit lost or damaged frames  For identification purposes, both data frames and ACKs are numbered alternatively 0 and 1.  A data frame is acknowledged by an ACK1 frame, indicating that the receiver has has got the frame 0 and is expecting the frame 1

Spring 2006Computer Networks8 Stop-and-wait ARQ (no lost frames or acknowledgements) Sender Receiver Time Data 0 ACK 1 Data 1 ACK 0 Data 0

Spring 2006Computer Networks9 Stop-and-wait ARQ (a frame is lost or damaged) Sender Timeout Receiver Time Data 0 ACK 1 Data

Spring 2006Computer Networks10 Stop-and-wait ARQ (ACK is lost or damaged) Receiver Time Data 0 ACK 1 Data 0 Timeout Sender ACK 1

Spring 2006Computer Networks11 Performace of Stop-and-Wait Protocol  Good for relatively short links for which the ratio between the transmission and propagation time is very small  This includes short links or longer links with low data rates  The limitation is a consequense of the rule to wait for an acknowledgement before sending another frame  Require one-bit storage for the sequence numbers  Inadequate for longer links and higher data rates

Spring 2006Computer Networks12 Improving the Stop-and-wait Protocol  Stop-and-wait is inefficient if one channel is used for frames and the other for acknowledgements.  Piggybacking  ACK is attached to the data frame in the oposit direction, thus using both channels for frames and for ACKs.  Sliding windows  A set of frames are sent without the acknowledgement. The number of frames of this set can be used for the flow control purposes, too.

Spring 2006Computer Networks13 Sliding Window Time Receiver Sender  The number of frames sent without acknowledgement is called the window size.  If the window size is w = 2 n, than, the number of sequence numbers for the frames is in the range from 0 to 2 n -1.  n-bit field is required in the frame to store the sequence number

Spring 2006Computer Networks14 Sliding Window (Cont.)  Problems arise when some of the frames are discarded. Two strategies are developed to deal with this problem  Go back n strategy  The reciever simply discards all frames after the damaged frame without sending acknowledgement.  Selective repeat strategy  The receiver keeps all the frames after the damaged frame. When sender finaly notice that something is wrong it retransmits the bad frame.  The two strategies are trade-offs between bandwidth and data-link buffer space.

Spring 2006Computer Networks15 Go Back n Strategy  Sending window of size n, receiving window of size 1.  The sender has to buffer n frames, bandwidth is wasted.

Spring 2006Computer Networks16 Selective Repeat Strategy  Only retransmit the frames that are in error  Both sending and receiving window are of size n

Spring 2006Computer Networks17 Visualisation of Data-link Protocols  You can check the animation of stop-and-wait and sliding window protocol using the java applet presented on the following page M335/dlsim/Simulation.html

Spring 2006Computer Networks18 Example Data-link Protocols  Character oriented protocols  Kermit, X modem  Simple transfer protocols used extensively for PC to PC communication  Bit oriented protocols  HDLC -  Data-link protocols in the Internet (SLIP and PPP)  ATM and Data-link protocols in ATM

Spring 2006Computer Networks19 SLIP (Serial Line IP)  Predecessor to PPP (not an Internet standard)  Very simple, but has some serious problems  Supports only IP as a network layer protocol  Does not do any error detection or correction (left to the upper protocols)  Each side must know the other’s IP address  Does not provide any form of authentication

Spring 2006Computer Networks20 PPP (Point-to-Point Protocol)  Internet Standard (RFC1661)  Handles error detection  Supports multiple protocols in the network layer (IP, IPX, OSI CLNP, XNS)  Allows IP addresses to be nagotiated at connection time  Used for dial-up and for leased lines

Spring 2006Computer Networks21 Framing  Data Link Layer packets are called frames.  Frames are always transmitted between directly connected ends (there is a physical connection).

Spring 2006Computer Networks22 Synchronization  A sequence of binary digit, transmitted at some regular rate over a link, has to be recovered at the reciever  Synchronization  Clocking or timing (the instance at which the reciever will be looking for individual bits) is an important issue  Different places where synchronization is needed  Bit synchronization (start of bit)  Character or byte synchronization (start of byte or character)  Frame synchronization (start of frame)

Spring 2006Computer Networks23 Two Approaches Exist  Asynchronous transmission  The reciever has a free-running clock (ussually fixed multiple of the sender clock).  Short bit sequences are emitted to allow the reciever to know when to start looking for bits.  The receiver clock assumes to maintain correct timing over short spans of few bits.  Synchronous transmission  Clock information has to be embeded within the bit stream, so that the reciever can either extract the clock information, or use the embeded information to fine tune its clock.  The clock signal can be sent via separate channel (additional bandwidth required).

Spring 2006Computer Networks24 Asynchronous Transmission  If the line is in the idle state (some electrical state) and one 7 or 8 bit group need to be sent, these bits are preceded by a start bit and followed by one to two stop bits.  The receiver continously samples at rate nominally N times the transmit clock rate.  It is looking for the first transition from ”high” to ”low” after its previous idle or ”stop” bits.  After this, it sets the next sampling instant to be half of the transmitter clock period (this should be near the center of the start bit).  It then samples at multiples of N receiver clock pulses until ending stop bits return the line to logic high

Spring 2006Computer Networks25 Example of Asynchronous Transmission

Spring 2006Computer Networks26 Synchronous Transmission  Assynchronous transmittion is ineficient (extra overhead bits needed) and cannot be used at high transmittion rates.  In synchronous transmission we tailor the way in which binary data is encoded onto the electrical signal to obtain a signal with properties such that the receiver can receive the clock information.

Spring 2006Computer Networks27 Frame Synchronization  Character count  Specify number of characters in the header  Not convinient because of possibility to get out of synchronization when there is a transmission error  Starting and ending characters  STX: start-of-text character signal at start of frame, ETX: end-of-text character signal at start of frame  Starting and ending flags  Each frame starts and ends with a special bit pattern called a flag byte  Using special coding sheme  If Manchester encoding sheme is used the high-high and low-low combinations can be used for this purpose

Spring 2006Computer Networks28 Character and Bit Stuffing  STX and ETX can be data  DLE-STX signal for start of frame, DLE-ETX signal for end of frame  DLE can be data, thus some solution is necessary  Character stuffing – insert a DLE character for any DLE character in data  Bit stuffing – analogous to character stuffing  If the flag byte = , than after five 1’s a 0 is inserted in the data string  Stuffed 0s are removed at the receiver