The Transport Service
The Transport Service
➢ To make the issue of transport service more concrete, we will examine two sets of
➢ First comes a simple (but hypothetical) one to show the basic ideas.
➢ 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 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
➢ In both cases, connections have three phases: establishment, data transfer, and
release.
connection to send a single packet and then tear it down immediately afterwards.
➢ The transport code runs entirely on the users’ machines, but the network layer
largely runs on the routers, which are operated by the carrier (at least for a wide area
network).
problem of poor service by using better routers or putting more error handling in the
➢ The only possibility is to put on top of the network layer another layer that improves
➢ If, in a connectionless network, packets are lost or mangled, the transport entity can
a long transmission that its network connection has been abruptly terminated, with
no indication of what has happened to the data currently in transit, it can set up a
➢ Using this new network connection, it can send a query to its peer asking which data
arrived and which did not, and knowing where it was, pick up from where it left off.
➢ In essence, the existence of the transport layer makes it possible for the transport
service to be more reliable than the underlying network, which may not be all that
reliable.
➢ The network service calls may vary considerably from one network to another (e.g.,
changing the network merely requires replacing one set of library procedures with
another one that does the same thing with a different underlying service.
➢ Thanks to the transport layer, application programmers can write code according to
a standard set of primitives and have these programs work on a wide variety of
networks, without having to worry about dealing with different network interfaces
➢ If all real networks were flawless and all had the same service primitives and were
guaranteed never, ever to change, the transport layer might not be needed.
➢ However, in the real world it fulfills the key function of isolating the upper layers
➢ For this reason, many people have made a qualitative distinction between layers one
through four on the one hand and layer(s) above four on the other.
➢ The bottom four layers can be seen as the transport service provider, whereas the
➢ This distinction of provider versus user has a considerable impact on the design of
the layers and puts the transport layer in a key position, since it forms the major
boundary between the provider and user of the reliable data transmission service.
➢ To allow users to access the transport service, the transport layer must provide some
simple (hypothetical) transport service and its interface to see the bare essentials.
➢ The transport service is similar to the network service, but there are also some
important differences.
➢ The main difference is that the network service is intended to model the service
➢ Real networks can lose packets, so the network service is generally unreliable.
➢ Of course, real networks are not error-free, but that is precisely the purpose of the
➢ Process A puts data into one end of the pipe, and process B takes it out of the other.
imperfections of the network service so that user processes can just assume the
existence of an error-free bit stream even when they are on different machines
➢ As an aside, the transport layer can also provide unreliable (datagram) service.
➢ A second difference between the network service and transport service is whom the
➢ From the perspective of network endpoints, the network service is used only by the
transport entities.
➢ Few users write their own transport entities, and thus few users or programs ever
➢ In contrast, many programs (and thus programmers) see the transport primitives.
➢ To get an idea of what a transport service might be like, consider the five primitives
➢ This transport interface is truly bare bones, but it gives the essential flavor of what
➢ To see how these primitives might be used, consider an application with a server and
➢ 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.
➢ The transport entity carries out this primitive by blocking the caller and sending a
➢ Encapsulated in the payload of this packet is a transport layer message for the
➢ A quick note on terminology is now in order. For lack of a better term, we will use
the 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
➢ That term is not used much any more now but you may see it in older papers and
books.
➢ Thus, segments (exchanged by the transport layer) are contained in packets (which
➢ In turn, these packets are contained in frames (exchanged by the data link layer).
➢ When a frame arrives, the data link layer processes the frame header and, if the
destination address matches for local delivery, passes the contents of the frame
➢ Getting back to our client-server example, the client’s CONNECT call causes a
➢ When it arrives, the transport entity checks to see that the server is blocked on a
LISTEN (i.e., is ready to handle requests). If so, it then unblocks the server and sends
➢ When this segment arrives, the client is unblocked and the connection is established.
➢ Data can now be exchanged using the SEND and RECEIVE primitives.
➢ In the simplest form, either party can do a (blocking)RECEIVE to wait for the other
party to do a SEND.
➢ As long as both sides can keep track of whose turn it is to send, this scheme works
fine.
➢ The packets bearing control segments are also acknowledged, implicitly or explicitly.
➢ These acknowledgements are managed by the transport entities, using the network
➢ Similarly, the transport entities need to worry about timers and retransmissions.
➢ To the transport users, a connection is a reliable bit pipe: one end stuffs bits in and
➢ This ability to hide complexity is the reason that layered protocols are such a
powerful tool.
within the two transport entities. 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.
other one.
➢ When one side does a DISCONNECT, that means it has no more data to send but it is
➢ In this model, a connection is released when both sides have done a DISCONNECT.
➢ Each transition is triggered by some event, either a primitive executed by the local
➢ We also assume that a symmetric disconnection model is used, with the client going
first.
➢ We will look at more realistic models later on when we describe how TCP works.