Skip to content

Instantly share code, notes, and snippets.

@prafiles
Last active January 18, 2023 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prafiles/52b3d9bd29418945a5950d5ac62a1348 to your computer and use it in GitHub Desktop.
Save prafiles/52b3d9bd29418945a5950d5ac62a1348 to your computer and use it in GitHub Desktop.
Script to ascertain MTU
#!/bin/bash
size=1272
while ping -s $size -c1 -M do 8.8.8.8 >&/dev/null; do
((size+=4))
done
echo "Max MTU size: $((size-4+28))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment