1

I am writing a client-server python application, a part of which is using UDP Multicast to communicate. And my current concern is about fragmentation.

RFC 791 (page 24) says:

Every internet module must be able to forward a datagram of 68 octets without further fragmentation. This is because an internet header may be up to 60 octets, and the minimum fragment is 8 octets.

By reading the above i understand that we can have an Application Layer PDU, 8 bytes of size, that can pass without fragmentation.
On Packet Tracer(an application where you can configure Routers in a Virtual environment), the minimum allowed MTU is 64 (see image below). This means that the Application Layer PDU guaranteed size can be 4 bytes?

enter image description here

I may not have understood this correctly, that's why i would like your help.
The question is: What should be the size of the Application Layer PDU, so that the IP packet that contains it can pass without being fragmented? 4 or 8 bytes?

athspk
  • 137
  • 1
  • 10
  • Also please consider improving your question. I am not entirely sure what your question is. – Zoredache Jul 25 '11 at 17:16
  • Can i do that ? Thanks, i will try to find out how to link my accounts and improve the question – athspk Jul 25 '11 at 17:17
  • @Athspk, go to [your accounts tab](http://serverfault.com/users/63416/athspk?tab=accounts) and see what it says. – Chris S Jul 25 '11 at 17:22
  • @Chris I just cheched and it looks like they are [connected](http://serverfault.com/users/63416/athspk?tab=accounts). I may have done it in the past but i dont really remember. – athspk Jul 25 '11 at 17:27
  • I edited the question with the hope to be clearer. – athspk Jul 25 '11 at 17:38
  • Are you honestly planning to send 4 or 8 bytes of data using 64- or 68-bytes packets? I don't know your application requirements, but this looks *absurdly* inefficient... – Massimo Jul 25 '11 at 17:56
  • Ah, clear the account association, and then re-associate them. You'll get the bonus. – Zoredache Jul 25 '11 at 18:07

1 Answers1

4

RFC791 Specifies IP only. Since you will be using UDP, you must read RFC791 in conjunction with RFC768 which specifies UDP. The UDP Datagram header is 8 octets, including a two-octet length field with a minimum value of 8 (the length of the header).

At the minimum Layer 3 (IP) PDU of 68 octets, if you use UDP as your Layer 4 Protocol, the largest higher-layer data packet you can transmit without fragmentation (when the maximum IP Header length of 60 octets is used) is zero octets - the 8 octet minimum having been used by the UDP Datagram header!

If you wish to have an application layer packet of 8 octets using UDP over IP and you envisage the IP Header regularly reaching the maximum length of 60 octets, you will need a link with an MTU of 76 octets or greater to ensure your packets do not require fragmentation.

However, you should note that RFC791 also states (Page 13):

The maximal internet header is 60 octets, and a typical internet Header
is 20 octets

If you assume a typical Internet header size, over an (incorrectly configured) link with an MTU of 64 octets, you would still be able to transmit an application packet of 36 octets before fragmentation:

  MTU - IP_HDR - UDP_HDR
=  64 -     20 -       8
=  36 octets

However, in most real-world scenarios, you should not encounter networks with such small MTU's (unless you're talking to a PLC in the Embedded / SCADA world, or another similarly restricted environment).

Mike Insch
  • 1,244
  • 8
  • 10