I N THE N AME OF G OD C OMPUTER N ETWORKS C HAPTER 6: T HE T RANSPORT L AYER Dr. Shahriar Bijani Shahed University May 2014.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Chapter 6 The Transport Layer.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Transport Layer Chapter
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 6 Transport Layer.
Chapter 6 The Transport Layer.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
UNIT 07 Process – to – Process Delivery: UDP,TCP and SCTP
Chapter 3: Transport Layer
Transport Layer3-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
The Transport Layer Chapter 6. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of.
Lecture 8 Chapter 3 Transport Layer
The OSI Reference Model
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
8-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow.
Process-to-Process Delivery:
Gursharan Singh Tatla Transport Layer 16-May
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 Transport Layer Computer Networks. 2 Where are we?
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Transport Layer Chapter 6.
Mukesh N. Tekwani Elphinstone College Mumbai
Transport Layer and UDP Tahir Azim Ref:
University of the Western Cape Chapter 12: The Transport Layer.
The Transport Layer.
TCP/IP Transport and Application (Topic 6)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer1 Ram Dantu (compiled from various text books)
Lecture91 Administrative Things r Return homework # 1 r Review some problems in homework # 1 r Questions about grading? Yona r WebCT for CSE245 is working!
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
The Transport Layer Chapter 6 12/14/2015www.ishuchita.com1.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
NET 221D:COMPUTER NETWORKS FUNDAMENTALS Lecture : Transport Layer: Behrouz A. Forouzan” Data communications and Networking 1.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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:
CSEN 404 Transport Layer I Amr El Mougy Lamia Al Badrawy.
The Transport Layer Dr. ir. S.S. Msanjila RIS 251.
Introduction to Networks
The Transport Layer Implementation Services Functions Protocols
Unit-7 The Transport Layer.
Chapter 3 outline 3.1 Transport-layer services
Transport Layer.
Process-to-Process Delivery, TCP and UDP protocols
TCP Transport layer Er. Vikram Dhiman LPU.
Introduction to Networks
Transport Layer Our goals:
Chapter 6 The Transport Layer The Transport Service & Elements of Transport Protocols.
Process-to-Process Delivery:
CPEG514 Advanced Computer Networkst
CSCD 330 Network Programming
PART 5 Transport Layer.
The Transport Layer Chapter 6.
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Layer 9/22/2019.
Transport Layer Our goals:
Presentation transcript:

I N THE N AME OF G OD C OMPUTER N ETWORKS C HAPTER 6: T HE T RANSPORT L AYER Dr. Shahriar Bijani Shahed University May 2014

References: Computer Networks A. S. Tanenbaum and D. J. Wetherall, Computer Networks (5th Edition), Pearson Education, the book slides, B. A. Forouzan, Introduction to the Transport Layer, TCP/IP Protocol Suite, 5th Edition, McGraw Hill, lecture slides,

T HE OSI M ODEL TCP/IP 3 PHYSICAL DATA LINK NETWORK TRANSPORT SESSION PRESENTATION APPLICATION

T HE T RANSPORT LAYER DUTIES  Packetizing  Sender side: breaks application messages into segments, passes them to network layer  Transport layer at the receiving host deliver data to the receiving process  Connection control  Connection-oriented  Connectionless  Addressing  Port numbers to identify which network application  Reliability  Flow control  Error Control

PROCESS-TO-PROCESS DELIVERY The transport layer is responsible for process- to-process delivery: the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship,The transport layer is responsible for process- to-process delivery: the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, In Client/Server communication, four entities must be defined: Sending Node Local Host IP Local Process Port number Receiving Node Remote host IP Remote Process ID Port number

Types of data deliveries

P ROCESSES COMMUNICATING ACROSS NETWORK  Process is an instance of a program in execution.  Processes on two hosts communicate with each other by sending and receiving messages  The process receives messages from, and sends messages into the network through its socket  A socket is the interface between the application layer and the transport layer within a host.  Sockets are the programming interface used to build network applications over the internet.  Programmers can select which transport layer protocol (UDP or TCP) to be used by the application and select few transport-layer parameters (maximum buffer size, Maximum segment size, starting sequence number of segment).

T RANSPORT S ERVICE Upper Layer Services Transport Service Primitives Berkeley Sockets

S ERVICES P ROVIDED TO THE U PPER L AYERS The network, transport, and application layers

