Mssfix 0 -- difference in usage since a few versions

If mssfix wasn’t checked, before 162 (or so) the openvpn export just exported a settings file without a mssfix line. This was then up to the system to manage.

Since sometime mssfix 0 is added to the client file. This completely destroys OpenVPN network connectivity for Windows clients, but removing the line fixes everything again. mssfix 0 is also set in server.conf when one checks.

This seems like some kind of a mismatch between the client and server settings. I’m not OpenVPN-savvy enough to grok what’s happening here, so hoping for some help.

Hi,
if mssfix is not used (not shown in the configs) the default value of 1450 byte will be used for TCP packets → https://github.com/OpenVPN/openvpn/blob/65a21eb14f4afd80864e88ff425f5d9ef8d8fdec/src/openvpn/mtu.h#L78 . So the MTU value for TCP is capped and ‘mssfix 0’ suspends this . This might be useful not only for e.g jumbo frames but also for other kinds of links → https://community.openvpn.net/openvpn/ticket/593 ?!

As an idea.

Best,

Erik

Hi there,

I just saw that this issue is still not fixed in Core 203. I wonder if ever a bug ticket was created for this?

As @ummeegge already said: Setting 0 (zero) in the client-config is not using the default, but completely disabling mssfix on client-side.
Currently, there is always a line added. When it is unconfigured, the line is “mssfix 0”, which is wrong IMHO.
I believe that the client-configs should not contain a line “mssfix” at all if that is disabled in the “advanced” settings in OpenVPN-UI.

cheers,
Chris

When the mssfix checkbox is unchecked then the line mssfix 0 is put in the conf file. OpenVPN manual says that using 0 means that mssfix is disabled, which matches with the mssfix checkbox not being checked.

If the mssfix checkbox is checked then mssfix is put into the conf file.
The OpenVPN manual says that this means that the value in the fragment box is then used in the conf file with an entry of fragment xxxx and that value is then used for mssfix or if fragment is not specified then the mssfix entry has a default value of 1492.

The manual has the following entry related to those two entries
https://www.ipfire.org/docs/configuration/services/openvpn/advanced#mssfix-fragment

So it is not recommended to use unless you have much older installations. However you are able to define to use mssfix and to specify the fragmentation size for your OpenVPN tunnel should you desire to do so and know how to set it for your connection.

From the OpenVPN manual the use of the mtu option, which was brought in with OpenVPN-2.6.0, specifies that value of the max parameter is interpreted to include IP and UDP encapsulation overhead.

So the mtu parameter basically does what the older combination of mssfix and fragment did.

So you would only need to use the mssfix/fragment combination if some of your OpenVPN clients being used are prior to 2.6.0 and therefore do not understand the mtu option.

Hi @bonnietwin,

thanks for the explanation!
I still find it a confusing, because it contradicts with the UX of the other settings. Also, the manual describes a value that can be set for mssfix. This is not possible with the current UI. What means ticked “mssfix” box then? Switching it on with default value? And why is there no field to put in a number for mssfix?

My suggestion would be, to change the UI in that way:

  • Having a “disable mssfix” box instead of a box that works vice-versa.
  • If the box is ticked, the line “mssfix 0” is added to the config.
  • If that box is NOT ticked, an additional field is writable that accepts a number. In that case the line “mssfix + number” is added.
  • If the number field is NOT filled, the default is used for “mssfix” (so the line “mssfix” is just removed in config).

That would bring a much more consistent guideline for the settings IMHO.

There is. If you put a number in the fragment box then mssfix in OpenVPN uses that.

In the OpenVPN manual under the section covering --mssfix
https://openvpn.net/community-docs/community-articles/openvpn-2-7-manual.html

there is the following line

if --mssfix is specified is specified without any parameter it inherits the parameters of --fragment if specified or uses the default for --mssfix otherwise.

But then it would need to be disabled by default because since 2.6.0 the use of the option mtu (also in the WUI page) with a default value of 1470 (but you can change that) supersedes using mssfix and fragment, hence the comment in the IPFire documentation.

I would recommend reading the OpenVPN manual on the mtu, fragment & mssfix options.

Hi @bonnietwin,

thanks again.
I did read trough the OpenVPN-docu and I’m using OpenVPN since many years now. That is one of the reasons why I find the approach in IPFire’s “advanced settings” screen a bit odd.

Btw, fragment is NOT the same as putting a number behind mssfix. AFAIK is fragment a much older, less sophisticated approach to split packets. This is what the net says about the differences:

Feature –mssfix –fragment
Traffic Type TCP only All protocols (TCP, UDP, ICMP)
How it works Adjusts TCP handshake parameters to prevent large packets Splits big packets into smaller chunks and reassembles them
Performance impact Very low; avoids extra overhead Higher; adds CPU load and reassembly work
Modern recommendation Preferred for TCP-heavy usage, though modern DCO (Data Channel Offload) kernels handle MTU differently Generally avoided today; incompatible with kernel offloading and some mobile clients

So, I stand that the UI needs an overhaul regarding these settings.

The problem is that your proposal would also need to have changes to existing client settings files, which could then easily break users existing configurations.

Well, the generated client-configs are already “wrong” from my perspective. I would have expected that there is no line completely disabling mssfix if that box is not ticked.
:man_shrugging:

Btw, the IPFire docs say:

" mssfix & fragment

The options are an outdated way to help OpenVPN connections to perform less fragmentation. Enabling mssfix will allow OpenVPN to tell TCP connections that run through the tunnel what the maximum packet size it can transport is. fragment allows OpenVPN to split any packets into multiple parts before sending them.

These options exist to support older installations and should not be used any more."

So, why is IPFire using “mssfix 0” then at all? Shouldn’t it follow it’s own guideline and not put any mssfix-entry in the client-configs?

mssfix 0 is understood by OpenVPN as totally ignore mssfix. It is just not needed when you have the mtu option. So the default setting is telling OpenVPN of any version to not use mssfix at all.

The IPFire documentation line

These options exist to support older installations and should not be used any more.

means leave them unused, ie not checked for mssfix and without any number in the fragment.

If this is still not sufficient for you then I think we are going to have to agree to disagree on this

Yes, it disables mssfix completely. This is still NOT the default behavior of OpenVPN. The default settings for mssfix if not changed in config is “mssfix 1492 mtu” while in older versions it was “mssfix 1450”.

I don’t know on base of which OpenVPN-server version the UI in IPFire was built, but the meaning of the mssfix-parameter changed somewhere in 2022: [Openvpn-devel] Implement fixed MSS value for mssfix and use it for non default MTUs - Patchwork

Hope this helps to understand why I think so.

This is exactly the basis for my thread start. Indeed, the compatibility with old clients/servers was broken then, and I had to modify every file after that at one customer – now moot as I don’t work with them any more.

No MSSFIX line at all (the old default) implicitly means MSSFIX 1492, while TUN-MTU can override this. For 2.6, that is, OpenVPN 2.4 used 1450.

MSSFIX without any argument will inherit FRAGMENT values.

MSSFIX 0 completely disables MSS which – to my current understanding – means that MTU might be a problem if the values are not correctly detected. And indeed, that was the symptom in this case.

So IPfire went from MTU 1450 (implicit value of OpenVPN 2.4 as I think the upgrade to 2.6 was the reason for the change) to God knows what, the MTU of the local NIC maybe? :smiling_face_with_tear: