User Datagram Protocol
The User Datagram Protocol (UDP) is one ofthe core members of the Internet protocol suite. The protocol was designed by David P. Reed in 1980 and formally defined in RFC 768.
UDP uses a simple connectionless transmission model with a minimum of protocol mechanism. It has no handshaking dialogues, and thus exposes the user’s program to any unreliability of the underlying network protocol. There is no guarantee of delivery, ordering, or duplicate protection. UDP provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram.
With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without prior communications to set up special transmission channels or data paths. UDP is suitable for purposes where error checking and correction is either not necessary or is performed in the application, avoiding the overhead of such processing atthe network interface level. Time-sensitive applications often use UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system. If error correction facilities are needed atthe network interface level, an application may use the Transmission Control Protocol (TCP) or Streaming Control Transmission Protocol (SCTP) which are designed for this purpose.
Packet structure
UDP is a minimal message-oriented Transport Layer protocol that is documented in IETF RFC 768.
UDP provides no guarantees to the upper layer protocol for message delivery and the UDP layer retains no state of UDP messages once sent. For this reason, UDP sometimes is referred to as Unreliable Datagram Protocol.
UDP provides application multiplexing (via port numbers) and integrity verification (via checksum) of the header and payload. If transmission reliability is desired, it must be implemented in the user’s application.
The UDP header consists of 4 fields, each of which is 2 bytes (16 bits). The use of the fields “Checksum” and “Source port” is optional in IPv4. In IPv6 only the source port is optional.
- Source port number: This field identifies the sender’s port when meaningful and should be assumed to be the port to reply to if needed. If not used, then it should be zero. If the source host is the client, the port number is likely to be an ephemeral port number.
- Destination port number: This field identifies the receiver’s port and is required. Similar to source port number, if the client is the destination host then the port number will likely be an ephemeral port number and if the destination host is the server then the port number will likely be a well-known port number.
- Length: A field that specifies the length in bytes of the UDP header and UDP data. The minimum length is 8 bytes because that is the length of the header. The field size sets a theoretical limit of 65,535 bytes (8 byte header + 65,527 bytes of data) for a UDP datagram. The practical limit for the data length which is imposed by the underlying IPv4 protocol is 65,507 bytes (65,535 – 8 byte UDP header – 20 byte IP header).
- Checksum: The checksum field may be used for error-checking of the header and data. This field is optional in IPv4, and mandatory in IPv6. The field carries all-zeros if unused.
Reliability and congestion control solutions
Lacking reliability, UDP applications must generally be willing to accept some loss, errors or duplication. Some applications, such as TFTP, may add rudimentary reliability mechanisms into the application layer as needed.
Most often, UDP applications do not employer liability mechanisms and may even be hindered by them. Streaming media, real-time multiplayer games and voice over IP (VoIP) are examples of applications that often use UDP. In the separticular applications, loss of packets is not usually a fatal problem. If anapplication requires a high degree of reliability, a protocol such as the Transmission Control Protocol may be used instead.
From: https://en.wikipedia.org/wiki/User_Datagram_Protocol
'Computer Science > Terminology' 카테고리의 다른 글
Stateful Firewall (0) | 2018.03.30 |
---|---|
Packet-filtering Firewall (0) | 2018.03.30 |
Transmission Control Protocol (TCP) (0) | 2018.03.30 |
Internet Protocol (IP) (0) | 2018.03.30 |
Protocol (0) | 2018.03.30 |