UDP-Lite

Last updated

UDP-Lite (Lightweight User Datagram Protocol) is a connectionless protocol that allows a potentially damaged data payload to be delivered to an application rather than being discarded by the receiving station. This is useful as it allows decisions about the integrity of the data to be made in the application layer (application or the codec), where the significance of the bits is understood. UDP-Lite is described in RFC   3828.

Contents

Protocol

UDP-Lite is based on User Datagram Protocol (UDP), but unlike UDP, where either all or none of a packet is protected by a checksum, UDP-Lite allows for partial checksums that only covers part of a datagram (an arbitrary count of octets at the beginning of the packet), and will therefore deliver packets that have been partially corrupted. It is designed for multimedia protocols, such as Voice over IP (VoIP) or streamed video, in which receiving a packet with a damaged payload is better than receiving no packet at all. For conventional UDP and Transmission Control Protocol (TCP), a single bit in error will cause a "bad" checksum, meaning that the whole packet must be discarded: in this way, bit errors are "promoted" to entire packet errors even where the damage to the data is trivial. For computing the checksum UDP-Lite uses the same checksum algorithm used for UDP (and TCP). [1]

Modern multimedia codecs, like G.718 and Adaptive Multi-Rate (AMR) for audio and H.264 and MPEG-4 for video, have resilience features already built into the syntax and structure of the stream. This allows the codec to (a) detect errors in the stream and (b) potentially correct, or at least conceal, the error during playback. These codecs are ideal partners for UDP-Lite, since they are designed to work with a damaged data stream, and it is better for these codecs to receive perhaps 200 bytes where a few bits are damaged rather than have to conceal the loss of an entire packet that was discarded due to a bad checksum. The application layer understands the significance of the data, where the transport only sees UDP packets. This means that error protection can be added if necessary at a higher layer, for example with a forward error correction scheme. The application is the best place to decide which parts of the stream are most sensitive to error and protect them accordingly, rather than have a single "brute force" checksum that covers everything equally. An example of this can be seen in research by Hammer et al. where UDP-Lite is coupled with the AMR codec to give improved speech quality in lossy network conditions. [2]

Since most modern link layers protect the carried data with a strong cyclic redundancy check (CRC) and will discard damaged frames, making effective use of UDP Lite requires the link layer to be aware of the network layer data being carried. Since no current IP stacks implement such cross-layer interactions, making effective use of UDP-Lite currently requires specially modified device drivers.[ citation needed ]

The IP protocol identifier is 136. UDP-Lite uses the same set of port numbers assigned by the Internet Assigned Numbers Authority (IANA) for use by UDP.

Support for UDP-Lite was added in the Linux kernel version 2.6.20.

Support for UDP-Lite was added in the FreeBSD kernel from r264212. [3] The changeset was also MFC'ed back to stable/10 [4] and became available in FreeBSD 10.1-RELEASE. [5]

The BSD socket API is extended to support UDP-Lite by the third parameter of the socket system call: Set it to IPPROTO_UDPLITE to request a UDP-Lite socket: [6]

intfd=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDPLITE);

One can also easily set what part of the packet will be covered by the checksum (starting from the beginning including header):

intval=20;/* 8 octets of header + 12 octets of the application protocol. */(void)setsockopt(fd,SOL_UDPLITE,UDPLITE_SEND_CSCOV,&val,sizeofval);

If a packet smaller than 12 octets is sent in such a setup, the checksum will cover the whole packet.

On the receiving side a socket will by default drop all packets which are not covered completely (UDP emulation.) To permit for smaller coverage one can use:

intval=20;/* 8 octets of header + 12 octets of the application protocol. */(void)setsockopt(fd,SOL_UDPLITE,UDPLITE_RECV_CSCOV,&val,sizeofval);

This will allow for packets where at minimum 12 octets of user data are checksummed. Any packet with a smaller coverage will be silently dropped as bad. If a packet has a coverage length of at least 20 octets (including header) and its checksum is correct, it will be delivered to application (whole or part of the payload can still be corrupted, because it could be not covered by checksum or because the checksum was correct incidentally, but the latter is very unlikely.) If the checksum is incorrect the packet will be dropped, because it is actually impossible to know if the error was inside the payload data or in the UDP-Lite header, so the packet could actually be destined for a different program.

The smallest possible coverage is 8 octets. Headers need to be included in checksum. Packets with a smaller length of coverage will always be dropped independent of any settings (ignoring sniffers which are interested in all traffic) as not conforming to standard.

Support

UDP-Lite is supported by the following operating systems:

Related Research Articles

The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet protocol suite. It is used by network devices, including routers, to send error messages and operational information indicating success or failure when communicating with another IP address, for example, an error is indicated when a requested service is not available or that a host or router could not be reached. ICMP differs from transport protocols such as TCP and UDP in that it is not typically used to exchange data between systems, nor is it regularly employed by end-user network applications.

