1

I want to stuff data into a packet, but I want to make sure that the packet does not exceed 512 bytes, so I need to know what the initial size of a UDP packet is so I know how much data I can put into the packet. I did some snooping around on Google, but I found answers that were contradictory. I'm using IPv6. Thanks in advance to anyone who replies!

  • Is your actual question what the minimum size of a UDP packet is? If so this has been asked and answered a few times. What's your reason for wanting to limit your packet size? 512 bytes is coincidentally the size imposed by DNS, have you seen this post ? – Reaces Jan 8 '15 at 12:48
3

Why not start with the RFCs or Wikipedia:

Result: 40 Byte for the minimal fixed IPv6 header and 8 byte for the UDP header

But: IPv6 has extension headers of variable length. Some of them can (theoetically) reach a length of 256 Bytes, so it's entirely possible to have a packet exceeding 512 byes without any payload.

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.