You need to adjust the Maximum Transmission Unit (MTU) size within a Virtual Private Cloud (VPC) to account for the additional overhead required by packet encapsulation.
Without this adjustment, you may encounter issues such as packet drops, connection resets, or delays when communicating between servers or accessing external services.
We recommend setting the MTU to 1450 on the network interface handling VPC traffic to ensure stable network performance and avoid packet fragmentation.
If your interface(s) are configured to use 'DHCP', MTU changes should dynamically adjust.
If your server is configured to use 'Split NICs', MTU adjustments are not requried. To configure 'Split NICs' for your server, enable 'Configure Cloud Server with two separate NICs: one for public internet access, and one for VPC traffic' within the 'Source/Dest Check' settings of your VPS.
TABLE OF CONTENTS
- To check and adjust the MTU on Ubuntu/Linux
- To check and adjust the MTU on Windows
- To check and adjust the MTU on other operating systems
- UDP packet loss on a server that is not in a VPC
To check and adjust the MTU on Ubuntu/Linux:
1. Check the current MTU for your WAN interface (typically 'ens3'):
ip addr show dev ens3
Look for the MTU value in the output.
2. Change the MTU for ens3 to 1450:
sudo ip link set dev ens3 mtu 1450
3. Persist the changes for ens3:
For systems using Netplan, edit the network configuration file (typically found in `/etc/netplan/*.yaml`) and update it like this:
network: version: 2 ethernet: ... ens3: dhcp4: no mtu: 1450
4. Apply the changes:
sudo netplan apply
Important
Without disabling the existing cloud-init network config, the netplan configuration will revert upon restarting your server. To disable the network configuration file, create a new network-config disabling configuration in `/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg` with the following content:network: {config: disabled}
To check and adjust the MTU on Windows:
1. Check the current MTU:
Open an elevated PowerShell terminal and run:
netsh interface ipv4 show subinterfaces
Change the MTU to 1450:
netsh interface ipv4 set subinterface "Ethernet" mtu=1450 store=persistent > nul
New Windows servers are deployed with MTU 1450 already set. The netsh command above only changes an adapter named "Ethernet": if it runs without an error but the MTU still shows 1500, your adapter has a different name. If you need to set it yourself and your adapter is not named "Ethernet" (on Windows Server 2025 it is often "Ethernet 2"), run in PowerShell as Administrator: Get-NetAdapter -Physical | Set-NetIPInterface -AddressFamily IPv4 -NlMtuBytes 1450, then check with Get-NetIPInterface -AddressFamily IPv4 | ft InterfaceAlias,NlMtu.
To check and adjust the MTU on other operating systems:
Refer to your operating system’s official documentation for specific instructions on adjusting the MTU settings.
UDP packet loss on a server that is not in a VPC
If UDP traffic loses packets while TCP to the same server works well, the usual cause is an MTU mismatch somewhere on the path between the two ends, even when the server is not in a VPC. TCP adapts to a smaller path MTU by negotiating a smaller packet size (MSS clamping); UDP has no such negotiation, so full-size packets (for example 1500 bytes on a path that carries only 1450) are fragmented or dropped.
To fix it, lower the MTU on the server's network interface using the steps above for your operating system, and check the MTU on the device or router at your end as well.
If you require assistance, feel free to submit a support ticket at our helpdesk here: Submit a ticket | BinaryLane
