Created
October 2, 2013 02:00
-
-
Save comoc/6788059 to your computer and use it in GitHub Desktop.
Inspect the maximum MTU value of your Mac.
Please specify the IP value to your environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ruby -e 'IP="192.168.1.1"; puts "Progress..."; for i in 1454..1500 do; cmd="ping -D -c 1 -s " + i.to_s + " " + IP; s=`#{cmd} 2>&1`; if s.include?("100.0% packet loss") && !s.include?("too") then; puts IP + " was not found"; exit(1); elsif s.include?("too") then ; puts "Max MTU is " + (i - 1).to_s; exit(0) end; end' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment