Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTU entered above 1280 not persistant after boot for IPv6 tunnel interface and not used for VPN #7451

Closed
Skreabengt opened this issue May 10, 2024 · 5 comments
Labels
support Community support

Comments

@Skreabengt
Copy link

I have three sites with dual stack. IPv6 on two of the sites are native and on one is through Hurricane Electric. There is a least one Domain Controller on each site, which need to commuincate with the others through IPv4 and IPv6. All sites have OPNsense routers and there are IPsec VPN tunnels between sites for both IPv4 and and IPv6 to reach subnets between the sites. Ping and simple DNS queries work between the subnets, but DNS replication through RPC fails when IPv6 is set on the DC on tunnel broker site. Others servers and network in general is affected with latency, etc. since the DC is not replying on the tunnel broker site. Mail servers typically need contact with all DC during update. Swithcing off IPv6 on that site normally solves the the network problem on the other sites.

I contacted Hurricane Electric and they said these problems typically are related to low MTU.

Ping through HE-tunnel over IPv6 with payload empasize the problem. Ping to Internet (Google) only works until 1230 Byte, whereas ping through IPsec to native site only reach 1095 Byte. Native site to Internet hit 1450 byte and 1310 byte in ping through IPsec between two native sites. The MTU for the HE-tunnel is too low for IPv6 to work, particularly for IPsec that seem to take 135-140 Byte.

MTU default at Hurricane Electric is 1480 Byte, as seen under advanced settings at HE. The GIF interface in OPNsense likely defaults to 1280 Byte and is as i understood suggested part of FreeBSD. Setting MTU to 1480 Byte on the TunnelBrokerHE interface increase the Payload ping from 1230 to 1430 Byte temporarily, but it had no effect on traffic through IPsec, which still fails over 1095 Byte. Packet size reverts to 1230 after boot although the MTU 1480 setting still exists on the interface and can be seen in backup XML! Netwok behaved erratically before router boot after server boot, but stabilize at low MTU after router boot.

Router is Chinese Topton industrial fanless mini PC with 16GB DDR4, 256GB NVMe, Intel N100 and 4x2.5G i226-V ports. Ethernet ports reports Katsujima Co., Ltd., which suggests Topton could be based on Japaneze motherboard.

OPNsense 24.1.6-amd64
FreeBSD 13.2-RELEASE-p11
OpenSSL 3.0.13

Setup is made recently and I never tried ping with payload on older versions, started with 2.1.4 and went through 2.1.5 to 2.1.6. Believe there could be one FreeBSD update in this sequnce too.

There are to my knowledge no setting to increase MTU for VPN IPsec in OPNsense. IPv6 requires 1280 as a minimum. The MTU need up near 1480 for the HE-tunnel to allow for the loss of bytes in headers, ESP, encryption, padding, etc. in the IPsec tunnel. This is needed to enable a packet size able for proper communication.

Try to solve persistant MTU after boot inline with the setting on the tunnel interface and make sure VPN through IPsec can utilize the higher MTU!

@fichtner fichtner added the support Community support label May 10, 2024
@Skreabengt
Copy link
Author

I have added a request in the forum a while ago and updated it for the second time yesterday after the contact with HE. There have been quite some readers, but no comments from others so far. Search on the internet reveals there have been others reporting the same thing about MTU for OPNsense, but on earlier versions than 24.1.6.

https://forum.opnsense.org/index.php?topic=39964.0

I consider the inability to keep the entered MTU active at the desired seeting after boot and the missing impact to the VPN a bug in OPNsense.

I suppose the cerise label "support" means that OPNsense don't agree and refers me to the community, right?

@fichtner
Copy link
Member

fichtner commented May 10, 2024

Feel free to propose a PR with the desired code changes. Until these changes are clear there is no use relabelling this to anything else. I’m on a vacation today as well so don’t expect qualified input too soon.

That being said I’ve rarely heard this is a real world problem and if so only in intermittent problems that have been solved with users before without the need for a generic request to „fix the bug“.

@Skreabengt
Copy link
Author

Skreabengt commented May 12, 2024 via email

@Skreabengt
Copy link
Author

From this morning I can ping between Tunnel Broker and native IPv6 sites to up to 1295 Byte and RPC traffic between DC:s is now working! I don’t understand, since I have not done anything, what could have changed?

The problem with MTU to be reapplied after boot persist, but the most serious problem seems gone, at least for now...

@Skreabengt
Copy link
Author

It seems that this problem now is gone without doing anything to fix it!

Didn't understand why it appeared and what solved it. Could be something done by the Internet Service Provider or by the Communication Operator in the P- or the PE-routers oit on the internet, but I guess we will never know. I asked Hurricane Electric, but they haven't done anything recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Community support
Development

No branches or pull requests

2 participants