1 Transmission Control Protocol (TCP) RFC: 793. 2 Introduction The TCP is intended to provide a reliable process-to-process communication service in a.

Slides:



Advertisements
Similar presentations
TCP/IP Christopher Zacky. lolwut Decimal Numbers.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
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)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A note on the use.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
TCP & UDP - Protocol Details Yen-Cheng Chen
Configuring a Router with RIP Basic Configuration and Show Commands.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
8. Transport Protocol and UDP 8.1 Transport protocol : End-to-end protocol –IP: Host to host packet delivery –Transport: Process to process communication.
Transmission Control Protocol (TCP) Basics
1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol.
10. UDP/TCP WWW page: Text book: Mastering Networks (Chapter 10) Network IP protocol is routes the data.
Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.
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.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
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.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
Transport Layer Problems with network layer services
Kazi Spring 2008 CSCI 6901 CSCI-690 Computer Networks Khurram Kazi.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
Spring 2003CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
1 ELEN 602 Lecture 15 More on IP TCP. 2 byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP Streams.
Gursharan Singh Tatla Transport Layer 16-May
1 Transport Layer Computer Networks. 2 Where are we?
Chapter 5 Transport layer With special emphasis on Transmission Control Protocol (TCP)
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
University of the Western Cape Chapter 12: The Transport Layer.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transmission Control Protocol
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
UDP and TCP Basics Rocky K. C. Chang 18 October 2010.
7: TCP Last Modified: 4/26/2017 1:52:15 PM 3: Transport Layer.
ECE 4110 – Internetwork Programming
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Hour 6 The Transport Layer 1. What You'll Learn in This Hour Connections oriented and connectionless protocols Ports and sockets TCP UDP 2.
Transport Protocols.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Advanced Computer Networks
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.
5. End-to-end protocols (part 1)
Process-to-Process Delivery
TCP.
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.
PART V Transport 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
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer 9/22/2019.
Presentation transcript:

1 Transmission Control Protocol (TCP) RFC: 793

2 Introduction The TCP is intended to provide a reliable process-to-process communication service in a multi-network environment. The TCP is intended to provide a reliable process-to-process communication service in a multi-network environment. The TCP is intended to be a host-to-host protocol in common use in multiple networks. The TCP is intended to be a host-to-host protocol in common use in multiple networks.

3 Protocol Layer

4 TCP Header Source PortDestination Port Sequence Number Acknowledgment Number Data OffsetReservedECNControl BitsWindow ChecksumUrgent Pointer Options and padding ::: Data :::

5 TCP Header Port number Internet Assigned Numbers Authority (IANA) The Well Known Ports are those from 0 through The Registered Ports are those from 1024 through The Dynamic and/or Private Ports are those from through 65535

6 TCP Header Sequence Number: 32 bits The sequence number of the first data octet in this segment (except when SYN is present). If SYN is present the sequence number is the initial sequence number (ISN) and the first data octet is ISN+1. Acknowledgment Number: 32 bits If the ACK control bit is set this field contains the value of the next sequence number the sender of the segment is expecting to receive. Once a connection is established this is always sent. Data Offset: 4 bits The number of 32 bit words in the TCP Header. This indicates where the data begins. The TCP header (even one including options) is an integral number of 32 bits long.

7 TCP Header Reserved: 4 bits Reserved for future use. Must be zero. ECN, Explicit Congestion Notification. 2 bits. Added in RFC C, CWR.(Congestion Windows Reduced) 1 bit. E, ECE.(Explicit Congestion Echo) 1 bit. Control Bits: 6 bits (from left to right): URG: Urgent Pointer field significant ACK: Acknowledgment field significant PSH: Push Function RST: Reset the connection SYN: Synchronize sequence numbers FIN: No more data from sender Window: 16 bits The number of data octets beginning with the one indicated in the acknowledgment field which the sender of this segment is willing to accept.

8 TCP Header Checksum: 16 bits Pseudo header

9 TCP Header Checksum: 16 bits

10 TCP Header Urgent Pointer: 16 bits This field communicates the current value of the urgent pointer as a positive offset from the sequence number in this segment. The urgent pointer points to the sequence number of the octet following the urgent data. This field is only be interpreted in segments with the URG control bit set. Options: variable (up to 40 Bytes) Options may occupy space at the end of the TCP header and are a multiple of 8 bits in length. All options are included in the checksum. An option may begin on any octet boundary. There are two cases for the format of an option: Case 1: A single octet of option-kind. Case 2: An octet of option-kind, an octet of option-length, and the actual option-data octets.

11 TCP Header Options CodeLengthDescription 01End of option list.[ ] 11No operation.[ ] 24Maximum Segment Size.[ ] [ ] + 2bytes 810Timestamp.[ ] [ ] + 4bytes*2

