The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, e-mail, WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.

Slides:



Advertisements
Similar presentations
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Advertisements

CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
TCP: Reliable Stream Transport
Chapter 7 – Transport Layer Protocols
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
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.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
Gursharan Singh Tatla Transport Layer 16-May
SEPT, 2005CSI Part 2.2 Protocols and Protocol Layering Robert Probert, SITE, University of Ottawa.
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.
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.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
Huda AL_Omairl - Network 71 Protocols and Network Software.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.
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.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Transport Layer Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
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.
User Datagram Protocol (UDP) Chapter 11. Know TCP/IP transfers datagrams around Forwarded based on destination’s IP address Forwarded based on destination’s.
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.
2000 년 11 월 20 일 전북대학교 분산처리실험실 TCP Flow Control (nagle’s algorithm) 오 남 호 분산 처리 실험실
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Transmission Control Protocol (TCP) BSAD 146 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Protocols and Protocol Layering. 2 Protocol Agreement about communication Specifies –Format of messages –Meaning of messages –Rules for exchange –Procedures.
© 2002, Cisco Systems, Inc. All rights reserved..
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Ch 3. Transport Layer Myungchul Kim
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
UDP: User Datagram Protocol. What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host – treats a computer as an.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Chapter 9: Transport Layer
Instructor Materials Chapter 9: Transport Layer
5. End-to-end protocols (part 1)
Module 1 UDP & TCP.
PART 5 Transport Layer Computer Networks.
Transport Layer Unit 5.
Process-to-Process Delivery:
CPEG514 Advanced Computer Networkst
PART 5 Transport Layer.
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
The TCP/IP Model.
Transport Layer 9/22/2019.
Presentation transcript:

The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery Service (IP) Unreliable Transport Service (UDP)

The Transmission Control Protocol (TCP) TCP is a protocol that specifies: –How to distinguish among multiple destinations on a given machine –How to initiate and terminate a stream transfer –Format of the data and acknowledgments that two computers exchange to achieve a reliable transfer –Procedures the computers use to ensure that the data arrives correctly

Distinguishing Among Multiple Destinations Like UDP, TCP uses protocol ports to identify the ultimate destination within a machine Unlike UDP, TCP defines a connection as the fundamental abstraction for data transfer Connection: –Virtual circuit –Identified by a pair of endpoints

Initiating Stream Transfers Virtual Circuit - simulate a circuit switched network over a packet-switched network –Sender and receiver interact before transfer begins to set up the connection –Once the connection is established a stream transfer can begin –During the transfer, protocol software on the two machines communicate to ensure that data is delivered correctly –Upon completion of the transfer the connection is closed

Initiating Stream Transfers (cont) An endpoint for a TCP connection is defined by a (host, port) pair –Host = the IP address of for a host –Port = a TCP port on that host A TCP connection is defined by a pair of endpoints: –Port 1037 on and port 76 on viper.cs.virginia.edu: ( , 1037) and ( , 76)

Initiating Stream Transfers (cont) Multiple connections to same host: –Port 1037 on and port 76 on viper.cs.virginia.edu: ( , 1037) and ( , 76) –Port 355 on falcon.cs.jmu.edu and port 801 on viper.cs.virginia.edu: ( , 355) and ( , 801)

Initiating Stream Transfers (cont) Multiple connections to same port: –Port 1037 on and port 444 on viper.cs.virginia.edu: ( , 1037) and ( , 444) –Port 355 on falcon.cs.jmu.edu and port 444 on viper.cs.virginia.edu: ( , 355) and ( , 444) No ambiguity - connection identified by both endpoints

Initiating Stream Transfers (cont) Both endpoints must agree to participate: –Passive open - one application program contacts its O.S. and indicates that it will accept an incoming connection –Active open - application program at other end contacts its O.S. and requests a connection Both TCP software modules cooperate to establish a connection Application programs can transmit data (TCP provides reliability)

TCP Data Stream Format Data from application programs is a sequence of octets (with no type associated) TCP divides data into segments for transmission Usually, each segment travels across the internet in a single IP datagram

