Provided by Colasoft Co., Ltd.

UDP ( User Datagram Protocol )

Home > Protocols > UDP Update: 2005-03-11 10:11:29    I have words to say about this protocol
On this page
SUMMARY
Protocol : User Datagram Protocol
Protocol suite : TCP/IP.
Layer : Transport Layer
Type : Connectionless transport protocol
SNMP MIBs : iso.org.dod.internet.mgmt.mib-2.udp (1.3.6.1.2.1.7).
iso.org.dod.internet.mgmt.mib-2.udpMIB (1.3.6.1.2.1.50)
Ports : Well known port numbers
Related protocols : UDP-Lite,
Lightweight User Datagram Protocol
DESCRIPTION
UDP (User Datagram Protocol) is a communications protocol that offers a limited amount of service when messages are exchanged between computers in a network that uses the Internet Protocol (IP). UDP is an alternative to the Transmission Control Protocol (TCP) and, together with IP, is sometimes referred to as UDP/IP. Like the Transmission Control Protocol, UDP uses the Internet Protocol to actually get a data unit (called a datagram) from one computer to another. Unlike TCP, however, UDP does not provide the service of dividing a message into packets (datagrams) and reassembling it at the other end.

UDP is defined to make available a datagram mode of packet-switched computer communication in the environment of an interconnected set of computer networks. The User Datagram Protocol offers only a minimal transport service -- non-guaranteed datagram delivery -- and gives applications direct access to the datagram service of the IP layer. UDP is used by applications that do not require the level of service of TCP or that wish to use communications services (e.g., multicast or broadcast delivery) not available from TCP.

UDP is almost a null protocol; the only services it provides over IP are checksumming of data and multiplexing by port number. Therefore, an application program running over UDP must deal directly with end-to-end communication problems that a connection-oriented protocol would have handled -- e.g., retransmission for reliable delivery, packetization and reassembly, flow control, congestion avoidance, etc., when these are required. The fairly complex coupling between IP and TCP will be mirrored in the coupling between UDP and many applications using UDP.

UDP is the transport protocol for several well-known application-layer protocols, including Network File System (NFS), Simple Network Management Protocol (SNMP), Domain Name System (DNS), and Trivial File Transfer Protocol (TFTP).

This protocol provides a procedure for application programs to send messages to other programs with a minimum of protocol mechanism. The protocol is transaction oriented, and delivery and duplicate protection re not guaranteed. Applications requiring ordered reliable delivery of streams of data should use the Transmission Control Protocol (TCP)

UDP provides a simple, but unreliable message service for transaction-oriented services. Each UDP header carries both a source port identifier and destination port identifier, allowing high-level protocols to target specific applications and services among hosts.


User Interface
A user interface should allow the creation of new receive ports, receive operations on the receive ports that return the data octets and an indication of source port and source address, and an operation that allows a datagram to be sent, specifying the data, source and destination ports and addresses to be sent.

IP Interface
The UDP module must be able to determine the source and destination internet addresses and the protocol field from the internet header. One possible UDP/IP interface would return the whole internet datagram including all of the internet header in response to a receive operation.
Such an interface would also allow the UDP to pass a full internet datagram complete with header to the IP to send. The IP would verify certain fields for consistency and compute the internet header checksum.

UDP Application Programming Interface
It provides for:
    The creation of new receive ports.
    Receive operation that returns the data bytes and an indication of source port and source IP address.
    Send operation that has as parameters the data, source and destination ports and addresses.
    The way this should be implemented is left to the discretion of each vendor.


Be aware that UDP and IP do not provide guaranteed delivery, flow-control or error recovery, so these must be provided by the application.
Standard applications using UDP include:
    Trivial File Transfer Protocol (TFTP)
    Domain Name System (DNS) name server
    Remote Procedure Call (RPC), used by the Network File System (NFS)
    Network Computing System (NCS)
    Simple Network Management Protocol (SNMP)



UDP Header

16

32 bits

Source port

Destination port

Length

Checksum

Data


  • Source port
    16 bits. Source port is an optional field. When used, it indicates the port of the sending process and may be assumed to be the port to which a reply should be addressed in the absence of any other information. If not used, a value of zero is inserted.

  • Destination port

  • 16 bits. Destination port has a meaning within the context of a particular Internet destination address.

  • Length

  • 16 bits. The length in octets of this user datagram, including this header and the data. The minimum value of the length is eight.

  • Checksum

  • 16 bits. It complement of the one¡¯s complement sum of a pseudo header of information from the IP header, the UDP header and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets. If the computed checksum is zero, then this field must be set to 0xFFFF.

    When transported by IPv4, the pseudo header contains the following fields:

    1

    28

    32 bits

    Source IPv6 address

    Destination IPv6 address

    Upper layer packet length

    0

    Next header


  • Data

  • Variable length. UDP data field.


