Chapter 6 Transport Layer

Slides:



Advertisements
Similar presentations
Chapter 6 The Transport Layer.
Advertisements

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.
Computer Networks NYUS FCSIT Spring 2008 Milos STOLIC, Bs.C. Teaching Assistant
Chapter 6 The Transport Layer.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Chapter 6-2 The Transport Layer
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.
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:
Chapter 6 The Transport Layer 2010.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks.
The Transport Layer Chapter 6. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of.
The Transport Layer Chapter 6. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of.
The OSI Reference Model
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 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
Chapter 6 The Transport Layer.
The Transport Layer.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011 The Transport Layer Chapter 6.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
The Transport Layer.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
The Transport Layer Chapter 6. The Transport Service The transport layer is the heart of the whole protocol hierarchy It provides reliable data transport.
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.
Networked & Distributed Systems TCP/IP Transport Layer Protocols UDP and TCP University of Glamorgan.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
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.
(from Tanenabaum: “Computer Networks” Chapter 1) and
The Transport Layer Chapter 6. Transport Service Primitives The primitives for a simple transport service.
The Transport Layer Chapter 6 12/14/2015www.ishuchita.com1.
ECE 4110 – Internetwork Programming
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.
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.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
The Transport Layer Dr. ir. S.S. Msanjila RIS 251.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Introduction to Networks
The Transport Layer Implementation Services Functions Protocols
The Transport Layer Congestion Control & UDP
Unit-7 The Transport Layer.
5. End-to-end protocols (part 1)
PART 5 Transport Layer Computer Networks.
Chapter 6 The Transport Layer.
Transport Layer: Sliding Window Reliability
Introduction to Networks
Transport Layer Unit 5.
Chapter 6 The Transport Layer The Transport Service & Elements of Transport Protocols.
Process-to-Process Delivery:
Transport Protocols: TCP Segments, Flow control and Connection Setup
Introduction to Computer Networks
The Transport Layer Chapter 6.
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Layer 9/22/2019.
Presentation transcript:

Chapter 6 Transport Layer

Transport Service Services provided to the upper layers Goal Provide efficient, reliable, and cost-effective services to its users (application/session layer processes) Transport entity Hardware/software within transport layer to do the work

The network, transport, and application layers Logical Relationship The network, transport, and application layers

Transport vs. Network Layer Network layer: logical communication between hosts Transport layer: logical communication between processes relies on, enhances, network layer services University analogy: 7 students sending letters to 7 students processes = students app messages = letters in envelopes hosts = universities transport protocol = post office of universities network-layer protocol = postal service

State Diagram

Transport Service Primitives The primitives for a simple transport service

The socket primitives for TCP Berkeley Sockets The socket primitives for TCP

Transport Service Primitives TPDU Transport protocol data unit Message transmitted between transport entities Nesting of TPDUs, packets, and frames.

Transport Service Primitives Client-server example Client process Server process CONNECT LISTEN ACCEPT SEND RECEIVE RECEIVE SEND : : DISCONNECT DISCONNECT

Elements of Transport Protocols Addressing Connection Request Connection Release Flow control and buffering Multiplexing

Addressing Which remote application process to connect to Transport address Which process can listen for connection TSAP Transport service access point Internet: Port Usually multiple TSAP supported by transport entity NSAP Network service access point Internet: IP address One or more NSAP (e.g., host w/ more than one connections, router, etc.)

Addressing

Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Normal operation.

Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Old duplicate CONNECTION REQUEST appearing out of nowhere.

Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Duplicate CONNECTION REQUEST and duplicate ACK

Abrupt disconnection with loss of data Connection Release Abrupt disconnection with loss of data

Releasing a Connection Three-way handshake + timers Fails when all DRs from source lost  Half-open connection Solution: If no TPDUs have arrived for a certain amount of time disconnect (DR –Disconnection Request) Timer needed Dummy TPDU might be needed to keep a connection alive

Connection Release Four protocol scenarios for releasing a connection. (a) Normal case of three-way handshake

