I have an Ubuntu Server 14.04 install which is connected to the internet using PPPoE. At the moment my ppp0
interface have an MTU of 1492 which mostly works.
I'd like to increase the MTU to 1500, which is supported by my ISP.
So far I have increased the MTU of the underlying Ethernet interface to 1508, and I have tried adding the following lines in /etc/ppp/peers/dsl-provider
mtu 1500
mru 1500
But my ppp0
interface still has an MTU of 1492. I believe the syntax of my added lines is correct, since using values lower than 1492 does work as expected.
Manually changing the MTU of the ppp0
interface to 1500 after it has been brought up works, but it only affects packets in one direction. Doing that I am able to send 1500 bytes packets across the internet and they will arrive at their destination with no fragmentation. But incoming traffic to me is still sent in 1492 byte fragments.
By capturing traffic on the Ethernet interface as the PPPoE connection is brought up, I can see that in the configuration request that my Ubuntu Server 14.04 machine sends to the provider, the MRU is specified as 1492. So I know the issue is on my end of the connection.
Why does Ubuntu Server 14.04 use 1492 as MRU in the configuration request, when the configuration file says 1500? And how can I change it to 1500?
I downloaded the
ppp
source code by typing these two commands:In the header file
pppd/plugins/rp-pppoe/pppoe.h
I found this:ETH_DATA_LEN
is defined in/usr/include/linux/if_ether.h
And in
pppd/plugins/rp-pppoe/plugin.c
I found this:What all of this means is that the
rp-pppoe
plugin has a hard coded limit of 1492 bytes. And the only way to increase it is by modifying the source and rebuild the plugin with a higher limit.By removing the above four lines from
plugin.c
and rebuilding the module, I was able to increase the MTU from 1492 to 1500. This only works as long as the underlying line is known to support the larger size, which happens to be the case on my connection.In order to detect the capability of the underlying line it would be necessary to use a newer pppd version with RFC 4638 support. Ubuntu 16.04 has a newer pppd version and thus should be capable of using larger MTU sizes for PPPoE without needing to recompile any code.
you could run pppd via strace and filter to display 'open' requests to see which files its opening to get its config from.
In my experience (of uk broadband) all connections have been 1492 if they go over BT , is there a specific reason you need another 8 octets ?
My understanding is that if you don't match the MRU properly you can end up having your packets become multiple packets, especially if you don't allow things like an 8 octet overhead for encapsulation.