The Transport Layer Chapter 6. The Transport Service The transport layer is the heart of the whole protocol hierarchy It provides reliable data transport.

Slides:



Advertisements
Similar presentations
Transport Layer. Context of various layers upto Network layer NL : present in LAN and subnet MAC sublayer : not present in Subnets, only in LANs DLL :
Advertisements

Chapter 6 The Transport Layer.
Computer Networks Transport Layer. Topics F Introduction (6.1)  F Connection Issues ( ) F TCP (6.4)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Transport Layer Chapter
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 6 Transport Layer.
Computer Networks NYUS FCSIT Spring 2008 Milos STOLIC, Bs.C. Teaching Assistant
Chapter 6 The Transport Layer.
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
I N THE N AME OF G OD C OMPUTER N ETWORKS C HAPTER 6: T HE T RANSPORT L AYER Dr. Shahriar Bijani Shahed University May 2014.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
EECC694 - Shaaban #1 lec #12 Spring Internet Transport Protocols Transmission Control Protocol (TCP):Transmission Control Protocol (TCP):
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
Chapter 6 The Transport Layer.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks.
Transport Layer Problems with network layer services
The Transport Layer Chapter 6. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of.
The Transport Layer Chapter 6. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of.
The OSI Reference Model
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Transport Layer TCP and UDP IS250 Spring 2010
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
Chapter 6 The Transport Layer.
The Transport Layer.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Transport Layer Computer Networks. 2 Where are we?
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Transport Layer Chapter 6.
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.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Transport Layer Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
The Transport Layer.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
Networked & Distributed Systems TCP/IP Transport Layer Protocols UDP and TCP University of Glamorgan.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
(from Tanenabaum: “Computer Networks” Chapter 1) and
CSCI 465 D ata Communications and Networks Lecture 27 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Networking Basics CCNA 1 Chapter 11.
The Transport Layer Chapter 6. Transport Service Primitives The primitives for a simple transport service.
The Transport Layer Chapter 6 12/14/2015www.ishuchita.com1.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
ECE 4110 – Internetwork Programming
Chapter 6 Transport Layer
4343 X2 – The Transport Layer Tanenbaum Ch.6.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Distributed Systems 8. Transport Layer Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano A.Y. 2014/2015.
The Transport Layer Dr. ir. S.S. Msanjila RIS 251.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
The Transport Layer Implementation Services Functions Protocols
Unit-7 The Transport Layer.
PART 5 Transport Layer Computer Networks.
Chapter 6 The Transport Layer.
Transport Layer: Sliding Window Reliability
Magda El Zarki Professor, ICS UC, Irvine
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
CS 5565 Network Architecture and Protocols
Transport layer issues Johan Lukkien
Transport Layer Unit 5.
Chapter 6 The Transport Layer The Transport Service & Elements of Transport Protocols.
Process-to-Process Delivery:
Chapter 17. Transport Protocols
The Transport Layer Chapter 6.
Presentation transcript:

The Transport Layer Chapter 6

The Transport Service The transport layer is the heart of the whole protocol hierarchy It provides reliable data transport end to end It masks the diversity of communication subnets, provide a common interface to the upper layer It provides multiple SAPs sharing one network link

The Transport Function net 1 net 2 AP 1 AP 2 AP 3 AP 4 transport entity AP 1 transport entity AP 4 subnet end to end 主机 A 主机 B

Services Provided to the Upper Layers The network, transport, and application layers.

Transport Service Primitives The primitives for a simple transport service.

Transport Service Primitives (2) The nesting of TPDUs, packets, and frames.

Transport Service Primitives (3) A state diagram for a simple connection management scheme. Transitions labeled in italics are caused by packet arrivals. The solid lines show the client's state sequence. The dashed lines show the server's state sequence.

Berkeley Sockets The socket primitives for TCP.

Elements of Transport Protocols Addressing Connection Establishment Connection Release Flow Control and Buffering Multiplexing Crash Recovery

Comparison of Transport Protocol & Data Link Protocol(1) (a) Environment of the data link layer. (b) Environment of the transport layer.

Comparison of Transport Protocol & Data Link Protocol(2) Both have to deal with error control, sequencing, flow control Environment differences Explicit addressing of destinations Initial connection establishment Storage capacity in the subnet Allocation of buffers

Addressing TSAPs, NSAPs and transport connections.

Addressing(2) How the client gets the server’s TSAP? Well-known TSAP Look up a name server or directory server

Addressing(3) How a user process in host 1 establishes a connection with a time-of-day server in host 2.

Connection Establishment The connection establishment TPDU could be delayed or duplicated see P497 example Solution & flaw If using throwaway transport addresses, no process server If giving each connection a connection identifier (i.e., a incremented sequence number), a crashed machine can not know which identifier have been used Packet lifetime should be restricted Restricted subnet design Putting a hop counter in each packet Timestamping each packet

Connection Establishment Tomlinson T: n times of maximum packet lifetime Make sure both a packet and it’s acknowledgement are dead Each host equipped with a time-of-day clock The clocks at different hosts need not be synchronized Each clock is a binary counter incremented at a small interval (tick) The clock should not stop even if the host goes down Allocate sequence for each TPDU Sequence is long enough, so it won’t be reused before period T When a connection is set up, the lower-order k bits of the clock are used as the initial sequence number The sequence space is larger than the one data link layer used, it limits the throughput of host Prevent sequence numbers from being used for a time T before their potential use as initial sequence numbers (i.e., one TPDU per clock tick)

