Networking Test ToolHere is a basic BAT file for testing your Internet Settings
Here is a list of tools1 - Test your network
2 - Show your network details
3 - Refresh IP
4 - Clear network cache and ARP tables
5 - Trace the route of packets
6 - Reinstall the TCP/IP protocol
7 - Reset the Winsock API
8 - Exit
Here is the code or you can download BAT fileDownload Network Test Tool@echo off
TITLE "Network Test Tool"
:start
echo.
echo --------------------------------
echo Welcome to the Network Test Tool
echo --------------------------------
echo.
echo This program works best when it is run from an account
echo with administrative rights.
echo.
echo Please remember to use these commands with:
echo Discretion, knowledge and common sense.
echo.
C:
CD %SystemRoot%\System32 2>nul
CD %SystemRoot%\sysWOW64 2>nul
REM Changes directory into where we need
:menu
echo.
echo 1 - Test your network
echo 2 - Show your network details
echo 3 - Refresh IP
echo 4 - Clear network cache and ARP tables
echo 5 - Trace the route of packets
echo 6 - Reinstall the TCP/IP protocol
echo 7 - Reset the Winsock API
echo 8 - Exit
echo.
SET /P MENU=Selection:
IF {%MENU%}=={1} (goto :test)
IF {%MENU%}=={2} (goto :ip)
IF {%MENU%}=={3} (goto :refresh)
IF {%MENU%}=={4} (goto :cache)
IF {%MENU%}=={5} (goto :trace)
IF {%MENU%}=={6} (goto :tcp)
IF {%MENU%}=={7} (goto :api)
IF {%MENU%}=={8} (goto :exit)
echo.
echo Pease make a proper selection
goto :menu
REM if it has not gone to something, you did it wrong
:test
echo.
echo.
echo Testing basic connectivity.
echo.
ping google.com > %TEMP%\pinglog
REM Changes directory into where we need, and pings Google while tempsaving the output.
find "Reply from" < %TEMP%\pinglog > nul
if not errorlevel 1 echo We can connect to Google.com! This signifies all is good with your connection.
REM Perfect connection :D
find "Request timed out" < %TEMP%\pinglog > nul
if not errorlevel 1 echo Couldn't connect, your connection timed out! I'd recommend you refresh the page and try again!
REM Usually this means is that their server is slow. Usually.
find "Unknown host" < %TEMP%\pinglog > nul
if not errorlevel 1 echo Couldn't connect, unknown host! This means the site is new and we don't know their IP address.
REM Oh noes! You found a new site! That's why DNS and IP won't match up... not for the next little bit at least.
find "could not find host" < %TEMP%\pinglog > nul
if not errorlevel 1 echo Couldn't connect, your connection can't find the host. This means that you're not connected to the internet. Most likely your ISP is down or your wireless card cannot get a clear signal.
REM Connect to the internet or check your cables. Chances are good it's one or the other.
echo.
goto :menu
:ip
echo.
echo.
SET /P DETAIL=Basic or Advanced level of detail (b/a):
echo.
echo Finding network details...
echo.
IF /i {%DETAIL%}=={b} (ipconfig)
IF /i {%DETAIL%}=={a} (ipconfig /all)
echo.
echo Done
echo.
goto :menu
REM Basic diagnostic tool. See your internal IP. Advanced users may want to see DNS or DHCP, subnet mask, proxy, and someothers.
:refresh
echo.
echo.
echo Working...
echo.
ipconfig /release
echo.
ipconfig /renew
echo.
echo Done
echo.
goto :menu
REM IPConfig/release & /renew, oldest tricks in the book to restore a connection. And it works.
:cache
echo.
echo.
echo Working...
echo.
netsh interface ip delete arpcache
ipconfig /flushdns
echo.
echo Done
echo.
goto :menu
REM Kinda funny how this is the second most common issue, eh? Worth a shot!
:trace
echo.
echo.
SET /P ADDRESS=Input address:
echo.
echo Working...
echo.
tracert %ADDRESS%
echo.
echo Done
goto :menu
REM Traceroot, inside your own computer. Most geeks I know don't even realise it!
:tcp
echo.
echo.
echo It is best to have administrative privillages to run this command.
SET /P CONTINUE=Continue (y/n):
IF /i {%CONTINUE%}=={n} (goto :menu)
echo.
echo Reinstalling TCP/IP protocol...
netsh int ip reset %TEMP%\resetlog.txt
echo Done. You must restart your computer for the changes to take full effect
echo.
goto :menu
REM I hate netsh. It requires admin account and everything needs a computer restart. But sometimes it's the only way out
:api
echo.
echo.
echo You NEED to have administrative privillages to run this command.
SET /P CONTINUE=Continue (y/n):
IF /i {%CONTINUE%}=={n} (goto :menu)
echo.
echo Resetting Winsock API...
netsh Winsock reset
echo Done
echo.
goto :menu
REM winsock is the interface programs use to access the TCP/IP stack. Sometimes a layered service provider(LSP) will fit between the winsock and TCP/IP layers. This should fix how winsock deals with that extra LSP
:exit
echo.
echo.
echo Thank you for using the Network Test Tool. Have a good day!
echo.
pause