End-to-End Protocols. End-to-End Protocols

Similar documents
Reliable Byte-Stream (TCP)

TCP Overview. Connection-oriented Byte-stream

End-to-End Protocols: UDP and TCP. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

Internet transport protocols

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 5 - Part 2

Flow Control, and Congestion Control

Problem. Chapter Outline. Chapter Goal. End-to-end Protocols. End-to-end Protocols. Chapter 5. End-to-End Protocols

Transport Layer Marcos Vieira

Fundamentals of Computer Networks ECE 478/578. Transport Layer. End- to- End Protocols 4/16/13. Spring Application. Application.

TCP. Sliding Windows, Flow Control, and Congestion Control. Networks : TCP Sliding Windows 1

Transport Protocols CS 640 1

EE 122: Transport Protocols: UDP and TCP

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson

Internet Protocols Fall Outline

Flow Control, and Congestion Control

EE 122: Transport Protocols. Kevin Lai October 16, 2002

End-to-End Protocols. Transport Protocols. User Datagram Protocol (UDP) Application Layer Expectations

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Frequently asked questions from the previous class surveys

Some slides courtesy David Wetherall. Communications Software. Lecture 4: Connections and Flow Control. CSE 123b. Spring 2003.

Chapter 5 End-to-End Protocols

11/24/2009. Fundamentals of Computer Networks ECE 478/578. Flow Control in TCP

Application Service Models

Page 1. Goals for Today" Placing Network Functionality" Basic Observation" CS162 Operating Systems and Systems Programming Lecture 15

CSEP 561 Connections. David Wetherall

TCP & UDP. Transport Layer. Transport. Network. Functions. End-to-end Reliable Byte Stream. Unreliable End-to-end. C.K. Kim

CSE/EE 461. Sliding Windows and ARQ. Last Time. This Time. We finished up the Network layer Internetworks (IP) Routing (DV/RIP, LS/OSPF)

Last Class. CSE 123b Communications Software. Today. Naming Processes/Services. Transmission Control Protocol (TCP) Picking Port Numbers.

CSE/EE 461 Lecture 12 TCP. A brief Internet history...

CSEP 561 Connections. David Wetherall

User Datagram Protocol

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

CSCI-1680 Transport Layer I Rodrigo Fonseca

Connections. Topics. Focus. Presentation Session. Application. Data Link. Transport. Physical. Network

CSCI-1680 Transport Layer I Rodrigo Fonseca

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

ECE 650 Systems Programming & Engineering. Spring 2018

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

Introduc)on to Computer Networks

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)

CSE 461 The Transport Layer

7. TCP 최양희서울대학교컴퓨터공학부

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability

Reliable Transmission

CS457 Transport Protocols. CS 457 Fall 2014

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

Connection-oriented (virtual circuit) Reliable Transfer Buffered Transfer Unstructured Stream Full Duplex Point-to-point Connection End-to-end service

Operating Systems and Networks. Network Lecture 8: Transport Layer. Adrian Perrig Network Security Group ETH Zürich

Transport Layer: outline

Operating Systems and Networks. Network Lecture 8: Transport Layer. Where we are in the Course. Recall. Transport Layer Services.

TCP. 1 Administrivia. Tom Kelliher, CS 325. Apr. 2, Announcements. Assignment. Read From Last Time

Outline Computer Networking. Functionality Split. Transport Protocols


CSCD 330 Network Programming

TCP Basics : Computer Networking. Overview. What s Different From Link Layers? Introduction to TCP. TCP reliability Assigned reading

Direct Link Networks (II)

Transport Protocols and TCP

CS4700/CS5700 Fundamentals of Computer Networks

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

Kent State University

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

UNIT IV. UDP TCP Adaptive Flow Control-Adaptive Retransmission Congestion Control Congestion avoidance QoS.

CS 356: Computer Network Architectures. Lecture 17: End-to-end Protocols and Lab 3 Chapter 5.1, 5.2. Xiaowei Yang

Flow and Congestion Control Marcos Vieira

Networking Technologies and Applications

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

CSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management

CSE 4213: Computer Networks II

TCP : Fundamentals of Computer Networks Bill Nace

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

CS 43: Computer Networks. 18: Transmission Control Protocol October 12-29, 2018

Transport Layer: Outline

L5: Building Direct Link Networks III. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Transport Protocols. Raj Jain. Washington University in St. Louis

CSE/EE 461 Lecture 14. Connections. Last Time. This Time. We began on the Transport layer. Focus How do we send information reliably?

Transport Layer (TCP/UDP)

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

UNIT IV TRANSPORT LAYER

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

CSC 401 Data and Computer Communications Networks

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

The Transport Layer: TCP & Reliable Data Transfer

Reliable Transport I: Concepts and TCP Protocol

CSE 461 Connections. David Wetherall

xkcd.com End To End Protocols End to End Protocols This section is about Process to Process communications.

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

