Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE 802.3  Wireless LANs (802.11) We have now covered chapters.

Slides:



Advertisements
Similar presentations
Data Link Layer Protocols Flow Control in Data Link Layer.
Advertisements

Assume that a file is transferred from a node A to a node B. The file has been fragmented in 5 frames (denoted as f0, f1, f2, f3, f4). Show the flow of.
Assume that a file is transferred from a node A to a node B. The file has been fragmented in 5 frames. Frame 0 is corrupted, the ACK of frame 1 is corrupted,
William Stallings Data and Computer Communications 7th Edition
Transmission Control Protocol (TCP)
Data Link Control We want to minimize the amount of error correcting and detecting we need to do.
Go-Back-N Improve Stop-and-Wait by not waiting!
Chapter 11 Data Link Control
Data and Computer Communications Updated: 2/9/2009.
Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
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.
Chapter 7 – Data Link Control Protocols
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
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.
Link-Level Flow and Error Control
CS3502: Data and Computer Networks DATA LINK LAYER - 2 WB version.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
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 - 2 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
11.1 Flow and Error Control Flow Control Error Control.
1 FIT1005 Topic 6 - Data Link Layer Reference: Chapter 7 -Stallings.
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.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
Telecommunications & Networking Lesson 3. ISO Open System Interconnect (OSI) Application Presentation Session Transport Network Data Link Physical Application.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
1 The utopia protocol  Unrealistic assumptions: –processing time ignored –infinite buffer space available –simplex: data transmitted in one direction.
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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Networking Lecture 16 – Reliable Transport.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data Link Layer.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Reliable Transmission
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Part III Datalink Layer 10.
Chapter 23 Introduction To Transport Layer
Instructor Mazhar Hussain
CIS 321 Data Communications & Networking
Flow Control.
Rivier College CS575: Advanced LANs Chapter 6: Logical Link Control
Flow and Error Control.
Overview Jaringan Komputer (2)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
CS4470 Computer Networking Protocols
Chapter 11 Data Link Control
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Presentation transcript:

Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters 1-11 We had previously discussed telephony digital technologies – chapter 12 We now move to look at Wide Area Networks (WAN) technologies Chapter 13 deals forwarding frames in a WAN. We will skip for now Chapter 14 deals with what is called connection oriented networking in the WAN. Skip for now

Network Characteristics Chapter 15 Network ownership  Private Networks  Public Networks  Virtual Private Networks Service Paradigm  Connection Oriented Service  Connectionless Service  Most LAN architectures are connectionless  Most WAN architectures are connection oriented  Addressing considerations

Network Characteristics Network Performance  Delay Propagation delay Delay through devices (repeaters, bridges) Access delays Queuing delays  Throughput Bandwidth Effective throughput Delay and congestion – affect throughput Delay – throughput product –The number of bits that will ‘fit’ on a channel or network  Jitter Variance in delay

Point-to-Point Communications Chapter 16 discusses protocol layering  Previously discussed ISO model of seven layers At data link layer, a number of point-to- point protocols are in wide use  We have mentioned HDLC used in point to point circuits  A popular protocol is officially call the Point-to- Point Protocol or PPP.

Point-to-Point Communications Consider two stations connected by some direct channel. One station has a number of frames to send The second station is ready to receive frames

AB What if receiver cannot receive as fast as sender can send? What if the receiver is not ready to receive? What could we do to effect flow control? Suppose we require receiver to acknowledge a frame before sending another?

AB 1 This controls the flow This works fine, if frames are never lost or damaged Suppose we add some checking, like CRC? Receiver could detect error and not send ACK After some period of time (timer) sender could resend Alternative: receiver could send a NAK to cause sender to resend ACK ACK2

Simple Protocol Suppose frame sent and received correctly ACK frame sent by receiver but never arrives Transmitter resends frame Now we have a duplicate frame Clearly, we must protect against a frame being lost or damaged We must protect against response frame being lost or damaged (ACK,NAK) Must prevent duplicate frames

Simple Protocol Clearly, a timer must be involved at the transmitter Receiver must be able to distinguish a new frame from a retransmitted one One approach might be to include a sequence number in each frame If receiver gets duplicate sequence number it could simply throw one away. Does the resulting protocol work? If yes, how large should the sequence number field be?

Stop and Wait Protocol There is only one unacknowledged frame at a time Need only two sequence numbers: 0 and 1 Send frame  Set timer  Wait for ACK or timeout Sender places sequence number in frame Receiver places sequence number in ACK Transmitter never sends new frame until acknowledgement

Stop and Wait Protocol In a full duplex environment both sides may be sending frames. It makes sense to carry an ACK for a received frame in a frame being sent seq ack Data

