Monday, March 18, 2013

IPv6 MTU discovery

Thanks to http://muzso.hu/2009/05/17/how-to-determine-the-proper-mtu-size-with-icmp-pings it looks like it's easy to discover the IPv6 MTU (Maximum Transmission Unit):


$ ping6 -c1 -M do -s 10000 www.google.com  | grep mtu | awk '{ print $NF }' 

mtu=1500

So the IPv6 MTU to www.google.com is 1500.

From another system, the MTU is 1480:

$ ping6 -c1 -M do -s 10000 www.google.com  | grep mtu | awk '{ print $NF }'

mtu=1480


Easy, isn't it?

For old-skool IPv4, the output of ping is a bit different, so the awk parsing is a bit different:


$ ping -c1 -M do -s 10000 www.google.com | grep mtu | awk '{ print $NF }' | sed -e s/\)//

1500

HTH


No comments: