[HOWTO] Configure WAN MTU with VLAN and / or PPPoE

Started by meyergru, February 05, 2025, 09:04:11 PM

Previous topic - Next topic
January 06, 2026, 03:31:21 PM #45 Last Edit: January 06, 2026, 03:52:34 PM by meyergru
1. It is correct that normally, with modern adapters, 1504 MTU is always possible, so you usually can add 4 bytes of VLAN tags without further ado. However, this was not the case with early ethernet equipment before the advent of 802.1q and also, for the sake of the argument that you should calculate the VLAN overhead, this will come to an end if you use QinQ. ISP equipment can do anything it likes, too. For example, german ISP Telekom does not like packets larger than 1504, so you cannot apply the guide there and have a net MTU of 1500 bytes - no matter what - I added a disclaimer for Telekom in the guide.

2. What OpnSense does by default with its calculations and/or fragmentation and what the FreeBSD kernel does has changed over time and releases and AFAIK, will again change with 15.x, see this for an example.

For good measure, I like to apply explicit value and even then, the returned values of "ifconfig" sometimes to not reflect the GUI settings.
I mentioned that in the guide by saying: test the effective settings after a reboot and also test what actually works - I have seen the results change from checking directly after I applied them and after a reboot. This is especially true when a "stack" of interfaces like WAN (pppoe) -> VLAN -> physical NIC is in play.


BTW: Testing against a local IP like 192.168.1.1 does not make sense for a WAN optimization, but after having said that, it should always yield 1500 bytes. To enable a WAN MTU of the same size as the usual WAN MTU, to avoid fragmentation with all of its issues is the main goal in the first place. If even your LAN MTU differs, it would be useless. If you get a 1226 byte MTU with the supplied script to a local IP, sometime seems way off.

Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

January 06, 2026, 03:43:34 PM #46 Last Edit: January 06, 2026, 03:50:18 PM by carepack
Ok. Thx Patrick. It seems we have the same setup with telekom, vlan 7, pppoe . May I ask what mtu values you definded and entered in your setup for

1. physical adapter =
2. vlan adapter =
3. pppoe mtu in pppoe config not wan =

This would a big help to me. Thank you!

@meyergru
Thx for the information. In first place the ip was another one: 1.1.1.1 But I get really strange values running the script wit an externel ip. Maximum MTU size would the be 3654 which looks incorrect to me. Iirc was 192.168.1.1 is the ip fo my modem but your right. Also makes no sense testing with that.

None at all. All of this works out of the box.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

ok, opnsense doin' the job right already. Thanks again!