T RANSPORT S ERVICE P RIMITIVES (1) The primitives for a simple transport service

T RANSPORT S ERVICE P RIMITIVES (2) Nesting of TPDUs, packets, and frames.

B ERKELEY S OCKETS (1) A state diagram for a simple connection management scheme. Transitions labeled in italics are caused by packet arrivals. The solid lines show the client’s state sequence. The dashed lines show the server’s state sequence.

B ERKELEY S OCKETS (2) The socket primitives for TCP

E XAMPLE OF S OCKET P ROGRAMMING : A N I NTERNET F ILE S ERVER (1)... Client code using sockets

E XAMPLE OF S OCKET P ROGRAMMING : A N I NTERNET F ILE S ERVER (2)... Client code using sockets

E XAMPLE OF S OCKET P ROGRAMMING : A N I NTERNET F ILE S ERVER (3)... Client code using sockets

E XAMPLE OF S OCKET P ROGRAMMING : A N I NTERNET F ILE S ERVER (4)... Server code

E XAMPLE OF S OCKET P ROGRAMMING : A N I NTERNET F ILE S ERVER (5)... Server code...

E XAMPLE OF S OCKET P ROGRAMMING : A N I NTERNET F ILE S ERVER (6)... Server code

E LEMENTS OF T RANSPORT P ROTOCOLS (1) Addressing Connection establishment Connection release Error control and flow control Multiplexing Crash recovery

E LEMENTS OF T RANSPORT P ROTOCOLS (2) (a) Environment of the data link layer. (b) Environment of the transport layer.

A DDRESSING TSAPs (Transport Service Access Points)= port number NSAPs (Network Service Access Points)

A DDRESSING How a user process in host 1 establishes a connection with a mail server in host 2 via a process server.

Port numbers Transport layer at the receiving host delivers data to the socket There should be a unique identifier for each socket. Socket identifier is called socket address Socket address = IP address & Port number

Port numbers

IP addresses versus port numbers Process-to-Process delivery needs IP address and Port number

IANA ranges Port numbers are 16-bit integers between  Well-known: Assigned and controlled by Internet Assigned Numbers Authority IANA for example: FTP 20,21, TELNET 23, SMTP 25, HTTP 80

Well-known ports used with UDP

Well-known ports used by TCP

Error control Why we need error control at the transport layer?

C ONNECTION E STABLISHMENT Establishing a connection sounds easy, but it is actually surprisingly tricky. At first glance, it would seem sufficient for one transport entity to just send a CONNECTION REQUEST TPDU to the destination and wait for a CONNECTION ACCEPTED reply. The problem occurs when the network can lose, store, and duplicate packets. This behavior causes serious complications. Restrict packet lifetime Equipping each host with a time-of-day clock. Three-way handshake

C ONNECTION E STABLISHMENT Techniques for restricting packet lifetime Restricted network design. Putting a hop counter in each packet. Timestamping each packet.

C ONNECTION E STABLISHMENT (2) (a) TPDUs may not enter the forbidden region. (b) The resynchronization problem.

C ONNECTION E STABLISHMENT Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Normal operation.

C ONNECTION E STABLISHMENT Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Old duplicate CONNECTION REQUEST appearing out of no-where.

C ONNECTION E STABLISHMENT Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Duplicate CONNECTION REQUEST and duplicate ACK

C ONNECTION R ELEASE Sudden disconnection with loss of data

C ONNECTION R ELEASE (2) The two-army problem

C ONNECTION R ELEASE Four protocol scenarios for releasing a connection. (a) Normal case of three-way handshake

C ONNECTION R ELEASE (4) Four protocol scenarios for releasing a connection. (b) Final ACK lost.

C ONNECTION R ELEASE (5) Four protocol scenarios for releasing a connection. (c) Response lost

C ONNECTION R ELEASE (6) Four protocol scenarios for releasing a connection. (d) Response lost and subsequent DRs lost.

M ULTIPLEXING (a) Multiplexing. (b) Inverse multiplexing.

44 M ULTIPLEXING / DEMULTIPLEXING segment - unit of data exchanged between transport layer entities Demultiplexing: delivering received segments to correct app layer processes application transport network M P2 application transport network receiver H t H n segment M application transport network P1 MMM P3 P4 segment header application-layer data How hosts handle more than one session simultaneously sender A sender B