Connection Release Four protocol scenarios for releasing a connection. (b) Final ACK lost.

Four protocol scenarios for releasing a connection. (c) Response lost Connection Release Four protocol scenarios for releasing a connection. (c) Response lost

Connection Release Four protocol scenarios for releasing a connection. (d) Response lost and subsequent DRs lost.

Buffering

Similar to data link layer Sliding window protocols Difference Flow Control Flow control Similar to data link layer Sliding window protocols Difference Host: numerous connections Router: a few lines

(a) Upward Multiplexing. (b) Downward multiplexing.

Multiplexing if only one network address is available on a host, all transport connections on that machine have to use it. This is called upward multiplexing. If a user needs more bandwidth than one virtual circuit can provide, a way out is to open multiple network connections and distribute the traffic among them on a round-robin basis. This is called downward multiplexing.

The Internet Transport Protocols: UDP Introduction to UDP Remote Procedure Call Real-Time Transport

UDP (User Datagram Protocol) Provides a way to send IP datagrams without establishing a connection A UDP segment has 8-byte header followed by data UDP length includes header and data UDP checksum includes the same format pseudoheader as in TCP

Steps in making a remote procedure call. The stubs are shaded.

Remote Procedure Call When a process on machine 1 calls a procedure on machine 2, the calling process on 1 is suspended and execution of the called procedure takes place on 2. Information can be transported from the caller to the callee in the parameters and can come back in the procedure result. No message passing is visible to the programmer. This technique is known as RPC (Remote Procedure Call). To call a remote procedure, the client program must be bound with a small library procedure, called the client stub, that represents the server procedure in the client's address space. Similarly, the server is bound with a procedure called the server stub.

Remote Procedure Call Step 1 is the client calling the client stub. This call is a local procedure call, with the parameters pushed onto the stack in the normal way. Step 2 is the client stub packing the parameters into a message and making a system call to send the message. (packing the parameters is called marshaling). Step 3 is the kernel sending the message from the client machine to the server machine. Step 4 is the kernel passing the incoming packet to the server stub. Finally, Step 5 is the server stub calling the server procedure with the un-marshaled parameters. The reply traces the same path in the other direction.

Real Time Transport Protocol (RTP) Used to transport multimedia streams Can multiplex different streams such as the audio and video into a single UDP socket Each packet is given a unique increasing number No flow control, no error control, no acks,no retransmission mechanism Contains a payload type field to specify encoding that allows changing quality of the multimedia data when available bandwidth drops Contains timestamps that are used to synchronize streams. However, these timestamps are used to compute the relative time from the start rather than absolute time Has a sister protocol, Real Time Control Protocol (RTCP) that carries delay, jitter, bandwidth and congestion information for feedback purposes

Real-Time Transport(RTP) (a) The position of RTP in the protocol stack. (b) Packet nesting.

RTP Header

RTP Header Ver-2 P-Indicates padding X-indicates Extension Header present CC-Contributing Sources (0-15) M-Marker bit indicate start of audio/video Payload Type-Audio/Video Sequence number Time Stamp Synchronization Source Identifier Contributing Source Identifier

The Internet Transport Protocols: TCP Introduction to TCP The TCP service model The TCP protocol The TCP segment header TCP connection establishment TCP connection release TCP connection management modeling TCP sliding window TCP timer management TCP congestion control

TCP Basic Functionality Provides reliable end-to-end byte stream over an unreliable internetwork Transport entity A piece of software that is either A user process or Part of kernel Accepts user data streams from local processes Breaks them into pieces not exceeding 64K bytes Send each piece as an IP datagram At the receiver, it reconstructs original byte streams

The TCP Service Model The sender and receiver create end points called sockets Each socket has IP address Port number (16 bit and local) A socket may be used for multiple connections at the same time Some port numbers are reserved FTP: 21 Telnet: 23

The TCP Service Model Some assigned ports. Port Protocol Use 21 FTP File transfer 23 Telnet Remote login 25 SMTP E-mail 69 TFTP Trivial File Transfer Protocol 79 Finger Lookup info about a user 80 HTTP World Wide Web 110 POP-3 Remote e-mail access 119 NNTP USENET news

