NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Get The TCP/IP Guide for your own computer.
The TCP/IP Guide

Google
Web TCP/IP Guide






Table Of Contents  The TCP/IP Guide
 9  TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4)
      9  TCP/IP Transport Layer Protocols
           9  Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)
                9  TCP/IP User Datagram Protocol (UDP)

Previous Topic/Section
UDP Operation
Previous Page
Pages in Current Topic/Section
1
2
Next Page
UDP Common Applications and Server Port Assignments
Next Topic/Section

UDP Message Format
(Page 1 of 2)

What's the magic word when it comes to UDP? Right, simple. This is true of the operation of the protocol, and it is also true of the format used for UDP messages. Interestingly, however, it is here that we will actually encounter probably the only aspect of UDP that is not simple. I bet that got you interested, huh? Okay, well, it was a worth a try. J

In keeping with the goal of efficiency, the UDP header is only eight bytes in length; this contrasts with the TCP header size of 20 bytes or more. Table 147 and Figure 200 show the format of UDP messages.


Table 147: UDP Message Format

Field Name

Size (bytes)

Description

Source Port

2

Source Port: The 16-bit port number of the process that originated the UDP message on the source device. This will normally be an ephemeral (client) port number for a request sent by a client to a server, or a well-known/registered (server) port number for a reply sent by a server to a client. See the section describing port numbers for details.

Destination Port

2

Destination Port: The 16-bit port number of the process that is the ultimate intended recipient of the message on the destination device. This will usually be a well-known/registered (server) port number for a client request, or an ephemeral (client) port number for a server reply. Again, see the section describing port numbers for details.

Length

2

Length: The length of the entire UDP datagram, including both header and Data fields.

Checksum

2

Checksum: An optional 16-bit checksum computed over the entire UDP datagram plus a special “pseudo header” of fields. See below for more information.

Data

Variable

Data: The encapsulated higher-layer message to be sent.



Figure 200: UDP Message Format

 


Previous Topic/Section
UDP Operation
Previous Page
Pages in Current Topic/Section
1
2
Next Page
UDP Common Applications and Server Port Assignments
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.