Application Service Models

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

Reliable Byte-Stream (TCP)

TCP Overview. Connection-oriented Byte-stream

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

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

Internet transport protocols

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

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

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

Internet Protocols Fall Outline

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

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

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

CSCI-1680 Transport Layer I Rodrigo Fonseca

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

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

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

CSCI-1680 Transport Layer I Rodrigo Fonseca

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

EE 122: Transport Protocols: UDP and TCP

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

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

CSE 461 Module 11. Connections

Chapter 5 End-to-End Protocols

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

Outline Computer Networking. Functionality Split. Transport Protocols

Introduc)on to Computer Networks

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

Introduc)on to Computer Networks

Transport Layer Marcos Vieira

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

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

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

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

CSE 461 Connections. David Wetherall

CSEP 561 Connections. David Wetherall

UNIT V. Computer Networks [10MCA32] 1

User Datagram Protocol

CSEP 561 Connections. David Wetherall

CSE 461 The Transport Layer

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

ECE 650 Systems Programming & Engineering. Spring 2018

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

TSIN02 - Internetworking

Flow Control, and Congestion Control

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

TSIN02 - Internetworking

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

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

Transport Protocols CS 640 1

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

TSIN02 - Internetworking

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Transport Layer (TCP/UDP)

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

Computer and Network Security

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

CSE 461 Module 10. Introduction to the Transport Layer

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


Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

CS457 Transport Protocols. CS 457 Fall 2014

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

TSIN02 - Internetworking

TCP: Transmission Control Protocol UDP: User Datagram Protocol TCP - 1

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

Multiple unconnected networks

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

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

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

05 Transmission Control Protocol (TCP)

Information Network 1 TCP 1/2

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

Chapter 24. Transport-Layer Protocols

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

CSCD 330 Network Programming Winter 2015

Lecture 22: TCP & NAT. CSE 123: Computer Networks Alex C. Snoeren

UNIT IV TRANSPORT LAYER

9th Slide Set Computer Networks

Networking Technologies and Applications

6.033 Computer System Engineering

UNIT IV TRANSPORT LAYER

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

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

Flow Control, and Congestion Control

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

User Datagram Protocol (UDP):

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP

Computer Network Programming. The Transport Layer. Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University

TCP/IP Protocol Suite 1

Lenuta Alboaie Computer Networks

The Internet. Overview. Network building blocks

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

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

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

Computer Networks and Data Systems

UDP, TCP, IP multicast

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Transcription:

SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 3 Are these needed by all applications? Guarantee message delivery Guarantee ordered delivery No duplicates Arbitrary size messages How about things like Encryption, Synchronization,... Recall the end-to-end principle; we are getting closer to the ends What are common end-to-end services of interest? Ideally: transport protocol worries about the endto-end service provided to the application; it does not care about the communication path Application Service Models End-to-End (Transport) Protocols IP and the network layer provide host-to-host connectivity across a scalable heterogeneous network IP provides only best-effort connectivity; it can: Drop Messages Reorder messages Duplicate messages Delay messages a long time Limit size of messages How do these features compare with the requirements of applications? SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 1 Flow Control and Congestion Control End-to-end protocols Transport Protocols are often also the place where we provide 1. Flow control prevent a sender from overflowing its receiver 2. Congestion control prevent senders collectively from overflowing network is this an end-to-end service? 3. Fairness and QoS Next layer up from the network layer Its services (in order of increasing difficulty!): 1. Provides process to process connectivity (not just host to host) 2. Provides better service models to applications 3. Sometimes, we use this layer to manage congestion 4....or even attempt to provide fairness and Quality of Service SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 4 SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 2

Discussion Why is end-to-end operation different from link-level communication? At the link layer (layer 2) ends on the link communicate with each other End-to-end, 2 ends of the connection communicate with each other Direct connection vs. a path over a switched network; we will revisit this relationship a couple of more times SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 5 Transport Protocols User Datagram Protocol (UDP) Basic transport: only provides process to process access to IP Many other protocols built on top of it Transmission Control Protocol () Reliable bytestream; many bells and whistles Others, including: Realtime Transmission Protocol (RTP/R) Remote Procedure Call (RPC) Stream Control Transmission Protocol (SCTP) Mutlicast Transport Protocols MFTP, PGM, etc.. Point UDP and are not the only transport protocols SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 6 UDP User Datagram Protocol Demultiplexing Application Application Application process process process Ports The simplest end-to-end protocol is to extend IP to recognize multiple processes per host UDP provides a simple demultiplexing key to differentiate between processes no other functionality is supported e.g., when a message arrives, if queues are full it is dropped Why is this interesting? What should be used as a demultiplex key How about process id? Queues Packets demultiplexed UDP Packets arrive Port Numbers are used as a demultiplex key A Port is a logical mailbox which is associated with a process How does a process know the key for a process it wants to communicate with? Well known port numbers for most servers (e.g., http server at port 80; defined in RFC 1700) Otherwise, by out-of-band agreement Try to tie this in with socket programming SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 7 SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 8

