Sometimes the reliability associated with TCP is not required or the overhead associated with providing this reliability is not suitable for the application. This is where UDP is used.
UDP Low Overhead Versus Reliability (26.7.1)
As previously explained, UDP is perfect for communications that need to be fast, like VoIP. This topic explains in detail why UDP is perfect for some types of transmissions. As shown in Figure 26-30, UDP does not establish a connection. UDP provides low-overhead data transport because it has a small datagram header and no network management traffic.
Figure 26-30 Connectionless Transport Between Sender and Receiver
UDP Datagram Reassembly (26.7.2)
Like segments with TCP, when UDP datagrams are sent to a destination, they often take different paths and arrive in the wrong order. UDP does not track sequence numbers the way TCP does. UDP has no way to reorder the datagrams into their transmission order, as shown in Figure 26-31.
Therefore, UDP simply reassembles the data in the order that it was received and forwards it to the application. If the data sequence is important to the application, the application must identify the proper sequence and determine how the data should be processed.
Figure 26-31 UDP: Connectionless and Unreliable
UDP Server Processes and Requests (26.7.3)
Like TCP-based applications, UDP-based server applications are assigned well-known or registered port numbers, as shown in Figure 26-32. When these applications or processes are running on a server, they accept the data matched with the assigned port number. When UDP receives a datagram destined for one of these ports, it forwards the application data to the appropriate application based on its port number.
Figure 26-32 UDP Server Listening for Requests
Note
The Remote Authentication Dial-In User Service (RADIUS) server shown Figure 26-32 provides authentication, authorization, and accounting services to manage user access. The operation of RADIUS is beyond the scope for this book.
As with TCP, client/server communication is initiated by a client application that requests data from a server process. The UDP client process dynamically selects a port number from the range of port numbers and uses this as the source port for the conversation. The destination port is usually the well-known or registered port number assigned to the server process.
After a client has selected the source and destination ports, the same pair of ports is used in the header of all datagrams in the transaction. For the data returning to the client from the server, the source and destination port numbers in the datagram header are reversed.
The example presented in Figures 26-33 through 26-37 demonstrates the sequence that occurs when two hosts are simultaneously requesting services from the DNS and RADIUS authentication server.
In Figure 26-33, Client 1 is sending a DNS request to the server and Client 2 is requesting RADIUS authentication services from the same server.
Figure 26-33 Clients Sending UDP Requests
In Figure 26-34, Client 1 is sending a DNS request using the well-known destination port 53 while Client 2 is requesting RADIUS authentication services using the registered destination port 1812.
Figure 26-34 UDP Request Destination Ports
The requests of the clients dynamically generate source port numbers. In this case, Client 1 is using source port 49152 and Client 2 is using source port 51152, as shown in Figure 26-35.
Figure 26-35 UDP Request Source Ports
When the server responds to the client requests, it reverses the destination and source ports of the initial request, as shown in Figures 26-36 and 26-37. In the server response to the DNS request, the destination port now is 49152, and in the server response to the RADIUS authentication request, the destination port now is 51152, as shown in Figure 26-36.
Figure 26-36 UDP Response Destination
The source ports in the server response are the original destination ports in the initial requests, as shown in Figure 26-37.
Figure 26-37 UDP Response Source Ports
Check Your Understanding—UDP Communication (26.7.5)
Refer to the online course to complete this activity.