See the download page to obtain this program
This protocol simulator provides:
You can immediately try out the online simulations to get a feel for what the simulator does. Your web browser will need to be configured to run Java applets and JavaScript.
The simulator is written in Java, and so can be used on nearly any platform with a web browser and/or a Java development environment.
The simulator is provided as a tar archive compressed with gzip. This should be easy to unpack on a Unix system. Am MS Windows system will need a utility like WinZip. The simulator unpacks to a directory (folder) called jasper-N.N (version N.N), which you might rename jasper for simplicity. The distribution contains:
The simulator can be used on the downloaded files by pointing a web browser at .../jasper/html (or possibly .../jasper/html/index.html). This assumes you renamed the distribution folder as jasper. This will bring up the main page, with general instructions and a list of protocols that can be simulated. Your web browser will need to be configured to run Java applets and JavaScript. Alternatively, use an applet viewer on the files (though the JavaScript to set protocol parameters will not work).
In a web browser, select an action by clicking on the list at the bottom of the diagram. Actions are things like a user sending a data message or the medium delivering a protocol message. You are completely in control of the simulation. For example you may have to decide when to send messages, whether to acknowledge messages, and whether messages are lost in the medium or are delivered. Since the simulation does not run in real-time, a timeout is possible as soon as a message has been sent.
The last action in the diagram is shown in red. If you make a mistake, or just want to backtrack in the simulation, then click Undo. You can undo as many steps as you like, right up to the beginning of the simulation. Clicking on Redo will perform the last undone step again. Clear will restart the simulation with the current protocol parameters. If you click on Run the simulator will run automatically, making random choices for you. If you are not sure what to experiment with, this is an easy way of seeing the protocol in action. While this is happening, the Run button changes to Stop. Click on Stop to return the simulator to user control. You can continue at this point as if you had made all the automatic choices yourself.
The Print, Load and Save buttons are disabled since the simulations are running as applets. If you wish hard copy of the simulation, position the scroll bar in the simulation pane at an interesting point and print out the whole web page.
Some simulations have associated protocol parameters. To change the defaults that are shown, enter new values and click Change Values. In some cases, this will force the simulation to restart. The following is a screen-shot of the TCP simulation, showing the protocol parameters and the main simulation controls.
Running a protocol simulation as an application gives access to the Print, Load and Save buttons. Print produces a hard copy of the whole simulation scenario; individual pages cannot be selected for printing. Load loads a simulation scenario file (with a name ending in .scn); this must be for the same protocol as you are currently simulating. It replaces the current simulation scenario (if any). Save saves the current simulation as a scenario file (with a name ending in .scn). If you are adventurous, you can create and edit your own scenarios using a standard text editor.
To run the simulator as an application is a little trickier than running it as an applet. If you have make (gmake, nmake), type make protocol at a command prompt in the same directory as the makefile. protocol is a protocol name such as ABP, ABRA, BOOTP, HTTP, IP, SMTP, SWP3 or SWP5 (three or five column), TCP/cs or TCP/pp (client-server or peer-peer), TFTP, UDP.
In the makefile, you may need to adjust the CLASSPATH variable according to your platform (e.g. `.:..' on a Unix system). If you are using MS DOS/Windows, you will need a Unix-like shell (sh.exe) such as the one distributed with CygWin. Alternatively you will need to adjust the SHELL definition, or remove it entirely and make some changes to the makefile. If you do not have make, the simulator can be run from the command prompt by run protocol. You may need to adjust your CLASSPATH as above.
Protocol parameters may be given on the command line for an application. (The makefile and run scripts do not cater for this.) For example, window sizes other than the default can be selected for TCP in client-server mode. The protocol name is followed by these parameters:
java -classpath .;.. simulator/ProtocolSimulator TCPcs windowSizeA=500 windowSizeB=300
The complete source of the simulator is provided. This can be rebuilt using the makefile (noting the platform dependencies mentioned above). make will print help information. make jar will rebuild ProtocolSimulator.jar (Java Archive) in the html directory. make clean will remove all compiled class files, but preserving the JAR file. make spotless will remove even this.
If you do not have make but are using MS DOS/Windows, you can instead use the batch files build.bat, clean.bat, help.bat and spotless.bat which have a similar effect to the makefile.
To modify an existing protocol simulation or to write a new one will need a knowledge of the simulation framework. See the article An Interactive Visual Protocol Simulator for details of this and an extended example of how to develop a simulation. Once the framework is understood, a simple simulation can be developed in a day; complex protocols could take a couple of weeks to develop.
Suppose that you want to develop a new simulation of the protocol EXP (`example protocol'). You would need to write EXP.java to instantiate the various entities in the protocol. For a simple protocol, you would then write EXPSender.java and EXPReceiver.java to define the behaviour of a sending or receiving protocol entity. More complex protocols could involve defining separate entities to handle the service interface and the protocol entity. It might also be necessary to define the formats of protocol messages and a variation on the underlying medium to match these. Finally, the makefile and run.bat would need to be adjusted for the new protocol.
Bear in mind that much of the development work was undertaken by students, so the level of comments in the code is somewhat limited in places. The ABP simulation is the simplest of the protocols and is a good place to start. The TFTP simulation is the best commented and best explained of the protocols. It illustrates nearly all the key points in simulation development.
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation - either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.
Paul Johnson and Kenneth Whyte contributed to the development of some of the simulations.
Version 1.0: Private internal version, Iain Robin <iain_robin@hotmail.com>, 1st September 1999
Version 1.1: Private internal version, Ken Turner, 22nd December 2000
Version 1.2: Private internal version, Ken Turner, 5th March 2001
Version 1.3: First public release, Ken Turner, 6th June 2001
Up one level to Communications Utilities