Written by James McDonald

July 15, 2011

I keep having to Google how to discover the correct MTU for a link so I’m going to blog about it to save the effort.

The command to test for the MTU in Linux is:
ping -M do -s <bytes> <ip address>

First a succesful MTU test ping:

ping -M do -s 1372
PING ( 1372(1400) bytes of data.
1380 bytes from icmp_req=1 ttl=63 time=88.5 ms
1380 bytes from icmp_req=2 ttl=63 time=90.9 ms
1380 bytes from icmp_req=3 ttl=63 time=90.0 ms

The above command is actually a ping down a PPTP tunnel. The default MTU for a PPTP connection in Windows is 1400 as you can see from the above I am using -s 1372 as the byte size because once you have to had a 28 byte header to get the 1400 bytes total which is the MTU (Maximum Transfer Unit).

Then you have to increase the -s parameter up until you see the following output. And then step down till it’s working again.

Now a ping with a packet size too big:

ping -M do -s 1373 
PING ( 1373(1401) bytes of data.
From icmp_seq=1 Frag needed and DF set (mtu = 1400)
From icmp_seq=1 Frag needed and DF set (mtu = 1400)
From icmp_seq=1 Frag needed and DF set (mtu = 1400)
From icmp_seq=1 Frag needed and DF set (mtu = 1400)

The packet will not pass.

Viewing the MTU of local linux connections:
From a terminal issue the /sbin/ifconfig command you can see the MTU listed in the output as follows.

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:  P-t-P:  Mask:
          RX packets:212 errors:0 dropped:0 overruns:0 frame:0
          TX packets:237 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:101633 (99.2 KiB)  TX bytes:39813 (38.8 KiB)

p4p1      Link encap:Ethernet  HWaddr F4:6D:04:92:76:7D  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::f66d:4ff:fe92:767d/64 Scope:Link
          RX packets:80676 errors:0 dropped:0 overruns:0 frame:0
          TX packets:91041 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:45961600 (43.8 MiB)  TX bytes:17869824 (17.0 MiB)
          Interrupt:45 Base address:0xa000 


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Network speed test host to host

On Ubuntu / Debian apt-get install iperf3 On Windows download it from https://iperf.fr/iperf-download.php#windows Make...

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...