Review: Unreliable Packet Delivery Service Benefits: –Fast –Cost-effective Drawbacks: –Packet loss, corruption, delay, duplication, out-of-order delivery –Sender might transmit faster than receiver can receive –Dictates a set packet size

The Need for a Reliable Stream Delivery Service Application-level programmers don’t want: –To have to provide reliability in each application –To be constrained by fixed-size packets Application-level programmers do want: –Reliability –Unstructured, stream-oriented service –Full duplex virtual circuit connection –Buffered transfer

Providing Reliability with Acknowledgments and Retransmissions SenderNetworkReceiver Receive ACK 2 Send packet 1 Send ACK 1 Receive packet 1 Send packet 2 Receive ACK 1 Receive packet 2 Send ACK 2

Packet Loss SenderNetworkReceiver Send packet 1 Receive ACK 1 Receive packet 1 Send ACK 1 (Timeout)

ACK Loss SenderNetworkReceiver Send packet 1 Receive ACK 1 (Timeout) Send ACK 1 Receive packet 1 Send ACK 1 (Discard)

ACK Delayed SenderNetworkReceiver Send packet 1 Receive ACK 1 (Timeout) Send packet 1 (Discard) Send ACK 1 Receive packet 1 Send ACK 1 (Discard)

A Problem A simple positive acknowledgment protocol wastes a substantial amount of network bandwidth because it must delay sending a new packet until it receives an acknowledgment for the previous packet.

A Solution SenderNetworkReceiver ACK1 ACK2 ACK3

Sliding Windows All packets inside the window can be transmitted When an acknowledgment for packet 1 is received the window slides to the right and allows the transmission of packet 9: window

Sliding Windows (cont) Receiver must keep a sliding window as well: After packet 1 is received and acknowledged: window

Sliding Windows (cont) Conceptually partitions the packets into three classes: –Transmitted, received, and acknowledged packets (outside and left of sliding window) –Packets being transmitted (inside the window) –Packets waiting to be transmitted (outside and right of sliding window)

Sliding Windows (cont) Only unacknowledged packets are retransmitted –Keep separate timer for each packet Performance : –Depends on the window size and the speed of the underlying network –Note: sliding window protocol with window size = 1 is the same as the simple positive acknowledgment protocol we saw earlier

Sliding Windows: Performance Tuning the sliding window protocol –Increase window size so that sender is transmitting packets as fast as the network can carry them –Eliminates network idle time –Increases throughput (as compared to the simple positive acknowledgment protocol)

Ideal Sliding Window Performance SenderNetworkReceiver

TCP - Efficient Transmission and Flow Control Uses a specialized sliding window mechanism Multiple segments can be sent before an acknowledgment arrives –Efficient transmission Allows receiver to restrict transmission until it has sufficient buffer space to accommodate more data –Flow control

TCP Sliding Windows Operates at the octet level Octets of the data stream are numbered sequentially Octets 1&2 have been sent and acknowledged Octets 3-6 sent but not acknowledged Octets 7&8 can be sent

TCP Sliding Windows Four per (full duplex) connection: –A sends to B –A receives from B –B sends to A –B receives from A

TCP Sliding Windows - Flow Control Each window can vary in size over time –Each ACK contains a window advisement –Specifies how many additional octets of data the receiver is willing to accept –Sender increases or decreases sending window sized based on the receiver’s advise Provides end-to-end flow control

TCP Sliding Windows - Flow Control Example Sender transmits 3 octets Receives an ACK 3 with window advisement = 3 Sender transmits 1 octet

TCP Sliding Windows - Flow Control Example (cont) Receives an ACK 4 with window advisement = 7 Sender transmits 4 octets Receives an ACK 8 with window advisement =

Summary TCP is a transport protocol that specifies: –How to distinguish among multiple destinations on a given machine –How to initiate and terminate a stream transfer –Format of the data and acknowledgments that two computers exchange to achieve a reliable transfer –Procedures the computers use to ensure that the data arrives correctly