Press "Enter" to skip to content

Wireguard MTU over PPPoE

Wireguard MTU was not auto detect when server or client is using PPPoE connection, in this guide, we going to learn how much MTU need to set for PPPoE users.

By default, Ethernet MTU is 1500 bytes,

Wireguard add another 40 bytes + 20 bytes (IPv4) or 40 bytes (IPv6):

IPv4:
1440 = 1500 - 40 - 20

IPv6:
1420 = 1500 - 40 - 40

So, Wireguard use 1420 bytes MTU size (dual-stack IPv6), problem when Wireguard over PPPoE cause more problem and slow down due to fragmentation.

PPPoE Overhead

PPPoE add another 8 bytes or 20 bytes depending on ISP setup, plus most PPPoE user have IPv4 and IPv6 native (Dual-Stack) , if your peer using mix of IPv4 and IPv6, this mean, you need recount Wireguard MTU to achieve maximum performance:

WG MTU = Ethernet MTU - WG overhead - IPv4/IPv6 header - PPPoE overhead
1412 = 1500 - 40 - 40 - 8
1400 = 1500 - 40 - 40 - 20

Conclusion

If your peer or server using PPPoE, adjust your Wireguard MTU accordingly,

When your PPPoE using 1492 MTU, you need set Wireguard MTU value to 1412

When your PPPoE using 1480 MTU, you need set Wireguard MTU value to 1400

Add MTU value at your Wireguard interface config:

[Interface]
PrivateKey = <priv key>
Address = 10.0.2.2/24
MTU = 1400

Also in your Mikrotik

If your Wiregurad is routable between subnet (No NAT) you need do some Firewall Mangle

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.