Connection Establishment Tomlinson(2) (a) TPDUs may enter the forbidden region if host send too fast or too slow (b) The resynchronization problem. (too slow)

Connection Establishment (3) Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. (a) Normal operation, (b) Old CONNECTION REQUEST appearing out of nowhere. (c) Duplicate CONNECTION REQUEST and duplicate ACK.

Connection Release Asymmetric Abrupt disconnection with loss of data.

Connection Release (2) The two-army problem.

Connection Release (3) Four protocol scenarios for releasing a connection. (a) Normal case of a three-way handshake. (b) final ACK lost. 6-14, a, b

Connection Release (4) (c) Response lost. (d) Response lost and subsequent DRs lost. 6-14, c,d

Flow Control and Buffering (a) Chained fixed-size buffers. (b) Chained variable-sized buffers. (c) One large circular buffer per connection.

Flow Control and Buffering(2) Why transport entity allocates buffers dynamically? Too much connection in transport layer Each connection may be opened or closed frequently Solution Explicit window in acknowledgement Variable-sized window Two flow control factor Buffer space available in the receiver explicit window indication The capacity of the subnet sender monitor the network’s carrying capacity

Flow Control and Buffering (3) Dynamic buffer allocation. The arrows show the direction of transmission. An ellipsis (…) indicates a lost TPDU.

Multiplexing (a) Upward multiplexing. (b) Downward multiplexing.

The Internet Transport Protocols TCP Transmission Control Protocol RFC793 Connection-oriented protocol Byte-stream UDP User Datagram Protocol RFC768 Connectionless Protocol TCP/IP STACK Application TCP UDP Host-to-Network Host-to-Network IP IP

UDP The UDP header.

The TCP Service Model Socket IP address (NSAP) and Port (16-bit, TSAP) Each connection is identified by a pair of sockets Well-known ports Reserved for standard services RFC1700 TCP connection Full-duplex Point-to-point Byte-stream, not message stream

The TCP Service Model Some well-known ports. PortProtocol Use 21 FTP File transfer 23 Telnet Remote login 25 SMTP 69 TFTP Trivial File Transfer Protocol 79 FingerLookup info about a user 80 HTTP World Wide Web 110 POP-3 Remote access 119 NNTP USENET news

The TCP Service Model (2) (a) Four 512-byte segments sent as separate IP datagrams. (b) The 2048 bytes of data delivered to the application in a single READ CALL.

TCP Protocol 32-bits sequence Count byte, not segment Segment=20bytes head + n bytes data MSS (Maximum Segment Size) Limited by IP datagram length Limited by MTU of each data link, so router could fragment a segment Variable sized sliding window Limited by IP datagram length Limited by MTU of each data link, so router could fragment a segment Reorder the segment Disordered and duplicated segments received by the receiver Accumulated acknowledgement

The TCP Segment Header TCP Header.

The TCP Segment Header (2) The pseudoheader included in the TCP checksum.

TCP Options MSS Window scale RFC1323 Selective repeat RFC1106

TCP Connection Establishment three-way handshake (a) TCP connection establishment in the normal case. (b) Call collision. 6-31

TCP Connection Release Host 1 Host 2 FIN=1, Seq=x Ack= x+1 Application request releasing connection Notify application Application request releasing connection Notify application FIN=1, Seq= y Ack= y+1 Release the whole connection  Use timer to avoid the two-army problem

TCP Connection Management Modeling The states used in the TCP connection management finite state machine.

TCP Connection Management Modeling (2) TCP connection management finite state machine. The heavy solid line is the normal path for a client. The heavy dashed line is the normal path for a server. The light lines are unusual events. Each transition is labeled by the event causing it and the action resulting from it, separated by a slash.

TCP Transmission Policy window management Window management in TCP.

TCP Transmission Policy efficiency TCP/IP overhead=20 bytes TCP head + 20 bytes IP head When used in TELNET connection, 1 data bytes carried with 40 bytes overhead Improvement algorithm Delay acknowledgement and window update reduce the load placed by the receiver Nagle’s algorithm send one segment unless either of the following condition exist: 1.acknowledgement to last segment has been received 2.buffered data fills half the window or a maximum segment

TCP Transmission Policy silly window syndrome Clark’s solution The receiver should not send a window update until it can handle the MSS or its buffer is half empty, whichever is smaller

TCP Congestion Control The reason for packet timeout Noise on a transmission line Packet discard at a congested router TCP congestion control algorithm Assumption: all timeouts are caused by congestion Two flow factor 1.receiver capacity: receiver window 2.network capacity: congestion window

TCP Congestion Control network capacity and receiver capacity (a) A fast network feeding a low capacity receiver. (b) A slow network feeding a high-capacity receiver.

TCP Congestion Control Slow Start Algorithm An example of the Internet congestion algorithm.

TCP Timer Management (a) Probability density of ACK arrival times in the data link layer. (b) Probability density of ACK arrival times for TCP.

TCP Timer Management Jacobson dynamic algorithm M how long the successful acknowledgement took α a smoothing factor that determines how much weight is given to the old value. Typically a = 7/8. RTT (Round Trip Time) the best current estimate of the round-trip time to the destination RTT= αRTT+(1- α)M D mean deviation of estimate D=αD+(1-α)|RTT-M | Timeout=RTT+4*D Karn’s algorithm do not update RTT on any segments that have been retransmitted, instead, the timeout is doubled on each failure until the segments get through the first time