Top of Page

EXAMPLES

Top of Page


PROTOCOL RELATIONS
Parent layer
Child layer
IP
UDP
SSH
Kerberos
DNS
BOOTP
HTTPS
Timbuktu
RTSP
L2TP
CSO
NetBIOS
CMIP Agent
Retrospect
RLOGIN
RSH
WINS
MSN
NFS
RPC
Lotus Notes
FileMaker
AOL
CU-SeeMe
HTTP Proxy
CIFS
SQL
NCP
SLP
PPTP
SIP
MGCP
SAP
H.323
H.225
Citrix ICA
GTP
LDAP
GroupWise
BitTorrent
FSP
TFTP
HSRP
L2F
NTP
SNMP
SNMP Trap
RIP
RADIUS Accounting
RADIUS
ISAKMP
Mobile IP
BACnet
WTP + WSP
AppleTalk Tunnel
Megaco
RTP
RTCP
SSDP
Other
QQ
GDP
ICP
Top of Page

GLOSSARY
DNS
DNS(Domain Name System or Service or Server), an Internet service that translates domain names into IP addresses. Because domain names are alphabetic, they're easier to remember. The Internet however, is really based on IP addresses. Every time you use a domain name, therefore, a DNS service must translate the name into the corresponding IP address. For example, the domain name www.example.com might translate to 198.105.232.4.

The DNS system is, in fact, its own network. If one DNS server doesn't know how to translate a particular domain name, it asks another one, and so on, until the correct IP address is returned.

NCS
NCS(Network Computing System )is a set of software tools developed by Apollo Computer Inc. that conform to the Network Computing Architecture. These tools include the Remote Procedure Call runtime library and the Location Broker. NCS is the underlying communications protocol used by License Use Management to transmit licensing transactions between clients and servers. Messages are broadcast from clients to the NCS-managed network.

NFS
NFS (Network File System) is a client/server application designed by Sun Microsystems that allows all network users to access shared files stored on computers of different types. NFS provides access to shared files through an interface called the Virtual File System (VFS) that runs on top of TCP/IP. Users can manipulate shared files as if they were stored locally on the user's own hard disk.

With NFS, computers connected to a network operate as clients while accessing remote files, and as servers while providing remote users access to local shared files. The NFS standards are publicly available and widely used.

Name server
Name server is a program that translates names from one form into another. For example, the Internet relies on Domain Name Servers (DNSs) that translate domain names into IP adresses.

RPC
RPC(Remote Procedure Call), a type of protocol that allows a program on one computer to execute a program on a server computer. Using RPC, a system developer need not develop specific procedures for the server. The client program sends a message to the server with appropriate arguments and the server returns a message containing the results of the program executed.

Two newer object-oriented methods for programs to communicate with each other, CORBA and DCOM, provide the same types of capabilities as traditional RPCs.

SNMP
SNMP (Simple Network Management Protocol) is a set of protocols for managing complex networks. The first versions of SNMP were developed in the early 80s. SNMP works by sending messages, called protocol data units (PDUs), to different parts of a network. SNMP-compliant devices, called agents, store data about themselves in Management Information Bases (MIBs) and return this data to the SNMP requesters.

TFTP
TFTP(Trivial File Transfer Protocol) is a simple form of the File Transfer Protocol (FTP). TFTP uses the User Datagram Protocol (UDP)and provides no security features. It is often used by servers to boot diskless workstations, X-terminals, and routers.

Top of Page

REFERENCES
RFCs:
[IEN 88] User Datagram Protocol.
[RFC 768] User Datagram Protocol.
[RFC 1122] Requirements for Internet Hosts -- Communication Layers.
[RFC 1156] Management Information Base for Network Management of TCP/IP-based internets.
                Obsoletes: RFC 1066.
[RFC 1180] A TCP/IP Tutorial.
[RFC 1213] Management Information Base for Network Management of TCP/IP-based internets: MIB-II.
                Obsoletes: RFC 1158.
[RFC 1240] OSI Connectionless Transport Services on top of UDP Version: 1.
[RFC 1347] TCP and UDP with Bigger Addresses (TUBA), A Simple Proposal for Internet Addressing and Routing.
[RFC 1475] TP/IX: The Next Internet.
[RFC 1705] Six Virtual Inches to the Left: The Problem with IPng.
[RFC 1791] TCP And UDP Over IPX Networks With Fixed Path MTU.
[RFC 1812] Requirements for IP Version 4 Routers.
[RFC 2013] SNMPv2 Management Information Base for the User Datagram Protocol using SMIv2.
                Defines SNMP MIB iso.org.dod.internet.mgmt.mib-2.udpMIB (1.3.6.1.2.1.50).
                Updates: RFC 1213.
