User Datagram Protocol (UDP) Overview and Functioning, Exercises of Data Communication Systems and Computer Networks

The user datagram protocol (udp) is a transport layer protocol defined by the us department of defence for use with the ip network layer. It provides an unreliable best-effort datagram service with no guarantees for delivery or protection from duplication. Udp packets can be sent without establishing a connection, and the header consists of four fields: source port, destination port, udp length, and udp checksum. Udp does not make any provision for error reporting and relies on the ip layer for delivery. Well-known port numbers are used for different applications such as ftp, telnet, and smtp.

Typology: Exercises

2011/2012

Uploaded on 07/30/2012

bassu
bassu 🇮🇳

4.5

(42)

141 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
The User Datagram Protocol (UDP)
The User Datagram Protocol (UDP) is a transport layer protocol originally defined by the
US Department of Defence (DoD) for use with the IP network layer protocol. It is
defined by RFC 768 written by John Postel. It provides a best-effort datagram service to
an End System (IP host).
The service provided by UDP is an unreliable service that provides no guarantees for
delivery and no protection from duplication (e.g. if this arises due to software errors
within an Intermediate System (IS)). The simplicity of UDP reduces the overhead from
using the protocol and the services may be adequate in many cases.
A computer may send UDP packets without first establishing a connection to the
recipient. The computer completes the appropriate fields in the UDP header (PCI) and
forwards the data together with the header for transmission by the IP network layer.
The UDP protocol header consists of 8 bytes of Protocol Control Information (PCI)
The UDP header consists of four fields each of 2 bytes in length:
Source Port (UDP packets from a client use this as a service access point (SAP)
to indicate the session on the local client that originated the packet. UDP packets
from a server carry the server SAP in this field)
Destination Port (UDP packets from a client use this as a service access point
(SAP) to indicate the service required from the remote server. UDP packets from
a server carry the client SAP in this field)
UDP length (The number of bytes comprising the combined UDP header
information and payload data)
UDP Checksum (A checksum to verify that the end to end data has not been
corrupted by routers or bridges in the network or by the processing in an end
system. The algorithm to compute the checksum is the Standard Internet
Checksum algorithm. If this check is not required, the value of 0x0000 is placed
in this field, in which case the data is not checked by the receiver.)
Like for other transport protocols, the UDP header and data are not processed by
Intermediate Systems (IS) in the network, and are delivered to the final destination in the
same form as originally transmitted.
At the final destination, the UDP protocol layer receives packets from the IP network
layer. These are checked using the checksum (when >0, this checks correct end-to-end
docsity.com
pf3

Partial preview of the text

Download User Datagram Protocol (UDP) Overview and Functioning and more Exercises Data Communication Systems and Computer Networks in PDF only on Docsity!

The User Datagram Protocol (UDP)

The User Datagram Protocol (UDP) is a transport layer protocol originally defined by the US Department of Defence (DoD) for use with the IP network layer protocol. It is defined by RFC 768 written by John Postel. It provides a best-effort datagram service to an End System (IP host).

The service provided by UDP is an unreliable service that provides no guarantees for delivery and no protection from duplication (e.g. if this arises due to software errors within an Intermediate System (IS)). The simplicity of UDP reduces the overhead from using the protocol and the services may be adequate in many cases.

A computer may send UDP packets without first establishing a connection to the recipient. The computer completes the appropriate fields in the UDP header (PCI) and forwards the data together with the header for transmission by the IP network layer.

The UDP protocol header consists of 8 bytes of Protocol Control Information (PCI)

The UDP header consists of four fields each of 2 bytes in length:

Source Port (UDP packets from a client use this as a service access point (SAP) to indicate the session on the local client that originated the packet. UDP packets from a server carry the server SAP in this field)  Destination Port (UDP packets from a client use this as a service access point (SAP) to indicate the service required from the remote server. UDP packets from a server carry the client SAP in this field)  UDP length (The number of bytes comprising the combined UDP header information and payload data)  UDP Checksum (A checksum to verify that the end to end data has not been corrupted by routers or bridges in the network or by the processing in an end system. The algorithm to compute the checksum is the Standard Internet Checksum algorithm. If this check is not required, the value of 0x0000 is placed in this field, in which case the data is not checked by the receiver.)

Like for other transport protocols, the UDP header and data are not processed by Intermediate Systems (IS) in the network, and are delivered to the final destination in the same form as originally transmitted.

At the final destination, the UDP protocol layer receives packets from the IP network layer. These are checked using the checksum (when >0, this checks correct end-to-end

operation of the network service) and all invalid PDUs are discarded. UDP does not make any provision for error reporting if the packets are not delivered. Valid data are passed to the appropriate session layer protocol identified by the source and destination port numbers (i.e. the session service access points).

Generally, clients set the source port number to a unique number that they choose themselves - usually based on the program that started the connection. Since this number is returned by the server in responses, this lets the sender know which "conversation" incoming packets are to be sent to. The destination port of packets sent by the client is usually set to one of a number of well-known ports. These usually correspond to one of a number of different applications, e.g. port 23 is used for telnet, and port 80 is used for web servers.

A server process (program), listens for UDP packets received with a particular well- known port number and tells its local UDP layer to send packets matching this destination port number to the server program. It determines which client these packets come from by examining the received IP source address and the received unique UDP source port number. Any responses which the server needs to send to back to a client are sent with the source port number of the server (the well-known port number) and the destination port selected by the client. Most people do not memorise the well known ports, instead they look them up in table (e.g. see below).

20 FTP-DATA File Transfer [Default Data] 21 FTP File Transfer [Control] 23 TELNET Telnet 25 SMTP Simple Mail Transfer 37 TIME Time 69 TFTP Trivial File Transfer 79 FINGER Finger 110 POP3 Post Office Protocol v 3 123 NTP Network Time Protocol 143 IMAP2 Interim Mail Access Prot. v