COMPUTER NETWORKS CS CS 55201

Similar documents
COMPUTER NETWORKS CS CS 55201

Reliable Byte-Stream (TCP)

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

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

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

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

Internet transport protocols

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

TCP Overview. Connection-oriented Byte-stream

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

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

EE 122: Transport Protocols: UDP and TCP

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

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

Chapter 5 End-to-End Protocols

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

Transport Protocols CS 640 1

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

CS457 Transport Protocols. CS 457 Fall 2014

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

ECE 650 Systems Programming & Engineering. Spring 2018

Internet Protocols Fall Outline

Application Service Models

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

Flow Control, and Congestion Control

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

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


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

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

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

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

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

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

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

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

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

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

Transport Layer Marcos Vieira

Transport Protocols and TCP

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

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

Flow Control, and Congestion Control

Flow and Congestion Control Marcos Vieira

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

User Datagram Protocol

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

CSCD 330 Network Programming

CSE 4213: Computer Networks II

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

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

TSIN02 - Internetworking

TSIN02 - Internetworking

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

CSCI-1680 Transport Layer I Rodrigo Fonseca

CSCI-1680 Transport Layer I Rodrigo Fonseca

User Datagram Protocol (UDP):

Transport Layer: outline

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

Networking Technologies and Applications

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

UNIT V. Computer Networks [10MCA32] 1

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

Lecture 3: The Transport Layer: UDP and TCP

TSIN02 - Internetworking

Fall 2012: FCM 708 Bridge Foundation I

TSIN02 - Internetworking

Internet Transport Protocols UDP and TCP

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

Multiple unconnected networks

Transport Layer: Outline

UNIT IV TRANSPORT LAYER

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Kent State University

Lecture 5. Transport Layer. Transport Layer 1-1

CS4700/CS5700 Fundamentals of Computer Networks

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

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

CS Lecture 1 Review of Basic Protocols

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

Introduction to Networks and the Internet

05 Transmission Control Protocol (TCP)

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

Transmission Control Protocol (TCP)

EE 122: IP Forwarding and Transport Protocols

TCP Congestion Control

Applied Networks & Security

ECE697AA Lecture 3. Today s lecture

Introduc)on to Computer Networks

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

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

Network Model. Why a Layered Model? All People Seem To Need Data Processing

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Chapter 24. Transport-Layer Protocols

Computer Communication Networks Midterm Review

CSC 4900 Computer Networks: TCP

Reliable Transport I: Concepts and TCP Protocol

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

Transcription:

Contents COMPUTER NETWORKS CS 45201 CS 55201 End-to-End (Transport) Protocols Simple Demultiplexer (UDP) CHAPTER 5 End-to-End protocols Paul A. Farrell and H. Peyravi Department of Computer Science Kent State University Kent, Ohio 44242 farrell@mcs.kent.edu http://www.cs.kent.edu/ farrell Fall 2001 CS 4/55201: Computer Networks Fall 2001 CS 4/55201: Computer Networks Fall 2001

End-to-End (Transport) Protocols Simple Demultiplexer (UDP) End-to-End (Transport) Protocols Simple Demultiplexer (UDP) Underlying best-effort network drops 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 end-to-end services 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 receiver to apply flow control to the sender support multiple application processes on each host Unreliable and unordered datagram service Adds multiplexing - multiple connections between hosts No flow control Endpoints identified by ports (16 bits - 64K possible per host) servers have well-known ports client and server use these to agree on other port for communication see /etc/services on Unix Checksum (Optional IPv4, Mandatory IPv6) - same as IP algorithm pseudo header + udp header + udp data pseudo header is IP protocol number, source and destination IP addresses, UDP length field Header format Src Port Dest Port Check Sum Length CS 4/55201: Computer Networks Fall 2001 1 of 20 CS 4/55201: Computer Networks Fall 2001 2 of 20

