TELE202 Lecture 13 TCP/UDP (1) 1 Lecturer Dr Z. Huang Overview ¥This Lecture »Internet Protocols (4) »Source: chapter 15 ¥This Lecture »TCP/UDP (1) »Source:

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

Computer Networks Transport Layer. Topics F Introduction (6.1)  F Connection Issues ( ) F TCP (6.4)
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 6 Transport Layer.
CCNA – Network Fundamentals
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
Chapter 7: Transport Layer
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
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.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks.
Networking Theory (Part 1). Introduction Overview of the basic concepts of networking Also discusses essential topics of networking theory.
The Transport Layer Chapter 6. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
The OSI Reference Model
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
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,
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Chapter 2 Network Models.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
The Transport Layer (L4) Provides an end-to-end, reliable transport service between l4 entities –Reliable - error-free, in- sequence, no loss or duplication.
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 Transport Layer Computer Networks. 2 Where are we?
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
NETWORK SOFTWARE Software structuring technique. Network Software Protocol Hierarchies Design Issues for the Layers Connection-Oriented and Connectionless.
Copyright 2003 CCNA 1 Chapter 9 TCP/IP Transport and Application Layers By Your Name.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
Mukesh N. Tekwani Elphinstone College Mumbai
Chapter 6 The Transport Layer.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
University of the Western Cape Chapter 12: The Transport Layer.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
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:
Chapter 2 Applications and Layered Architectures Sockets.
Transportation Layer (1). Transportation Layer Very similar to the data link layer. – two hosts connected by a link or two hosts connected by a network.
Transport Layer COM211 Communications and Networks CDA College Theodoros Christophides
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
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.
Network Architecture Protocol hierarchies Design Issues for the layers
5. The Transport Layer 5.1 Role of Transport Layer It bridge the gab between applications and the network layer. Provides reliable cost-effective data.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
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.
1 Network Communications A Brief Introduction. 2 Network Communications.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
Process-to-Process Delivery:
The Transport Layer Dr. ir. S.S. Msanjila RIS 251.
Chapter 9 The Transport Layer The Internet Protocol has three main protocols that run on top of IP: two are for data, one for control.
The Transport Layer Implementation Services Functions Protocols
Chapter 6: Transport Layer (Part I)
NET323 D: Network Protocols
Transport Layer Unit 5.
NET323 D: Network 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
Chapter Five: Network Software Protocol Hierarchies
Transport Layer 9/22/2019.
Presentation transcript:

TELE202 Lecture 13 TCP/UDP (1) 1 Lecturer Dr Z. Huang Overview ¥This Lecture »Internet Protocols (4) »Source: chapter 15 ¥This Lecture »TCP/UDP (1) »Source: chapter 17 ¥Next Lecture »TCP/UDP (2) »Source: chapter 17

TELE202 Lecture 13 TCP/UDP (1) 2 Lecturer Dr Z. Huang Transport layer ¥The transport layer is at the heart of the whole protocol hierarchy »It is the first layer which does not involve intermediate nodes. It just involves end-to- end communication. »Its task is to provide a reliable, cost-effective data transport from the source machine to the destination machine, independent of the physical networks in use »There are two types of transport services: connection-oriented and connectionless, similar to the corresponding network services

TELE202 Lecture 13 TCP/UDP (1) 3 Lecturer Dr Z. Huang Transport layer ¥Functions of transport layer »Connection management –set-up and release connections »Flow and error control »Error detection ¥Why error detection is needed in transport layer, given the data link layer has done it hop by hop? »Intermediate nodes/routers may cause errors while processing packets ¥The software within the transport layer that does the work is called the transport entity

TELE202 Lecture 13 TCP/UDP (1) 4 Lecturer Dr Z. Huang Transport layer ¥Why are there two distinct layers, i.e., network and transport layers? »Network layer is part of the communication subnet and is run by the carriers »The network layer may offer connection- oriented service which may be unreliable »The users have no control over the subnet, so the only possibility to improve the quality of service is to put another layer on top of the network layer »The transport service interface for the higher layer can be designed to be independent of the network service interface, which may vary considerably from network to network »The primary function of the transport layer can be regarded as enhancing the quality of service provided by the network layer ¥Transport Protocol Data Unit (TPDU) is used to name the messages sent between transport entities