Introduc)on to Computer Networks

Lecture 3: The Transport Layer: UDP and TCP

Internet Transport Protocols UDP and TCP

TSIN02 - Internetworking

Transcription:

End-to-End Protocols UDP (User Datagram Protocol) (Transport Control Protocol) Connection Establishment/Termination Sliding Window Revisit Flow Control Adaptive Retransmission End-to-End Protocols Limitations of Underlying Best-effort Network (e.g., Internet) drop messages re-orders messages delivers duplicate copies of a given message limits messages to some finite size delivers messages after an arbitrarily long delay Common Properties of the End-to-End Protocols guarantee message delivery deliver messages in the same order they are sent deliver at most one copy of each message support arbitrarily large messages support synchronization allow the r to flow control the sender support multiple application processes on each host 1 2 Simple Processes Demultiplexor (UDP) Unreliable and unordered datagram service Adds multiplexing No flow control Endpoints (target process) identified by ports /UDP /UDP servers have well-known ports see /etc/services on Unix (e.g., DNS: 53) Unique on a single host Implementation diff. on OSs Header format Optional checksum (IPv4) Over UDP header/payload, part of IP header (source/des IP address, protocol number) 3 Ref: Data & Computer Communications by Stallings 4

Reliable, Connection-oriented Byte-stream app writes bytes sends segments app reads bytes Full duplex Overview Flow control: keep sender from overrunning r; an end-to-end issue ( how much ) Congestion control: keep sender from overrunning network; concerned with how hosts and networks interact ( how fast ) frees the application from the worry of missing or reordered data 5 End-to-End Issues: Data Link Vs Transport Core of : sliding window algorithm Potentially connects many different hosts need explicit connection establishment and termination Potentially different RTTs need adaptive timeout mechanism Potentially long delay in network need to be prepared for arrival of very old packets (MSL:120s) Potentially different capacity at destination need to accommodate different amounts of buffering->flow control Potentially different network capacity need to be prepared for network congestion (Chapter 6) X.25 use sliding window on a hop-by-hop basis 6 Segment Format Although provides byte stream service to application processes, itself does not transmit individual bytes over the Internet, but a packet (segment) exchanged between peers Trigger mechanisms: MSS without causing local IP to fragment; sender push operation (e.g., telnet); Segment Format (cont) Each connection identified ( demux key) with 4-tuple: (SrcPort, SrcIPAddr, DsrPort, DstIPAddr) Sliding window + flow control acknowledgment, SequenceNum, AdvertisedWinow Flags SYN, FIN, RESET, PUSH, URG, ACK Checksum pseudo header + header + data 7 8

Connection Establishment and Termination Three way handshake algorithm (note: a timer is scheduled for each of the first 2 segments) Q. : why exchange starting Seq. # instead of starting from default number such as 0? (two incarnations) Note: Connection setup is asymmetric, while connection tear down is symmetric; Once a connection setup, it is a bidirectional connection 9 Heavy line: normal path for a client; CLOSED Light line: unusual events passive open, create TCB applic. close, send FIN ACK SYN_RCVD FIN_WAIT_1 FIN_WAIT_2 SYN, send SYN, ACK Active close 2 RST ACK applic. close, send FIN FIN FIN, ACK FIN LISTEN SYN, applic.cl ose send SYN ESTABLISHED CLOSING ACK TIME_WAIT dashed line: normal path for server 3 1 active open send SYN SYN_SENT SYN, ACK, FIN, applic. close send FIN CLOSE_WAIT LAST_ACK (2MSL period) Ref: book by Leon-Garcia applic. close or timeout Passive close ACK 10 Sliding Window Revisit Basic Idea: Allow sender to transmit multiple frames before receiving an ACK, thereby keeping the pipe full. There is an upper limit (called window) on the number of outstanding (un-acked) frames allowed. Size of window sets amount of data that can be sent w/o waiting for ACK from the r Time Sender 1 2 3 N Receiver 11 Revisit Sliding Window: Sender Assign sequence number to each frame (SeqNum) Maintain three state variables: send window size (SWS): upper bound on the # of outstanding (un- ACK) frames sequence # of last acknowledgment d (LAR) sequence # of last frame sent (LFS) Maintain invariant: LFS - LAR <= SWS at all time SWS 1 2 3 4 5 6 7 8 9 10 LAR Advance/update LAR when ACK arrives to allow a new frame be sent Buffer up to SWS frames for retransmission if needed LFS 12

