15-441 Computer Networking Lecture 16 – Reliable Transport.

Slides:



Advertisements
Similar presentations
TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from Computer Networks A Systems Approach, Fourth Ed.,Peterson and Davie,
Advertisements

Advanced Computer Networks : TCP Sliding Windows1 TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from “Computer Networks.
Primitives for Achieving Reliability 3035/GZ01 Networked Systems Kyle Jamieson Department of Computer Science University College London.
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.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
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.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
Computer Networking Lecture 16 – Transport Protocols.
Transport Layer3-1 Reliable Data Transfer. Transport Layer3-2 Principles of Reliable data transfer r important in app., transport, link layers r top-10.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
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.
CSE 461: Sliding Windows & ARQ. Next Topic  We begin on the Transport layer  Focus  How do we send information reliably?  Topics  The Transport layer.
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
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:
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.
CSE 461 University of Washington1 Topic The sliding window algorithm – Pipelining and reliability – Building on Stop-and-Wait Yeah! Network.
Go-Back-N ARQ  packets transmitted continuously (when available) without waiting for ACK, up to N outstanding, unACK’ed packets  a logically different.
Data Link Control Protocols
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.3: Reliable Transmission Dr. Nghi.
14-Oct-15Computer Networks1 Reliable Transmission.
– 1 – TCP Connection Management, Error Control Mar. 29, 2004 Slides – Randy Bryant, Hui Zhang, Ion Stoica, Dave Eckhardt L17a_TCP Computer.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
Computer Networking Lecture 16 – Transport Protocols Dejian Ye, Liu Xin.
Computer Networking Lecture 16 – Transport Protocols.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 15.
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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Networking Lecture 16 – Transport Protocols Copyright ©, Carnegie Mellon University.
Transport Layer: Sliding Window Reliability
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.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
9: Pipelined Protocols and RTT Transport Layer 3-1 Slides adapted from: J.F Kurose and K.W. Ross,
CSE/EE 461 Sliding Windows and ARQ. 2 Last Time We finished up the Network layer –Internetworks (IP) –Routing (DV/RIP, LS/OSPF) It was all about routing:
1 Direct Link Networks: Reliable Transmission Sections 2.5.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
1 The utopia protocol  Unrealistic assumptions: –processing time ignored –infinite buffer space available –simplex: data transmitted in one direction.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Ch 3. Transport Layer Myungchul Kim
1 COMP 431 Internet Services & Protocols The Transport Layer Pipelined Transport Protocols Jasleen Kaur March 29, 2016.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data Link Layer.
Reliable Transmission
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Introduction of Transport Protocols
ECE 4450:427/527 - Computer Networks Spring 2017
TCP and Congestion Control (1)
CSS432 (Link Level Protocols) Reliable Transmission Textbook Ch 2.5
TCP Sliding Windows, Flow Control, and Congestion Control
Lecture 16 – Transport Protocols
Advanced Computer Networks
Getting Connected (Chapter 2 Part 3)
The Transport Layer Reliability
Transport Layer Outline Intro to transport UDP
TCP Sliding Windows, Flow Control, and Congestion Control
Error detection: Outline
TCP Sliding Windows, Flow Control, and Congestion Control
Presentation transcript:

Computer Networking Lecture 16 – Reliable Transport

Lecture 16: Transport Protocols2 Last Question of Mid Term

Lecture 16: Transport Protocols3 Transport Protocols Lowest level end-to- end protocol. Header generated by sender is interpreted only by the destination Routers view transport header as part of the payload Transport IP Datalink Physical Transport IP Datalink Physical IP router

Lecture 16: Transport Protocols4 Functionality Split Network provides best-effort delivery End-systems implement many functions Reliability In-order delivery Demultiplexing Message boundaries Connection abstraction Congestion control …

Lecture 16: Transport Protocols5 What Problems Reliable Transport Solution Try to Solve? Best effort network layer Packets can get corrupted Packets can get lost Packets can get re-ordered

Lecture 16: Transport Protocols6 Mechanisms used in Reliable Transport Packets can get corrupted CRC or Checksum to detect, retransmission to recover Error correction code to recover Packets can get lost Acknowledgement + Timeout to detect, retransmission to recover Packets can get re-ordered Sequence number to detect, receiver buffer to re-order

Lecture 16: Transport Protocols7 Automatic Repeat Request (ARQ) Algorithms Use two basic techniques: Acknowledgements (ACKs) Timeouts Two examples: Stop-and-Wait Sliding window

Lecture 16: Transport Protocols8 Stop-and-Wait Receiver: send an acknowledge (ACK) back to the sender upon receiving a packet (frame) Sender: excepting first packet, send a packet only upon receiving the ACK for the previous packet Time SenderReceiver frame ACK

Lecture 16: Transport Protocols9 What Can Go Wrong? SenderReceiver frame ACK Timeout Frame lost  resent it on Timeout SenderReceiver frame ACK Timeout ACK lost  resent packet Need a mechanisms to detect duplicate packet SenderReceiver frame ACK Timeout ACK delayed  resent packet Need a mechanism to differentiate between ACK for current and previous packet

