OPNsense Forum

English Forums => General Discussion => Topic started by: systeme on February 19, 2025, 01:58:27 PM

Title: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: systeme on February 19, 2025, 01:58:27 PM
Hello,

We are experiencing TCP fragmentation issues on our network infrastructure, which have been resolved by implementing MSS Clamping (https://docs.opnsense.org/manual/firewall_scrub.html). Here are the details of our environment and situation:

Environment:



Current Configuration:


Symptoms observed before correction (non-exhaustive list):


Note:

Our question concerns the optimal strategy for MSS Clamping implementation:


Thank you in advance,

Best regards,
Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: Monviech (Cedrik) on February 19, 2025, 02:01:49 PM
MSS clamping is mostly needed when the firewall is very strictly configured regarding ICMP types. You can have automatic MSS clamping with PMTUD if you allow ICMP to do its thing in your environment.

https://en.wikipedia.org/wiki/Path_MTU_Discovery
Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: systeme on February 19, 2025, 02:35:36 PM
Thank you for your answer.

How do I get the "path mtu discovery" (PMTUD) function to work properly? Is it possible to do this other than with MSS Clamping ?

Similar problem : https://community.spiceworks.com/t/network-mtu-problems/1112518/2

Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: Monviech (Cedrik) on February 19, 2025, 02:49:57 PM
PMTU is a standard, each device on the layer3 network path must abide to this standard.

It only fails if some ICMP types are filtered along the way from source to destination.

If it works correctly the client will receive an ICMP message with the correct MSS to use and it will cache and use that MSS.

Though in your case, if you tunnel layer 2 over layer 3, it could make static MSS clamping mandatory because clients do not expect their layer2 network to reduce MTU with something like vxlan, though unsure here.
Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: Patrick M. Hausen on February 19, 2025, 03:01:13 PM
As far as I know e.g. WireGuard will not send "fragmentation needed but DF set" messages.

So it can always happen that some intermediate smaller MTU link is not discoverable by end systems.
Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: systeme on February 19, 2025, 03:18:17 PM
ICMP is filtered on the public IP on the Proxmox VE side and on the additional public IP of the server used by the Opnsense WAN interface.
Do you think that allowing it would change anything? Since PMTU is a standard, it is natively authorized?

Edit: I've tried authorizing it, but it doesn't change anything.
Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: systeme on February 19, 2025, 03:59:38 PM
Do you think MSS Clamping should be applied across the entire network?
Would there be any problems if we activated this "normalization" everywhere?
Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: Monviech (Cedrik) on February 19, 2025, 04:46:52 PM
Reducing MSS can theoretically increase the amount of transmitted packets. E.g., if there is routed SMB or NFS traffic with Jumbo frames, squashing the over 8000 MSS down to 1420 would really cripple the performance.

I would never apply it organisation wide without knowing what kind of traffic there is.
Title: Re: MSS Clamping Strategy Question - VXLAN Environment with OPNsense
Post by: systeme on February 19, 2025, 05:27:48 PM
Thanks for your feedback.

It confirms what we thought, which is why we only applied it where it caused problems.

We don't have NFS, nor SMB etc... but if the infrastructure evolves. But in any case, it's preferable not to create other problems.