12 TCP Operation Basic Data Transfer Basic Data Transfer Reliability Reliability Flow Control Flow Control Multiplexing Multiplexing Connections Connections Precedence and Security Precedence and Security

13 Basic Data Transfer The TCP is able to transfer a continuous stream of octets in each direction between its users. The TCP is able to transfer a continuous stream of octets in each direction between its users. Processes transmit data by calling on the TCP and passing buffers of data as arguments. Processes transmit data by calling on the TCP and passing buffers of data as arguments. The TCP packages the data from these buffers into segments and calls on the internet module to transmit each segment to the destination TCP. The TCP packages the data from these buffers into segments and calls on the internet module to transmit each segment to the destination TCP. The receiving TCP places the data from a segment into the receiving user’s buffer and notifies the receiving user. The receiving TCP places the data from a segment into the receiving user’s buffer and notifies the receiving user. Segment : A logical unit of data, in particular a TCP segment is the unit of data transferred between a pair of TCP modules. Segment : A logical unit of data, in particular a TCP segment is the unit of data transferred between a pair of TCP modules.

14 Reliability TCP provide a mechanism to recover from data that is damaged, lost, duplicated, or delivered out of order. TCP provide a mechanism to recover from data that is damaged, lost, duplicated, or delivered out of order. Sender : Assigning a sequence number to each octet transmitted, and requiring a positive acknowledgment (ACK) from the receiving TCP. Sender : Assigning a sequence number to each octet transmitted, and requiring a positive acknowledgment (ACK) from the receiving TCP. If the ACK is not received within a timeout interval, the data is retransmitted. If the ACK is not received within a timeout interval, the data is retransmitted. Receiver : the sequence numbers are used to correctly order segments that may be received out of order and to eliminate duplicates. Receiver : the sequence numbers are used to correctly order segments that may be received out of order and to eliminate duplicates. Damage is handled by adding a checksum to each segment transmitted, checking it at the receiver, and discarding damaged segments. Damage is handled by adding a checksum to each segment transmitted, checking it at the receiver, and discarding damaged segments.

15 Reliability Timer Timer Retransmission Timer Retransmission Timer Persistence Timer Persistence Timer Keepalive Timer Keepalive Timer Time-Waited Timer Time-Waited Timer

16 Flow Control A means for the receiver to govern the amount of data sent by the sender. A means for the receiver to govern the amount of data sent by the sender. Receiver returns a "window" with every ACK indicating a range of acceptable sequence numbers beyond the last segment successfully received. Receiver returns a "window" with every ACK indicating a range of acceptable sequence numbers beyond the last segment successfully received. Indicates an allowed number of octets that the sender may transmit. Indicates an allowed number of octets that the sender may transmit.

17 Flow Control Sliding Window Sliding Window Silly Window Syndrome Silly Window Syndrome Created by sender Created by sender Nagle’s algorithm Nagle’s algorithm Created by receiver Created by receiver Clark’s solution Clark’s solution Delayed Acknowledgment Delayed Acknowledgment

18 Multiplexing To allow for many processes within a single Host to use TCP communication facilities simultaneously. To allow for many processes within a single Host to use TCP communication facilities simultaneously. A pair of sockets uniquely identifies each connection. A pair of sockets uniquely identifies each connection. A socket may be simultaneously used in multiple connections. A socket may be simultaneously used in multiple connections. Socket : An address which specifically includes a port identifier, that is, the concatenation of an Internet Address with a TCP port. Socket : An address which specifically includes a port identifier, that is, the concatenation of an Internet Address with a TCP port.

19 Connections The combination of certain status information, including sockets, sequence numbers, and window sizes, is called a connection. The combination of certain status information, including sockets, sequence numbers, and window sizes, is called a connection. Each connection is uniquely specified by a pair of sockets identifying its two sides. Each connection is uniquely specified by a pair of sockets identifying its two sides. To identify the separate data streams that a TCP may handle, the TCP provides a port identifier. To identify the separate data streams that a TCP may handle, the TCP provides a port identifier.

20 Three-Way Handshaking

21 Four-way handshaking

22 Precedence and Security The users of TCP may indicate the security and precedence of their communication. Provision is made for default values to be used when these features are not needed. The users of TCP may indicate the security and precedence of their communication. Provision is made for default values to be used when these features are not needed.

23 State Transition Diagram CLOSED LISTEN SYN_RCVDSYN_SENT ESTABLISHED CLOSE_WAIT LAST_ACKCLOSING TIME_WAIT FIN_WAIT_2 FIN_WAIT_1 Passive openClose Send/SYN SYN/SYN + ACK SYN + ACK/ACK SYN/SYN + ACK ACK Close/FIN FIN/ACKClose/FIN FIN/ACK ACK + FIN/ACK Timeout after two segment lifetimes FIN/ACK ACK Close/FIN Close CLOSED Active open/SYN

24 State Transition Diagram

25 State Transition Diagram