Set DHCPD option MTU 26

Started by cybermaus, June 28, 2017, 08:39:05 PM

Previous topic - Next topic
June 28, 2017, 08:39:05 PM Last Edit: July 06, 2017, 07:33:53 PM by cybermaus
I am trying to have DHCP on a VLAN interface direct the clients to set MTU to 1492 instead of 1500

The DHCP option for that is 26, followed by a hardcoded 2 and then a 16 bit unsigned value
http://www.networksorcery.com/enp/protocol/bootp/option026.htm


The hardcoded 2 is the 8 bit type/length, which is what I am guessing is the selection of the 16 bit unsigned in OPNsense? So in OPNsense's DHCP option fields I put:   26; "Unsigned 16 bit"; 1492


But neither my phone nor my laptop responds to this, so I am not sure, someone either confirming or correcting me would be nice. Especially because when I did the same in an OpenWRT based router, it did work on the same phone and laptop.


Hi

So, while I thought it was solved, it is not.

There is in fact a special field for MTU in the DHCP server settings, but it does not actually send out the MTU value. Also when I add custom field 26, it does not send. I checked with WireShark.


So while I can imagine I may have messed up the custom "additional options", surely the actual intended " Interface MTU" (between "Maximum lease time" and "Failover IP" should work.

Why is it not working, should I report this as bug?

July 06, 2017, 07:08:11 PM #2 Last Edit: July 06, 2017, 10:34:02 PM by cybermaus
Edit: removed logs dumps:

Turns out a DHCP server never pushes the options, unless the client asks for it.
And Windows simply does not ask for MTU in the DHCP request:

https://superuser.com/questions/655253/windows-7-doesnt-request-mtu-from-dhcp-server-what-is-it-thinking

And the solution for my dropped packets was MSS, which I set to 1450 (below standard 1470, so the MSS fits the 1492 MTU) and now it works.