The user datagram protocol (UDP) is used primarily for real-time communications and in situations where speed matters. The UDP header size is 8 bytes compared to 20 in TCP. A UDP packet does not have segment acknowledgment and is usually much faster, since it is a connectionless protocol. Also, error checking is still a part of UDP, but no reporting of errors takes place. A common example of UDP is Voice over Internet Protocol (VoIP). Comparing to the structure we discussed in the very beginning of the chapter, we have the following structure for UDP:
We can see that we have so many fields reduced and primarily have only the Source Port, Destination Port, Length, and Checksum fields. Let's validate this by analyzing a UDP packet in Wireshark:
We can see that we have certain fields as mentioned in the preceding diagram. Additionally, we can...