Side_1_360

(Dana P.) #1

(destination unreachable, packet too big, time
exceeded, parameter problem) and informational
messages (echo request, echo reply).


4 User Datagram Protocol



  • UDP
    Avoiding addressing each of the processes util-
    ising IP explicitly, protocol port numbers are
    introduced as explained in Section 6. Each pro-
    tocol port is identified by an integer. To commu-
    nicate with a remote process, the destination IP
    address and port number of the process have to
    be known. Then, for a connectionless protocol
    this information has to be included in every mes-
    sage. Hence, while IP addresses commonly refer
    to machines/IP layer processes, further identi-
    fiers must be used to identify the transport pro-
    cess.


Two protocols dominate in the transport layer;
Transmission Control Protocol (TCP) and User
Data Protocol (UDP). The former is connection-
oriented while the latter is connectionless.


Simplified, UDP can be seen as placing a short
header in front of the user data before putting it
into an IP packet. Hence, the User Datagram
Protocol, UDP, is seen as one of the simplest
transport protocols utilising IP. The format of
the UDP header is depicted in Figure 7.


As depicted, the UDP header is divided into four
16 bit fields. The Sourceand Destination ports
identify the UDP processes at the two ends (fill-
ing in the Source port is optional). The Length
field gives the number of bytes in the UDP
packet (sum of header and data). The UDP
checksumfield can be used to detect bit errors
introduced in the header and user data. A pseudo
header is added before the checksum is calcu-
lated allowing the receiving process to check
that the correct destination and protocol port
have been used.


Examining the fields in the UDP header, it is
recognised that UDP provides an unreliable con-
nectionless delivery service based on IP. How-
ever, UDP adds the ability to multiplex several
processes on a given host, see Figure 8.


5 Transmission Control


Protocol – TCP


Several applications are asking for more reliable
transfers than UDP can provide. For those, TCP
can be used. TCP provides a reliable transfer ser-
vice, as packet loss does not need to be dealt
with by the application. Two basic features are
part of TCP; acknowledgement of transferred
data, and window for unacknowledged data
units. The former makes sure that the data is cor-
rectly transferred by explicitly giving acknowl-
edgements. Introducing windows on the sender


side allows a number of packets to be sent
before being acknowledged, increasing the utili-
sation of the network. In contrast to UDP, TCP
is connection-oriented. That is, prior to sending
data a TCP connection is established between
the two end-points.

TCP was specified to support a dependable flow
of user data to be carried by IP packets, that is,
over an unreliable network. TCP was initially
defined in [RFC793], and some corrections and
extensions described in [RFC1122] and
[RFC1323], respectively. A TCP entity com-
monly accepts a flow of user data and divides it
into packets smaller than 64 kbytes (commonly
1500 bytes are used), and sends each packet to
the IP entity. As a network has its maximum
transfer unit (MTU), this value is commonly
respected by the TCP entity when deciding upon
the packet size in order to avoid fragmentation
in the IP layer. At the receiver side, the IP packet
is transferred to the TCP entity that reconstructs
the original user data flow.

TCP uses a sliding window mechanism for effi-
cient transmission and flow control. Sending
multiple packets before an acknowledgement
has to arrive at the sender increases the transfer
rate and therefore the link utilisation. As the
window has a limited width, it can also be used
to limit the data volume that can be sent and
therefore the transfer rate. The window size to
use depends on conditions in the network or the
receiver (controlled by reporting on window
width to be used and delaying acknowledge-
ments). Moreover, as the sender is adjusting the
window width based on the packet dropping
(lack of timely acknowledgements), dropping
packets in the network during congestion will
also limit the sender’s transmission rate. Figure 7 UDP header format

Figure 8 UDP demultiplexing
based on port numbers

Destination port
UDP checksum

01631
Source port
Length

Port i Port j Port k

IP

UDP-
demultiplexing
Free download pdf