<span class="mw-page-title-main">Internet Protocol version 4</span> Fourth version of the Internet Protocol

Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version deployed for production on SATNET in 1982 and on the ARPANET in January 1983. It is still used to route most Internet traffic today, even with the ongoing deployment of Internet Protocol version 6 (IPv6), its successor.

<span class="mw-page-title-main">IPv6</span> Version 6 of the Internet Protocol

Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion, and was intended to replace IPv4. In December 1998, IPv6 became a Draft Standard for the IETF, which subsequently ratified it as an Internet Standard on 14 July 2017.

The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet.

In computer networking, the maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single network layer transaction. The MTU relates to, but is not identical to the maximum frame size that can be transported on the data link layer, e.g., Ethernet frame.

The Real-time Transport Protocol (RTP) is a network protocol for delivering audio and video over IP networks. RTP is used in communication and entertainment systems that involve streaming media, such as telephony, video teleconference applications including WebRTC, television services and web-based push-to-talk features.

The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network. Major internet applications such as the World Wide Web, email, remote administration, and file transfer rely on TCP, which is part of the Transport Layer of the TCP/IP suite. SSL/TLS often runs on top of TCP.

In computer networking, the User Datagram Protocol (UDP) is one of the core communication protocols of the Internet protocol suite used to send messages to other hosts on an Internet Protocol (IP) network. Within an IP network, UDP does not require prior communication to set up communication channels or data paths.

In computing, Internet Protocol Security (IPsec) is a secure network protocol suite that authenticates and encrypts packets of data to provide secure encrypted communication between two computers over an Internet Protocol network. It is used in virtual private networks (VPNs).

In telecommunications and computer networking, a network packet is a formatted unit of data carried by a packet-switched network. A packet consists of control information and user data; the latter is also known as the payload. Control information provides data for delivering the payload. Typically, control information is found in packet headers and trailers.

<span class="mw-page-title-main">Network address translation</span> Protocol facilitating connection of one IP address space to another

Network address translation (NAT) is a method of mapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device. The technique was originally used to bypass the need to assign a new address to every host when a network was moved, or when the upstream Internet service provider was replaced, but could not route the network's address space. It has become a popular and essential tool in conserving global address space in the face of IPv4 address exhaustion. One Internet-routable IP address of a NAT gateway can be used for an entire private network.

Berkeley sockets is an application programming interface (API) for Internet sockets and Unix domain sockets, used for inter-process communication (IPC). It is commonly implemented as a library of linkable modules. It originated with the 4.2BSD Unix operating system, which was released in 1983.

The Serial Line Internet Protocol (SLIP) is an encapsulation of the Internet Protocol designed to work over serial ports and router connections. It is documented in RFC 1055. On personal computers, SLIP has largely been replaced by the Point-to-Point Protocol (PPP), which is better engineered, has more features, and does not require its IP address configuration to be set before it is established. On microcontrollers, however, SLIP is still the preferred way of encapsulating IP packets, due to its very small overhead.

<span class="mw-page-title-main">Transport layer</span> Layer in the OSI and TCP/IP models providing host-to-host communication services for applications

In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end communication services for applications. It provides services such as connection-oriented communication, reliability, flow control, and multiplexing.

In computer networking, Layer 2 Tunneling Protocol (L2TP) is a tunneling protocol used to support virtual private networks (VPNs) or as part of the delivery of services by ISPs. It uses encryption ('hiding') only for its own control messages, and does not provide any encryption or confidentiality of content by itself. Rather, it provides a tunnel for Layer 2, and the tunnel itself may be passed over a Layer 3 encryption protocol such as IPsec.

In computer networking, the Datagram Congestion Control Protocol (DCCP) is a message-oriented transport layer protocol. DCCP implements reliable connection setup, teardown, Explicit Congestion Notification (ECN), congestion control, and feature negotiation. The IETF published DCCP as RFC 4340, a proposed standard, in March 2006. RFC 4336 provides an introduction.

A network socket is a software structure within a network node of a computer network that serves as an endpoint for sending and receiving data across the network. The structure and properties of a socket are defined by an application programming interface (API) for the networking architecture. Sockets are created only during the lifetime of a process of an application running in the node.

The Internet checksum, also called the IPv4 header checksum is a checksum used in version 4 of the Internet Protocol (IPv4) to detect corruption in the header of IPv4 packets. It is carried in the IP packet header, and represents the 16-bit result of summation of the header words.

An IPv6 packet is the smallest message entity exchanged using Internet Protocol version 6 (IPv6). Packets consist of control information for addressing and routing and a payload of user data. The control information in IPv6 packets is subdivided into a mandatory fixed header and optional extension headers. The payload of an IPv6 packet is typically a datagram or segment of the higher-level transport layer protocol, but may be data for an internet layer or link layer instead.

The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the protocol provides the message-oriented feature of the User Datagram Protocol (UDP), while ensuring reliable, in-sequence transport of messages with congestion control like the Transmission Control Protocol (TCP). Unlike UDP and TCP, the protocol supports multihoming and redundant paths to increase resilience and reliability.

References