The Transport Layer. 2 Purpose of this layer Interface end-to-end applications and protocols –Turn best-effort IP into a usable interface Data transfer.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Transportation Layer. Very similar to the data link layer. – two hosts connected by a link or two hosts connected by a network differences: – When two.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 16 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
CS 471/571 Transport Layer 5 Slides from Kurose and Ross.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr.
CPSC 441: Intro, UDP1 Transport Layer Instructor: Carey Williamson Office: ICT Class Location:
Ken Birman. TCP: The network transport protocol Although Internet supports other protocols, TCP is by far the most commonly used In fact many firewalls.
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
The Transport Layer. 2 Announcements Project 4 is due next Monday, April 9th Homework 5 available later today, due next Wednesday, April 11th Prelim II.
Transport Layer 3-1 outline r TCP m segment structure m reliable data transfer m flow control m congestion control.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
Computer Communication Digital Communication in the Modern World Transport Layer Multiplexing, UDP
Chapter 3: Transport Layer
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer3-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Lecture 8 Chapter 3 Transport Layer
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
1 Ch. 7 : Internet Transport Protocols. Transport Layer Our goals: r understand principles behind transport layer services: m Multiplexing / demultiplexing.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
8-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow.
Transport Layer Transport Layer. Transport Layer 3-2 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet,
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 12 Omar Meqdadi Department of Computer Science and Software Engineering University.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Network LayerII-1 RSC Part III: Transport Layer 1. Basic Concepts Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
2: Transport Layer 21 Transport Layer 2. 2: Transport Layer 22 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data.
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.
Transport Layer and UDP Tahir Azim Ref:
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Part.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Transport Layer1 Ram Dantu (compiled from various text books)
1 Transport Layer Lecture 7 Imran Ahmed University of Management & Technology.
Lecture91 Administrative Things r Return homework # 1 r Review some problems in homework # 1 r Questions about grading? Yona r WebCT for CSE245 is working!
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
1 End-to-End Protocols (UDP, TCP, Connection Management)
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Transport Layer 3-1 Internet Transport Layer Lecture 8 Dr. Najla Al-Nabhan.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Transport Protocols.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
Transport Layer1 Goals: r understand principles behind transport layer services and protocols: m UDP m TCP Overview: r transport layer services r multiplexing/demultiplexing.
Introduction 1-1 source application transport network link physical HtHt HnHn M segment HtHt datagram destination application transport network link physical.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
CSEN 404 Transport Layer I Amr El Mougy Lamia Al Badrawy.
CIS679: UDP and Multimedia r Review of last lecture r UDP and multimedia.
Chapter 3 outline 3.1 Transport-layer services
Introduction to Networks
06- Transport Layer Transport Layer.
Transport Layer Goals: Overview:
Transport Layer Our goals:
Chapter 5 Transport Layer Introduction
Chapter 5 Transport Layer Introduction
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer Our goals:
Chapter 3 Transport Layer
Presentation transcript:

The Transport Layer

2 Purpose of this layer Interface end-to-end applications and protocols –Turn best-effort IP into a usable interface Data transfer b/w processes: –Compared to end-to-end IP We will look at 2: –TCP –UDP application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical logical end-end transport

3 UDP Unreliable Datagram Protocol Best effort data delivery between processes –No frills, bare bones transport protocol –Packet may be lost, out of order Connectionless protocol: –No handshaking between sender and receiver –Each UDP datagram handled independently

4 UDP Functionality Multiplexing/Demultiplexing –Using ports Checksums (optional) –Check for corruption application transport network M P2 application transport network receiver H t H n segment M application transport network P1 MMM P4 segment header application-layer data P3

5 Multiplexing/Demultiplexing Multiplexing: –Gather data from multiple processes, envelope data with header –Header has src port, dest port for multiplexing Why not process id? Demultiplexing: –Separate incoming data in machine to different applications –Demux based on sender addr, src and dest port source port # dest port # 32 bits Application data (message) UDP segment format length checksum Length, in bytes of UDP segment, including header

6 Implementing Ports As a message queue –Append incoming message to the end –Much like a mailbox file If queue full, message can be discarded When application reads from socket –OS removes some bytes from the head of the queue If queue empty, application blocks waiting