Connection-oriented Byte-stream Overview sending process writes some number of bytes TCP breaks into segments and sends via IP receiving process reads some number of bytes Appl Process TCP... send buffer Write Bytes segment... segment segment Appl Process TCP... receive buffer Read Bytes End-to-End Issues Based on sliding window protocol used at data link level, but the situation is very different. 1. Potentially connects many different hosts need explicit connection establishment and termination 2. Potentially different RTT need adaptive timeout mechanism 3. Potentially long delay in network need to be prepared for arrival of very old packets is limit, discarded after TTL MSL (maximum segment lifetime) - recommended 120 sec 4. Potentially different capacity at destination need to accommodate different amounts of buffering 5. Potentially different network capacity need to be prepared for network congestion Transmit Segments Full duplex Flow control: keep sender from overrunning receiver Congestion control: keep sender from overrunning network CS 4/55201: Computer Networks Fall 2001 3 of 20 CS 4/55201: Computer Networks Fall 2001 4 of 20

Segment Format Src Port HdrLen 0 Flags (4) (6) (6) CheckSum SequenceNum Acknowledgement options (variable) data Dest Port Advertised Window UrgPtr Each connection identified with 4-tuple: SrcPort, SrcIPAddr, DstPort, DstIPAddr Sliding window + flow control Acknowledgment, SequenceNum, AdvertisedWindow Data (SequenceNum) Flags SYN: TCP connection establishing FIN: TCP connection terminating RESET: Receiver is confused - abort connection PUSH: Sender invokes push operation URG: segment contains urgent data ACK: Acknowledgment Checksum pseudo header + tcp header + data When does TCP send segment? 1. After MSS (Maximum Segment Size) bytes are buffered usually largest size that IP will not fragment MSS = MTU - sizeof(tcp + IP headers) 2. if sender flushes buffer with push operation Telnet does after each character 3. when timer expires Sender Receiver Acknowledgement + AdvertisedWindow CS 4/55201: Computer Networks Fall 2001 5 of 20 CS 4/55201: Computer Networks Fall 2001 6 of 20

Connection Establishment and Termination Three-Way Handshake Active Participant Passive Participant Sending Appl Sliding Window Revisited Receiving Appl SYN, SequenceNum = x TCP TCP SYN + ACK, SequenceNum = y, Acknowledgement = x + 1 Last Byte Acked Last Byte Written Last Byte Sent Last Byte Read Next Byte Expected Last Byte Received ACK, Acknowledgement = y + 1 Each byte has a sequence number ACKs are cumulative Sending side LastByteAcked LastByteSent LastByteSent LastByteWritten bytes between LastByteAcked and LastByteWritten must be buffered Receiving side LastByteRead < NextByteExpected, Why? NextByteExpected LastByteRcvd + 1, Why? CS 4/55201: Computer Networks Fall 2001 7 of 20 CS 4/55201: Computer Networks Fall 2001 8 of 20

Flow Control Receiver advertises a window size to prevent buffer overflow Sender buffer size: MaxSendBuffer Receive buffer size: MaxRcvBuffer Receiving side LastByteRcvd - LastByteRead MaxRcvBuffer AdvertisedWindow = MaxRcvBuffer - (LastByteRcvd - LastByteRead) Sending side LastByteSent - LastByteAcked AdvertisedWindow EffectiveWindow = AdvertisedWindow - (LastByteSent - LastByteAcked) LastByteWritten - LastByteAcked MaxSendBuffer TCP blocks sender from sending y bytes if (LastByteWritten - LastByteAcked) + y > MaxSendBuffer Always send ACK in response to an arriving data segment, but not otherwise Sender persists in sending 1 byte when AdvertisedWindow=0 Eventually ACK will arrive with new AdvertisedWindow Keeping the Pipe Full Wrap Around: 32-bit SequenceNum - want no wrap in 120 sec Bandwidth T1 (1.5Mbps) Ethernet (10Mbps) T3 (45Mbps) FDDI (100Mbps) STS-3 (155Mbps) STS-12 (622Mbps) 55 seconds STS-24 (1.2Gbps) 28 seconds Time Until Wrap Around 6.4 hours 2 32 /(1.544/8) bytes =6.18 hrs 57 minutes 13 minutes 6 minutes 4 minutes Bytes in Transit: 16-bit AdvertisedWindow allows 64KB of data in pipe Assume RTT= 100 ms typical crosscountry delay in US Bandwidth Delay Bandwidth Product T1 (1.5Mbps) 18KB Ethernet (10Mbps) 122KB T3 (45Mbps) 549KB FDDI (100Mbps) 1.2MB STS-3 (155Mbps) 1.8MB STS-12 (622Mbps) 7.4MB STS-24 (1.2Gbps) 14.8MB CS 4/55201: Computer Networks Fall 2001 9 of 20 CS 4/55201: Computer Networks Fall 2001 10 of 20

