In comparison to TCP, UDP is a very simple protocol. Recall that UDP is connectionless, and as such doesn’t have any reliability mechanisms built in. Because of this, UDP relies on upper layer applications and services for reliability – UDP itself does nothing to attempt to make the communication process reliable. You should also remember that this isn’t UDP’s fault – as a protocol it was designed with speed in mind. If a reliable connection is required, applications should be programmed to use TCP.
Much like TCP, UDP also makes use of 65,536 port numbers to define communication endpoints. Similar to TCP, port numbers below 1024 are considered to be well defined and apply to servers, while client port numbers are usually dynamically assigned in the same way as with TCP. If you were to take a look at the list of port numbers on the IANA website, you would notice that both TCP and UDP port numbers are assigned to most services. For the most part, a service will regularly use one of TCP or UDP to communicate, and seldom both. Certain exceptions apply, such as with DNS. For regular DNS queries, UDP port 53 is used. However, for large queries and zone transfers, DNS uses TCP port 53.
The list below outlines some common UDP port numbers:
The figure below outlines the fields found in a UDP header. While a TCP header is comprised of 192 bits of information, a UDP header is considerably smaller at only 64 bits (not including data, of course).
Tip: For more information on User Datagram Protocol, see RFC 768