Subject: [dhcwg] DHCPv4 - definition of maximum message size.

From: Simon Kelley <[email-masked]>
Date: Fri, 06 May 2005 12:09:31 +0100

Does the value in "maximum message size" option (option code 56) include 
the IP and UDP headers?

Neither RFC2131 or RFC2132 ever state this explicitly, but they are 
self-consistent if it's the case. RFC2132 states that the minimum legal 
value is 576 octets, which equals IP header + UDP header + fixed DHCP 
fields + the minimum 312 octet options field specified in RFC2131.

I ask because I've just come across a client which advertises a maximum 
message size of 548. Presumably this is broken, and there's a chance 
that the client is also misinterpreting a "576" maximum message size 
option _from_ a DHCP server  and could potentially try and use 28 bytes 
that the server cannot receive.

If the wise ones here can confirm that this really is an RFC violation, 
I'll submit a bug report to the vendor of the client.

Cheers,

Simon.

_______________________________________________
dhcwg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/dhcwg

---

From: "David W. Hankins" <[email-masked]>
Date: Fri, 6 May 2005 11:52:33 -0700

> fields + the minimum 312 octet options field specified in RFC2131.

To add to your confusion, ISC DHCP calculates this as:

	'mms' - (ethernet + ip + udp + dhcp header sizes)

Should the 'mms' be less than 576, we use 576.

I suspect our inclusion of the ethernet header size in this calculation
is incorrect, since as you mention it doesn't add up if you use a 312 byte
options field.

> that the server cannot receive.

As I mentioned above, I believe our DHCP server would simply not observe
this mms, and pretend as though it was not supplied.

> I'll submit a bug report to the vendor of the client.

I have no such wisdom.

-- 
David W. Hankins		"If you don't do it right the first time,
Software Engineer			you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins
_______________________________________________
dhcwg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/dhcwg

---

From: Bud Millwood <[email-masked]>
Date: Sat, 7 May 2005 13:35:26 +0200

> Does the value in "maximum message size" option (option code 56) include

This has been brought up before, since it's not obvious from the specs, and 
the general consensus IIRC is "yes".

I think most DHCP servers by now will (correctly) subtract ip+udp header sizes 
from the value the client advertises.

And for David: I seem to recall that the ISC DHCP server uses some type of raw 
interface to the network layer; might the ethernet header size be included 
for that reason?

Regards,

Bud Millwood
Weird Solutions, Inc.
http://www.weird-solutions.com
tel: +46 8 758 3700
fax: +46 8 758 3687
mailto:[email-masked]

---

From: "David W. Hankins" <[email-masked]>
Date: Mon, 9 May 2005 10:20:00 -0700

> interface to the network layer; might the ethernet header size be included 

Yes, this was probably done to ensure that the output packet would never
exceed 1500 bytes (due to some platform limitation in passing data in sizes
larger than that, even though through raw sockets, I am imagining).

But this is calculating the maximum size of the "options" space from the
client-supplied mms, and consequently the maximum size of the output packet
since that's the only variable, rather than directly calculating output
packet space.

It doesn't matter if the client (or server) is not ethernet, and it doesn't
matter if the server is using Berkeley sockets.  It's applied in every
case.

I think this is pretty clearly a bug on our part, but the fact that this
is in all released versions of the software of which I am aware (this
calculation of "udp overhead" is in RCS version 1.1 of the header, so it
appeared in all version-2 releases), I think muddies the 'what does MMS
mean' question that's being asked here.