= Original Algorithm Adaptive Retransmission Measure SampleRTT for each segment/ack pair Compute weighted average of RTT EstimatedRTT = α EstimatedRTT + β SampleRTT where α + β = 1 α between 0.8 and 0.9 β between 0.1 and 0.2 Set timeout based on EstimatedRTT TimeOut = 2 EstimatedRTT = A flaw Does ACK really acknowledges a transmission? No, it acknowledges receipt of a segment How many retransmissions had taken place before ACK arrived? = Wrong samples Sample RTT Sender Receiver Sender Receiver original transmission retransmission ACK Sample RTT original transmission ACK retransmission (a) Sample RTT too long (b) Sample RTT too short in (a) sample should be for the second attempt in (b) sample should be for the first attempt = Karn/Partridge Algorithm Do not sample RTT when retransmitting Double timeout after each retransmission Similar to backoff algorithm CS 4/55201: Computer Networks Fall 2001 11 of 20 CS 4/55201: Computer Networks Fall 2001 12 of 20

= Jacobson/Karels Algorithm Karn/Partridge algorithm was introduced when the Internet was not suffering the current congestion Consider variance when setting timeout value Jacobson/Karels came up with a new calculation for average RTT Difference = SampleRTT - EstimatedRTT EstimatedRTT = EstimatedRTT + (δ Difference) Deviation = Deviation + δ ( Difference - Deviation) where δ is a fraction between 0 and 1 TimeOut = µ EstimatedRTT + φ Deviation where µ = 1 and φ = 4 Overview Common pattern of communication used by application programs Also called message transaction Client Server request blocked blocked computing reply blocked CS 4/55201: Computer Networks Fall 2001 13 of 20 CS 4/55201: Computer Networks Fall 2001 14 of 20

args req caller (client) client stub RPC Protocol return value reply args req callee (server) server stub RPC Protocol return value reply Bulk Transfer (BLAST) Unlike AAL and IP in that it tries to recover from lost fragments; persistent, but does not guarantee delivery. Strategy is to use selective retransmission (or partial acknowledgments). Sender Frag 3 Frag 1 Frag 2 Receiver network Peterson divides RPC protocol into three basic functions BLAST: fragments and reassembles large messages CHAN: synchronizes request and reply messages SELECT: dispatches request messages to the correct process Frag 4 Frag 5 Frag 6 Frag 3 Frag 5 SRR SRR CS 4/55201: Computer Networks Fall 2001 15 of 20 CS 4/55201: Computer Networks Fall 2001 16 of 20

BLAST Header Format ProtNum MID Length Num Type Frags FragMask Request/Reply (CHAN) Guarantees message delivery, and synchronizes client with server; i.e., blocks client until reply received. Supports at-most-once semantics. Simple case: Client request ACK reply Server MID must protect against wrap around ACK Type = DATA or SRR NumFrags indicates number of fragments in message Implicit Acknowledgments: FragMask distinguishes among fragments: Client Server if Type=DATA, identifies this fragment if Type=SRR, identifies missing fragments request 1 reply 1 request 2 reply 2... CS 4/55201: Computer Networks Fall 2001 17 of 20 CS 4/55201: Computer Networks Fall 2001 18 of 20

Dispatcher (SELECT) Dispatches request messages to the appropriate procedure; fully synchronous counterpart to UDP. Caller xcall Client Callee Server xcalldemux Simple RPC Stack Putting it All Together SELECT CHAN SELECT xcall SELECT xcalldemux BLAST xpush CHAN xdemux xpush CHAN xdemux IP Address Space for Procedures ETH Flat: unique id for each possible procedure Hierarchical: program + procedure within program CS 4/55201: Computer Networks Fall 2001 19 of 20 CS 4/55201: Computer Networks Fall 2001 20 of 20