TELE202 Lecture 13 TCP/UDP (1) 5 Lecturer Dr Z. Huang Transport layer ¥Transport layer uses primitives, provided by network layer, to send and receive data »Transport entities use NL_send(TPDU, NL_address) and NL_recv(TPDU) to send/receive TPDU »TPDU is put in the payload of network packet which is put in the payload of data link frame »TPDU in TCP is called TCP segment, packet in IP is called IP packet

TELE202 Lecture 13 TCP/UDP (1) 6 Lecturer Dr Z. Huang QoS ¥Quality of Service (QoS) should be supported in the transport layer ¥QoS can be charaterized by a number of parameters, such as the parameters in flow specification »Throughput, transit delay, error ratio ¥The transport service allows the user to specify preferred and minimum unacceptable values for these parameters at the time a connection is set up ¥Some of the parameters also apply to connectionless transport ¥It is up to the transport layer to examine these parameters, and depending on the kind of network services available to it, determine whether it can provide the required service

TELE202 Lecture 13 TCP/UDP (1) 7 Lecturer Dr Z. Huang QoS negotiation ¥The transport user makes a proposal on some QoS parameters ¥The transport layer may immediately realize that some of them are unacceptable and report failure (together with the reasons) to the users ¥If the transport layer can not achieve the desired goal (e.g. 600 Mbps throughput), but it can achieve a lower but still acceptable one (150Mbps), it then sends the lower rate and the minimum acceptable rate to the destination ¥The destination machine may change the QoS to an acceptable level or reject the connection attempt ¥Finally the originating transport user is informed of the result

TELE202 Lecture 13 TCP/UDP (1) 8 Lecturer Dr Z. Huang Transport service ¥Two main differences between the transport service and the network service »The network service is intended to model the service offered by real (unreliable) networks, while the (connection-oriented) transport service is reliable »The network service is used only by the transport entities, while the transport service is used by application programs directly and must be convenient and easy to use ¥The transport service provides (interface) primitives to allow application programs to access the transport service »LISTEN: wait for a connection »CONNECT: initiate a connection »SEND: send data »RECEIVE: get data or wait for data »DISCONNECT: initiate a release

TELE202 Lecture 13 TCP/UDP (1) 9 Lecturer Dr Z. Huang Example ¥Example »consider an application with a server and a number of remote clients

TELE202 Lecture 13 TCP/UDP (1) 10 Lecturer Dr Z. Huang Transport layer operation ¥Connection establishment »The server executes a LISTEN primitive, which blocks the server until a client turns up »A client executes a CONNECT primitive, which blocks the client, and send a TPDU (encapsulating the information of the connection request) to the server via the underlying network layer »When the TPDU arrives at the server side, the transport entity checks to see that the server is blocked on a LISTEN (i.e. interested in handling a connection request). »It then unblocks the server and sends a CONNECTION ACCEPTED TPDU back to the client »When this TPDU arrives at the client side, the client is unblocked and the connection is established ¥Addressing »When an application process wishes to set up a connection to a remote application process, it must specify which one to connect to »The method normally used is to define transport addresses to which processes can listen for connection requests »In Internet, transport addresses are (IP address, local port) pairs

TELE202 Lecture 13 TCP/UDP (1) 11 Lecturer Dr Z. Huang Transport layer operation ¥Data exchange »Either party can do a (blocking) RECEIVE to wait for the other party to do a SEND »When the DATA TPDU arrives, the receiver is unblocked »As long as both sides can keep track of whose turn it is to send, this scheme works fine »Each TPDU sent will be (eventually) acknowledged. These acknowledgements, timers, and re-transmissions are managed by the transport entities using the network layer protocol and are not visible to the transport users ¥Connection release »Asymmetric disconnection: either transport user can issue a DISCONNECT primitive, which results in a DISCONNECT TPDU being sent to the remote transport entiry. Upon arrival, the connection is released »Symmetric disconnection: when one side does a DISCONNECT, that means it has no more data to send, but is still willing to accept data from its partner. A connection is released when both sides have done a DISCONNECT

