Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 CS162 S ECTION 8.

Slides:



Advertisements
Similar presentations
Primitives for Achieving Reliability 3035/GZ01 Networked Systems Kyle Jamieson Department of Computer Science University College London.
Advertisements

Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
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,
End2End Design – The Internet Architecture David E. Culler CS162 – Operating Systems and Systems Programming Lecture 32.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 16 Omar Meqdadi Department of Computer Science and Software Engineering University.
Transport Layer 3-1 Transport services and protocols  provide logical communication between app processes running on different hosts  transport protocols.
Chapter 3 outline 3.1 transport-layer services
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
CSE 461: Sliding Windows & ARQ. Next Topic  We begin on the Transport layer  Focus  How do we send information reliably?  Topics  The Transport layer.
Lecture 7 Transport Protocols: UDP, TCP
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
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.
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:
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
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.
Transport Layer1 Reliable Transfer Ram Dantu (compiled from various text books)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
1 Kyung Hee University Chapter 13 Introduction to the Transport Layer.
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
2: Transport Layer 21 Transport Layer 2. 2: Transport Layer 22 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data.
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.
3: Transport Layer 3a-1 8: Principles of Reliable Data Transfer Last Modified: 10/15/2015 7:04:07 PM Slides adapted from: J.F Kurose and K.W. Ross,
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transport Layer CS168, Fall 2014 Scott Shenker (understudy to Sylvia Ratnasamy) Material thanks to Ion Stoica,
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
CS/ECE 4381 Concepts Reverse-path forwarding Regular routing protocols compute shortest path tree, so forward multicast packets along “reverse” of this.
Transport Layer 3-1 Internet Transport Layer Lecture 8 Dr. Najla Al-Nabhan.
Chapter 13 Introduction to the Transport Layer
Transport Protocols.
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.
CS162 Operating Systems and Systems Programming Lecture 15 Reliability, Transport Protocols March 16, 2011 Ion Stoica
Peer-to-Peer Networks 13 Internet – The Underlay Network
CS162 Operating Systems and Systems Programming Lecture 17 TCP, Flow Control, Reliability April 3, 2013 Anthony D. Joseph
TCP Flow Control – an illustration of distributed system thinking David E. Culler CS162 – Operating Systems and Systems Programming
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:
TCP as a Reliable Transport. How things can go wrong… Lost packets Corrupted packets Reordered packets …Malicious packets…
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.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
Ch 3. Transport Layer Myungchul Kim
1 COMP 431 Internet Services & Protocols The Transport Layer Pipelined Transport Protocols Jasleen Kaur March 29, 2016.
CS162 Operating Systems and Systems Programming Lecture 11 Reliability, Transport Protocols October 5, 2011 Anthony D. Joseph and Ion Stoica
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Sliding Window Protocol | Go-Back-N
Introduction of Transport Protocols
Chapter 23 Introduction To Transport Layer
Anthony D. Joseph and Ion Stoica
CS4470 Computer Networking Protocols
April 2, 2014 Anthony D. Joseph CS162 Operating Systems and Systems Programming Lecture 17 TCP, Flow Control, Reliability.
Anthony D. Joseph and John Canny
The Transport Layer Reliability
Presentation transcript:

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 CS162 S ECTION 8

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 A DMINISTRIVIA  Spring Break: It was last week!  Project 3 design doc: Due on Tuesday (4/8) !!  You’re done with nachos. Hooray! Read and understand the source for project 3 ASAP, as it is the same source for project 4.  Do not, do not, do not, do NOT: post, solicit, sell, flagrantly display, or indecently expose your code from projects 1 and 2 to the public.

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 QUIZ TIME

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Five Layers Summary Lower three layers implemented everywhere Top two layers implemented only at hosts Logically, layers interacts with peer’s corresponding layer Transport Network Datalink Physical Transport Network Datalink Physical Network Datalink Physical Application Host AHost BRouter

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 The Internet Hourglass Data Link Physical Applications The Hourglass Model Waist There is just one network-layer protocol, IP The “narrow waist” facilitates interoperability SM TP HTT P NT P DN S TC P UD P IP Ethernet SONE T Transpor t Fiber Coppe r Radio

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Implications of Hourglass Single Internet-layer module (IP): Allows arbitrary networks to interoperate –Any network technology that supports IP can exchange packets Allows applications to function on all networks –Applications that can run on IP can use any network Supports simultaneous innovations above and below IP –But changing IP itself, i.e., IPv6 is very complicated and slow

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 TCP: Transport Control Protocol Reliable, in-order, and at most once delivery –Packets don’t necessarily have to be sent in order, and they don’t necessarily have to arrive in order. –Packets must be delivered to the application (top layer) in order. Stream oriented: messages can be of arbitrary length Provides congestion and flow control

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Reliable Transfer Retransmit missing packets –Numbering of packets and ACKs Do this efficiently –Keep transmitting whenever possible –Detect missing packets and retransmit quickly Two schemes –Stop & Wait –Sliding Window (Go-back-n and Selective Repeat)

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Detecting Packet Loss? Timeouts –Sender timeouts on not receiving ACK Missing ACKs –Receiver ACKs each packet –Sender detects a missing packet when seeing a gap in the sequence of ACKs –Need to be careful! Packets and ACKs might be reordered NACK: Negative ACK –Receiver sends a NACK specifying a packet it is missing

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Stop & Wait w/o Errors Send; wait for ack; repeat RTT: Round Trip Time (RTT): time it takes a packet to travel from sender to receiver and back –One-way latency (d): one way delay from sender and receiver ACK 1 Time Sender Receiver 1 2 ACK 2 3 RTT RTT = 2*d (if latency is symmetric) d

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Stop & Wait w/o Errors How many packets can you send? 1 packet / RTT Throughput: number of bits delivered to receiver per sec ACK 1 Time Sender Receiver 1 2 ACK 2 3 RTT

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Stop & Wait w/o Errors Say, RTT = 100ms 1 packet = 1500 bytes Throughput = 1500*8bits/0.1s = 120 Kbps ACK 1 Time Sender Receiver 1 2 ACK 2 3 RTT Throughput doesn’t depend on the network capacity → even if capacity is 1Gbps, we can only send 120 Kbps!

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Stop & Wait with Errors If a loss wait for a retransmission timeout and retransmit Slow w/o errors. Even SLOWER with errors! Timeouts take a long time. ACK 1 Time Sender Receiver 1 RTT timeout 1

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Sliding Window window = set of adjacent sequence numbers The size of the set is the window size Assume window size is n Let A be the last ACK’d packet of sender without gap; then window of sender = {A+1, A+2, …, A+n} Sender can send packets in its window Let B be the last received packet without gap by receiver, then window of receiver = {B+1,…, B+n} Receiver can accept out of sequence, if in window

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Sliding Window w/o Errors Throughput = W*packet_size/RTT Tim e Window size (W) = 3 packets SenderReceiver 1 {1} 2 {1, 2} 3 {1, 2, 3} 4 {2, 3, 4} 5 {3, 4, 5} Unacked packets in sender’s window Out-o-seq packets in receiver’s window {} 6 {4, 5, 6} {}

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Example: Sliding Window w/o Errors Assume –Link capacity, C = 1Gbps –Latency between end-hosts, RTT = 80ms –packet_length = 1000 bytes What is the window size W to match link’s capacity, C? Solution We want Throughput = C in the optimal case (max out our capacity) Throughput = W*packet_size/RTT C = W*packet_size/RTT W = C*RTT/packet_size = 10 9 bps*80*10 -3 s/(8000b) = 10 4 packets Window size ~ Bandwidth (Capacity), delay (RTT/2)

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Sliding Window with Errors Two approaches –Go-Back-n (GBN) –Selective Repeat (SR) In the absence of errors they behave identically Go-Back-n (GBN) –Transmit up to n unacknowledged packets –If timeout for ACK(k), retransmit k, k+1, … –Typically uses NACKs instead of ACKs  Recall, NACK specifies first in-sequence packet missed by receiver

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 Selective Repeat (SR) Sender: transmit up to n unacknowledged packets Receiver: indicate packet k is missing (by ACKing packet k+1) Assume packet k is lost Sender: retransmit packet k (either immediately or after a timeout)

Lec 17. 4/2/14 Anthony D. Joseph CS162 ©UCB Spring 2014 SR Example with Errors Time SenderReceiver Window size (W) = 3 packets {1} {1, 2} {1, 2, 3} {2, 3, 4} {3, 4, 5} {4, 5, 6} {7} Unacked packets in sender’s window ACK 5 ACK 6 No timeout, so resend immediately Do you see why packet 7 can’t be sent along with 4? (Hint: think about the window size)