Configure the MTU Print

  • 9

This article only applies to VPS's in our Amsterdam or Germany region. If your VPS is not located in Amsterdam or Germany, you can disregard this guide.

Introduction

In this guide, you will learn how to configure the MTU on different operating systems. If you are seeing slow speeds or having strange network issues (i.e. certain pages not loading) or certain commands (i.e. top, htop) not working, it is likely that the MTU is set correctly.

Linux Distro

Ubuntu

If you are using Ubuntu, you must edit /etc/netplan/50-cloud-init.yaml and add mtu: 1462 at the bottom of the file. After this, run netplan apply for the changes to be saved

Example Picture:

Please make sure to use spaces and not tabs when adding the MTU to the bottom of the file

Debian

If you are using Debian, you must edit /etc/network/interfaces.d/50-cloud-init and add mtu 1462 to the bottom of the file. After this, run systemctl restart networking for the changes to be saved

Example Picture:

 

Please make sure to use spaces and not tabs when adding the MTU to the bottom of the file

Windows

If you're running Windows, the MTU is set incorrectly by default.

In order to find a list of network interfaces, please run the following command:

netsh interface ipv4 show subinterface

The command will display a list of interfaces.

Now, run this command (replace INTERFACE NAME with the interface your server is on):

netsh interface ipv4 set subinterface "INTERFACE NAME" mtu=1462 store=persistent

Pterodactyl/Docker

If you are running Pterodactyl, you will need to run these commands in order to set the MTU:

systemctl stop docker wings
docker network rm pterodactyl_nw
docker network create --scope=local --driver=bridge --ipam-driver=default --ipam-opt=null\
--ipv6=true --internal=false --attachable=false --ingress=false --config-only=false \
--subnet=172.18.0.0/16 --gateway=172.18.0.1 \
--subnet=fdba:17c8:6c94::/64 --gateway=fdba:17c8:6c94::1011 \
-o "com.docker.network.bridge.default_bridge"="false" \
-o "com.docker.network.bridge.enable_icc"="true" \
-o "com.docker.network.bridge.enable_ip_masquerade"="true" \
-o "com.docker.network.bridge.host_binding_ipv4"="0.0.0.0" \
-o "com.docker.network.bridge.name"="pterodactyl0" \
-o "com.docker.network.driver.mtu"="1462" \
-o "encryption"="false" \
pterodactyl_nw
systemctl restart docker wings


Was this answer helpful?

« Back