Lecture 16: Transport Protocols10 How to Recognize Retransmissions? Use sequence numbers both packets and acks Sequence # in packet is finite  How big should it be? For stop and wait? One bit – won’t send seq #1 until received ACK for seq #0 Pkt 0 ACK 0 Pkt 0 ACK 1 Pkt 1 ACK 0

Lecture 16: Transport Protocols11 Stop-and-Wait Disadvantage May lead to inefficient link utilization Example: assume One-way propagation = 15 ms Bandwidth = 100 Mbps Packet size = 1000 bytes  transmit = (8*1000)/10 8 = 0.08ms Neglect queue delay  Latency = approx. 15 ms; RTT = 30 ms Propagation = 15 ms Bandwidth = 100 Mbps

Lecture 16: Transport Protocols12 Stop-and-Go Disadvantage (cont’d) Send a message every 30 ms  Throughput = (8*1000)/0.03 = Mbps Thus, the protocol uses less than 0.3% of the link capacity! Sender Receiver frame ACK 30 ms

Lecture 16: Transport Protocols13 How to Keep the Pipe Full? Send multiple packets without waiting for first to be acked Number of pkts in flight = window Reliable, unordered delivery Several parallel stop & waits Send new packet after each ack Sender keeps list of unack’ed packets; resends after timeout Receiver same as stop & wait How large a window is needed?

Lecture 16: Transport Protocols14 Sliding Window Protocol: Sender Each packet has a sequence number Assume infinite sequence numbers for simplicity Sender maintains a window of sequence numbers SWS (sender window size) – maximum number of packets that can be sent without receiving an ACK LAR (last ACK received) LFS (last frame sent) seq. numbers LAR LFS Acknowledged packetsPackets not acknowledged yet

Lecture 16: Transport Protocols15 Example Assume SWS = 3 SenderReceiver frame 1 1 frame 2 frame ACK frame ACK 2 frame Note: usually ACK contains the sequence number of the first packet in sequence expected by receiver

Lecture 16: Transport Protocols16 Sliding Window Protocol: Receiver Receiver maintains a window of sequence numbers RWS (receiver window size) – maximum number of out- of-sequence packets that can received LFR (last frame received) – last frame received in sequence LAF (last acceptable frame) LAF – LFR <= RWS

Lecture 16: Transport Protocols17 Sliding Window Protocol: Receiver Let seqNum be the sequence number of arriving packet If (seqNum = LAF) Discard packet Else Accept packet ACK largest sequence number seqNumToAck, such that all packets with sequence numbers <= seqNumToAck were received seq. numbers LFR LAF Packets in sequencePackets out-of-sequence

Lecture 16: Transport Protocols18 Receiver Sender Sender/Receiver State …… Sent & AckedSent Not Acked OK to SendNot Usable …… Max acceptable Receiver window Max ACK receivedNext seqnum Received & AckedAcceptable Packet Not Usable Sender window Next expected

Lecture 16: Transport Protocols19 Sequence Numbers How large do sequence numbers need to be? Must be able to detect wrap-around Depends on sender/receiver window size E.g. Max seq = 7, send win=recv win=7 If pkts 0..6 are sent succesfully and all acks lost Receiver expects 7,0..5, sender retransmits old 0..6!!! Max sequence must be  send window + recv window

Lecture 16: Transport Protocols20 Cumulative ACK + Go-Back-N On reception of new ACK (i.e. ACK for something that was not acked earlier) Increase sequence of max ACK received Send next packet On reception of new in-order data packet (next expected) Hand packet to application Send cumulative ACK – acknowledges reception of all packets up to sequence number Increase sequence of max acceptable packet

Lecture 16: Transport Protocols21 Loss Recovery On reception of out-of-order packet Send nothing (wait for source to timeout) Cumulative ACK (helps source identify loss) Timeout (Go-Back-N recovery) Set timer upon transmission of packet Retransmit all unacknowledged packets Performance during loss recovery No longer have an entire window in transit Can have much more clever loss recovery

Lecture 16: Transport Protocols22 Go-Back-N in Action

Lecture 16: Transport Protocols23 Selective Ack + Selective Repeat Receiver individually acknowledges all correctly received pkts Buffers packets, as needed, for eventual in-order delivery to upper layer Sender only resends packets for which ACK not received Sender timer for each unACKed packet Sender window N consecutive seq #’s Again limits seq #s of sent, unACKed packets

Lecture 16: Transport Protocols24 Selective Repeat: Sender, Receiver Windows

Lecture 16: Transport Protocols25 Summary of ARQ Protocols Mechanisms: Sequence number Timeout Acknowledgement Sender window: fill the pipe Receiver window: handle out-of-order delivery

Lecture 16: Transport Protocols26 Many Nuances What type of acknowledgements? Selective acknowledgement Cumulative acknowledgement Negative acknowledgement How big should be the timeout value, SWS, RWS, sequence number field? Reliability mechanism used to implement other functions: flow control, congestion control Function overloading introduces ambiguity and complexity