Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.

Slides:



Advertisements
Similar presentations
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Advertisements

CCNA – Network Fundamentals
© 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)
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
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.
1 CS492B Project #2 TCP Tutorial # Jin Hyun Ju.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
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.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
5/6/2015© 2010 Raymond P. Jefferis IIILect Transport Layer.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7: Objectives Part 1
Chapter 7 – Transport Layer Protocols
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 7.1: End-to-end Protocols Dr. Nghi.
TCP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
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
1 Chapter 1 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection.
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 : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
Transport Layer Mike Freedman COS 461: Computer Networks Best-effort local packet delivery Best-effort.
81 Sidevõrgud IRT 0020 loeng okt Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Transport Protocols.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are still here.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
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
Introduction to Networks
Introduction to Networks
5. End-to-end protocols (part 1)
Chapter 17 and 18: TCP is connection oriented
TCP.
ECE 4450:427/527 - Computer Networks Spring 2017
TCP - Part I Karim El Defrawy
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Layer Jennifer Rexford COS 461: Computer Networks
Ilam University Dr. Mozafar Bag-Mohammadi
Transportation Layer.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Introduction to Computer Networks
Introduction to Computer Networks
Introduction to Computer Networks
Lecture 21 and 22 5/29/2019.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University of Arizona

Transmission Control Protocol (TCP) Connection oriented Explicit set-up and tear-down of TCP session Stream-of-bytes service Sends and receives a stream of bytes, not messages Reliable, in-order delivery Checksums to detect corrupted data Acknowledgments & retransmissions for reliable delivery Sequence numbers to detect losses and data reordering Flow control Prevents overflow of the receiver’s buffer Congestion control Adapts to network congestion for the greater good 2

Does TCP Duplicate Lower Layer Services? Sliding-window based algorithm Incorporates ACK, NACKs, retransmissions, timeouts, ordering How is TCP different? Runs over a route rather than a single physical link  Needs to establish a connection and negotiate parameters (sliding window size) Adapts to heterogeneous conditions RTT varies with connected hosts, time of the day etc, unpredictable Flow control on computers with different resources Reorders and retransmits packets end-to-end Even if packets are in order on one physical link this does not guarantee end-to-end ordering Provides congestion control No immediate feedback from the link, no knowledge of conditions along the way Congestion control based on feedback 3

TCP Byte Service 4 In general, TCP is a full duplex protocol,. i.e. data flows in both directions

5 TCP Segment IP packet No bigger than Maximum Transmission Unit (MTU) E.g., up to 1500 bytes on an Ethernet TCP packet IP packet with a TCP header and data inside TCP header is typically 20 bytes long TCP segment No more than Maximum Segment Size (MSS) bytes E.g., up to 1460 consecutive bytes IP Hdr IP Data TCP HdrTCP Data (segment)

TCP Segment 6

Simplified TCP Flow Data Sequence Numbers flow toward the receiver Acks and Window Size flow the opposite direction 7

Header Fields in a Segment define a TCP connection SequenceNum: Sequence number of the first byte in the segment Flags: 6-bit field: SYN, FIN, RESET, PUSH, URG, ACK SYN, FIN: Establish and terminate a TCP connection ACK: request for an acknowledgement URG: Urgent Data UrgPtr points to where the urgent data ends PUSH: a notification to the application running over TCP RESET: some error occurred and the connection needs to be aborted 8

9 Sequence Numbers Host A Host B TCP Data TCP HDR TCP HDR ISN (initial sequence number) Sequence number = 1 st byte ACK sequence number = next expected byte

10 Initial Sequence Number (ISN) Sequence number for the very first byte E.g., Why not a de facto ISN of 0? Practical issue IP addresses and port #s uniquely identify a connection Same port #s may get used again to establish new connection and there is a chance an old packet is still in flight and might be associated with the new connection So, TCP requires changing the ISN over time Set from a 32-bit clock that ticks every 4 μs Wraps around once every 4.55 hours! But, this means the hosts need to exchange ISNs

Connection Establishment 11 Three-Way Handshake Exchange of three messages Timer

Client’s SYN Packet 12 Client’s PortServer’s Port Client’s ISN 20SYN

Server’s Reply Packet 13 Client’s PortServer’s Port Server’s ISN 20 SYN, ACK Client’s ISN + 1

Client’s ACK Packet 14 Client’s PortServer’s Port Server’s ISN ACK

TCP Transition Diagram 15

16 Tearing Down the Connection Closing the connection Finish (FIN) to close and receive remaining bytes And other host sends a FIN ACK to acknowledge Reset (RST) to close and not receive remaining bytes SYN SYN ACK ACK Data FIN FIN ACK ACK time A B FIN ACK