IP Revisited 0 4 8 16 19 31 Version HLen TOS Length Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Pad (variable) Options (variable) Data How does the packet get to UDP in the first place?? Protocol numbers also defined in RFC 1700 SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 9 SrcPort UDP 0 16 31 Checksum Data DstPort Length UDP checksum is optional; when used, it checksums the whole message body (including UDP header) Psuedoheader from IP 0 7 8 15 16 23 24 31 source address destination address zero protocol UDP length Recall that IP checksum was on the IP header only Idea: protection against misrouted datagrams SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 10 Transmission Control Protocol () A reliable connection-oriented service model Reliable: everything gets there exactly one time connection-oriented: in-order delivery of a stream of bytes Full duplex Most widely used and most carefully tuned transport protocol on the internet Like UDP supports multiple processes per host (also using port numbers) implements both flow-control and congestion control (will discuss in detail later) SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 11 Overview of Operation Application process Send buffer Write bytes Segment Segment Segment Transmit segments Application process Connection establishment is needed Receive buffer Read bytes Sending process writes some bytes (any number) breaks into segments and sends via IP Receiving process reads some bytes (any number) How big is the segment? When does send the segments? How to implement Reliability and in-order delivery? SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 12

Overview (cont d) 0 4 10 16 31 SrcPort DstPort SequenceNum Common choice for Maximum Segment Size (MSS): maximum size that will not cause IP to fragment locally What is this equal to? When to send a segment? 1. When there is enough data to send an MSS 2. If the application demands an immediate send 3. Set a timer when you send a segment; send again when it fires Why three different ways? Packet boundaries are not visible to a process Reliability? Need some form of ARQ (isnt it supported at link layer?) In-order delivery? Dont allow a receive until all preceeding data has arrived HdrLen 0 Flags Checksum Acknowledgment Options (variable) Data AdvertisedWindow UrgPtr Source port and Destination port identify processes With source and destination IPs, they provide a unique connection identifier runs a sliding window algorithm Acknowledgements used to ack received segments Sequence number is the number of the first byte in the segment Advertised window is the size of the window at the receiver (flow control) Checksum is identical to UDP SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 13 SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 14 Connection Establishment Passive participant (server) Active participant (client) SYN, SequenceNum = x Acknowledgment = x + 1 SYN +, SequenceNum = y,, Acknowledgment = y + 1 The sequence number is the number of the byte received last + 1 Initially randomly picked Note Duplex operation SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 15 SYN_RCVD Close/FIN FIN_WAIT_1 FIN_WAIT_2 State Diagram Passive open CLOSED LISTEN ESTABLISHED CLOSING TIME_WAIT Close SYN/SYN + Send/SYN SYN/SYN + Close/FIN FIN/ + FIN/ FIN/ SYN + / FIN/ Close Timeout after two segment lifetimes Active open/syn SYN_SENT CLOSE_WAIT LAST_ Close/FIN CLOSED Normal operation occurs within the established state Why timewait state? Track connection establishment and teardown SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 16

Established Operation Data (SequenceNum) Receiver Sender Acknowledgment + AdvertisedWindow Strategy Sliding window ARQ Use s and Sequence numbers sets a flag bit to say that the field is valid Flow control using advertised window (more soon) Congestion control (more later) SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 17 Sliding Window Operation in LastByteAcked Sending application LastByteWritten (a) LastByteSent Receiving application LastByteRead NextByteExpected (b) LastByteRcvd s sliding window is a hybrid of Selective repeat and Go-Back-N (accepts out of order segments, but cumulative ) Sender window size obtained by explicit feedback; used for flow control Advertised window is: (MaxRcvBuffer - (LastByteRcvd - LastByteRead)) Effective Send Window = Advertised Window - (Last Byte Sent - Last Byte d) SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 18 Problems/Performance Tuning Aside: Gigabit Networks and Wraparound Problems Zero window advertisement Sender probes with 1-byte packet Silly Window Syndrome Small openings in advertised window cause tiny packets to be sent inefficient Solution Sender side: Nagle s algorithm, wait before you send under some conditions Solution Receiver side: delay acks to give window chance to open can have bad side effects Problem: Gigabit networks and field wraparound Problem: 32-bit sequence number can wraparound fast on Gigabit networks assumes a packet cannot live more than Maximum Segment Life (MSL = 120s) Problem: valid packets with same sequence number alive at the same time Not a big problem currently; tend to be constrained by flow control first Problem: 16-bit advertised window field only enough to express 64-Kb window Delay bandwidth product (pipe volume) of Megabytes or even gigabytes possible Cannot fill the pipe without exceeding the advertised window Forced to operate at a low throughput SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 19 SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 20

Solution: Long Fat Pipe Extension Uses options in header Add a timestamp to the packet; destination copies back onto helps identify different incarnations of the same sequence number Negotiate a scaling factor for the advertised window size Helps with the 16-bit advertised window limitation how? Is there a drawback? Details in RFC 1122 SUNY-BINGHAMTON CS428/528 SPRING 2013 LEC. #21 21