Module 4
Module 4
Module 4
Transport Layer :
Together with the network layer, the transport layer is the heart of the protocol hierarchy. The network
layer provides end-to-end packet delivery using datagrams or virtual circuits.
The transport layer builds on the network layer to provide data transport from a process on a source
machine to a process on a destination machine with a desired level of reliability that is independent of the
physical networks currently in use. It provides the abstractions that applications need to use the network.
The ultimate goal of the transport layer is to provide efficient, reliable, and cost-effective data transmission
service to its users, normally processes in the application layer. To achieve this, the transport layer makes
use of the services provided by the network layer. The software and/or hardware within the transport
layer that does the work is called the transport entity. The transport entity can be located in the operating
system kernel, in a library package bound into network applications, in a separate user process, or even on
the network interface card. The first two options are most common on the Internet.
The (logical) relationship of the network, transport, and application layers is illustrated in Fig. 6-1
The transport code runs entirely on the users’ machines, but the network layer mostly runs on the
routers, which are operated by the carrier (at least for a wide area network)
To see how these primitives might be used, consider an application with a server and a number of
remote clients. To start with, the server executes a LISTEN primitive, typically by calling a library
procedure that makes a system call that blocks 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. Encapsulated in the payload of
this packet is a transport layer message for the server’s transport entity
Note :
term segment for messages sent from transport entity to transport entity. TCP, UDP and other Internet
protocols use this term. Some older protocols used the ungainly name TPDU (Transport Protocol Data Unit).
Thus, segments (exchanged by the transport layer) are contained in packets (exchanged by the network
layer). In turn, these packets are contained in frames (exchanged by the data link layer).
Disconnection has two variants: asymmetric and symmetric. In the asymmetric
variant, either transport user can issue a DISCONNECT primitive, which results in a
DISCONNECT segment being sent to the remote transport entity. Upon its arrival, the
connection is released. In the symmetric variant, each direction is closed separately,
independently of the other one. When one side does a DISCONNECT, that means it
has no more data to send but it is still willing to accept data from its partner. In this
model, a connection is released when both sides have done a DISCONNECT
The socket primitives as they are used for TCP. Sockets were first released as part of
the Berkeley UNIX 4.2BSD
The primitives are now widely used for Internet programming on many operating
systems, especially UNIX-based systems, and there is a socket-style API for Windows
called ‘‘winsock.’
The method normally used is to define transport addresses to which processes can
listen for connection requests. In the Internet, these endpoints are called ports.
• We will use the generic term TSAP (Transport Service Access Point) to mean a
specific endpoint in the transport layer.
• The analogous endpoints in the network layer (i.e., network layer addresses) are
not-surprisingly called NSAPs (Network Service Access Points).
• Application processes, both clients and servers, can attach themselves to a local
TSAP to establish a connection to a remote TSAP
Packet lifetime can be restricted to a known maximum using one (or more) of the
following techniques:
1. Restricted network design.
2. Putting a hop counter in each packet.
3. Timestamping each packet.
• Once both transport entities have agreed on the initial sequence number, any
sliding window protocol can be used for data flow control.
• . Within a connection, a timestamp is used to extend the 32-bit sequence number
so that it will not wrap within the maximum packet lifetime, even for gigabit-per-
second connections
This mechanism is a fix to TCP that was needed as it was used on faster and faster
links. It is described in RFC 1323 and called PAWS (Protection Against Wrapped
Sequence numbers).
• Across connections, for the initial sequence numbers and before PAWS can come
into play, TCP originally used the clock-based scheme just described.
However, it remains important that the initial sequence numbers not repeat for an
interval even though they appear random to an observer.