Lecture 4.1 Transport Layer - Process-to-Process Delivery
Lecture 4.1 Transport Layer - Process-to-Process Delivery
Transport Layer
The Internet model has three protocols at the transport layer: UDP, TCP, and
SCTP.
The data link layer is responsible for delivery of frames between two
neighboring nodes over a link. This is called node-to-node delivery. The
network layer is responsible for delivery of datagrams between two hosts.
This is called host-to-host delivery. Communication on the Internet is not
defined as the exchange of data between two nodes or between two hosts. Real
communication takes place between two processes. So that we need process-
to-process delivery.
However, at any moment, several processes may be running on the source
host and several on the destination host. To complete the delivery, we need a
mechanism to deliver data from one of these processes running on the source
host to the corresponding process running on the destination host.
Transport Layer
1. Client/Server Paradigm
2. Multiplexing and Demultiplexing
3. Connectionless Versus Connection-Oriented Service
4. Reliable Versus Unreliable
5. Three Protocols
Process-to-Process Delivery
1. Client/Server Paradigm
1. Client/Server Paradigm
1. Local host
2. Local process
3. Remote host
4. Remote process
Process-to-Process Delivery - Client/Server Paradigm
2. Addressing
Whenever we need to deliver something to one specific destination among
many, we need an address. At the data link layer, we need a MAC
address to choose one node among several nodes if the connection is not
point-to-point. A frame in the data link layer needs a destination MAC
address for delivery and a source address for the next node's reply.
At the network layer, we need an IP address to choose one host among
millions. A datagram in the network layer needs a destination IP address for
delivery and a source IP address for the destination's reply.
At the transport layer, we need a transport layer address, called a port
number, to choose among multiple processes running on the destination
host. The destination port number is needed for delivery; the source port
number is needed for the reply.
Process-to-Process Delivery - Client/Server Paradigm
2. Addressing
In the Internet model, the port numbers are 16-bit integers between 0 and
65,535. The client program defines itself with a port number, chosen
randomly by the transport layer software running on the client host. This is
the ephemeral port number.
Ephemeral port number: An ephemeral port is a temporary
communication hub used for Internet Protocol (IP) communications. It is
created from a set range of port numbers by the IP software and used as an
end client's port assignment in direct communication with a well-known
port used by a server.
Ephemeral port number : For example, file server service is on port 445,
HTTPS is 443, HTTP is 80, and RPC is 135
Process-to-Process Delivery - Client/Server Paradigm
2. Addressing
The server process must also define itself with a port number. This port
number, however, cannot be chosen randomly. If the computer at the server
site runs a server process and assigns a random number as the port number,
the process at the client site that wants to access that server and use its
services will not know the port number.
Every client process knows the well-known port number of the
corresponding server process. For example, while the Daytime client
process, discussed above, can use an ephemeral (temporary) port number
52,000 to identify itself, the Daytime server process must use the well-
known (permanent) port number 13.
Process-to-Process Delivery - Client/Server Paradigm
2. Addressing
A daytime service simply sends a the
current date and time as a character
string without regard to the input. A
server listens for TCP connections on
TCP port 13.
2. Addressing
The IP addresses and port numbers play different roles in selecting the
final destination of data. The destination IP address defines the host
among the different hosts in the world. After the host has been selected,
the port number defines one of the processes on this particular host
Process-to-Process Delivery - Client/Server Paradigm
3. lANA Ranges
The lANA (Internet Assigned Number Authority) has divided the port
numbers into three ranges: well known, registered, and dynamic (or
private)
Process-to-Process Delivery - Client/Server Paradigm
3. lANA Ranges
Well-known ports. The ports ranging from 0 to 1023 are assigned and
controlledby lANA.
Registered ports. The ports ranging from 1024 to 49,151 are not assigned
orcontrolled by lANA
Dynamic ports. The ports ranging from 49,152 to 65,535 are neither
controllednor registered. They can be used by any process. These are the
ephemeral ports.
Process-to-Process Delivery - Client/Server Paradigm
4. Socket Addresses
Multiplexing
At the sender site, there may be several processes that need to send packets.
However, there is only one transport layer protocol at any time. This is a many-
to-one relationship and requires multiplexing.
Demultiplexing
Three Protocols
UDP packets, called user datagrams, have a fixed-size header of 8 bytes. Figure
4.9 shows the format of a user datagram.
Source port number. This is the port number used by the process running
on the source host. It is 16 bits long, which means that the port number can
range from 0 to 65,535.
USER DATAGRAM PROTOCOL (UDP)
2. User Datagram
Destination port number. This is the port number used by the process
running on the destination host. It is also 16 bits long.
Length. This is a 16-bit field that defines the total length of the user
datagram, headerplus data. The 16 bits can define a total length of 0 to
65,535 bytes.
UDP length = IP length - IP header's length
Checksum. This field is used to detect errors over the entire user datagram
(header plus data).
USER DATAGRAM PROTOCOL (UDP)
3. Checksum
The UDP checksum calculation is different from the one for IP and ICMP. Here
the checksum includes three sections: a pseudoheader, the UDP header, and the
data coming from the application layer
http://aboelela.site/profile/projects/net-seal/animations/tcp-connections/
https://www.brainkart.com/article/User-Datagram-Protocol-(UDP)_13485/