OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: cybermaus on June 28, 2017, 08:39:05 pm

Title: Set DHCPD option MTU 26
Post by: cybermaus on June 28, 2017, 08:39:05 pm
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

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.

Title: Re: Set MTU option 26
Post by: cybermaus on July 06, 2017, 06:40:12 pm

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?
Title: Re: Set MTU option 26
Post by: cybermaus on July 06, 2017, 07:08:11 pm
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:


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.