Click here to Skip to main content
15,881,248 members
Articles / Desktop Programming / MFC
Article

How to test the reachability of a VPN-Connection?

Rate me:
Please Sign up or sign in to vote.
3.30/5 (8 votes)
15 May 20042 min read 112.6K   2.4K   22   11
Program to test the availability of hosts in a network on the basis of ICMP-Pings.

SimpleLineTester

What is this?

SimpleLineTester is a very easy to use command-line program (written in VB.NET) to test the availability of hosts in a network on the basis of ICMP-Pings. You can use it, if you want to check, when your provider is disconnecting you, and when your firewall / Router is connecting you up to the Internet again. It is also very helpful to test the availability of a VPN-Connection over more then 24 hours (especially in conjunction with a DynDNS-service). I personally needed this program to test a VPN-Online-Connection, so I thought, maybe anyone needs such a tool too?! Here it is!

This program is OPEN-SOURCE. See here for the open-source package.

Features:

  • Ping as many hostnames and IP-addresses as you want, only limitation is your computer-hardware! (threading)
  • High-resolution pings with 3 positions after decimal point (in the source, it is measured with the precision of 100ns).
  • 5-Mode System to ensure that a host is really gone down.

How does it function?

The program starts a new sub-thread for every host. The default-settings are as follows:

It pings the host every 1500 ms, and waits for a ping in normal mode 1200 ms. When a ping is not received, the mode is changed (Timeout is the time, the programs waits for a ping in ms, and Sleeptime is the time the program waits before sending a new ICMP-ping-packet:

ModeTimeoutSleeptime
NormalChecking12001500
RetryTest120003000
RetryTest250006000
RetryTest31000011000
DownTest50006000

So, when a ping-packet is not received in time, the mode goes one level down. This function ensures compatibility with hosts that are becoming really slow. When a ping is received again, the mode is set to NormalChecking. The program resolves the given hostnames every 30 seconds (for use with DynDNS). This would be a sample-log-entry:

15.04.2004 20:50:58 | Thread started, testing 192.168.0.254 every 1500 ms
15.04.2004 20:50:59 | Resolved IP has changed from 127.0.0.1 to 192.168.0.50
15.04.2004 20:51:00 | Up | Delay: 90,125 ms
16.04.2004 09:00:23 | Down
16.04.2004 09:00:35 | Up | Delay: 981,402 ms

What are the Requirements to run the Program?

  • Windows 98/2K/Me/XP/2K3 (only tested under 2K, XP)
  • Microsoft .NET Framework Version 1.1 Redistributable Package
  • 21 KB of free disc-drive =)

How to use it?

  1. First, you need to install Microsoft .NET Framework Version 1.1 Redistributable Package (you can go to step 2 if you're sure that this is installed on your PC: download here).
  2. You need to download the SimpleLineTester, if you haven't done that already (here).
  3. Unpack SimpleLineTester (packed with WinRar).

    The archive contains 4 files:

    • SimpleLineTester.exe, the main program
    • SimpleLineTesterLib.dll, the libs for the program
    • config.txt, the config-file
    • readme.txt, this file
  4. Configure the program for your needs. The format in config.txt is:
    host.com 192.168.1.1 anotherhost.com

    This means write down the hostnames in the first line, separated with one space, there shouldn't be a space behind the last host ! :-/

  5. Finished!

Start SimpleLineTester.exe without parameters (that are none) and enjoy. Thank you for using!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Engineer
Germany Germany
Thomas is interested in technical programming, networking and security technologies.

Currently he's studying at a german university

Comments and Discussions

 
QuestionCode Pin
Devon Amato27-Apr-12 8:48
Devon Amato27-Apr-12 8:48 
GeneralCPU usage Pin
jouleverne20-Feb-05 3:11
jouleverne20-Feb-05 3:11 
GeneralRe: CPU usage Pin
Julian Brown22-Jun-05 11:23
Julian Brown22-Jun-05 11:23 
GeneralRe: CPU usage Pin
wilyCoyote6-Apr-06 12:29
wilyCoyote6-Apr-06 12:29 
Generalexception Pin
bruno cortona9-Dec-04 20:41
bruno cortona9-Dec-04 20:41 
GeneralRe: exception Pin
thomasdev10-Dec-04 0:15
thomasdev10-Dec-04 0:15 
Generalextension Pin
thomasdev17-Jun-04 20:46
thomasdev17-Jun-04 20:46 
GeneralRe: extension Pin
MPROCTOR28-Jan-05 15:12
MPROCTOR28-Jan-05 15:12 
GeneralRe: extension Pin
MPROCTOR14-Feb-05 23:02
MPROCTOR14-Feb-05 23:02 
Any news on that Ping class?
GeneralRe: extension Pin
MPROCTOR11-Apr-05 1:25
MPROCTOR11-Apr-05 1:25 
AnswerRe: extension Pin
MatthysDT7-Aug-06 3:45
MatthysDT7-Aug-06 3:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.