netscan

Copyright 2000 - 2004, Stuart Udall

overview
important bits
installation
configuration and startup
controls and methods
issues and limitations
planned improvements
revision history
download

version 0.07: October 10, 2004


 
  overview

NETSCAN runs multiple tests against a remote host and logs the results to file. The basic tests it runs are:

  • PING (to establish connectivity, resolve hostname, and measure reliability of connection)
  • TRACERT (to get routing and timing information)
  • NBTSTAT (to get remote machine name table and MAC address)
  • NET VIEW (to get remote machine shared resources)

NETSCAN can perform a quick ping against this remote host, to verify network connectivity.

If performing a group scan (ie., scanning a list of IP addresses), it will identify the local system using bundled Windows tools:

  • NET CONFIG (to get computername, workgroup, username)
  • IPCONFIG (to get IP configuration)
  • NETSTAT (to get active connections, routes, and TCP/IP statistics)

NETSCAN can perform a quick ping against this list of IP addresses, to verify network connectivity.

NETSCAN can perform a quick ping against a list of remote hosts, to verify network connectivity.

NETSCAN can also run a quick ping against a prespecified remote host, to verify local internet connectivity.

If NETSCAN cannot contact the remote host, it will offer to verify the functionality of the local TCP/IP stack, the LAN, and the local internet connection. It will not offer this if scanning a list of addresses, however. If local network connectivity is verified, NETSCAN will trace a route to the remote host, in order to pinpoint the problem.

NETSCAN includes a "super" mode in which it runs three tests sequentially: quick ping of local IP addresses; quick test of internet connection, and quick ping of remote hosts.

NETSCAN logs everything it does to disk.

Using Windows' Task Scheduler, NETSCAN can be scheduled to run at at given interval, and constantly monitor your network.


 
  important bits

  • requires Windows 9x
  • requires STAMP.EXE (included, licence-free)
  • some functions require an active internet connection

  • the following points are this program's terms and conditions of use:
  1. This program is hereinafter known as "the Software".
  2. The Software comes with no warranty and is used at your own risk.
  3. The Software is not (and will never be) complete and as such may behave strangely.
  4. The Software is the copyrighted property of the author.
  5. The Software may be distributed freely.
  6. The Software may NOT be incorporated into a commercial work without prior written permission from the author.
  7. The Software is "donateware" - you can choose your amount, and pay with Paypal! Donating will encourage me to create more tools. If you do decide to donate, thankyou in advance; the form is here.

There is a feedback form here.


 
  installation
  1. run the self-extracting distribution archive, and extract the files to a directory of your choice

  2. ensure you have CHOICE, FIND, NET, NBTSTAT, NETSTAT, PING, TRACERT and STAMP (included) somewhere in the PATH

    The PATH is defined in C:\AUTOEXEC.BAT and consists of a series of directories, each separated by a semicolon.

    To place a program in the PATH, copy it into a directory which is mentioned in the PATH statement, or add the directory name to a PATH line in C:\AUTOEXEC.BAT

    To test whether a program is in the path, get to a command prompt, type the program's name, and press Enter.

    CHOICE, FIND, NET, NBTSTAT, NETSTAT, PING and TRACERT are probably in the PATH already, as they are bundled with Windows; STAMP may not be - it is supplied, and you chould copy it to your C:\WINDOWS\COMMAND directory, if unsure.

Note: once you have configured and tested NETSCAN, you may wish to copy it to a directory in your PATH (as discussed above).


 
  configuration and startup

  • Using a text editor such as Notepad, edit NETSCAN.BAT and change the environment variables as detailed in the table below. The variables are identified by the SET command which precedes them, eg. SET ROUTER=192.168.0.1. The environment variables are at the top of the file and are clearly marked.

    variablenameexplanation
    NETLOGthe file to contain test results; an example would be SET NETLOG=d:\data\logs\netscan.log
    ROUTERis the IP address of your router or internet gateway; an example would be SET ROUTER=192.168.0.1
    DEFAULTis the IP address of a reliable internet server; an example would be SET DEFAULT=www.yahoo.com
    NODELISTa comma-separated list of the last parts of your IP addresses that are different from each other.

    An example would be SET NODELIST=1,2,3,4,5, which would tell NETSCAN to append ".0", ".1" etc. to the rest of the IP address defined in the NETMASK variable below.

    SERVERLISTa comma-separated list of remote hosts your wish to check (used with the /SERVERS parameter)

    An example would be SET SERVERLIST=mail.cyberdelix.net,www.cyberdelix.net, which would tell NETSCAN to ping those servers

    NETMASKis the first part of your IP addresses that are the same.

    An example would be SET NETMASK=192.168.0, which would tell NETSCAN to prepend "192.168.0" to the list of IP addresses defined in the NODELIST variable above.

    NETTEMPa file to use for temporary writing and reading. The default should work on most systems. An example would be SET NETTEMP=c:\temp\nettemp.tmp

Note: using unresolved (eg. human-readable) addresses instead of IP addresses in the ROUTER and DEFAULT fields works, however test results will be unreliable if the test machine's DNS server is unreachable.

Note: NETSCAN will not execute if the NETLOG, ROUTER or DEFAULT environment variable are not set.

Note: If scanning a range of IP addresses, NETSCAN will not execute if the NETMASK and NODELIST environment variables are not set.


 
  controls and methods

  • type NETSCAN on the commandline, plus any optional parameters, as detailed below:

    parametersexplanation
    <none>With no paramters supplied, NETSCAN will scan the list of IP addresses defined by the variable NODELIST inside NETSCAN.BAT for resolved hostname, traceroute, computername, nametable, and shares. It will also run a series of tests against the local system.
    /PINGTo verify connectivity to the list of IP addresses defined by the variable NODELIST inside NETSCAN.BAT.
    IPaddressTo scan the supplied IP address for resolved hostname, traceroute, computername, nametable, and shares.
    IPaddress /PINGTo verify connectivity to the supplied IP address.
    /DEFAULTTo verify connectivity to the default remote host defined by the variable DEFAULT inside NETSCAN.BAT.
    /SERVERSTo verify connectivity to the list of remote hosts defined by the variable SERVERLIST inside NETSCAN.BAT.
    /SUPERThis is the equivalent of using /PING, /DEFAULT and /SERVERS one after another.

Note: To change NETSCAN's internal variables, see the configuration section.

Note: When NETSCAN is not running in groupscan or groupping mode, if it is unable to reach a remote host, it will offer to verify local network connectivity. If local network connectivity is verified, it will trace a route to the remote host, in order to pinpoint the broken connection. Press N to skip verification.

Note: When NETSCAN is running in groupscan, groupping or super mode, it will include information about the local system in the logfile.

Note: To automatically overwrite the logfile in SUPER mode, use NETSCAN /SUPER /AUTO


 
  issues and limitations

  • unreliable DNS server may make tests unreliable
  • unknown whether this works on NT/ME/2K/XP .....
  • number and document error messages

 
  planned improvements
  • configuration program/shell


 
  revision history

Jul 20000.01initial development; basic implementation
Jul 20000.02added local system detection
Aug 20000.03added quick ping
Aug 20000.04added group scan
Oct 20000.05added HTML documentation and SFX distribution
Dec 20010.06added network connectivity verification, and /DEFAULT, /SERVERS, and /SUPER parameters
Oct 20040.07added /AUTO to allow automatic logfile overwrite


 
  download

netscan.exe  library