[RFC 2454] IP Version 6 Management Information Base for the User Datagram Protocol.
[RFC 2460] Internet Protocol, Version 6 (IPv6) Specification.
[RFC 2507] IP Header Compression.
[RFC 2508] Compressing IP/UDP/RTP Headers for Low-Speed Serial Links.
[RFC 2556] OSI connectionless transport services on top of UDP Applicability Statement for Historic Status.
[RFC 2675] IPv6 Jumbograms.
                Obsoletes: RFC 2147.
[RFC 2780] IANA Allocation Guidelines For Values In the Internet Protocol and Related Headers.
[RFC 3095] RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed.
[RFC 3545] Enhanced Compressed RTP (CRTP) for Links with High Delay, Packet Loss and Reordering.
Obsolete RFCs:
[RFC 1066] Management Information Base for Network Management of TCP/IP-based internets.
                Obsoleted by: RFC 1156.
[RFC 2147] TCP and UDP over IPv6 Jumbograms.
                Obsoleted by: RFC 2675.
                Updates: RFC 1883.
                


Top of Page

OTHER PROTOCOLS OF TCP/IP SUITE
AARP   RRP   RTP Video   RTP Audio   RTP   COPS   Gopher   HSRP   ICP   MPLS   IEEE 802.2   CIP   FTP - Data   FTP - Ctrl   IMAPS   IP Fragment   LDAPS   PUP   MSSQL   RSH   SQL   POP3s   RTELNET   RSVP   STP   VLAN   MSN   H.323   MSRDP   HTTPS   WINS   LPD   GTP   ICMPv6   POP   TELNET   H.225   VRRP   PIM   RARP   SAP   OSPF   RLOGIN   SCTP   SIP   RTCP   PPPoE   Mobile IP   IMAP3   WhoIs   SLP   NCP   PPTP   MGCP   LDAP   L2TP   Kerberos   IPv6   GRE   Ethernet SNAP   AFP   CIFS   IEEE 802.3   Finger   NBDGM   NetBEUI   NBSSN   ESP   EIGRP   EGP   DHCP   CGMP   CDP   BOOTP   AH   NBNS   EthernetII   ICQ   PPP   ARP   RIP   IPX   IGRP   IGMP   SSH   RPC   NetBIOS   TFTP   SNMP   SNA   SMB   RADIUS   NTP   NNTP   UDP   TCP   BGP   DNS   SOCKS   IMAP   RTSP   NFS   ICMP   IP   FTP   Telnet   POP3   SMTP   HTTP  
Search RFCs:

Advanced Search
Search Glossary:
Exact search
Fuzzy search


All Protocols
Submit a Request

Recommend an Article

 Layer 7 Application Layer
  AFP
  BOOTP
  CIFS
  CIP
  COPS
  DHCP
  DNS
  Finger
  FTP
  FTP - Ctrl
  FTP - Data
  Gopher
  HSRP
  HTTP
  HTTPS
  ICP
  ICQ
  IMAP
  IMAP3
  IMAPS
  Kerberos
  LPD
  MGCP
  MSN
  MSRDP
  MSSQL
  NCP
  NFS
  NNTP
  NTP
  POP
  POP3
  POP3s
  RADIUS
  RLOGIN
  RRP
  RSH
  RTCP
  RTELNET
  RTP
  RTP Audio
  RTP Video
  RTSP
  SAP
  SIP
  SLP
  SMB
  SMTP
  SNA
  SNMP
  SOCKS
  SSH
  Telnet
  TELNET
  TFTP
  WhoIs
  WINS
 Layer 6 Presentation Layer
  NBNS
  NBSSN
  NCP
  NetBIOS
 Layer 5 Session Layer
  LDAP
  LDAPS
  NCP
  NetBEUI
  RPC
 Layer 4 Transport Layer
  H.225
  H.323
  NBDGM
  NetBEUI
  PUP
  SCTP
  TCP
  UDP
 Layer 3 Network Layer
  AARP
  AH
  BGP
  EGP
  EIGRP
  ESP
  GRE
  GTP
  ICMP
  ICMPv6
  IGMP
  IGRP
  IP
  IP Fragment
  IPv6
  IPX
  Mobile IP
  MPLS
  OSPF
  PIM
  PPPoE
  RIP
  RSVP
  STP
  VRRP
 Layer 2 Data Link Layer
  ARP
  CDP
  CGMP
  Ethernet SNAP
  EthernetII
  IEEE 802.2
  IEEE 802.3
  L2TP
  PPP
  PPTP
  RARP
  SQL
  VLAN
 Layer 1 Physical Layer
© 2006 - 2007 Colasoft Co., Ltd. All rights reserved.