Stop and Wait Efficiency Consider a T1 circuit, 1.5 Mbps Suppose circuit is coast to coast, 4000 km Assume a 1000 byte frame Assume size of ACK frame negligible We can calculate efficiency Tx = time to transmit a frame p = one way propagation delay Tx = 8000/1,500,000 = 5.3 ms p = 4,000,000/200,000,000 = 20 ms U = 5.3/( *20 =.117 U = 11.7 per cent

Sliding Window Protocol To improve utilization, we must send more than one frame before receiving an ACK Suppose we use a 3 bit sequence number Frame numbers would range from 0-7 How many frames could we send before receiving an acknowledgement? We could not send all frames numbered Why not? We could send frames numbered 0, 1,.., 6 and wait for an ACK before proceeding

Sliding Window Protocol In general, we have n bits for sequence number Sequence runs 0, 1, 2, …., 2 n -1 Stop and Wait protocol is simply the case of n=1 Sender maintains buffers of frames sent but not acknowledged This is the sending window (N frames) Receiver tracks sequence number(s) it is able to receive

Sliding Window Protocol If sliding window is large enough, an ACK would arrive before the last frame in the window is sent In this case, we could be sending continuously This is called pipelining Given N, the window size, what is the utilization of this protocol? For the moment, assume no errors

AB ACK1 ACK2ACK3ACK4ACK5ACK6ACK1ACK2ACK1ACK2ACK3ACK1ACK2ACK3ACK4ACK1ACK2ACK3ACK4ACK5 In this case 6 frames fit on the channel The delay-product is 6 * bits/frame It takes 12 unacked frames to keep the channel at 100 per cent utilization

AB ACK1 ACK2ACK3ACK4ACK5ACK6ACK1ACK2ACK1ACK2ACK3ACK1ACK2ACK3ACK4ACK1ACK2ACK3ACK4ACK5 In this case 6 frames fit on the channel The delay-product is 6 * bits/frame It takes 12 unacked frames to keep the channel at 100 percent utilization

Sliding Window Utilization We have seen that for Stop and Wait This is the time to send one frame and get an ACK If we could send N frames during this time Assuming of course this does not exceed 1 * *

Errors with Sliding Windows Suppose a frame is lost or damaged in transmission Frames following damaged frame continue to arrive Suppose se send f 0, f 1, f 2. f 3, f 4, f 5, f 6 Receiver must pass frames to next layer in order What strategies could we use to address this situation? Couple approaches

Handling Errors – Strategy 1 Ignore all frames following damaged one Do not acknowledge damaged frame or any following ones In due time, transmitter will time out for damaged frame and all those following Sender sends all frames starting with damaged one This is called Go Back N Also called Automatic Repeat Request (ARQ)

Handling Errors –Strategy 1 In this case the receiver only accepts frames in order The receiver has a receive window of size 1

Handling Errors –Strategy 1 Remember, sending window cannot be full range of sequence numbers Suppose you had sequence numbers 0, 1, 2,.., 7 (8 numbers) Send frames 0-7 All received correctly All ACKs lost! Transmitter sends 0-7 (again) Receiver assumes second set Therefore, cannot have 8 outstanding frames

Handling Errors –Strategy 2 Let receiver have a larger receive window Let receiver accept and buffer all frames in window Receiver does not acknowledge good frames unless all previous frames are good Transmitter only resends damaged frames or frames that time out In previous example, f 0, f 1, f 2. f 3, f 4, f 5, f 6 Receiver ACKS f 1, buffers f 3, f 4, f 5, f 6,

Handling Errors –Strategy 2 This strategy is called Selective Repeat If we have sequence numbers 0, 1, 2, …, 7, what is the sending window in this case?

Selective Repeat Accept frames out of order – buffer them if they fit in receive window Suppose we have sequence numbers 0-7 sending windowreceive window Frames 0-6 are sent and received Receiver adjusts receive window Suppose all ACKS are lost Frames 0 – 6 are resent

Selective Repeat Sending window cannot be simply 1 less than the number of sequence numbers In fact, if we have sequence 0, 1, 2, ….., 2 n -1 window cannot be larger than or half the range of numbers If n = 4, range of sequence numbers 0, 1,.. 15 Window size (N) cannot exceed 8 frames

Sliding Window Utilization If there are no errors * where N = window size Let q = probability a frame or ACK in error Selective Repeat * U = 1 – q for N*Tx ≥ Tx + 2p

Sliding Window Utilization Go Back N or Automatic Repeat Request (ARQ) N*Tx ≥ Tx + 2p * *

Sliding Window Examples HDLC – High Level Data Link Control LAPB – Link Access Protocol PPP - Point to Point Protocol These are all bit oriented protocols All use variations of sliding window protocols

HDLC Frame Address Control data FCS Control 0 SEQ ACK SEQ, ACK = 3 bits or 7 bits

Sliding Window Summary Transmitter send N frames before having to receive acknowledgement N is the window size Transmitter sets a timer for each frame Transmitter resends each frame that times out  Go Back N (ARQ)  Selective Repeat Acknowledging a frame implies all previous frame acknowledged Variation: Instead of acknowledging a received frame, specify the next frame expected