Magda El Zarki Professor, ICS UC, Irvine

Slides:



Advertisements
Similar presentations
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 5 Transport Layer TCP/IP Protocols.
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
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.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Transport Layer 3-1 outline r TCP m segment structure m reliable data transfer m flow control m congestion control.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
The Transport Layer.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Networked & Distributed Systems TCP/IP Transport Layer Protocols UDP and TCP University of Glamorgan.
1 Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Networking Basics CCNA 1 Chapter 11.
1 Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
© 2002, Cisco Systems, Inc. All rights reserved..
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Introduction to Networks
Chapter 5 Network and Transport Layers
The Transport Layer Implementation Services Functions Protocols
Chapter 9: Transport Layer
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
TCP Lecture 4.
Instructor Materials Chapter 9: Transport Layer
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Introduction to Networks
Transmission Control Protocol (TCP)
5. End-to-end protocols (part 1)
Transport Layer.
Process-to-Process Delivery, TCP and UDP protocols
TCP.
Process-to-Process Delivery
PART 5 Transport Layer Computer Networks.
TCP.
TCP Transport layer Er. Vikram Dhiman LPU.
Introduction to Networks
Introduction of Transport Protocols
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Process-to-Process Delivery:
Transport Protocols An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
TCP and UDP Layer 3 of the TCP/IP protocol stack. Transport layer
PART V Transport Layer.
PART 5 Transport Layer.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer 9/22/2019.
Presentation transcript:

Magda El Zarki Professor, ICS UC, Irvine ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine

Course Outline Ch 1: Introduction Ch 2:Bridges Ch 3:Routers Ch 4: Transport Protocols

4. Transport Layer Protocols Introduction Transport Layer Protocols: Transport Control Protocol (TCP) and User Datagram Protocol (UDP)

4.1 Introduction

4.1.1 TCP and UDP There are two kinds of Transport Protocols used in the Internet: UDP: User Datagram Protocol TCP: Transport Control Protocol They both operate over IP. They both use PORT numbers for connecting to applications.

4.1.2 Port Numbers (1/3) The concatenation of IP address and Port Number provides a unique identifier for transferring information between a source and a destination. This is known as a socket, the door between an application and the underlying transport system. Each application service is allocated a unique port number: FTP - 21 Telnet - 23 Domain Name Server - 53, etc.

4.1.2 Port Numbers (2/3) There are 1023 port numbers available for application services. Not all port numbers are well known, in that case a request is sent to a catch all port number. The response packet contains the correct port number.

4.1.2 Port Numbers (3/3)

4.1.3 TCP vs UDP The tuple <Source Port, Destination Port> is used in the addressing of the Transport Data Unit (TDU). Most applications that require a reliable transport mechanism use TCP, otherwise UDP is used because it is simpler. UDP is the preferred choice for real-time services as it does not incorporate a lot of the overhead that is associated with TCP.

4.2 UDP (1/3) Uses only 8 bytes of header: 2 bytes for source port 2 bytes for destination port 2 bytes for length of data unit 2 bytes for checksum (covers IP addresses and IP length field included)

4.2 UDP (2/3) Provides connectionless service - no sequencing, no end to end error control (only error detection, includes data), no flow control. NFS, some routing protocols (e.g., RIP), RTP (Real-Time Protocol), TFTP, etc., use UDP as it is simple and fast if reliability is not an issue. IP will do fragmentation if the UDP packet is too large for the path (i.e., > path MTU).

4.2 UDP (3/3) A UDP packet can be as large as the max. IP packet minus the headers. Generally the application will limit the packet size. UDP leaves most of the work to the upper (application) layer. This can slow things down, as ACKs, re-ordering, etc., has to be done by the application.

4.3 TCP (1/2)

4.3 TCP (2/2) 20 byte header (without options) Header plus data referred to as a transport segment Segment size chosen to accommodate the smallest IP packet size on path to avoid fragmentation

4.3.1 Connection Establishment and Tear Down TCP goes through a 3 phase set-up: Connection set-up (3 way hand-shake): SYN, SYN ACK, ACK Data transfer Connection tear down: FIN, ACK, FIN, ACK (two way or one way)

4.3.2 Sequence Numbers and ACKs TCP is connection oriented - uses sequence numbers (always increasing, numbers not consecutive, reflect the number of bytes not segments!). For example: if TCP wants to send 2000 bytes and sends them in two segments of 1000 bytes each, if first segment has sequence no 102, then sequence number of second segment will be 102+1000= 1102. The ACKs on the other hand reflect the sequence number of the next byte that the receiver is expecting. If the receiver received segment with sequence number 102 of length 1000, then ACK will use number: 102+ 1000 = 1102.

4.3.3 Out of Order Arrivals The RFC does not specify what to do with out of order packets. TCP will only acknowledge ordered transmissions, but the question is: should it keep out of order packets in its buffer or just discard them? The easiest implementation is to discard and wait for all packets to arrive in order. An ACK is sent in response to an out of order packet, it contains the “expected” sequence number.

4.3.4 Group and Delayed ACKs Group ACKs: TCP will use group ACKs, also referred to as delayed ACKs. in otherwords, it will not ACK each received segment, it will wait for a short while (differs on each system, 200msecs for WANs, 20msec for LANs) and then ACK all segments (max. 2 segments) that it has received so far. It does that so that: 1) it can do group ACKing which is more efficient, and 2) it hopes to be able to piggyback an ACK on data going in the reverse direction. If there is data in the buffer that needs to be sent, it will not do a delayed ACK. Only uses delayed ACK if send buffer is empty.

4.3.5 Timers & Retransmissions Uses error detection and recovery - ACKs and retransmissions. If an ACK is not received before a timer expires, the segment is resent. The retransmission timer is not a static value. It is calculated based upon current network status. The timer must be greater than the roundtrip delay!

4.3.6 Flow Control (1/2) Sliding window is used as the flow control technique (matching of sender and receiver data rates): Each end system will advertise the largest window it is willing to receive without ACKs, i.e., packets that can be outstanding between source and destination. This value is dynamic, it changes based upon how fast the receiver can read the arriving data. It is always advertised in the messages sent from the destination to the source. Note however that the TCP congestion control mechanism does kick in too and affects the amount of data that can be sent.

4.3.6 Flow Control (2/2) If an ACK packet comes back with a receiver window size of “0”, that means that the destination wants the source to hold off with transmission. In this case the sending host can only send segments with 1 byte of data. This is to keep the connection alive between the two ends, i.e., keep ACKs flowing from destination to source indicating the window size.

4.3.7 Congestion Control TCP has imbedded congestion control. When ACKs come back with a delay (i.e. timers expire) the window size is reduced by the sender. The sender will only send data = min{congestion window, receiver (or sliding) window}. TCP also uses something called slow start: The sender starts off with only sending 1 (in some cases 2) packet, then doubles that if the ACK comes back before the retransmit timer expires. It keeps on doubling until it reaches a threshold then goes into a linear increase (i.e., adds one to the window size). If at anytime an ACK is delayed, it sets the threshold to half the current congestion window size and starts again with slow start.

4.3.8 Applications and TCP All applications that are concerned with reliable transport use TCP SMTP (email), ftp, RIP, http, etc. use TCP. TCP hides the underlying network from the application: it segments,it re-orders packets, does error control and handles flow matching and congestion control.