Upload
rajaram-pandian
View
217
Download
0
Embed Size (px)
Citation preview
8/7/2019 Transport Layer Seminar
1/16
TRANSPORT LAYER
*TRANSPORT SERVICE
** TRANSPORT SERVICES PRIMITIVES
8/7/2019 Transport Layer Seminar
2/16
TRANSPORT SERVICE PRIMITIVES
* to allow the user to access the transport service,
the transport layer must provide some operation
to application program (ie.,)transport interface
*Each transport service has its own interface
*The connection oriented transport service is
reliable.
8/7/2019 Transport Layer Seminar
3/16
EXAMPLE
Consider two process connected by pipes in
UNIX.
They assume that the connection between them
is perfect they dont expect for the acks, lost packages,
congestion(*).
They expect only for 100% reliable connection.
Process A puts data into one end of the pipe andprocess B takes it out of the other (*)
Transport layer can also provide
unreliable(datagram) service.
8/7/2019 Transport Layer Seminar
4/16
CONTS
User mainly concentrate on connection oriented
transport service
Advantages
- transport service must be convenient andeasy to use
8/7/2019 Transport Layer Seminar
5/16
PRIMITIVES FOR SIMPLE TRANSPORT
SERVICE
Primitive Packet sent Meaning
LISTEN (none) Block until some
process ties to
connect
CONNECT CONNECTION REQ Actively attempt toestablish a
connection
SEND DATA Send info
RECEIVE (none) Block until DATA
packet arrives
DISCONNECT DISCONNECT
REQ
The side wants to
release the
connection
8/7/2019 Transport Layer Seminar
6/16
CONTS
An application with a server and number of
remote clients.
To start with the server executes a LISTEN
primitive, typically by calling a library procedurethat makes a system call to block the server until
a client turns up.
When a client wants to talk to the server, it
executes a CONNECT primitive.
The transport entity carries out this primitive by
blocking the caller and sending a packet to the
server.
8/7/2019 Transport Layer Seminar
7/16
NESTING OF TPDUS, PACKETS,AND
FRAMES
8/7/2019 Transport Layer Seminar
8/16
TPDU- TRANSPORT PROTOCOL DATA UNIT
In transport layer , even in simple unidirectional
data exchange is more complicated than at the
network layer
Every data packet sent will also beacknowledged (eventually)
The packets bearing control TPDUs are also
acknowledged, implicitly, or explicitly
The acknowledged are managed by the transportentities, using the network layer protocol, and
are not visible to the transport users.
The transport entities will need to worry About
timers and retransmissions.
8/7/2019 Transport Layer Seminar
9/16
CONTS
When a connection is no longer needed , it must
be released to free up table space within the two
transport entities.
Disconnection has two variants* asymmetric variants
* symmetric variants
o In asymmetric variants, either the transport
user can issue a DISCONNECT primitive , whichresult in a DISCONNECT TPDU being sent to
the remote transport entity
8/7/2019 Transport Layer Seminar
10/16
In symmetric variants, Each direction is closed
separately, independently of other one .
When one side DISCONNECT, that means it has
no more idea to send but still willing to acceptdata from its partner
In this model, a connection is released when both
sides have done DISCONNECT.
8/7/2019 Transport Layer Seminar
11/16
BERELEY SOCKETS
Set of transport primitives, the socket primitive s
used in Berkeley UNIX for TCP.
These primitives are widely used for internet
programming
8/7/2019 Transport Layer Seminar
12/16
PRIMITIVE MEANING
SOCKET Create a new connection end
point
BIND Attach a local address to a socket
LISTEN Announces willingness to accept
connections; give queue size
ACCEPT Block the caller until a
connection attempt arrives
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
8/7/2019 Transport Layer Seminar
13/16
The first four primitives are executed by servers.
The SOCKET primitive creates s new end point
and allocates table space for it within the
transport entity .
A newly created socket do not have network
address. These are assigned using BIND
primitive.
Once a server a bounded an address to a socket,
remote clients can connect to it.
Next listen call, which allocates space to queue
incoming for the case that several clients try to
connect at the same time .
8/7/2019 Transport Layer Seminar
14/16
When TPDU asking for a connection arrives , the
transport entity create a new socket with the
same properties as the original one and returns
a file descriptor for it.
The server can then fork off a process and thread
to handle the connection on the new socket & go
back to waiting for the next connection on the
original socket
ACCEPT returns a normal file descriptor , which
can be used for reading and writing in the
standard way, the same as for files.
8/7/2019 Transport Layer Seminar
15/16
In a client side a socket must first be created
using the SOCKET primitive, but BIND is not
required since the address used does not matter
to the server.
The CONNECT primitive blocks the caller and
activity starts the connection process.
When it completes the clients process is
unblocked and the connection is established
8/7/2019 Transport Layer Seminar
16/16
Both sides can now use SEND and RECV to
transmit and receive the data over the full-
duplex connection .
The standard UNIX -READ and WRITE systemcalls can also be used if none of the special
options of SEND & RECV are required
Connection release with sockets is symmetric.
When both sides have executed a CLOSE
primitive , the connection is released.