Unit-5 Transport and Application Layer
Unit-5 Transport and Application Layer
Transport Layer
Application layer
Transport Layer
Addressing:
• When an application (e.g., a user) process wishes to set up a
connection to a remote application process, it must specify
which one to connect to.
• 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.
• TSAP (Transport Service Access Point)- specific endpoint in
transport layer
• NSAPs(Network Service Access Points)- specific endpoint in
Network layer. IP addresses are examples of NSAPs.
A possible scenario for a transport connection is as follows:
• A mail server process attaches itself to TSAP 1522 on host 2
to wait for an incoming call. How a process attaches itself to a
TSAP is out- side the networking model and depends entirely
on the local operating system. A call such as our LISTEN might
be used, for example.
• An application process on host 1 wants to send an email
message, so it attaches itself to TSAP 1208 and issues a
CONNECT request. The request specifies TSAP 1208 on host 1
as the source and TSAP 1522 on host 2 as the destination.
This action ultimately results in a transport connection being
established between the application process and the server.
• The application process sends over the mail message.
• The mail server responds to say that it will deliver the
message.
• The transport connection is released.
Connection Establishment:
• Establishing a connection sounds easy, but it is actually
surprisingly tricky.
• At first glance, it would seem sufficient for one transport
entity to just send a CONNECTION REQUEST segment to the
destination and wait for a CONNECTION ACCEPTED reply.
• The problem occurs when the network can lose, delay,
corrupt, and duplicate packets.
• To solve this problem, Tomlinson (1975) introduced the
three-way handshake.
• The normal setup procedure when host 1 initiates is shown
in Fig. 6-11(a).
• Host 1 chooses a sequence number, x, and sends a
CONNECTION REQUEST segment containing it to host 2.
• Host 2 replies with an ACK segment acknowledging x and
announcing its own initial sequence number, y.
• Finally, host 1 acknowledges host 2’s choice of an initial
sequence number in the first data segment that it sends.
• In Fig. 6-11(b), the first segment is a delayed duplicate
• CONNECTION REQUEST from an old connection. This segment
arrives at host 2 without host 1’s knowledge.
• Host 2 reacts to this segment by sending host 1 an ACK
segment.
• When host 1 rejects host 2’s attempt to establish a connection,
host 2 realizes that it was tricked by a delayed duplicate and
abandons the connection. In this way, a delayed duplicate does
no damage.
• The worst case is when both a delayed CONNECTION REQUEST
and an ACK are floating around in the subnet(Fig.6-11(c))
Connection Release:
• Releasing a connection is easier than establishing one.
• Asymmetric release is the way the telephone system works: when
one party hangs up, the connection is broken.
• Symmetric release treats the connection as two separate
unidirectional connections and requires each one to be released
separately
• In Fig. 6-14(a), we see the normal case in which one
of the users sends a DR (DISCONNECTION REQUEST)
segment to initiate the connection release. When it
arrives, the recipient sends back a DR segment and
starts a timer, just in case its DR is lost.
• When this DR arrives, the original sender sends back
an ACK segment and releases the connection. Finally,
when the ACK segment arrives, the receiver also
releases the connection.
• Releasing a connection means that the transport
entity removes the information about the
connection from its table of currently open
connections
THE INTERNET TRANSPORT PROTOCOLS: UDP
and TCP
• The Internet has two main protocols in the transport
layer, a connectionless protocol and a connection-
oriented one.
• The protocols complement each other. The
connectionless protocol is User Datagram
Protocol(UDP).
• The connection-oriented protocol is Transmission
Control Protocol(TCP).
UDP(user datagram protocol)
Headers Headers
A blank line A blank line
End-to-end method
Store-and- forward method