Friday, June 4, 2021

How to do MTU discovery on Linux and Mac



To find the optimal MTU for your network, you need to find the maximum packet size you can send through it. 

on Mac  use the following command to send ping packets with a MTU size of 1500 :

ping -D -s $((1500-28)) -c 1 1.1.1.1

and on linux use:

ping -M do -D -s $((1500-28)) -c 1 1.1.1.1


To find the default MTU that is set on your device, use the following command on linux 

ip -d link list

and on mac use :

networksetup -getMTU en0

ifconfig should also show the default MTU for your network interfaces.


No comments:

Post a Comment

How to export Apple Health / Google Fit training activity to TCX format

  I own a Xiaomi Smart Band 7, and recently, my Mi Fitness app stopped syncing running activities to Strava. Mi Fitness supports syncing dat...