In literature, I see UDP datagram format as following: enter image description here

I cannot understand why it does not include source and destination IP addresses?

  • 6
    Hmmm, no mac-address shown either. Mar 6, 2014 at 14:21
  • 2
    What is the difference between a segment and a packet?
    – YLearn
    Mar 6, 2014 at 14:39
  • A packet contains IP source and destination, a segment contains protocol information.
    – HAL
    Mar 6, 2014 at 21:57

2 Answers 2


Because you're looking at the UDP Datagram, which is the payload in an IP Datagram. The IP Header has the src/dst IP addresses.

  • Why are we having the source and destination ports in UDP Datagram in that case? Jan 18, 2020 at 0:58

At transmission the psuedoheader is added for the destination and source IP addresses. This might clarify the process a bit more:

By itself, the UDP packet header only contains the source port and destination port of the client/target as well as a checksum and length.

This is a related question asked on StackOverflow:

  • 2
    The pseudoheader is only used for calculating checksums, it is never actually transmitted. Feb 3, 2017 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.