TELE202 Lecture 13 TCP/UDP (1) 12 Lecturer Dr Z. Huang Problems in connection setup ¥Simple connection (two-way handshake) »Entity 1 send a TPDU to entity 2, saying “good morning, I would like to talk with a process with port number pn” »Entity 2 receives the TPDU and ask the process if it accept the request »If the process agrees, entity 2 sends a TPDU saying “ok, you can talk now”, and connection is established ¥Problem with establishing a connection occurs when the subnet can lose, store, and duplicate packets ¥Consider the following scenario »A user establishes a connection with a bank »Sends messages telling the bank to transfer a large amount of money to the account of a not entirely trustworthy person »And then releases the connection ¥What happens if all packets in the above process are duplicated and stored in the subnet?

TELE202 Lecture 13 TCP/UDP (1) 13 Lecturer Dr Z. Huang Solution for connection problem ¥Unique sequence number »To avoid the problem, each TPDU uses a sequence number and is acknowledged »The sequence number is determined using a counter and ensured to be different from the sequence number or acknowledged number of existing TPDU wandering in the network ¥Three-way handshake protocol »Transport entity A transmits a connection request (in a TPDU) which is accompanied by different sequence number x »When entity B receives the request, it sends A a connection acceptance TPDU acknowledging the sequence number x and initiates a new sequence number y »Entity A acknowledges the acceptance with the sequence number y

TELE202 Lecture 13 TCP/UDP (1) 14 Lecturer Dr Z. Huang Examples ¥How three-way handshaking can prevent false connection requests

TELE202 Lecture 13 TCP/UDP (1) 15 Lecturer Dr Z. Huang Disconnect ¥Asymmetric release is abrupt and may result in data loss ¥Symmetric release »One way to avoid data loss is to use symmetric release, in which each direction is released independently of the other »A host can continue to receive data even after it has sent a DISCONNECT TPDU ¥The symmetric release acts as below »A says:”I am done. Are you done too?” »If B responds:”I am done too. Bye.” »Then the connection can be safely released ¥This way does not always work

TELE202 Lecture 13 TCP/UDP (1) 16 Lecturer Dr Z. Huang Disconnect ¥The two-army problem »A white army is encamped in a valley »On both of the surrounding hillsides are blue armies »The white army is larger than either of the blue armies alone, but together they are larger than the white army »If either blue army attacks by itself, it will be defeated, but if the two blue armies attack simultaneously, they will be victorious »The communication medium between the two blue armies is to send messengers on foot down into the valley, where they might be captured and the message lost »The question is, does a protocol exist that allows the blue armies to win absolutely? –The answer is that NO.

TELE202 Lecture 13 TCP/UDP (1) 17 Lecturer Dr Z. Huang Disconnect ¥The same answer applies to the absolutely safe disconnection »Just substitute “disconnect” for “attack”. If neither side is prepared to disconnect until it is convinced that the other side is prepared to disconnect too, the disconnection will never happen ¥In practice, one is usually prepared to take more risks when releasing connections than attacking white armies, so the situation is not entirely hopeless

TELE202 Lecture 13 TCP/UDP (1) 18 Lecturer Dr Z. Huang Disconnect ¥Three-way handshake combined with a timer »Timer is used: if there is no TPDU from the other party for some time, disconnect anyway »The protocol can fail if the initial DR and n retransmissions are all lost: the sender will give up and delete the connection, while the other side knows nothing about the attempts to disconnect and is still fully active »This situation is called half-open connection

TELE202 Lecture 13 TCP/UDP (1) 19 Lecturer Dr Z. Huang Summary ¥Concepts »Transport layer »Transport entity »Transport address »TPDU »QoS »Two-army problem ¥Differences between transport layer and network layer ¥Connection establishment and release »three-way handshake protocol for connection establishment »Three-way handshake combined with timer for connection release