1

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. – Mike Pennington Mar 6 '14 at 14:21
  • 2
    What is the difference between a segment and a packet? – YLearn Mar 6 '14 at 14:39
  • A packet contains IP source and destination, a segment contains protocol information. – HAL Mar 6 '14 at 21:57
16

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.

| improve this answer | |
  • Why are we having the source and destination ports in UDP Datagram in that case? – Curious Coder Jan 18 at 0:58
2

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:

| improve this answer | |
  • 2
    The pseudoheader is only used for calculating checksums, it is never actually transmitted. – Peter Green Feb 3 '17 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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