MTUサイズを調べる

pingでデータの送信長を指定して調べる。
以下の例では1472byteでOKで、1473byteでNGなので、MTUサイズは
1472(データサイズ)+8(ICMPヘッダ)+20(IPヘッダ)=1500bytes
となる。

$ ping -f -l 1472 -n 1 xxx.xxx.xxx.xxx //1472bytes送信
Pinging xxx.xxx.xxx.xxx with 1472 bytes of data:
Reply from xxx.xxx.xxx.xxx: bytes=1472 time=1ms TTL=127 //応答OK
Ping statistics for xxx.xxx.xxx.xxx:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms

$ ping -f -l 1473 -n 1 xxx.xxx.xxx.xxx //1473bytes送信
Pinging xxx.xxx.xxx.xxx with 1473 bytes of data:
Packet needs to be fragmented but DF set. //応答OK
Ping statistics for xxx.xxx.xxx.xxx:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),

投稿者 java

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です