7 UDP Checksum Over the headers and data –Ensures integrity end-to-end –1’s complement sum of segment contents Is optional in UDP If checksum is non-zero, and receiver computes another value: –Silently drop the packet, no error message detected

8 UDP Discussion Why UDP? –No delay in connection establishment –Simple: no connection state –Small header size –No congestion control: can blast packets Uses: –Streaming media, DNS, SNMP –Could add application specific error recovery

9 TCP Transmission Control Protocol –Reliable, in-order, process-to-process, two-way byte stream Different from UDP –Connection-oriented –Error recovery: Packet loss, duplication, corruption, reordering A number of applications require this guarantee –Web browsers use TCP

10 Handling Packet Loss sender receiver time message There are a number of reasons why the packet may get lost: - router congestion, lossy medium, etc. How does sender know of a successful packet send?

11 Lost Acks sender receiver time message ack What if packet/ack is lost? timeout

12 Delayed ACKs sender receiver time message ack timeout What will happen here? Due to congestion, small timeout, … Delayed ACKs  duplicate packets message

13 Delayed ACKs sender receiver time m1 ack timeout m1 timeout m2 ack How to solve this scenario?

14 Insertion of Packets sender receiver time m1 ack1 m2 ack2 m2’ m2’ could be from an old expired session!

15 Message Identifiers Each message has –Message id: uniquely identifies message in sender –Session id: unique across sessions Message ids detect duplication, reordering Session ids detect packet from old sessions TCP’s sequence number has similar functionality: –Initial number chosen randomly –Unique across packets –Incremented by length of data bytes

16 TCP Packets source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr urgent data checksum F SR PAU head len not used Options (variable length) URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) # bytes rcvr willing to accept counting by bytes of data (not segments!) Internet checksum (as in UDP)

17 TCP Connection Establishment sender receiver (ack x, seq # y) (open, seq # x) (ack y) TCP is connection-oriented. Starts with a 3-way handshake. Protects against duplicate SYN packets.

18 TCP Usage sender receiver (ack x, seq # y) (open, seq # x) (ack y) Data Data, ACK Fin, ACK

19 TCP timeouts What is a good timeout period ? –Want to improve throughput without unnecessary transmissions Timeout is thus a function of RTT and deviation NewAverageRTT = (1 -  ) OldAverageRTT +  LatestRTT NewAverageDev = (1 -  ) OldAverageDev +  LatestDev where LatestRTT = (ack_receive_time – send_time), LatestDev = |LatestRTT – AverageRTT|,  = 1/8, typically. Timeout = AverageRTT + 4*AverageDev

20 TCP Windows Multiple outstanding packets can increase throughput

21 TCP Windows Can have more than one packet in transit Especially over fat pipes, e.g. satellite connection Need to keep track of all packets within the window Need to adjust window size DATA, id=17 DATA, id=18 DATA, id=19 DATA, id=20 ACK 17 ACK 18 ACK 19 ACK 20

22 TCP Congestion Control TCP increases its window size when no packets dropped It halves the window size when a packet drop occurs –A packet drop is evident from the acknowledgements Therefore, it slowly builds to the max bandwidth, and hover around the max –It doesn’t achieve the max possible though –Instead, it shares the bandwidth well with other TCP connections This linear-increase, exponential backoff in the face of congestion is termed TCP-friendliness

23 TCP Window Size Linear increase Exponential backoff Assuming no other losses in the network except those due to bandwidth Time Bandwidth Max Bandwidth

24 TCP Fairness Want to share the bottleneck link fairly between two flows Bandwidth for Host B Bandwidth for Host A B A Bottleneck Link D

25 TCP Slow Start Linear increase takes a long time to build up a window size that matches the link bandwidth*delay Most file transactions are not long enough Consequently, TCP can spend a lot of time with small windows, never getting the chance to reach a sufficiently large window size Fix: Allow TCP to build up to a large window size initially by doubling the window size until first loss

26 TCP Slow Start Initial phase of exponential increase Assuming no other losses in the network except those due to bandwidth Time Bandwidth Max Bandwidth

27 TCP Summary Reliable ordered message delivery Connection oriented, 3-way handshake Transmission window for better throughput Timeouts based on link parameters Congestion control Linear increase, exponential backoff Fast adaptation Exponential increase in the initial phase