---
title: IT関連技術レポートの情報公開（#5 MTU check Bat file ）
description: IT関連技術に関するレポートを公開する際のポイントや方法について解説します。
---

[ブログ](https://sola-solutions.jp.net/ja/ブログ)

# [IT関連技術レポートの情報公開（#5 MTU check Bat file ）](https://sola-solutions.jp.net/ja/ブログ/簡単なit関連技術レポートの情報公開-0-0-0-0)

 作成者: [Keith Nakagama](https://sola-solutions.jp.net/ja/ブログ/author/keith-nakagama)｜Jun 26, 2024, 1:02:19 PM

 

## MTUのサイズの見つけ方

**How to find out MTU Size**

Here is the Bat file program.

------------------------------------------

echo off  
set mtu=300  
set IPADDR=192.168.1.1  
echo Target IPAddress is %IPADDR%

rem ontime Check  
ping %IPADDR% | find "ms TTL" > NUL  
if ERRORLEVEL 1 goto err

rem 100MTU Check  
:check1  
echo try DataSize: %mtu%  
ping -f -l %mtu% %IPADDR% | find "ms TTL" > NUL  
if ERRORLEVEL 1 goto check2  
set /a mtu = mtu + 100  
goto check1  
pause

rem 50MTU Check  
:check2  
echo DataSize: %mtu% is Failed.  
set /a mtu = mtu - 50  
echo try DataSize: %mtu%  
ping -f -l %mtu% %IPADDR% | find "ms TTL" > NUL  
if ERRORLEVEL 1 (  
 echo DataSize: %mtu% is Failed.  
 set /a mtu = mtu - 50  
)  
goto check3  
pause

rem 10MTU Check  
:check3  
set /a mtu = mtu + 10  
echo try DataSize: %mtu%  
ping -f -l %mtu% %IPADDR% | find "ms TTL" > NUL  
if ERRORLEVEL 1 (  
 echo DataSize: %mtu% is Failed.  
 set /a mtu = mtu - 10  
 goto check4  
)  
goto check3  
pause

rem 1MTU Check  
:check4  
set /a mtu = mtu + 1  
echo try DataSize: %mtu%  
ping -f -l %mtu% %IPADDR% | find "ms TTL" > NUL  
if ERRORLEVEL 1 goto result  
goto check4  
pause

rem Result Display  
:result  
rem IP headder 8byte {ICMP headder 20byte  28byte  
rem Success data size(mtu-1) {28byte MTU size calicurate.  
echo DataSize: %mtu% is Failed.  
set /a mtu = mtu + 27  
echo Check Complete!!  
echo ---------------------------------------------  
echo MTU is %mtu%.  
echo ---------------------------------------------  
echo on  
pause  
exit

rem ping doesn't reach  
:err  
echo ---------------------------------------------  
echo Ping doesn't work. Not reach to target IP address.  
echo To make sure Netwrok connection again.  
echo ---------------------------------------------  
echo on  
pause  
exit

-------------------------------------------------------------

Bat file running example.

[完全な記事を表示](https://sola-solutions.jp.net/ja/ブログ/簡単なit関連技術レポートの情報公開-0-0-0-0)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Keith Nakagama"
  },
  "dateModified" : "2024-07-14T00:09:45.158Z",
  "datePublished" : "2024-06-26T13:02:19Z",
  "headline" : "IT関連技術レポートの情報公開（#5 MTU check Bat file ）",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://sola-solutions.jp.net/ja/ブログ/簡単なit関連技術レポートの情報公開-0-0-0-0",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "ブログ"
  }
}
```