Section 5: The Transport Layer. 5.2 CS 320 - Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Introduction In the previous section.

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Advertisements

© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
CCNA – Network Fundamentals
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
EECC694 - Shaaban #1 lec #12 Spring Internet Transport Protocols Transmission Control Protocol (TCP):Transmission Control Protocol (TCP):
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.
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.
Autumn 2000John Kristoff1 Transport Layer Computer Networks.
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.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Gursharan Singh Tatla Transport Layer 16-May
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.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
TCP/IP: Basics1 User Datagram Protocol (UDP) Another protocol at transport layer is UDP. It is Connectionless protocol i.e. no need to establish & terminate.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
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.
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.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
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)
Routers and Routing Basics CCNA 2 Chapter 10.
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.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
Chapter 2 Applications and Layered Architectures Sockets.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
Transmission Control Protocol (TCP) BSAD 146 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
1 End-to-End Protocols User Datagram Protocol (UDP) Transmission Control Protocol(TCP)
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 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).
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
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)
Transport Layer.
Process-to-Process Delivery, TCP and UDP protocols
Process-to-Process Delivery:
Dr. John P. Abraham Professor UTPA
Dr. John P. Abraham Professor UTPA
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Layer 9/22/2019.
Presentation transcript:

Section 5: The Transport Layer

5.2 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Introduction In the previous section we looked at the services provided by the network layer and specifically how the Internet uses IP to provide unreliable connectionless packet delivery service. Building on top of this, transport protocols must provide reliable end-to-end communication, independent of the underlying network used. In order to describe the services provided by the transport layer we will use TCP as an example

5.3 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. TCP Services From an application program’s point of view, the service offered by TCP has seven major features: –Connection Orientation –Point-To-Point Communication –Complete Reliability –Full Duplex Communication –Stream Interface –Reliable Connection Start-up –Graceful Connection Shutdown

5.4 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Hence, TCP provides a completely reliable (no data duplication or loss), connection oriented, full-duplex stream transport service that allows two application programs to form a connection, send data in either direction, and then terminate the connection. Each TCP connection is started reliably and terminated gracefully, with all data being delivered before the termination occurs.

5.5 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. TCP and IP With TCP/IP, irrespective of whether the underlying network is a LAN, WAN, single network, or internetwork, the internet protocol (IP) is always present in the network layer. Thus, all transport packets (known as segments) are transferred across the underlying network in IP datagrams. The underlying internet system does not provide hardware support or software support for connections

5.6 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Therefore, for TCP to provide an end-to-end protocol, it uses what are known as virtual connections (i.e. connections held in software) In essence TCP treats IP as a packet communication system that connects hosts at two endpoints of a connection, and IP treats each TCP message as data to be transferred This idea is shown graphically in the next slide.

5.7 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Courtesy of Computer Networks 3rd Ed. by A.S.Tanenbaum, 1994

5.8 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Achieving reliability Problems: –Unreliable delivery by the underlying communications system, and, system crashes and reboots. TCP combines a number of different mechanisms to achieve reliability, of which the more prominent are: –Adaptive retransmission –Sliding window for flow control – 3-way handshake for establishing and releasing connections –(We will not cover congestion control)

5.9 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Adaptive retransmission To compensate for packet loss the sender uses a retransmission scheme whereby if a packet is not acknowledged by the receiver in a certain amount of time, the sender assumes it to be lost and retransmits The delay required for the data to reach a destination and an acknowledgement to return depends on the traffic in the internet and the distance to the destination In order for the network usage to be optimised TCP adapts to these delays

5.10 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. It performs this adaptation policy by building up a sequence of round-trip times for a connection and then performing a statistical analysis of that sequence. This then allows TCP to accurately estimate the round- trip time (RTT) and set the timeout accordingly.

5.11 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Flow Control To overcome the maximum achievable bandwidth associated with the positive acknowledgement and retransmission, TCP uses a sliding window protocol, which allows several unacknowledged segments to be present in the network. The next slide show a diagrammatic representation of the technique

5.12 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Sliding window Bytes already sent Bytes not sent yet Bytes already acknowledged Bytes not yet acknowledged Window size (determined by the recipient) Front edge of window Back edge of window

5.13 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Bytes behind the trailing edge of the window have been both transmitted and acknowledged. Bytes in front of the leading edge of the window have not been sent yet. To control this sliding window, there are three fields with the TDP header. The sequence number is placed in the header by the sender and indicates the byte offset within the data stream at which this segment begins

5.14 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. The acknowledgement number is used in the acknowledgements returned by the recipient, to indicate which segment is being acknowledged A third field, called the window size field is used in acknowledgement packets to indicate how many more bytes of data (beyond the one that is currently being acknowledged) the recipient is willing to accept before further acknowledgements are sent

5.15 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Three-Way Handshake To guarantee that connection are established or terminated reliable, TCP uses a 3-way handshake in which three message are exchanged (a minimum of 3 message are required to ensure setup or release) When setting up a connection TCP uses synchronisation segments ( SYN segment) When releasing a segment it uses finish segments ( FIN segments)

5.16 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Setting up a connection Send SYN Send SYN + ACK Send ACK Receive SYN Receive SYN + ACK

5.17 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Accessing TCP Services Access to the services provided by TCP can only be granted through t ransport s ervice a ccess p oints (TSAPs) known as ports. To use a port a socket must be created and bound to it. Each socket is addressed by a number made up of the machines IP address and a 16-bit port number local to that host (e.g ,23 is the telnet port on csa10) Port numbers below 1024 are called well-known ports and are reserved for standard services

5.18 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Berkeley sockets One implementation of TCP used in Berkeley UNIX a set of socket primitives described below –SOCKET: Create a new communication end point –BIND: Attach a local address to a socket –LISTEN: Announce willingness to accept connections –CONNECT: Actively attempt to establish a connection –SEND: Send some data over the connection –RECEIVE: Receive some data from the connection –CLOSE: Release the connection

5.19 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Building servers Servers execute the first four primitives in the order given A successful call to SOCKET return an ordinary file descriptor that may be used in succeeding calls. BIND assigns an specific address to the newly created socket, at which stage clients who know this address may connect to it The LISTEN call allows a number of clients to try and connect simultaneously in which case they will be queued for service

5.20 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. LISTEN is non-blocking i.e. once called it sets up the queue, tells the TCP to look after it, and returns control to the programs When the server wishes to accept an incoming connection it executes the ACCEPT call. If a client is waiting a connection is set-up otherwise the call blocks until a client tries to connect. ACCEPT returns a new file descriptor specifically assigned for communication between the server and the new client

5.21 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Building clients When a client wishes to utilise the services of TCP it must also first make a call to SOCKET. In this case however the address of the TSAP does not matter since the client connects to the server (not vice- versa) Once the socket has been created the CONNECT call asks TCP to make a connection to the server SEND and RECEIVE may then be used to exchange data To release a connection a call to CLOSE is made

The End!