I recently found myself tinkering with my router settings in an effort to make my broadband work. There was, in hindsight, a good chance that the problem was my ISP and nothing that I had done, but that didn't stop me from tinkering just in case.
Whilst messing with the settings I found myself looking at the MTU settings for my WAN and PPPoE connection and wondering why they had to be so small compared to the local LAN interfaces. So I tweaked some more! And I broke it entirely, however I tweaked some more and enabled something called baby jumbo frames.
So, in this blog I'm going to briefly cover the things I discovered. If you're sat there thinking, or Googling any of the following then this is the blog for you:
- What MTU should I use for my FTTC broadband?
- What is the MTU for a PPPoE session?
- Can I use 1500 MTU with my PPPoE?
- How to enable baby jumbo frames on my FTTC connection?
Note that for the purpose of this blog I will use the acronym FTTC (Fibre to the cabinet) to refer to any type of fibre broadband, this will most likely be marketed to you as fibre broadband in the UK, most common of all, BT Infinity.
Also note, that my router at home is a Routerboard and so is highly customisable. Some things are simply not possible with free ISP routers or cheaper home routers. Solution? get a better router.
What is MTU?
Firstly, MTU stands for maximum transmission unit. It refers to the maximum size of packet that can be sent down a given connection. Generally speaking with an ethernet connection the MTU is 1500 bytes, for different types of connection the MTU may be bigger, or it may be smaller.
When you send some data over a network, that data is broken up into packets, those packets won't be any larger than the MTU of the connection they are going over. For context, 1MB is 1,000,000 bytes, and so would be made up of roughly 666 1500 byte packets.
If a packet is too big for a connection then it will be broken up into pieces, this is called fragmentation. Fragmented packages still work, however they require additional CPU resource to piece back together again and so can impact performance.
Why is MTU important?
The MTU is important because it can impact performance, too small an MTU and there will be far too many packets which can take a lot of time to process and so slow down network performance if large amounts of data are being transmitted.
Too big an MTU and latency may increase because connections are being unnecessarily utilised by large packets which will hold them up if transmitting only very small pieces of data.
If the MTU is wrong (either too big or too small) then a connection may not function at all, or function poorly.
In the case of an inter connected network like your internet connection then it will break in interesting ways. For example with an MTU problem you will find that some websites load and others do not. This is because some network equipment on the path from your router to that website's routers don't like the packets you are sending and so they aren't getting through. This can be difficult to diagnose and often very easy to blame on the ISP, but if some web pages are loading and others are not then it may well be your MTU.
Does MTU make a difference to broadband performance?
The jury is out on this, a lot of people will tell you that in the age of 80Mbps FTTC and even faster FTTP the adding of a few extra bytes to each packet with the type of data people consume online makes little difference. On 14.4k modem the MTU could make a big difference, but perhaps it's less important with our connections now.
That said, if it made no difference at all then network operators wouldn't have invested the time in adopting standards such as RFC4638 to allow for so called "baby jumbo frames" over their networks.
What is the correct MTU for PPPoE and FTTC?
Let's get this out of the way first, what are the most likely correct settings for an FTTC connection?
The general maximum MTU of an ethernet connection is 1500 bytes, on a local network it can be higher, but over the internet the maximum is 1500.
Your FTTC connection uses something called PPP to connect to your ISP, that PPP connection is made over ethernet to a modem, so we refer to it as PPPoE. To keep track of the packets the PPPoE session needs 8 bytes in each packet, thus the MTU of your internet connection needs to be 1500 minus 8.
Thus, the maximum MTU of a PPPoE connection is going to be 1492 bytes. If you're using a Routerboard or other more advanced router you should also make sure the L2 MTU is set to 1526.
The L2 MTU refers to the MTU of your IP package MTU of 1500 bytes, plus the layer two ethernet frame of 26 bytes, hence, 1526. The L2 MTU will be potentially different if it isn't an ethernet connection on that port.
If your L2 MTU is wrong then you likely won't be able to establish a connection to your ISP.
Baby jumbo frames
What if you want to use 1500 bytes packets? You can! (Probably)
Most ISPs in the UK support something called a baby jumbo frame. They have adopted the standard RFC4638 which allows for an MTU bigger than the normal maximum of 1500 bytes, specifically they've allowed for a 1508 byte MTU.
This means that your router can use a 1500 byte MTU for your connection and still have space for 8 bytes for the PPP session which takes you to the 1508 baby jumbo frame.
How do I setup baby jumbo frames?
It depends on your router, but you must accomplish two things.
- Set the MTU of your ethernet port to which the BT Openreach modem connects to 1508.
- Set the L2 MTU of your ethernet port to which the VDSL modem connects to 1526.
- Set the MTU of the PPPoE session to 1500.
If you can't specifically access the MTU of your hardware ethernet port then it may be that your router will automatically just add 8 bytes and make it 1508. Or, more likely the router simply won't allow you to select an MTU of 1500 for PPPoE. Solution? Get a better router.
Once you've set these settings, test the connection. You may need to manually restart the WAN interface and PPPoE session, or restart your router. If it works, horray!
If it doesn't work, ask your ISP if they support baby jumbo frames and an MTU of 1508 (They will probably look at your blankly). Failing that if it really matters to you, change to an ISP that does support it, a smaller more geek/nerd/techie friendly ISP is a good bet.
What about my LAN?
As a general rule of thumb the MTU on your LAN is also 1500 bytes, however if you're using gigabit throughout your network and transfer large files around then your local network can really benefit with bigger MTUs. Using jumbo frames you can specify an MTU much higher than an internet connection, up to 9k. But that's a blog for another day.
MTU is important, it can subtly affect performance of your internet connection, and if you do it wrong can break it entirely. With careful tuning though you can get your internet connection working with a full size 1500 byte MTU which may increase performance very slightly, and more importantly will give you nerdy bragging rights.