Sunteți pe pagina 1din 70

Transport Layer

By
Farhan M.Shaikh
B.Sc. (CS),M.Sc. (IT), B.Ed.,M.Ed., M.A (Sociology)., UGC-NET (Education/ Sociology)

Visiting Faculty
L.S. Raheja College, SantaCruz
Tolani College, Andheri
Pioneer Education Center, Borivali, Andheri & Vasai
L.I.I.T., Dadar & Mulund
T.I.M.E., Andheri & Borivali
Unit 2 : Transport Layer
Process to Process Delivery
UDP
TCP

farhan.mohd@yahoo.co.in 2
PROCESSTOPROCESSDELIVERY

The transport layer is responsible for process-to-


process deliverythe delivery of a packet, part of a
message, from one process to another. Two processes
communicate in a client/server relationship, as we will
see later.
Topics discussed in this section:
Client/Server Paradigm
Multiplexing and Demultiplexing
Connectionless Versus Connection-Oriented Service
Reliable Versus Unreliable
Two Protocols
farhan.mohd@yahoo.co.in 3
Note

The transport layer is responsible for


process-to-process delivery.

farhan.mohd@yahoo.co.in 4
Types of data deliveries

farhan.mohd@yahoo.co.in 5
Client- Server Paradigm

farhan.mohd@yahoo.co.in 6
Addressing

farhan.mohd@yahoo.co.in 7
Addressing

farhan.mohd@yahoo.co.in 8
Port numbers

farhan.mohd@yahoo.co.in 9
IP addresses versus port numbers

farhan.mohd@yahoo.co.in 10
IANA Ranges

farhan.mohd@yahoo.co.in 11
Socket Addresses

farhan.mohd@yahoo.co.in 12
Multiplexing & Demultiplexing

farhan.mohd@yahoo.co.in 13
Multiplexing & Demultiplexing

farhan.mohd@yahoo.co.in 14
Connectionless v/s Connection Oriented
Service

farhan.mohd@yahoo.co.in 15
Reliable versus Unreliable

farhan.mohd@yahoo.co.in 16
Error control

farhan.mohd@yahoo.co.in 17
Position of UDP, TCP, and SCTP in TCP/IP suite

farhan.mohd@yahoo.co.in 18
User Datagram Protocol (UDP)

farhan.mohd@yahoo.co.in 19
Well-known ports used with UDP

farhan.mohd@yahoo.co.in 20
User Datagram

farhan.mohd@yahoo.co.in 21
User Datagram

farhan.mohd@yahoo.co.in 22
User Datagram

UDP length
= IP length IP headers length

farhan.mohd@yahoo.co.in 23
UDP Operation

farhan.mohd@yahoo.co.in 24
UDP Operation

farhan.mohd@yahoo.co.in 25
UDP Operation

farhan.mohd@yahoo.co.in 26
Use of UDP

farhan.mohd@yahoo.co.in 27
TCP

farhan.mohd@yahoo.co.in 28
TCP Services

farhan.mohd@yahoo.co.in 29
TCP Services

farhan.mohd@yahoo.co.in 30
Stream delivery

farhan.mohd@yahoo.co.in 31
TCP Services

farhan.mohd@yahoo.co.in 32
Sending and receiving buffers

farhan.mohd@yahoo.co.in 33
TCP Services

farhan.mohd@yahoo.co.in 34
TCP Segments

farhan.mohd@yahoo.co.in 35
TCP segments

farhan.mohd@yahoo.co.in 36
TCP Services

farhan.mohd@yahoo.co.in 37
TCP Services

farhan.mohd@yahoo.co.in 38
TCP Features

farhan.mohd@yahoo.co.in 39
Note

The bytes of data being transferred in


each connection are numbered by TCP.
The numbering starts with a randomly
generated number.

farhan.mohd@yahoo.co.in 40
Example

The following shows the sequence number for each


segment:

farhan.mohd@yahoo.co.in 41
TCP Features

farhan.mohd@yahoo.co.in 42
Note

The value in the sequence number field


of a segment defines the
number of the first data byte
contained in that segment.

farhan.mohd@yahoo.co.in 43
TCP Features

farhan.mohd@yahoo.co.in 44
TCP Segment Format

farhan.mohd@yahoo.co.in 45
TCP Segment Format

farhan.mohd@yahoo.co.in 46
TCP Segment Format

farhan.mohd@yahoo.co.in 47
TCP Segment Format

farhan.mohd@yahoo.co.in 48
TCP Segment Format

farhan.mohd@yahoo.co.in 49
A TCP Connection

farhan.mohd@yahoo.co.in 50
Connection Establishment

farhan.mohd@yahoo.co.in 51
Connection Establishment

farhan.mohd@yahoo.co.in 52
Connection establishment using three-way handshaking

farhan.mohd@yahoo.co.in 53
Connection Establishment

A SYN segment cannot carry data, but it


consumes one sequence number.

A SYN + ACK segment cannot


carry data, but does consume one
sequence number.
farhan.mohd@yahoo.co.in 54
Connection Establishment

An ACK segment, if carrying no data,


consumes no sequence number.

farhan.mohd@yahoo.co.in 55
Data Transfer

farhan.mohd@yahoo.co.in 56
Data transfer

farhan.mohd@yahoo.co.in 57
Connection Termination

The FIN segment consumes one


sequence number if it does
not carry data.
farhan.mohd@yahoo.co.in 58
Connection termination using three-way handshaking

farhan.mohd@yahoo.co.in 59
Connection Termination

The FIN + ACK segment consumes


one sequence number if it
does not carry data.

farhan.mohd@yahoo.co.in 60
Flow Control :-Sliding window

farhan.mohd@yahoo.co.in 61
Sliding Window

A sliding window is used to make


transmission more efficient as well as
to control the flow of data so that the
destination does not become
overwhelmed with data.
TCP sliding windows are byte-oriented.

farhan.mohd@yahoo.co.in 62
Sliding Window

farhan.mohd@yahoo.co.in 63
Note

Some points about TCP sliding windows:


The size of the window is the lesser of rwnd and
cwnd.
The source does not have to send a full windows
worth of data.
The window can be opened or closed by the
receiver, but should not be shrunk.
The destination can send an acknowledgment at
any time as long as it does not result in a shrinking
window.
The receiver can temporarily shut down the
window; the sender, however, can always send a
segment of 1 byte after the window is shut down.
farhan.mohd@yahoo.co.in 64
Error Control

farhan.mohd@yahoo.co.in 65
Error Control

ACK segments do not consume


sequence numbers and are not
acknowledged.

farhan.mohd@yahoo.co.in 66
Error Control

No retransmission timer is set for an


ACK segment.

farhan.mohd@yahoo.co.in 67
Error Control

Data may arrive out of order and be


temporarily stored by the receiving TCP,
but TCP guarantees that no out-of-order
segment is delivered to the process.

farhan.mohd@yahoo.co.in 68
References
Computer Networks,
Tanenbaum A (PHI)

Data Communications and Networking,


Forouzan B (TMH)

farhan.mohd@yahoo.co.in 69
farhan.mohd@yahoo.co.in 70

S-ar putea să vă placă și