UDP – Calculating Fragmentation in UDP

fragmentationipipv4mtuudp

Assume we have a ethernet link with an MTU of 1300 bytes, while an application want to send 5200 bytes of data. How many fragments do we transmitted ?

i would say 5, to send 5200 bytes over a link with an MTU of 1300 bytes then we need 4 fragments, 5200/1300=4 but we have the additonal overhead, IPv4 header is 20 bytes, while the UDP header is 8 bytes therefore we will have 5 fragments in total.

Am i thinking right here ?

Best Answer

You seem to be confusing fragments and packets. Fragmentation is a layer-3 function, but UDP is at layer-4. Fragmentation happens when the MTU changes size (shrinks) in the path. Routers may fragment a packet if it is larger than the MTU of the next link to which is must send the packet. What you have doesn't say anything like that.

What your question should be asking is how many packets will be used to send the data using IPv4, and that would be five packets.

Related Topic