Chapter 5 : End-to-End (Transport) Protocols Summary of underlying best-effort network capabilities (host-host) –drops packets or datagrams –re-orders.

Slides:



Advertisements
Similar presentations
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 5 End-to-End Protocols Copyright © 2010, Elsevier Inc. All rights.
Advertisements

COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Spring 2002CS 4611 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
Spring Remote Procedure Call (5.3) Outline Protocol Stack Presentation Formatting.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transmission Control Protocol (TCP)
CS 6401 Transport Control Protocol Outline TCP objectives revisited TCP basics New algorithms for RTO calculation.
Computer Networks Chapter 5: End-to-End Protocols
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
1 Chapter 5 End-to-End Protocols Outline 5.1 UDP 5.2 TCP 5.3 Remote Procedure Call.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 5 End-to-End Protocols Copyright © 2010, Elsevier Inc. All rights.
8. Transport Protocol and UDP 8.1 Transport protocol : End-to-end protocol –IP: Host to host packet delivery –Transport: Process to process communication.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
6-May-154/598N: Computer Networks End-to-End Protocols Underlying best-effort network –drop messages –re-orders messages –delivers duplicate copies of.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 14 – February 23, 2010.
1 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
Fundamentals of Computer Networks ECE 478/578 Lecture #21: TCP Window Mechanism Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
TDC561 Network Programming Camelia Zlatea, PhD Week 10: Performance Aspects of End-to-End (Transport)
Spring 2003CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Spring 2002CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
1 Chapter 1 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
1 Internet Engineering University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
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.
1 Lecture 14 High-speed TCP connections Wraparound Keeping the pipeline full Estimating RTT Fairness of TCP congestion control Internet resource allocation.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
Introduction to Computer Networks
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Ilam University Dr. Mozafar Bag-Mohammadi 1 Transport Layer.
Spring 2000CS 4611 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
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:
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 End-to-End Protocols UDP TCP –Connection Establishment/Termination –Sliding Window Revisited –Flow Control –Congestion Control –Adaptive Timeout.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Advanced Computer Networks
Transport Control Protocol
5. End-to-end protocols (part 1)
SACK TCP (RFC 2018).
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Process-to-Process Delivery:
TCP Overview Connection-oriented Byte-stream Full duplex
Transport Control Protocol
Advanced Computer Networks
Advanced Computer Networks
University of Houston Remote Procedure Call Datacom II Lecture 6
Reliable Byte-Stream (TCP)
Ilam University Dr. Mozafar Bag-Mohammadi
Transmission Control Protocol (TCP) Part II Neil Tang 11/21/2008
Advanced Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Introduction to Computer Networks
Introduction to Computer Networks
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

Chapter 5 : End-to-End (Transport) Protocols Summary of underlying best-effort network capabilities (host-host) –drops packets or datagrams –re-orders packets or datagrams ( send order versus receive order) –delivers duplicate copies of a given packet or datagram –limits size of packets or datagrams –Arbitrarily long delays for delivering packets or datagrams End-to-end services desired ( process-to-process ) –guarantee delivery of messages –Same-order delivery of messages (same order as they are sent) –deliver one copy of each message –arbitrarily large message support –Synchronization support sender-to-receiver (ie, connection oriented) –flow control (allowing receiver to regulate sender’s rate) –multiple application process support on each host

End-to-End (Transport) Protocols continued RPC RPC = Remote Procedure Call

Simple Demultiplexing support (UDP) Unreliable, unordered, datagram service Adds demultiplexing No flow control Endpoints identified by ports –servers have well-known ports –see /etc/services on Unix Optional checksum Header format

Reliable Byte-Stream (TCP) Overview Connection-oriented, Byte-stream –sending process writes stream of bytes –TCP breaks into segments and sends them as IP_datagrams –receiving process reads stream of bytes (a) byte segments sent as IP datagrams (b) 2048B read as stream Full duplex channel Flow control provided (to keep sender from overrunning receiver) Congestion control provided (to keep sender from overrunning network)

End-to-End Issues Based on sliding window protocol similar to that used at data link level, but the situation is very different. Potentially connects many different hosts –need explicit connection establishment and termination Potentially different RTT –need adaptive timeout mechanism Potentially long delay in network –need to be prepared for arrival of very old packets Potentially different capacity at destination –need to accommodate different amounts of buffering Potentially different network capacity –need to be prepared for network congestion

Segment Format Each connection is identified by a 4-tuple as a demux key: Sliding window alg + flow control involve the following fields: AcknowledgmentNumber, SequenceNumber, AdvertisedWindowSize HdrLen is in 32-bit words 6-bit Flag: used to relay control information URGent set when urgent data is pointed to by UrgPtr ACK set when AckNum is valid, PUSh signifies that sender has flushed buffers ReSeT says receiver has become confused (start over!) SYNchronize, FINish set to establish/terminate connection Checksum : pseudo header(SrcAdr+DestAdr+Lengths) + TCP_header + data Advertised

Connection Establishment and Termination 3-WAY Handshake: Client sends a segment to the server with its start Seq# (SYN=1, SeqNum=x) Server sends a segment with (SYN=1,ACK=1,AckNum=x+1, SeqNum=y (its own start Seq#)) Client sends ack segment with (ACK=1, AckNum=y+1) Normal case Call collision (Active Client)(Passive Server)