Revisit Sliding Window: Receiver Maintain three state variables window size (RWS): upper bound on the # of out-of-order frames (Why?) sequence # of largest acceptable frame (LAF) sequence # of last frame d (LFR) in order Maintain invariant: LAF - LFR <= RWS LFR RWS 1 2 3 4 5 6 7 8 9 10 Frame SeqNum arrives: if LFR < SeqNum < = LAF accept if SeqNum < = LFR or SeqNum > LFA discarded Mechanism of Sending cumulative ACKs LFR = SeqNumtoAck (largest seq # not yet acknowledged) LAF = LFR + RWS LAF 13 ARQ:Stop-and-wait -> Sliding Window (delay x bandwidth) : Sliding Window Revisit 1) reliable delivery; 2) in-order delivery; LastByteAcked 3) flow control: dynamic window size Sending side LastByteAcked < = LastByteSent LastByteSent < = buffer bytes between LastByteAcked and Sending application LastByteSent Receiving application LastByteRead NextByteExpected Pointers (sequence numbers) LastByteRcvd Receiving side LastByteRead < NextByteExpected NextByteExpected < = LastByteRcvd +1 (?!) buffer bytes between LastByteRead and LastByteRcvd 14 Flow Control Send buffer size: MaxSendBuffer LastByteRead Receive buffer size: MaxRcvBuffer Receiving side LastByteAcked LastByteSent NextByteExpected (largest in order) LastByteRcvd - LastByteRead < = MaxRcvBuffer AdvertisedWindow = MaxRcvBuffer -(LastByteRcvd - LastByteRead) Sending side LastByteSent - LastByteAcked < = AdvertisedWindow EffectiveWindow = AdvertisedWindow -(LastByteSent - LastByteAcked) - LastByteAcked < = MaxSendBuffer block sender process if ( - LastByteAcked) + y > MaxSenderBuffer Always (AWS + NextByteExpt) in response to arriving data segment Persist when AdvertisedWindow = 0 (1 byte probe segment) Sending application Receiving application LastByteRcvd 15 Protecting Against Wrap Around : 16bits for AdvertiseWindow, 32 bits for SeqNum Sequence # space be at least twice of window size SeqNum should not wrap around within MSL (120 seconds) Assume the full pipe 32-bit SequenceNum 2 32 x 8 / BW Bandwidth (BW) T1 (1.5 Mbps) Ethernet (10 Mbps) T3 (45 Mbps) FDDI (100 Mbps) STS-3 (155 Mbps) STS-12 (622 Mbps) STS-24 (1.2 Gbps) Time Until Wrap Around 6.4 hours 57 minutes 13 minutes 6 minutes 4 minutes 55 seconds 28 seconds 16

Sequence Number Space (sliding window at data link layer) SeqNum field is finite; sequence numbers wrap around (reuse) Sequence number space must be larger than number of outstanding frames SWS <= MaxSeqNum-1 is not sufficient suppose 3-bit SeqNum field (0..7) SWS=RWS=7 sender transmit frames 0..6 arrive successfully, but all ACKs lost sender retransmits 0..6 r expecting 7,0..5, but s second incarnation of 0..5 SWS < (MaxSeqNum+1)/2 is correct rule when SWS = RWS If RWS=1, SWS <= MaxSeqNum-1 is sufficient Delay x Bandwidth product Keeping the Pipe Full 16-bit AdvertisedWindow (assume RTT of 100ms) Allows to advertise a window of only 64KB Bandwidth T1 (1.5 Mbps) Ethernet (10 Mbps) T3 (45 Mbps) FDDI (100 Mbps) STS-3 (155 Mbps) STS-12 (622 Mbps) STS-24 (1.2 Gbps) Delay x Bandwidth Product 18KB < 64KB 122KB > 64KB 549KB > 64KB 1.2MB > 64KB 1.8MB > 64KB 7.4MB > 64KB 14.8MB > 64KB Extension (reading assignment:p408-409) 17 18 Adaptive Retransmission (Original Algorithm) In Internet, range & variation of RTT could be big retransmit if an ACK is not d within time (as a function of RTT) Measure SampleRTT for each segment/ack pair Compute weighted average of RTT EstRTT = α x EstRTT + β x SampleRTT where α + β = 1 α between 0.8 and 0.9 β between 0.1 and 0.2 Set timeout based on EstRTT TimeOut = 2 x EstRTT Dynamics (vs. data link layer sliding window mech.) Advertised window (how much data the source can send) Adaptive Timeout (how fast data can be resent by a specific source) Karn/Partridge Algorithm Problem: Ack indicates the receipt (not transmission) of data Solution: Do not sample RTT when retransmitting Double timeout for each retransmission (exponential backoff) : intuition? 19 20

Jacobson/ Karels Algorithm Karn/Partridge algorithm does not take the variance into account New Calculations for average RTT EstRTT = α x EstRTT + β x SampleRTT Diff = SampleRTT EstRTT EstRTT = EstRTT + (δ x Diff) Dev = Dev + δ( Diff - Dev) where δ is a factor between 0 and 1 Consider variance when setting timeout value TimeOut = μ x EstRTT + φ x Dev where μ = 1 and φ = 4 Notes accurate timeout mechanism important to congestion control (later) 21