45 M ULTIPLEXING / DEMULTIPLEXING multiplexing/demultiplexing in the Internet: based on sender, receiver port numbers, IP addresses source, dest port #s in each segment recall: well-known port numbers for specific applications gathering data from multiple app processes, enveloping data with header (later used for demultiplexing) source port #dest port # 32 bits application data (message) other header fields TCP/UDP segment format Multiplexing:

46 M ULTIPLEXING / DEMULTIPLEXING : EXAMPLES host A server B source port: x dest. port: 23 source port:23 dest. port: x port use: simple telnet app (Note how port 23 at server must be shared whereas port x at host can be reserved) Web client host A Web server B Web client host C Source IP: C Dest IP: B source port: x dest. port: 80 Source IP: C Dest IP: B source port: y dest. port: 80 port use: Web server Source IP: A Dest IP: B source port: x dest. port: 80 Q: how does the server know which packets go with which process?

Encapsulation and decapsulation

Multiplexing and demultiplexing

C ONGESTION C ONTROL Desirable bandwidth allocation Regulating the sending rate

T HE I NTERNET T RANSPORT L AYER The Internet supports two transport layer protocols: The Transport Control Protocol (TCP) for reliable service The Unreliable (User) Datagram Protocol (UDP)

Position of UDP in the TCP/IP protocol suite

U SER D ATAGRAM P ROTOCOL (UDP)  Connectionless  No handshaking between UDP sender, receiver  Each UDP segment handled independently of others  A server application that uses UDP serves only ONE request at a time. All other requests are stored in a queue waiting for service.  Unreliable protocol has no flow and error control  A UDP segment can be lost, arrive out of order, duplicated, or corrupted  Checksum field checks error in the entire UDP segment. It is Optional  UDP doe not do anything to recover from an error it simply discard the segment  Application accepts full responsibility for errors  It uses port numbers to multiplex/demultiplex data from/to the application layer.  Advantages: Simple, minimum overhead, no connection delay  Services provided by UDP:  Process-to-Process delivery  Error checking (however, if there is an error UDP does NOT do anything to recover from error. It will just discard the message

Queues in UDP

UDP A PPLICATIONS Used for applications that can tolerate small amount of packet loss: Multimedia applications, Internet telephony, real-time-video conferencing Domain Name System messages Audio Routing Protocols

User datagram format Header size = 8 bytes Minimum UDP process data size 0 bytes Maximum UDP process data size= – 20 (network layer headers) - 8 (UDP headres)= bytes

UDP length = IP length – IP header’s length

T RANSMISSION C ONTROL P ROTOCOL (TCP) Transmission Control Protocol properties: Connection-oriented (establishment & termination) Reliable Full-duplex

C ONNECTION -O RIENTED Connection oriented means that a virtual connection is established before any data is transferred. Connection ensures that the receiving process is available and ready before the data is sent Three-way handshaking connection establishment procedure because TCP is full-duplex both side must initialize communication and get approval from the other side before any data transfer, Virtual connection since TCP protocol will make sure that segments are given to the receiver application in the same order as they were sent by the sender even if they travel through different physical paths A server application that uses TCP can handle many client requests at the same time each has its own connection.

Connection establishment and termination Connection establishment Connection release Combined into one step

Stream delivery TCP establishes a virtual connection TCP will deliver segments to the applications in order and without error, lost, or duplicates

F ULL D UPLEX Data segments can flow in both directions at the same time. Each TCP connection has its own sending and receiving buffers.

F LOW CONTROL AND R ELIABILITY Flow control (process-to-process): TCP makes sure that the sender does not cause the receiver buffer to overflow By defining the amount of data that can be sent before receiving an acknowledgement from the receiver (sliding – window protocols) Error control (process-to-process): entire message arrives at the receiving transport layer without error, loss, duplication and in the same order they were sent Error detection is done using checksum and correction by retransmission Implemented by a sliding window ARQ Every transmission of data is acknowledged by the receiver. Acknowledgements are cumulative. If the sender does not receive ACK within a specified amount of time, the sender retransmits the data. Accepts out of order but does Not send negative acknowledgements, if a segment is not acknowledged before time-out, it is considered to be either corrupted or lost and the sender will retransmit the segment only when it times-out

TCP A PPLICATIONS Following applications require reliable data transfer through TCP: WWW using HTTP Electronic mail using SMTP Telnet File transfer using FTP

TCP segment format Minimum header length is 20 bytes and the maximum is 60 bytes when there are options