How to change your interface MTU in Linux
Here is how to change your interface MTU size in Linux os. My example below is from an Ubuntu VM.
- Open the Terminal program to get a command line prompt.
- Type the command ifconfig into terminal to see current interface info. You may see something like eth0 for the interface. But in my example from a VM below I am seeing enp0s3. ( You may be asking what is enp0s3? This is a part of a standard for Predictable Network Interface Names. (You can find more info on that here if your interested or more detail at the bottom of this post. )
- To change the MTU size to 1518 in my example, I am going to use the command sudo ifconfig enp0s3 mtu 1518 , this will change the MTU size to 1518 on the specific interface I identify in the command (for me this is interface enp0s3).
- Here you can see the MTU size has now been changed to 1518.
Why is the interface called enp0s3 ?
Basically it breaks down to “en” Ethernet “p <bus> s <slot>” which is how my interface got named enp0s3.
You can find the full naming information in the comments section HERE. But here is short summary of it.
en — Ethernet
ib — InfiniBand
sl — serial line IP (slip)
wl — wlan
ww — wwan
b<number> — BCMA bus core number
c<bus_id> — bus id of a grouped CCW or CCW device,
with all leading zeros stripped [s390]
— on-board device index number
— hotplug slot index number
x<MAC> — MAC address
— PCI geographical location
— USB port number chain
v<slot> – VIO slot number (IBM PowerVM)
a<vendor><model>i<instance> — Platform bus ACPI instance id
i<addr>n<phys_port_name> — Netdevsim bus address and port name
Changing MTU in Windows
If you would like to see how to change the MTU size in windows, you can see that in this post here.