Suggest an editImprove this articleRefine the answer for “What fields make up a UDP header?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**The UDP header** is a very simple control part of a UDP datagram. It contains the **minimum amount of information** needed to deliver data to an application. **Key point:** the UDP header consists of only 4 fields.Shown above the full answer for quick recall.Answer (EN)Image**The UDP header** is a very simple control part of a UDP datagram. It contains the **minimum amount of information** needed to deliver data to an application. In short: **the UDP header consists of only 4 fields**. --- ## Fields of the UDP header ### 1. **Source Port** - **16 bits** - indicates **which application** the data was sent from - can be `0` if the source port is not needed --- ### 2. **Destination Port** - **16 bits** - indicates **which application** the data is intended for - a required field --- ### 3. **Length** - **16 bits** - contains the **total length of the UDP datagram**: - the UDP header plus the data - the minimum value is **8 bytes** (header only) --- ### 4. **Checksum** - **16 bits** - used to **verify data integrity** - if the checksum does not match: - the datagram is dropped Important: - in IPv4, the checksum can be optional - in IPv6, the checksum is **mandatory** --- ## Size of the UDP header - **Always 8 bytes** - does not depend on the data - unlike TCP, **there are no options or extra fields** --- ## What is important to remember - the UDP header: - **does not contain** sequence numbers - **does not contain** an ACK - **does not contain** windows or flags - so UDP is: - fast - has minimal overhead - has no delivery or order guarantees --- ## Comparison with TCP (briefly) - **UDP** - 8-byte header - **TCP** - at least 20 bytes A smaller header means lower latency and higher speed.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.