DummyServer Program

"DummyServer" is a simple TCP server program, written in Java, which can listen on one or more ports for client connections. On each connection it responds with a banner which includes an "ident tag" and the port its listening on, waits to read one line of text from the client, echoes it back and then closes the connection. If the text is the word "QUIT", then the server terminates. It was originally written to assist students in hand-on data networking & Cisco network labs by giving them a target server to access on any desired port on host systems.

Since DummyServer is written in Java, it will run on any system with a suitable Java runtime. If one is not present already on your system, it may be obtained from Sun Microsystems - http://java.sun.com/j2se/. This version was written and tested using Java v1.4.2.

Files

The DummyServer suite comprises the following files:

To install it on your system, provided you have a Java runtime present, you need only copy the jar file and (if needed) the appropriate script file to a suitable location on your system. All of the above files are bundled in the DummyServer.jar JAR file, and can be extracted using the command: jar xvf DummyServer.jar

Usage

DummyServer can run in both command-line and GUI modes. If run with no arguments (ie the JAR file is directly executed), it will use the GUI interface. This displays a window with text field for entering the desired port number and a server identity tag. Note that the user running the program must be permitted to use the desired port number (ie must have root/administrator privileges on most respectable O/S's to bind to ports less than 1024). The identity tag is typically the name of the system or some other identifer for the server. It is shown to clients when they connect to it. Once these values are entered the server may be started. Multiple servers can be started on different ports.

Once the server is running, the log window lists connections to it from clients.

Alternatively, the DummyServer can be run on the command-line with additional arguments specifying the port and an optional identity_tag thus:

    DummyServer port [ident_msg]
This starts a single server on the specified port. The log of connections is written to standard error for the program.

Authorship & Copyright

The DummyServer application and GUI were written by Lawrie Brown from ADFA, Canberra Australia. Lawrie's code is Copyright © 2005 by Lawrie Brown. Permission to reuse this code as desired is granted, provided due acknowledgement is given of the author and source of the original code.


Lawrie.Brown@adfa.edu.au / 8 Mar 2005