The TCP Service Model (a) Four 512-byte segments sent as separate IP datagrams. (b) The 2048 bytes of data delivered to the application in a single READ CALL. A TCP connection is a byte stream, not a message stream Message boundaries are not preserved end to end

The TCP Protocol Every byte on a TCP connection has its own 32-bit sequence number to be used for acks and sliding window sequencing Window mechanism has its own 32-bit header Data is exchanged in form of segments A segment consists of a 20-byte header and zero or more bytes A segment must fit into a IP payload (65635 bytes) or Maximum Transfer Unit, MTU of the underlying network (further segmentation is a major problem) Sliding window acks next expected sequence number

The TCP Segment Header TCP header length in 32 bit words, URG-urgent, ACK- ack number is valid, PSH-push, RST-reset connection, SYN-used to establish connection, FIN-used to release connection

The TCP Segment Header (2) The pseudoheader (part of the IP header) included in the TCP checksum.

TCP Options Some TCP options are: Maximum segment size (MSS): Specified what is the payload the sender is able to receive. (Default MSS = 536 bytes, i.e., Segment size = MSS + 20). SMSS/RMSS is Sender/Receiver MSS. Window scale: The window size field allows for upto 2^16 bytes of data. But this might be inefficient for high bw x delay situations. This options TCP indicate a scaling factor. Negative acknowledgement: Lets receiver user NAKs to get realize selective repeat rather than the normal go-back-N TCP behaviour.

TCP Connection Establishment 6-31 (a) TCP connection establishment in the normal case. (b) Call collision.

TCP Connection Release Each side releases the connection independently. If A send a FIN to B and B ACKs that FIN. It only means no data will flow from A to B. Data can still flow from B to A indefinitely. In all 4 messages are required to completely release the connection. A FIN and ACK for each side. However, the second FIN and the first ACK can be combined for 3 messages.

TCP Connection Management Modeling

TCP Connection Management Finite state machine The heavy solid line is the normal path for a client. The heavy dashed line is the normal path for a server. The light lines are unusual events. Each transition is labeled by the event causing it and the action resulting from it, separated by a slash.

TCP Transmission Policy Sliding Window management in TCP.

TCP Transmission Policy Sender TCP is not required to send data as soon as it arrives from the application. Sender TCP might buffer to create larger segments (up to receiver window size) Receiver TCP is not required to send ACK as soon as receives a segment. Receiver might delay ACK for up to 500 msecs hoping to piggyback ACK on data from receiver to sender. Such ACKS are called delayed ACKs

Silly window syndrome

Nagle's algorithm If application data comes in byte by byte, send first byte only. Then buffer all application data till until ACK for first byte comes in. If network is slow and application is fast, the second segment will contain a lot of data. Send second segment and buffer all data till ACK for second segment comes in. This way the algorithm prevents sending several one byte segments back to back.

TCP Congestion Control (a) A fast network feeding a low capacity receiver. (b) A slow network feeding a high-capacity receiver.

TCP congestion control In essence TCP deals with two potential problems separately: Problem Solution Receiver capacity Receiver window (rwnd) Network capacity Congestion window (cwnd) Each window reflect the number of bytes the sender may transmit. The sender sends the minimum of these two sizes. This size is the effective window. Effective window is the minimum of what the sender thinks is all right to send (congestion window) and what the receiver this is ok to send (receiver window). We assume that both rwnd and cwnd are measured in bytes.

TCP Timer Management Of the several timers TCP maintains the most important is the ReTransmission timer RTO, (also called timeout) . After each segment is sent, TCP starts a retransmission timer, if ACK arrives before timer expires, cancel timer. If timer expires first, consider segment lost. How long should RTO be ? Typically some small multiple of RTT(Round Trip Time). So how to measure RTT ? Measure time between segment sent and ACK receiver. Unfortunately, in the Internet RTT is not constant.