IDNetters Forums

Technical News & Discussion => Networking & Routers => Topic started by: EvilPC on Apr 25, 2021, 16:25:10

Title: What MTU should be used for FTTC
Post by: EvilPC on Apr 25, 2021, 16:25:10
Hi,

Is there a 'best' setting for MTU ?
I'm using opnsense as my PPPoE connection and firewall. On the WAN Interface I've currently got the MTU set at 1476.
Is there a better setting to use ?

Thanks
Title: Re: What MTU should be used for FTTC
Post by: L2020 on Apr 26, 2021, 14:59:10
You can set your MTU on the WAN in OpnSense to 1508, this allows for the maximum Internet MTU of 1500 + the 8 Bytes that is needed for PPPoE to be carried out of your network.  Once your data packets have reached the PPPoE server the 8 Bytes are removed (done their job) and your data goes out on the Internet at up to 1500 MTU, optimising through put with other servers that are also optimised up to 1500.  If a server requires smaller packets this is usually negotiated automatically, and your setting of 1476 had been override by IDNet to 1460 up until just recently, but they have removed that now as it was kind of dated thing to be doing.

You can check the size of your MTU in reality by visiting http://speedguide.net:8080

I've been running at 1500 for decades and never had a problem.

In reality you will unlikely notice any difference moving from 1476 up to 1500.
Title: Re: What MTU should be used for FTTC
Post by: EvilPC on Apr 26, 2021, 17:27:49
Thanks.

I changed the MTU last night to 1492 and so far everything seems good.
I went with 1492, think 1500 - 8 bytes for the PPPoE.

Title: Re: What MTU should be used for FTTC
Post by: L2020 on Apr 27, 2021, 15:28:40
Quote from: EvilPC on Apr 26, 2021, 17:27:49
Thanks.

I changed the MTU last night to 1492 and so far everything seems good.
I went with 1492, think 1500 - 8 bytes for the PPPoE.

What does it say if you visit speedguide.net:8080 for your MTU? Usually on the router you don't subtract the 8 bytes, as the subtraction is done at the ISP when our traffic leaves for the Internet.

So with that setting your router will be wanting a maximum MTU of 1492 for data in and out of the WAN and this is including PPPoE, so your data packets from devices need to be a maximum of 1484 as the router adds 8 Bytes for PPPoE and needs to fit within 1492.  Default for OpnSense on the WAN interface is 1500, hence PPPoE connections usually are a maximum MTU of 1492 on the Internet and we used to be stuck at that.  However to maximum MTU with PPPoE mini jumbo packets are supported on Openreach from us to the ISP gateways, so whilst the Internet works to a maximum MTU of 1500, usually we can send up to 1516 to our ISP over Openreach to allow for things like PPPoE to be added on top and so still keep sending/receiving the maximum MTU of 1500 from and to the Internet.

So I would set your OpnSense MTU on the WAN interface to 1508, the LAN interfaces don't usually have an MTU and default to 1500.  Your devices will send maximum packet sizes of 1500, then as traffic leaves the WAN interface 8 Bytes is added on for PPPoE without needing to fragment packets as all that fits within 1508 precisely, packets travel at 1508 maximum size until they get to the ISP which strips of the 8 Bytes for PPPoE and the packets then leave and travel on the Internet at the maximum 1500 MTU.  It is then fully optimised.
Title: Re: What MTU should be used for FTTC
Post by: EvilPC on Apr 27, 2021, 16:14:02
Hi,

I get the following from SpeedGuide

MTU = 1484
MTU is somewhat optimized for broadband. If you're not on a PPPoE DSL connection that limits packet size, consider increasing your MTU to 1500 for optimal throughput.

MSS = 1444
Maximum useful data in each packet = 1444, which equals MSS.

Currently things seem stable, would changing the MTU make much difference ?

Thanks
Title: Re: What MTU should be used for FTTC
Post by: L2020 on Apr 27, 2021, 16:45:11
Quote from: EvilPC on Apr 27, 2021, 16:14:02
Hi,

I get the following from SpeedGuide

MTU = 1484
MTU is somewhat optimized for broadband. If you're not on a PPPoE DSL connection that limits packet size, consider increasing your MTU to 1500 for optimal throughput.

MSS = 1444
Maximum useful data in each packet = 1444, which equals MSS.

Currently things seem stable, would changing the MTU make much difference ?

Thanks

As I thought it is 1492 - 8 = MTU max at 1484.

As for noticing a difference it depends if packets are getting fragmented because of the lower MTU required by your router.  With fast connections these days if MTU isn't that well optimised we don't tend to notice so much.  As the report says though the optimal MTU is 1500, and it is better we aren't the bottleneck or the cause of fragmented packets.

So I would just try on OpnSense putting it to 1508, that should see you fully optimised.  Easily changed back of course. 


Give it a go, what is the worst that could happen  ;D





Title: Re: What MTU should be used for FTTC
Post by: EvilPC on Apr 27, 2021, 17:24:07
Hi,

In opnsense I've got some wireguard VPNs setup that required some tweaking to get right.

With the WAN MTU set as 1492 I've set the VPN MTU to 1420 and its MSS to 1380
I'm not sure what I'd need to tweak these to, to make sure they work.

Any ideas ?
Title: Re: What MTU should be used for FTTC
Post by: L2020 on Apr 28, 2021, 08:36:43
VPN MTUs should be less than normal MTU setting because the packets get wrapped again so are made larger, and you don't want them exceeding the maximum MTU available.  Because your MTU is at 1492 (unless you change your OpnSense WAN MTU to 1508 to give you 1500), you should set your Wireguard to 1412, this is because the worst case scenario for Wireguard increasing the packet size is 80 bytes, so 1492 - 80 = 1412.  If you increase your WAN MTU to 1508 to give you optimised Internet packets of 1500 after PPPoE is stripped off, then 1420 is the correct value.  Some more info here https://lists.zx2c4.com/pipermail/wireguard/2017-December/002201.html