NET0183 Networks and Communications Lecture 28 TCP: a transport layer protocol... the story continues... Sagan halda áfram 8/25/20091 NET0183 Networks.

Slides:



Advertisements
Similar presentations
CS144 Review Session 4 April 25, 2008 Ben Nham
Advertisements

Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Flow control Connection management TCP, UDP
1 Transport Protocols & TCP CSE 3213 Fall April 2015.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Transport Layer – TCP (Part2) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
CSCI 4550/8556 Computer Networks
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 16 Omar Meqdadi Department of Computer Science and Software Engineering University.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Transport Layer3-1 Summary of Reliable Data Transfer Checksums help us detect errors ACKs and NAKs help us deal with errors If ACK/NAK has errors sender.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
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):
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
- Reliable Stream Transport Service
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.
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
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 Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
Ch 23 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
NET0183 Networks and Communications Lectures 26 and 27 TCP: a transport layer protocol 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
COMT 4291 Communications Protocols and TCP/IP COMT 429.
CS 4396 Computer Networks Lab
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
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.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Chapter 12 Transmission Control Protocol (TCP)
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
1 TCP III - Error Control TCP Error Control. 2 ARQ Error Control Two types of errors: –Lost packets –Damaged packets Most Error Control techniques are.
Copyright © Lopamudra Roychoudhuri
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
ECE 4110 – Internetwork Programming
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
TCP as a Reliable Transport. How things can go wrong… Lost packets Corrupted packets Reordered packets …Malicious packets…
© 2002, Cisco Systems, Inc. All rights reserved..
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer Timing Recovery.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Transport Layer Unit 5.
Computer Networks and Internets, 5e By Douglas E. Comer
The Transmission Control Protocol (TCP)
Presentation transcript:

NET0183 Networks and Communications Lecture 28 TCP: a transport layer protocol... the story continues... Sagan halda áfram 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks Lecture powerpoints from the recommended textbook are by Lami Kaya, Lecture powerpoints are © 2009 Pearson Education Inc. Their content has sometimes been edited by Andy Brooks. transport layer protocol/samskiptareglur flutningslags

8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 2 The recommended textbook is Computer Networks and Internets by Douglas E. Comer (for additional discounts and offers)

The port numbers identify the applications. Window is the number of bytes (beyond the sequence number in the acknowledgement field) that the receiver is currently willing to receive. If the ACK flag (A) is set, the value of Acknowledgement Number is the next sequence number that the receiver is expecting (thus acknowledging receipt of all prior bytes). The Sequence Number is the sequence number of the first byte of data in the segment. 3 NET0183 Networks and Communications by Dr Andy Brooks 8/25/2009

Sequence number (32 bits) – has a dual role: If the SYN flag is set, then this is the initial sequence number. The sequence number of the actual first data byte (and the acknowledged number in the corresponding ACK) will then be this sequence number plus 1. If the SYN flag is clear, then this is the accumulated sequence number of the first data byte of this packet for the current session. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 4 March 23, 2010

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP's Three-Way Handshake To establish or terminate connections reliably, TCP uses a 3-way handshake in which 3 messages are exchanged. During the 3-way handshake to start a connection, each side sends a control message that specifies an initial buffer size (for flow control) and a sequence number. TCP's 3-way exchange ensures unambiguous agreement. –despite packet loss, duplication, delay, and replay events The handshake insures that TCP will not open or close a connection until both ends have agreed.

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP's Three-Way Handshake The term synchronization segment or SYN segment is used to describe the control messages used in a 3-way handshake to create a connection. The term finish segment or FIN segment is used to describe control messages used in a 3-way handshake to close a connection. Figure 26.8 illustrates the 3-way handshake to create a connection. A key aspect of the 3-way handshake is the selection of sequence numbers. –TCP requires each end to generate a random 32-bit sequence number that becomes the initial sequence number for data sent.

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP's Three-Way Handshake Connection Establishment Figure 26.8 The 3-way handshake used to create a TCP connection. SYN bit on, ACK bit off SYN bit on, ACK bit on ACK bit on

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP's Three-Way Handshake If an application attempts to establish a new TCP connection after a computer reboots, TCP chooses a new random number. The probability of selecting a random value that matches the sequence used on a previous connection is very low. So TCP avoids replay problems: –The sequence numbers on the new connection will differ from the sequence numbers used on the old connection. –Delayed packets from the old connection are detected and rejected. To close a connection, the 3-way handshake uses FIN segments. –An ACK is sent in each direction along with a FIN to guarantee that all data has arrived before the connection is terminated. Figure 26.9 illustrates the exchange.

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP's Three-Way Handshake Connection Termination Figure 26.9 The 3-way handshake used to close a connection.

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP Congestion Control Retransmission can exacerbate congestion by injecting additional copies of a packet. To help avoid congestion collapse, TCP uses changes in delay as a measure of congestion, and it responds to congestion by reducing the rate at which it retransmits data. –The timeout is made bigger. (The length of time the retransmission timer is set for.)

The retransmission timeout (RT0) NET0183 Networks and Communications by Dr Andy Brooks 8/25/2009 “In addition, senders employ a retransmission timeout (RTO) that is based on the estimated round-trip time (or RTT) between the sender and receiver, as well as the variance in this round trip time. The behavior of this timer is specified in RFC There are subtleties in the estimation of RTT. For example, senders must be careful when calculating RTT samples for retransmitted packets; typically they use Karn's Algorithm or TCP timestamps (see RFC 1323). These individual RTT samples are then averaged over time to create a Smoothed Round Trip Time (SRTT) using Jacobson's algorithm. This SRTT value is what is finally used as the round-trip time estimate.”round-trip time RFC 2988Karn's AlgorithmRFC 1323Jacobson “Enhancing TCP to reliably handle loss, minimize errors, manage congestion and go fast in very high-speed environments are ongoing areas of research and standards development. As a result, there are a number of TCP congestion avoidance algorithm variations.”TCP congestion avoidance algorithm

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP Congestion Control A sending TCP can effectively reduce the data rate by temporarily reducing the window. In the extreme case where loss occurs, TCP temporarily reduces the window to one-half of its current value. (simplified story) –A loss is assumed if no ACK arrives within the timeout (the length of time the retransmission timer is set for).

Explanation of TCP slow start 13 NET0183 Networks and Communications by Dr Andy Brooks 8/25/2009 “The above diagram and description is based on the Message Segment Size (MSS) of 1 KB, no datagrams or ACKs are lost, and the send window size (Ws) is maximum (64KB).”

Explanation of TCP slow start TCP does not immediately send data to fill up a receiver´s window. TCP starts by sending one segment. – W c (the congestion window) equals 1. If an ACK arrives before the retranmission timer is set to expire, W c is increased by 1. This “doubling” continues until the slow start threshold (SST) is reached. W c then increases by 1 segment for each set of ACKs that are received, rather than increase by 1 for each ACK received. Eventually data throughput reaches the maximum allowed by the receiver´s window. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 14

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP Segment Format TCP uses a single format for all messages. TCP uses the term segment to refer to a message. Figure illustrates the TCP segment format. A TCP connection contains two streams of data, one flowing in each direction.

© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved TCP Segment Format Figure The TCP segment format used for both data and control messages.