CS 453 Computer Networks Lecture 11 Layer 2 – Data Link Layer Protocols.

Slides:



Advertisements
Similar presentations
Networks : TCP Sliding Windows1 TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from Computer Networks A Systems Approach,
Advertisements

CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 14 Introduction to Computer Networks.
Data Link Layer Protocols Flow Control in Data Link Layer.
TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from Computer Networks A Systems Approach, Fourth Ed.,Peterson and Davie,
Network Operations & administration CS 4592 Lecture 15 Instructor: Ibrahim Tariq.
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,
Chapter 11 Data Link 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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Chapter 2 Designing Reliable Protocols Professor Rick Han University of Colorado at Boulder
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Computer Networks: Data Link Layer 1 Data Link Layer.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 12 Introduction to Computer Networks.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
ACN: TCP Sliding Windows1 TCP Sliding Windows, with Flow Control, and Congestion Control Based on Peterson and Davie Textbook.
Advanced Computer Networks : TCP Sliding Windows1 TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from “Computer Networks.
CMPE 150 – Winter 2009 Lecture 6 January 22, 2009 P.E. Mantey.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
1 Reliable Data Transfer. 2 r Problem: Reliability  Want an abstraction of a reliable link even though packets can be corrupted or get lost r Solution:
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
Principles of Reliable Data Transfer. Reliable Delivery Making sure that the packets sent by the sender are correctly and reliably received by the receiver.
Data Link Control Protocols
ARQ Mechanisms Rudra Dutta ECE/CSC Fall 2010, Section 001, 601.
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.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.3: Reliable Transmission Dr. Nghi.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
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.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 15.
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.
CS 453 Computer Networks Lecture 9 Layer 2 – Data Link Layer.
Data Link Layer - 2 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Transport Layer: Sliding Window Reliability
Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311.
11.1 Flow and Error Control Flow Control Error Control.
CSCI 465 D ata Communications and Networks Lecture 10 Martin van Bommel CSCI 465 Data Communications & Networks 1.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
Data Link Layer. Data link layer The communication between two machines that can directly communicate with each other. Basic property – If bit A is sent.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
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.
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.
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.
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.
March 21, 2001 Recall we have talked about the Sliding Window Protocol for Flow Control Review this protocol A window of size I can contain at most I.
Part III Datalink Layer 10.
B. R. Chandavarkar CSE Dept., NITK Surathkal
Instructor Mazhar Hussain
Data Link Layer What does it do?
Flow Control.
ECE 4450:427/527 - Computer Networks Spring 2017
Data Link Layer: Data Link Control
Flow and Error Control.
Advanced Computer Networks
Getting Connected (Chapter 2 Part 3)
The Transport Layer Reliability
Error detection: Outline
Presentation transcript:

CS 453 Computer Networks Lecture 11 Layer 2 – Data Link Layer Protocols

Data Link Protocols Previously, we talked about Data Link Layer (DLL) protocols and the software to implement them We looked at a Simplex protocol,… … A Simplex protocol with flow control… … and a Simplex protocol with flow control and error control (at least to a limited degree)

Data Link Protocols Recall that in the previously presented protocols we had a number of requirements and assumptions that we had to deal with… Data flowed in one direction (sort of) Data flowed in one direction (sort of) Is this realistic? At DLL a communications channel is “wire- like” At DLL a communications channel is “wire- like” What does this mean?

Data Link Protocols As we have already seen – we can implement a level of error control by sending return acknowledgement (ack) frames When we send acks back to the sender we are transmitting bidirectionally or… Full Duplex

Data Link Protocols An interlude- As network designers, engineers, or developers… As network designers, engineers, or developers… It’s OK to use expensive communications channels… It’s OK to use expensive communications channels… …and use them very inefficiently… …and use them very inefficiently… Right? Right? Wrong! Wrong! What do we mean by inefficiently? What do we mean by inefficiently?

Data Link Protocols So how we send acks back… We can build and send ack frames… or… We can build and send ack frames… or… We can attach ack to data frames that are going back anyway We can attach ack to data frames that are going back anyway This is called Piggybacking One issue with piggybacking is that we must be able to deal with situations when there are no returning frames on which to piggyback What do you suppose we do about this?

Data Link Protocols So far, we have implicitly assumed that frame delivery time and acknowledgement delivery time is instantaneous or at least, inconsequential Is that realistic? Try Ping sometime

Data Link Protocols Stop-and-wait protocol Sender send a frame… Sender send a frame… …and blocks until it receives an acknowledgement (ack) from receiver that it was received ok …and blocks until it receives an acknowledgement (ack) from receiver that it was received ok When receiver receives the frame and it is ok, it transmits an acknowledgment to sender When receiver receives the frame and it is ok, it transmits an acknowledgment to sender When sender receives the ack from the receiver it unblocks and send next frame When sender receives the ack from the receiver it unblocks and send next frame

Data Link Protocols Stop-and-wait protocol From: Peterson & Davie, Computer Networks (2003) Morgan Kaufman, pg. 100

Data Link Protocols Consider this… 50kbs communications link 50kbs communications link 500 msec roundtrip (r) propagation time 500 msec roundtrip (r) propagation time Frame launch to ack receipt 1000 bit frames 1000 bit frames t=0 msec sender initiatives transmission of data frame t=0 msec sender initiatives transmission of data frame t=20 msec full data frame is on it way t=20 msec full data frame is on it way t= 270 frame fully arrives at receiver (r/2) t= 270 frame fully arrives at receiver (r/2) Ack sent from receiver to sender Ack sent from receiver to sender Ack arrives at sender at t=? Ack arrives at sender at t=?