1.Guarantees the reliable delivery of data 2.Ensures that data is delivered in order 3.Enforces flow control (that sender does not overrun receiver) Basically the same as in the sliding window algorithm at the link level For 1. (guaranteed reliable delivery). Where TCP sliding window differs is that it folds flow control in as well. Rather than fixed size window, receiver advertises a window size thru the AdvertiseWindow field (based on available buffers). Sender then is limited to having no more than that window size. Treatment of Sequence number wrap-around is essentially the same as link level. Sliding Window

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 –bytes between NextByteRead and LastByteRcvd must be buffered Sliding Window Send buffer Window

Keeping the Pipe Full Bandwidth T1 (1.5Mbps) Ethernet (10Mbps) T3 (45Mbps) FDDI (100Mbps) STS-3 (155Mbps) STS-12 (622Mbps) STS-24 (1.2Gbps) Time til Wraparound 6.4 hours 57 minutes 13 minutes 6 minutes 4 minutes 55 seconds 28 seconds Delay x Bandwidth Product 18KB 122KB 549KB 1.2MB 1.8MB 7.4MB 14.8MB

Adaptive Retransmission Original Algorithm –Measure SampleRTT for each segment/ACK pair –Compute weighted average of RTT EstimatedRTT = a * EstimatedRTT + b * SampleRTT where a + b = 1 a between 0.8 and 0.9 b between 0.1 and 0.2 –Set timeout based on EstimatedRTT TimeOut = 2 * EstimatedRTT Karn/Partridge Algorithm Do not sample RTT when retransmitting Double timeout after each retransmission

Jacobson/Karels Algorithm (used today) New calculation for average RTT Diff = SampleRTT - EstimatedRTT EstimatedRTT = EstimatedRTT + (  * Diff) Deviation = Deviation +  (|Diff|- Deviation) (where  is a fraction between 0 and 1) Setting timeout value TimeOut =  x EstimatedRTT +  x Deviation (where  = 1 and  = 4) Notes –algorithm only as good as granularity of clock (500ms on Unix) –accurate timeout mechanism important to congestion control (later) TCP Extensions proposed –Store timestamp in outgoing segments –Use 32-bit timestamp –Make modifications to advertised window

Remote Procedure Call (RPC) Protocol Stack BLAST: fragments and reassembles large messages CHAN: synchronizes request and reply messages Simple RPC Protocol Stack SELECT: dispatches message to correct process Caller (client) Client stub RPC protocol Return value Arguments ReplyRequest Callee (server) Server stub RPC protocol Return value Arguments ReplyRequest BLAST ETH IP SELECT CHAN

Bulk Transfer (BLAST) Strategy –Accumulates acks –selective retransmission –aka partial acknowledgements Blast header format MID protects against wraparound NumFrags = number of fragments TYPE = DATA or SRR FragMask distinguishes fragments if Type=DATA, identifies this frag if Type=SRR, identifies missing frags SenderReceiver Fragment 1 Fragment 2 Fragment 3 Fragment 5 Fragment 4 Fragment 6 Fragment 3 Fragment 5 SRR Unlike AAL and IP, BLAST tries to recover from lost fragments

Request/Reply (CHAN) Guarantees message delivery Synchronizes client with server Supports at-most-once semantics Simple timeline Timeline using Implicit Acks ClientServer Request ACK Reply ACK ClientServer Request 1 Request 2 Reply 2 Reply 1 …

CHAN Header Format typedef struct { u_short Type; /* REQ, REP, ACK, PROBE */ u_short CID; /* unique channel id */ int MID; /* unique message id */ int BID; /* unique boot id */ int Length; /* length of message */ int ProtNum; /* high-level protocol */ } ChanHdr; CHAN Session State typedef struct { u_char type; /* CLIENT or SERVER */ u_char status; /* BUSY or IDLE */ int retries; /* number of retries */ int timeout; /* timeout value */ XkReturn ret_val; /* return value */ Msg *request; /* request message */ Msg *reply; /* reply message */ Semaphore reply_sem; /* client semaphore */ int mid; /* message id */ int bid; /* boot id */ } ChanState;

Dispatcher (SELECT) Dispatch to appropriate procedure Synchronous counterpart to UDP Address Space for Procedures –flat: unique id for each possible procedure –hierarchical: program + procedure number

SunRPC IP implements ~BLAST-equivalent SunRPC implements ~CHAN-equivalent UDP + SunRPC implement SELECT-equivalent –UDP dispatches to program (ports bound to programs) –SunRPC dispatches to procedure within program SUN RPC header: –XID (transaction id) similar to CHAN’s MID –Server does not remember last XID it serviced –Problem if client retransmits request while reply is in transit Data MsgType = CALL XID RPCVersion = 2 Program Version Procedure Credentials (variable) Verifier (variable) 031 Data MsgType = REPLY XID Status = ACCEPTED 031

Presentation Formatting Data types considered –integers –floats –strings –arrays –structs Application data Presentation encoding Application data Presentation decoding Message … Types of data not considered –images –video –multimedia documents