Data Link Protocols Consider this… So, the ack is received by the sender at t=520 So, the ack is received by the sender at t=520 recall that (in the protocols discussed so far) the sender can’t send the next frame until the last frame has been acknowledged recall that (in the protocols discussed so far) the sender can’t send the next frame until the last frame has been acknowledged The next frame can start at t=520 frame the start of the last frame The next frame can start at t=520 frame the start of the last frame So, the sender used the channel for 20 msec… So, the sender used the channel for 20 msec… then had to wait 500 msecs to start another tranmission… then had to wait 500 msecs to start another tranmission… So, … So, …

Data Link Protocols Consider this… what was the channel utilization? what was the channel utilization? about 4% Then, what was the effective bandwidth Then, what was the effective bandwidth 4% of 50kbs = 2000 bps not too good, right not too good, right What can we do about this? What can we do about this?

Data Link Protocols Pipelining Lets eliminate the requirement that the sender has to wait for an acknowledgement from the receiver before sending the next frame? Lets eliminate the requirement that the sender has to wait for an acknowledgement from the receiver before sending the next frame? This is called Pipelining This is called Pipelining Establish a window of n frames Sender can send up to frames before requiring an acknowledge Frames are still acknowledged on per frame basis but the sender can send n of them before halting (blocking) transmission for lack of an acknowledgement Look at the last example again

Data Link Protocols Pipelining At 50kbs it takes how long to launch a 1000 bit frame? At 50kbs it takes how long to launch a 1000 bit frame? 20 msec The ack for the first frame will arrive at sender when? The ack for the first frame will arrive at sender when?t=520 So, at 20 msec/frame how many frames can the sender put “in the pipe” by the time the first ack returns? So, at 20 msec/frame how many frames can the sender put “in the pipe” by the time the first ack returns?26 So we make the window size 26 frames So we make the window size 26 frames

Data Link Protocols Pipelining Where – Where – l = frames size in bits b = data rate in bits/sec R = roundtrip transit time l/b = time to transmit one frame R/2 – data transit time from sender to receiver R/2 – ack transit time from receiver to sender In stop and wait mode (previous protocols) channel utilization = l /(l+bR) with pipelining channel utilization (effective bandwidth) can approach 100%

Data Link Protocols Pipelining From: Peterson & Davie, Computer Networks (2003) Morgan Kaufman, pg. 100

Data Link Protocols But if we use a pipeline protocol what do we do if we have a frame error?

Data Link Protocols Sliding Window Protocols A class of protocols where more than one frame is transmitted before an ack is received A class of protocols where more than one frame is transmitted before an ack is received Generally it works like this- Generally it works like this- Sender assigns a sequence number to each frame Receiver acks frames by sequence number Sender and receiver maintain a window For sender window is range of unacknowledged transmitted frames For sender window is range of unacknowledged transmitted frames For receiver window is range of frames/sequence numbers it can accept For receiver window is range of frames/sequence numbers it can accept

Data Link Protocols Sliding Window Protocols When sender transmits a frame it increments the upper end of the window (last frame sent) When sender transmits a frame it increments the upper end of the window (last frame sent) When sender receives an ack it increments the lower end of the window (last frame acknowledged) When sender receives an ack it increments the lower end of the window (last frame acknowledged) When receiver receives a frame (correct) it returns an ack and increment the lower end of its receive window (last frame received),… When receiver receives a frame (correct) it returns an ack and increment the lower end of its receive window (last frame received),… … and increments the upper end of it receive window (last acceptable frame) - because the window is a certain size – no necessarily fixed … and increments the upper end of it receive window (last acceptable frame) - because the window is a certain size – no necessarily fixed

Data Link Protocols Sliding Window Protocols Some terms (for next diagram) Some terms (for next diagram) LAR – last ack received LFS – last frame sent LFR – last frame received LAF – last acceptable frame

Data Link Protocols Sliding Window Protocols < SWS LARLFS ■ ■ ■ ─ RWS LFRLAF ■ ■ ■ < ─ Sender Window Receiver Window From: Peterson & Davie, Computer Networks (2003) Morgan Kaufman, pg. 102

Data Link Protocols Sliding Window Protocols Thought question – Thought question – What do you use for frame sequence number? What do you use for frame sequence number? 0-n … where n is the total number of frames-1 Modulo M

Data Link Protocols Go back n protocol Sender continues to send frames within constraint of send window Sender continues to send frames within constraint of send window Keeps track of oldest unacknowledged frame Keeps track of oldest unacknowledged frame if Time-out on oldest unacknowledged frame – if Time-out on oldest unacknowledged frame – resend all frames from oldest unacknowledged frame to last frame in other words, backup to oldest unacknowledged frame and resend everything trash potentially good frames sent after unacknowledged frame

Data Link Protocols Go back n protocol from Tanenbaum (2003) pg. 218

Data Link Protocols Selective resend/Frame buffering What if we toss out the wire rule What if we toss out the wire rule Sender sends sequence numbered frames up to the window size n Sender sends sequence numbered frames up to the window size n Receiver receives frames and for each frame Receiver receives frames and for each frame if no error returns an ack if error (out of sequence), sends nak If sender receives no ack or a nak for a specific frame it resends that frame only If sender receives no ack or a nak for a specific frame it resends that frame only

Data Link Protocols Selective resend/Frame buffering from Tanenbaum (2003) pg. 218

Data Link Protocols Selective resend/Frame buffering This means that frames can arrive at DLL out of sequence, however… they still must be passed to the Network layer in sequence, so The sender must buffer all frames in window, so it can resend any of them The receiver must buffer all incoming frames in window, so it can resequence them when they arrive out of sequence