79
Version 1.109 9/6/2008 Page 1 of 79 JNW USERS GUIDE Version 1.109 of August 05, 2008 FOR JAVA NETWORK WORKBENCH (JNW)

9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 1 of 79

JNW USERS GUIDE

Version 1.109 of August 05, 2008

FOR

JAVA NETWORK WORKBENCH (JNW)

Page 2: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 2 of 79

Java Network Workbench Version 1.106

Copyright (c) 2007 by J. Mark Pullen George Mason University, Fairfax, Virginia

Permission to use, copy, modify, and distribute this

software and its documentation for academic purposes is hereby granted without fee, provided that the above copyright notice

and this permission appear in all copies and in supporting documentation, and that the name of George Mason University

not be used in advertising or publicity pertaining to distribution of the software without specific, written prior

permission. GMU makes no representations about the suitability of this software for any purposes. It is provided "AS IS"

without express or implied warranties. All risk associated with use of this software is expressly assumed by the user. GMU does not give its permission to sell this software, or include it within commercial products, without separate

written agreement.

Page 3: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 3 of 79

INTRODUCTION This guide is provided to help students use JNW, the Java version of Network Workbench. JNW was developed in Netbeans 6.1 using Java 1.5.0. This guide is oriented towards students using JNW for network simulation. The “Software Developers Guide” provides more information for software developers. Java VERSION Since JNW uses Java enumerations which were introduced with java version 1.5.0, Java version 1.5.0 or later is needed to compile or run JNW. NetBeans ENVIRONMENT INSTALLATION Network Workbench in Java was should compile and run correctly with Java version 1.5.0 or later. Please read the section “KNOWN ERRORS-PROBLEM BETWEEN JNW AND NETWORK EDUCATION WARE (NEW)” if you use a version later than Java 1.5.0 for a possible error when running the Network Education Ware. You can download the NetBeans 6.1 IDE environment from http://download.netbeans.org/netbeans/6.1/final/ . If you plan on using Network Education Ware (NEW) for attending class via the Internet, do not download a version of NetBeans with JDK version 6.0 or later if you plan on using Network Education Ware (NEW) for attending class via the Internet. There appears to be a conflict between the Java 1.6 and NEW. Execute the download which will install the Java runtime environment and the development environment, NetBeans, in the directory of your choice. INSTALLING JAVA NETWORK WORKBENCH SOURCE CODE IN NetBeans In NetBeans, create a new project by entering Ctrl+Shift+N. In the New Project window choose "Java Application" or "general application," depending on the NetBeans version. In the next window, change the default Project Name from "JavaApplication"N to "JNWS." In the same window, you can choose the Project Location, where the project will be stored: C:\JNWS is strongly recommended. If you are using the brand-new Netbeans 6.0.1, I have noticed that it did not create the correct project name. If the project name shown is not "JNWS,"

Page 4: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 4 of 79

delete the project by right-clicking on the project name, and deleting the project. Be sure to delete all the sources under C:\JNWS When the folder C:\JNWS is created, delete the folder C:\JNWS\src\JNWS, where NetBeans stores the source code. Copy the Java Network Workbench code into C:\JNWS\src. You should now be ready to compile and run JNW. INSTALLING JAVA NETWORK WORKBENCH JAR IN NetBeans Put the .jar file wherever you want. If you are running the student version of JNW, JNWS, put the .jar file into the folder where you are installing the student exercises folder as described above. In the NetBeans Projects window, right-click on the project JNWS. Choose “Properties” at the bottom of the list. In the Project Properties window choose the Libraries category. Choose the Compile tab and click the Add JAR/Folder button. Navigate to the JNW.jar file and click OK. The JNW.jar file is now in the classpath of the compiler. Now when you compile, all the classes of JNW are available. INSTALLING JAVA NETWORK WORKBENCH IN OTHER ENVIRONMENTS Another commonly used environment is Eclipse, available from http://www.eclipse.org/downloads/ . Extract the .zip file to any folder and execute eclipse\eclipse.exe. The workspace launcher in Eclipse will ask for a workspace. Use C:\JNWS. Create a project with File -> New -> JavaProject and give it the name JNWS. You (non-existent) source code should now be installed in C:\JNWS\JNWS\src. As with NetBeans, copy the code into C:\JNWS\JNWS\src. Under File, click on Refresh, and the source files will appear. You should be ready to compile and run. NetBeans and Eclipse are pretty similar in operation. If you can use one, you can easily adapt to the other. JNW DEVELOPMENT STATUS JNW, the Java version of Network Workbench is in development. Some of the features of the C++ version of Network Workbench are not yet implemented. Presently, a general router network and an Ethernet bus are implemented; a token ring is not. There is no multicasting. Some of the buttons on the Main GUI are inoperable. They are simply placeholders for later additions.

Page 5: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 5 of 79

JAVADOC JNW has a JavaDoc, which you can create by clicking on “Build” on the tool bar and then “Generate JavaDoc for ‘JNWS’.” Once generated, the JavaDoc is stored in C:\JNW\dist\javadoc. Other than the overall description, the JavaDoc is complete, and it defines all class variables down to the private level. This is how you should learn about the classes and methods that are available for your use. You may wish to display the version number with the JavaDoc. If the version number is not displayed, right-click on the project JNW(S), select Properties at the bottom, select Build Documenting and check the Document Additional Tags: @Author and @Version. The JavaDoc for JNW has several links to external sites. For example the class ModelNetwork.Routing has fours links to sites that explain Dijkstra's Algorithm and have interactive implementation of the algorithm. SETTING THE MAIN METHOD If you run the student version of JNW and get an error message

java.lang.NoClassDefFoundError: jnws/Main Exception in thread "main" Java Result: 1

this means that NetBeans is trying to find the incorrect main ( String [ ] args ) method. There are approximately 5 mains in JNW, most of which are for testing classes. To correct this

1. Right-click on the JNWS project in the Projects window of NetBeans.

2. Click on the “Properties”, the last entry on the list.

3. Click on the “Run” category in the Project Properties window.

4. In the “ Main Class:” entry, use the “Browse” button to choose StartJNW or another main if you specifically need it.

JNWS will now run.

Page 6: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 6 of 79

RUNNING JNW FROM THE .JAR FILE If you just wish to execute JNW without any development or changes, execute the .jar file, which should be included in the software distribution, as

java –jar JNW.jar from the folder where you have JavaNetworkWorkbench.jar stored. In NetBeans, the source code of the distribution is stored in the src folder, and the .jar file is stored as dist\JNW.jar. If you try to run a .jar file with a compiler which is an earlier Java release than was used to compile the .jar file, you will get an error message. Change to a later version of java, or contact the authors. CHOOSING THE CORRECT main (String [ ] args) JNW has many main (String [ ] args) methods that have been used for testing. These will be cleaned out in a near future release. Ignore them. The model is started with the main method in StartJNW in the highest level package. MAIN GUI The main GUI,

Page 7: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 7 of 79

Figure 1 MainGUI

contains the controls to input the data. The output data is written to the center panel of the Main GUI. Please note that the sixth through eleventh buttons on the toolbar are inoperable placeholders for later additions. NETWORK TYPES Network Workbench can represent three different network types, a Router Network, an Ethernet bus and a token ring as shown in figure 2 below:

Page 8: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 8 of 79

Figure 2 Network Types in Network Workbench

Presently (1 August 2008) only the Router Network is properly implemented. The other network types will be implemented as possible.

NODES, LINKS, AND INTERFACES In JNW, a Node is a computer which can send or receive messages or route messages. It can be the message source, the messages destination, or it may be only an intermediate stop between the source and destination. JNW does not differentiate between a node and a router. In JNW they are identical. Links are the physical layer of the model. A link only introduces a delay in frame propagation and int introduces bit errors.

Page 9: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 9 of 79

Interfaces operated the data link layer. The interface wraps an input UDP or TCP packets into a frame fro transmission. The interface handles error detection and retransmission. In JNW, Nodes, Links, and Interfaces are stored in java.util.Vectors. In this way, the user does not need to specify a priori, the number of nodes, etc. All the information is contained in the network topology file. The nodes in the network topology file must be numbered 0 to N-1. If the nodes are not numbered this way, an error message is generated. JNW will automatically correctly number the links and interfaces.

READING NETWORK TOPOLOGY FROM A TEXT FILE Regardless of the network type, Router Network, Ethernet bus, or token ring, the network topology is specified by a comma-separated text file, which can be stored anywhere. The type of network is specified by a line

NETWORK-TYPE:Router_Network, NETWORK-TYPE:Token_Ring, or NETWORK-TYPE:Ethernet_Bus

Each other line of the input represents one link between nodes. The nodes should be numbered 0 to N-1. The input data in order is for each line in the text file is:

1. SOURCE NODE NUMBER ( 0 to N-1) , 2. DESTINATION NODE NUMBER ( 0 to N-1) , 3. CAPACITY ( in kbps), 4. LINK TYPE (“”HDLC”, “Ethernet”, “Token_Ring”), 5. BIT ERROR RATE ( for example 0.0000001) , and 6. TRANSMISSION DELAY ( in microseconds)

In the example below

// JAVA NETWORK WORKBENCH TOPOLOGY INPUT FILE // FORMAT: SOURCE NODE NUMBER, DESTINATION NODE NUMBER, CAPACITY IN KBPS // FORMAT: INTERFACE TYPE, BIT ERROR RATE, TRANSMISSION DELAY // Figure 8.8 of Pullen // The delay time is 10 times the number in Figure 8.8 of Pullen // NOTE: The error rates are insignificant, essentially 0.!

Page 10: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 10 of 79

// Network type is a router network NETWORK-TYPE:Router_Network // MANDATORY LINK CHARACTERISTICS // LINK FORMAT: SOURCE NODE NUMBER, DESTINATION NODE NUMBER, CAPACITY IN KBPS, // INTERFACE TYPE, BIT ERROR RATE, TRANSMISSION DELAY IN MICROSECONDS //Duplex link between nodes 1 and 2, by the numbering in the book 0,1,10000,Ethernet, 0.000000001 , 60 //Duplex link between nodes 1 and 3, by the numbering in the book 0,2,10000,Ethernet, 0.000000001 , 90 //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between nodes 2 and 5, by the numbering in the book 1,4,10000,Ethernet, 0.000000001 , 30 //Duplex link between nodes 3 and 6, by the numbering in the book 2,5,10000,Ethernet, 0.000000001 , 20 //Duplex link between nodes 4 and 5, by the numbering in the book 3,4,10000,Ethernet, 0.000000001 , 30 //Duplex link between nodes 4 and 6, by the numbering in the book 3,5,10000,Ethernet, 0.000000001 , 40 //Duplex link between nodes 5 and 7, by the numbering in the book 4,6,10000,Ethernet, 0.000000001 , 40 //Duplex link between nodes 6 and 7, by the numbering in the book 5,6,10000,Ethernet, 0.000000001 , 50

there are seven nodes connected via 10 megabit per second, Ethernet, point-to-point links, with essentially error-free transmissions. The delay between nodes 0 and 2 is 60 microseconds, 1 and 4 30 microseconds, etc. This represents the router network shown below in Figure 8.8 of the textbook, except that the node numbering in the model begins at 0, not 1 as in the figure. Blank lines and lines beginning with “//’ are ignored. The order of entry of the links is irrelevant, for example

NETWORK-TYPE:Router_Network 4,6,10000,Ethernet, 0.000000001 , 40 5,6,10000,Ethernet, 0.000000001 , 50

is the same as

5,6,10000,Ethernet, 0.000000001 , 50 NETWORK-TYPE:Router_Network 4,6,10000,Ethernet, 0.000000001 , 40

Page 11: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 11 of 79

because NetworkWorkbench, after reading the whole network topology, reorders the nodes in numerical order. The position of NETWORK-TYPE in the file is also irrelevant. Optinally, the use can enter the nods X and Y coordinates. The coordinates are used only the establish a position for graphical display. The input below adds the node positions to the input file above.

// JAVA NETWORK WORKBENCH TOPOLOGY INPUT FILE // FORMAT: SOURCE NODE NUMBER, DESTINATION NODE NUMBER, CAPACITY IN KBPS // FORMAT: INTERFACE TYPE, BIT ERROR RATE, TRANSMISSION DELAY // Figure 8.8 of Pullen // The delay time is 10 times the number in Figure 8.8 of Pullen // NOTE: The error rates are insignificant, essentially 0.! // Network type is a router network NETWORK-TYPE:Router_Network // MANDATORY LINK CHARACTERISTICS // LINK FORMAT: SOURCE NODE NUMBER, DESTINATION NODE NUMBER, CAPACITY IN KBPS, // INTERFACE TYPE, BIT ERROR RATE, TRANSMISSION DELAY IN MICROSECONDS //Duplex link between nodes 1 and 2, by the numbering in the book 0,1,10000,Ethernet, 0.000000001 , 60 //Duplex link between nodes 1 and 3, by the numbering in the book 0,2,10000,Ethernet, 0.000000001 , 90 //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between nodes 2 and 5, by the numbering in the book 1,4,10000,Ethernet, 0.000000001 , 30 //Duplex link between nodes 3 and 6, by the numbering in the book 2,5,10000,Ethernet, 0.000000001 , 20 //Duplex link between nodes 4 and 5, by the numbering in the book 3,4,10000,Ethernet, 0.000000001 , 30 //Duplex link between nodes 4 and 6, by the numbering in the book 3,5,10000,Ethernet, 0.000000001 , 40 //Duplex link between nodes 5 and 7, by the numbering in the book 4,6,10000,Ethernet, 0.000000001 , 40 //Duplex link between nodes 6 and 7, by the numbering in the book 5,6,10000,Ethernet, 0.000000001 , 50 // NODE POSITIONS // IF NOT READ-IN HERE, THE POSITIONS ARE RANDOMLY ASSIGNED BY THE MODEL Position of Node 0 = ( 65 , 240 ) Position of Node 1 = ( 200 , 100 ) Position of Node 2 = ( 200 , 420 ) Position of Node 3 = ( 450 , 240 ) Position of Node 4 = ( 600 , 100 ) Position of Node 5 = ( 600 , 420 ) Position of Node 6 = ( 750 , 240 )

Page 12: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 12 of 79

READING NETWORK TOPOLOGY GRAPHICALLY Network workbench also has the ability to enter and display topologies

graphically. Clicking on the button will cause the topology display window to open with the current topology displayed. If no topology has been read into JNW, then the display is blank.

Figure 3 Topology Display Window (with blank topology)

The user can enter Nodes and Links graphically. Clicking on the window will place a Node

Page 13: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 13 of 79

Figure 4 Topology Display Window With Nodes (After Two Separate

Clicks) Links can be added between Nodes by right-clicking on one Node and dragging to another Node.

Figure 5 Creating Link By Right-Clicking And Dragging Between Nodes You can continue to enter a complete network.

Page 14: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 14 of 79

Figure 6 A Complete Network

Nodes can be dragged by clicking and dragging.

Figure 7 Network After Node 4 Is Dragged

Page 15: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 15 of 79

Links can be deleted by double clicking on a Link.

Figure 8 Network After Deleting Link with Double-Click on Link

Nodes and their attached Links can be deleted with a double-click on the Node. The nodes and the Links are automatically renumbered.

Figure 9 Network After Deleting Node with Double-Click on Link

Page 16: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 16 of 79

Link characteristics can be displayed and edited in the input GUI window by right-clicking on a Link

Figure 10 Reviewing Link Characteristics with a Double-Click on Link

Clicking the “ENTER/UPDATE” button of the Input Window will save the Link characteristics. Clicking the “ENTER/UPDATE” button of the Topology Display window will save the complete topology. Graphical Command Summary The table below summarizes the graphical commands.

Desired Action Procedure

Create Node Click on graphical input Delete Node (and attached Links) Double-click on an existing Node Move a Node (and its attached Links) Click on an existing Node, and drag it

to the new position Create Link Right-click and drag between existing

Nodes Delete Link Double-click on an existing Link View Link characteristics Right-click on an existing Link Change Link characteristics Right-click on an existing Link, make

changes in the input GUI, and press the “ENTER/UPDATE” button

Save the topology Click the “ENTER/UPDATE” button on the Topology Display window

Page 17: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 17 of 79

Table 1 Graphical Input Display Commands

Desired Action Procedure Move a Node (and its attached Links) Click on an existing Node, and drag it

to the new position View Node characteristics (buffer status)

Right-click on an existing Node

View Link characteristics Right-click on an existing Link View Interface characteristics Right-click on an existing Interface

Table 2 Graphical Output Display Commands SAVE TOPOLOGY AS TEXT FILE

JNW can write the topology to a text file. Click on the button on the MainGUI. This will open a JChooserPanel which will permit the user to decide where to save the topology. For example, the topology below

Figure 11 Sample Topology

saves as // FORMAT: SOURCE NODE NUMBER, DESTINATION NODE NUMBER, CAPACITY IN KBPS

Comment [d1]: This display is implemented but not currently available to students.

Comment [d2]: Wrong figure

Page 18: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 18 of 79

// FORMAT: INTERFACE TYPE, BIT ERROR RATE, TRANSMISSION DELAY // Network type is NETWORK-TYPE:Router_Network 0,1,10000,Ethernet,1.0E-9,60.0 0,2,10000,Ethernet,1.0E-9,90.0 0,3,10000,Ethernet,1.0E-9,20.0 1,4,10000,Ethernet,1.0E-9,30.0 2,5,10000,Ethernet,1.0E-9,20.0 3,4,10000,Ethernet,1.0E-9,30.0 3,5,10000,Ethernet,1.0E-9,40.0 4,6,10000,Ethernet,1.0E-9,40.0 5,6,10000,Ethernet,1.0E-9,50.0

which is the topology from Figure 8.8 of the textbook. ROUTER NETWORK TOPOLOGY In Network Workbench a router network is a multiple-node network connected by any combination of links.

Figure 12 Example Router Network Topology (Figure 8.8 of Pullen)

Page 19: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 19 of 79

This example can be found in Figure 8.8 of “Understanding Internet Protocols Through Hands-On Programming,” J. Mark Pullen, Wiley Computer Publishing, 2000.

The topology input file can be read using the chooser below by using the button. Use the chooser to find the text file containing the topology definition.

Figure 13 Chooser Panel for Reading Topology File

Just click on the text file, and click the open button. When the topology file is read, it creates the topology, for example the figure below

Page 20: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 20 of 79

Figure 14 Network Workbench Representation of Router Network

JNW creates Java vectors of nodes, interfaces and links. It links them together as shown in the figure 15 below. This way each node, interface, and link has a unique address.

Page 21: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 21 of 79

Figure 15 Data Structures in JNW ROUTER NETWORK After Network Workbench reads the topology file, it calls ModelNetworking.Routing.ComputeCostMatrix to compute the cost matrix, cost [ i ] [ j ] [ k ], of moving a frame from node j to node k as seen from node i. Presently the cost is just the transmission delay time between nodes j and k. Later the student could dynamically update the cost matrix to include additional time-varying costs. After computing the costMatrix, Network Workbench executes ModelNetworking.Routing.ComputeRoutingMatrices which uses Dijkstra's algorithm to compute the best routing between node i and all the other nodes. The result is stored in the matrix routingMatrix. It then copies the ith row of routingMatrix into the routingTable, for each node i. One could dynamically update the routing by calling Networking.Routing.ComputeCostMatrix and Networking.Routing.ComputeRoutingMatrices during the execution of JNW. Presently a call to Networking.Routing.ComputeRoutingMatrices automatically calls Networking.Routing.ComputeCostMatrix, so a separate call to Networking.Routing.ComputeCostMatrix in unnecessary. This may be separated in the future.

Page 22: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 22 of 79

You can re-enter a different topology at any time. Each time you re-enter the topology file, the old topology is deleted and the costMatrix and the routingTable are recomputed for each node. ETHERNET BUS TOPOLOGY An Ethernet bus has N nodes but only one link, the Ethernet bus.

Figure 16 Representation of Ethernet Bus in Java Network Workbench

An example Ethernet topology input file is

// FORMAT: SOURCE NODE NUMBER, DESTINATION NODE NUMBER, BANDWIDTH // FORMAT: LINK TYPE, BIT ERROR RATE, TRANSMISSION DELAY, INTERFACE TYPE // 0,1,10000,Ethernet, 0.0000001 , 5 // 1,2,10000,Ethernet, 0.0000001 , 10 // 2,3,10000,Ethernet, 0.0000001 , 15 // 3,4,10000,Ethernet, 0.0000001 , 20 // 4,5,10000,Ethernet, 0.0000001 , 25 // 5,6,10000,Ethernet, 0.0000001 , 30 NETWORK-TYPE:Ethernet_Bus

This defines a six-node, 10-megabit Ethernet bus with distance of 6 kilometers to 21 kilometers between adjacent nodes. Please note that in a router network it is OK to enter

4, 6, 10000, Ethernet, 0.0, 100 5, 6, 10000, Ethernet, 0.0, 70

This defines the delay times between nodes 4 and 6 as 100 milliseconds and the time delay betweens nodes 5 and 6 as 70 milliseconds. But in an Ethernet bus it only makes sense to include the delay between adjacent nodes such as

Page 23: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 23 of 79

5, 6, 10000, Ethernet, 0.0, 70

The Ethernet bus would not know what do with

4, 6, 10000, Ethernet, 0.0, 100 5, 6, 10000, Ethernet, 0.0, 70

BASIC MODEL OPERATION Each node in a router network can have any number of interfaces. Each Ethernet bus or token ring node has only one interface. Within one node the interfaces are numbered 0 to NInterface( node ), for 0 <= node < N. Additionally, each interface has a unique sequence number, shown in figure 7 above, 0

to )1)((0

+∑=

=

Nnode

nodeInterface nodeN .

Each node has a buffer for storing packets. All buffers in JNW will overflow when they exceed their programmed limit. The message, packet, or frame will be lost. In a router network, the node has a buffer for performing packet routing. Each interface has transmit and receive buffers. In there buffers, the IP (UDP or TCP) is enclosed in the appropriate data-link-level wrapper (for example the Ethernet header and checksum) , before frame transmission or the wrapper is removed. After removing the wrapper, the packet is sent to the node buffer where it is routed using the routingTable.

Page 24: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 24 of 79

Figure 17 Node Structure for Router Network

In Ethernet bus, each node has only one interface.

Figure 18 Node Structure for Ethernet Bus

Page 25: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 25 of 79

When the Ethernet frame is received, the interface reads the destination address. If the node is not the destination, the frame is discarded. If the node is the destination, the frame is forwarded to the node buffer where the e-mail is removed from the packets for display.

READING E-MAIL E-mail messages are read using another chooser panel from text files by clicking

on the button. For example the file EMAIL_UDP_2.txt contains FROM:0 TO:6 PROTOCOL:UDP /FROM:0 /TO:6 /PROTOCOL:UDP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:6 TO:0 PROTOCOL:UDP /FROM:6 /TO:0 /PROTOCOL:UDP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0

Page 26: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 26 of 79

An e-mail can be of any length, and you may have a many emails in the file as you wish. JNWS now reads the source node and destination nodes from the email file. If you fail to provide both TO and FROM entries, an error messages is printed. The email ends with “MESSSAGE-END:”. Further you cannot open the email chooser panel until you have read in the topology. Otherwise, JNW will issue an error message. Each time you read in an e-mail text file, the file is queued in the buffer of the source node. Therefore, you can queue several e-mail messages before starting to execute the model. You can put the messages in different nodes if the enter different source nodes in FROM: field. For example, you could send a message from node 0 to node 1 and simultaneously a message from node 1 to node 0. UDP MULTICASTING UDP multicasting is not yet implemented.

Page 27: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 27 of 79

MESSAGE LOAD GENERATOR JNW provides the capability to create a sequence of blank UDP messages. This may be useful for demonstrating buffer overflow or buffer performance.

Figure 19 Load Generator Input GUI

Page 28: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 28 of 79

The user specifies the message length distribution, fixed or exponential, the means message length, the rate of messages creation in messages per second, and the source and destination nodes. When the use executes the model, a message generation events executes at time 0. It uses the random number generator to define the message length and the time that the next message will be generated. If the load generator output is printed the output for an exponentially-distributed length with mean length 5000 bytes, and generated at 500 messages a second the output might be:

At time 0 a message of length 3887 bytes is sent At time 8188 a message of length 535 bytes is sent At time 26994 a message of length 5087 bytes is sent At time 32757 a message of length 3567 bytes is sent At time 47630 a message of length 6926 bytes is sent At time 90938 a message of length 2835 bytes is sent At time 116804 a message of length 3489 bytes is sent At time 149847 a message of length 1988 bytes is sent At time 152895 a message of length 7288 bytes is sent At time 163320 a message of length 3314 bytes is sent At time 165939 a message of length 1639 bytes is sent At time 168415 a message of length 4011 bytes is sent At time 178948 a message of length 2716 bytes is sent At time 185659 a message of length 3859 bytes is sent At time 209338 a message of length 4196 bytes is sent At time 228727 a message of length 11928 bytes is sent

The load generator wraps the blank messages in UDP and IP headers and put the packet into the source node buffer for transmission. The message is filled with “00000000”s. The message length includes the UDP and IP headers but not the Ethernet headers and trailer. Only one GenerateMessageLoad event can exist in JNW. JNW is designed to create one GenerateMessageLoad event only when the ENTER/UPDATE button is pushed on the load generator variables GUI. The load generator variables can be updated; when JNW executes it will execute with the latest data entered. JNW EXECUTION

Use the button to start the model execution. Each time you click the button, the random number generator is reinitialized to the random number generator seed you entered on the Global Variable input window. So, each time you execute JNW with the same random number seed, you will get the same results. Output is written to the center panel, but it can be directed to standard output using the boolean Utility.Print.Out.sendOutputToStandardOutput = true ;

Page 29: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 29 of 79

IMPLEMENTING LOOK AND FEEL JNW implements different looks and feels. If for example, you are running UNIX, you may wish to change the look and feel to OpenLook as shown in the figure below.

Figure 20 OpenLook Look and Feel in JNW with

LOOK_AND_FEEL_CONSTANT = 1 The looks and feels can be changed by setting GUIConstants.General. lookAndFeelConstant. The possible settings are lookAndFeelConstant = 0 for "Metal,” 1 for "Openlook,” and 2 for "Windows."

Page 30: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 30 of 79

SWING CONCURRENCY PROGRAMMING JNW is a model employing active entry of data and controls from the input GUIs and extensive computation. This requires that the programmer carefully separate the GUI from the computations. Read http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html for a brief description of the problem and the solution. As suggested in the web page http://java.sun.com/docs/books/tutorial/uiswing/concurrency/initial.html , the MainGUI is started with javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { GUIs.MainGUI maiGUI = new GUIs.MainGUI ( ) ; } } ) ; not just new GUIs.MainGUI ( ) ; In class GUIActions. RunModelAction and the two other Actions supporting model execution, the model is run by executing GUIGraphical.SwingWorker < java.lang.Void , java.lang.Void > swingWorker = new GUIGraphical.SwingWorker < java.lang.Void , java.lang.Void > ( ) { public java.lang.Void doInBackground ( ) { ModelDES.DiscreteEventSimulator.getInstance ().StartModel (); return null ; } } // end of anonymous inner class ; swingWorker . execute ( ) ; The SwingWorker class is not available until Java 1.6. I therefore took backport of SwingWorker, available from https://swingworker.dev.java.net/ and put the classes into package GUIGraphical by changing the package name. This cause the discrete event simulator to run in background. This permits the GUI to respond rapidly to user input and the update outputs.

Page 31: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 31 of 79

INTERACTIVE OPERATION MODE Normally, when the user clicks the run button, Network Workbench runs to completion. There may be circumstances when the user wishes to stop the model during execution. When the interactive mode of operation is selected, Network Workbench stops at reselected sites. When any character is entered at the standard IO, Network Workbench resumes execution. Presently, the interactive mode of operation is implemented for every output. That is, if you check the Interactive Mode Of Operation checkbox, Network Workbench will halt after every output. To implement interactive operation at other locations, insert the statement

Utility.Print.Interact ( ); in the code, and check the Interactive Mode Of Operation checkbox on the Global Variables GUI. When this is done, Network Workbench stops execution at the statement awaiting any input from the standard IO. DEMONSTRATIONS JNW has several demonstrations provided as .jar files. Open a command prompt window. Go to the folder containing the .jar files and type

java –jar BitStuffing_0s_and_1s.jar or

java –jar BitStuffing_EMail.jar or

java –jar CRC_Computation.jar ERROR MESSAGES JNW has extensive internal error testing. Error messages, staring “ERROR” are written to the standard error output. If Print Errors on MainGUI is checked (default setting) on the global input variables, the errors will also be printed on the Main GUI in red, as shown in the following example.

Comment [d3]: Should this be removed?

Comment [S4]: Currently 20080420 inoperable

Page 32: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 32 of 79

ERROR IN TCPDestinationBuffer.RemoveBottomNRow attempting to remove bottom 5 rows from dataArray of length 50

JNW also issues “WARNING”s and “NOTIFICATION”s. These are warnings respectively that something may be wrong and that something unusual is happening. A NOTIFICATION is not an error. An array overflow is an error. If the array is automatically adjusting its size to avoid an overflow it will issue a NOTIFICATION. Warnings and notifications are written to the standard error output. If Print Warnings on MainGUI is checked (default setting) on the global input variables, the warnings and notifications will also be printed on the Main GUI in blue.

NOTIFICATION in Utility.TCPDestinationBuffer EnlargeDataArray : dataArray overflow. More than 20 packets. Increasing dataArray size by 10.

KNOWN ERRORS The known errors are listed in a table in the document ERRORS_OR_IMPROVEMENTS_20080420.doc. KNOWN ERRORS-PROBLEM BETWEEN JNW AND NETWORK EDUCATION WARE (NEW) There may be a problem if you are running Network Education Ware (NEW) and JNW. The problem was first noticed when NetBeans was installed after NEW. Both NEW and JNW require the Java Runtime Environment (JRE) be installed. There may be a conflict if the JRE is installed for NEW to run and then NetBeans (or any other environment) is installed with a later version of the JRE. If this happens, check the folder C:\Program Files\Java. There should be one or more folders jre1.6.0_01, jre1.5.1_11, or some similar name. Uninstall all the JRE by

1. Click on the start button in the lower left corner of the screen 2. Click on Setting and then Control Panel 3. Click on Add or Remove Programs 4. Find the program(s) “Java™ SE Runtime Environment 6 Update 1” or

something similar 5. Click the remove button

Page 33: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 33 of 79

This removes the JRE. Now nothing will run so go to http://java.sun.com/javase/downloads/index.jsp and download just the JRE. The version number of the JRE should be the same as the JDK in your C:\Program Files\Java folder. Install the JRE, and both NEW and JNW should work together. IMPROVEMENTS Report any errors or suggestions for this users guide to [email protected]. Report any errors in the model to [email protected] and to [email protected]. FURTHER READING More material for JNW is contained in the slide presentation Class_Presentation_20070903.ppt. AUTHORS JNW was written by Dr. Mark J. Pullen,

Professor of Computer Science, George Mason University and Director, Center of Excellence in Command, Control, Communications, Computing and Intelligence (C4I Center), and Bill Dixon,

Page 34: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 34 of 79

a lowly, aged graduate student. (Now you know why!)

Page 35: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 35 of 79

APPENDIX A: Utility.JNWBitSet DESCRIPTION Utility.JNWBitSet, a subclass of java.util.BitSet, is a class of static methods to support bit processing in Java Network Workbench. java.util.BitSet represents bits as a vector of boolean values (true and false). It is a very flexible class since it allows bit sets to grow or shrink to any size. It has many methods to support bit operations. You can find a JavaDoc for java.util.BitSet at http://java.sun.com/j2se/1.5.0/docs/api/java/util/BitSet.html . Unfortunately, from our point of view java.util.BitSet has two errors. In java.util.BitSet the bit set 00000000 00000000 has length 0. java.util.BitSet uses the position of the first 1 as its length(). We want 00000000 00000000 to have length 16. Therefore, a JNWBitSet has two lengths, the length() inherited from java.util.BitSet and the JNWLength, which is the total length of the bit set including all the leading zeros. I have not overridden length() because JNWBitSet relies on java.util.BitSet and the performance of java.util.BitSet depends on length(). So there are two lengths: Be sure to use the correct one, JNWLength. java.util.BitSet also has a very strange behavior. java.util.BitSet is supposed to automatically expand if you enter a bit outside the current length. That is, data.set (16*1024, true), will automatically expand data to 16K length, but data.set (16*1024, false) will not! java.util.BitSet is only interested in the first true and all the bits below that. Be careful with java.util.BitSet. JNWBitSet solves both these problems. The JNWLength is the total length of the bit set, and data.set (16*1024, false) will expand data to 16K length. JNWBitSet also provides a very complete set of utilities for your use. Therefore, it was necessary to create the subclass Utility.JNWBitSet which corrects these errors. The correct length, for our purposes, is usually JNWLength. Be very careful when using any of the methods of class java.util.BitSet since they may produce unexpected results. There are several things you should know about JNWBitSet. java.util.BitSet and Utility.JNWBitSet represent bits as booleans (trues and falses) not 0s and 1s. So, if you went to set the indexValue bit to 0, you must use set (indexValue, false); and set (indexValue, true); to set it to 1. There are two methods in Utility.JNWBitSet, getBitValue (bitIndex) and setBitValue (bitIndex , 0_or_1) , which get and set bits as 0s and 1s. The

Page 36: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 36 of 79

methods internally convert 0 to false and 1 to true. If you want boolean input and output, get (bitIndex) and set (bitIndex), and set(bitIndex, true_or_false) from java.util.BitSet work fine. An Utility.JNWBitSet with length JNWLength has an index from 0 to JNWLength-1 as shown in the figure below, with the convention that THE 0 INDEX BIT IS THE RIGHTMOST BIT AS SHOWN BELOW. THIS IS AN UNAVOIDABLE REVERSE OF THE C++ VERSION, BECAUSE THE SUPERCLASS java.util.BitSet FOLLOWS THIS CONVERTION.

Figure 1 Indices of a JNWBitSet

JNWBitSet has several useful methods • setJNWLength ( int length) sets the length of the JNWBitSet • getJNWLength ( ) gets the length of the JNWBitSet • setBitValue ( int bitindex , int value ) sets the bit at index bitIndex to 0 or 1 • getBitValue ( int bitindex) gets the bit at index bitIndex as a 0 or 1 • shift ( int numberOfBitsToShift ) shifts the BitSet left ( positive ) or right ( negative ) by numberOfBitsToShift bits • setJNWBitSetToString ( String string ) converts a String into a JNWBitSet • toString ( ) converts a JNWBitSet to a formatted String of 0s and 1s, 40 bits

per row • toString ( int numberOfBits ) converts a JNWBitSet to a formatted String of 0s

and 1s, numberOfBits bits per row Notice that a shift with a positive index causes the bits to shift to the left and a shift with a negative shift causes the bits to shift to the right. The effects of a shift are shown in the figure below.

Page 37: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 37 of 79

Figure 2 Effects of shift ( ) Methods on a JNWBitSet

There are several methods to convert between Strings, integers, etc. and JNWBitSets. They include • setJNWBitSetToLongAndTruncate ( long inputIn , int numberOfBits ) converts

a long, int, short, or byte to a bit set and truncates this to a specified number of bits

• setJNWBitSetToString ( String string ) converts a String to a bit set. • setJNWBitSetToZerosAndOnes ( String stringOfZerosAndOnes ) converts a

String of 0s and 1s, such as “01010011 10101010” to a bit set. The acceptable characters are “0”, “1”, and “ “, so you can enter two octets as “00000111 11111100”.

• convertJMUBitSetToLong ( ) converts a bit set to a long. You can then cast it to an int, short, or byte, as, for example;

int portNumber = (int) dataBitSet. convertJMUBitSetToLong ( ) ; • convertJMUBitSetToString ( ) converts a bit set to a String There are several methods for appending and prepending bit sets. For example, • data.append (“01010011 10101010” ) appends 0101001110101010 to

Page 38: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 38 of 79

the end of data • data.prepend (“01010011 10101010” ) prepends 0101001110101010 as the header of data as do • data.append (bitSet) appends bitSet to the end of data • data.prepend (bitSet) prepends bitSet as the header of data There are methods for getting and setting subsets of a bit set. • getSubset (int fromIndex, int toIndex) returns a clone of the subset from

fromIndex (inclusive) to toIndex (exclusive). For example, data.getSubset ( data.getJNWLength ( ) -32, data.getJNWLength ( ) – 24 )

will return the fourth octet of data. • setSubset ( int fromIndex, JNWBitSet data ) sets the subset of this from

fromIndex (inclusive) to data. Constructors Utility.JNWBitSet also has several useful constructors • JNWBitSet( int nbits ) creates a JNWBitSet of length nbits with all the bits

false (0) • JNWBitSet (String stringOfZerosAndOnes) creates a bit set of 0s and 1s.

For example, JNWBitSet data = new JNWBitSet (“00001111 1111 0000 10” ) ;

creates the bit set 000011111111000010. • JNWBitSet ( long inputIn , int numberOfBits ) converts a long into a bit set of

length numberOfBits. For example JNWBitSet data = new JNWBitSet ( 765 , 16 ) ; creates the bit set 0000001011111101.

• JNWBitSet (JNWBitSet JNWBitSetIn) is a cloning constructor which creates an identical copy of JNWBitSetIn. The clone () method does not work correctly with java.util.BitSet-which is not unusual. Remember,

JNWBitSet clone = dataBitSet ; will result in clone and dataBitSet pointing to the same data. If you

manipulate clone, you are also manipulating dataBitSet. But

JNWBitSet clone = new JNWBitSet (dataBitSet ) ;

Page 39: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 39 of 79

creates two identical copies. Later a clone method was added to Utility.JNWBitSet, so you can now say

JNWBitSet clone = dataBitSet. clone ( ) ; One useful method from class java.util.BitSet is

data. xor ( argument ) which performs a logical bit-by-bit XOR of the bit set data with the bit set argument. data and bitSet need not be the same length. XOR starts with the rightmost (index 0) bit and performs the xor function until it reaches the end of either bitSet or data. Another useful method in Utility.JNWBitSet is data.xorAndShift (JNWBitSet xorIn ) This method computes the XOR of data and xorIn starting at bit 0. It then recursively computes the XOR at position xorIn.JNWLength, 2 * xorIn.JNWLength, etc. until it has computed the XOR for all data. This method is useful for computing XORs over the IP header, UCP packet, and TCP packet. The toString ( ) method is overridden in JNWBitSet, but a better substitute is

toString ( int columnWidth ) or

toString ( ) this writes the JNWBitSet as octets. The first method writes columnWidth bits per row and the second writes 40 bits per row. IMPORTANT: though JNWBitSet, is a subclass of java.util.BitSet, it does not necessarily override the methods in java.util.BitSet. Some of these methods are still used internally in Utility.JNWBitSet. But the use of the java.util.BitSet methods directly may give unexpected results. But most students need use ONLY the methods of JNWBitSet or the get and set methods from java.util.BitSet. Do not use the methods of java.util.BitSet unless you are positive of what you are doing. Unexpected results may occur. If you need a new method in JNWBitSet, contact the authors.

Page 40: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 40 of 79

APPENDIX B: RANDOM NUMBER GENERATOR To ensure repeatability, JNWS has only one random number generator. You instantiate that random number generator as

Utility.JNWRandom randomNumberGenerator = Utility.JNWRandom.getInstance ( ) ;

This will give you access to all the methods of java.util.Random plus an Exponential number generator and a Poisson distribution: double nextExponential(double mu)

Method to return exponentially distributed number with mean 1 / mu. int nextPoisson(double lambda)

Method to return a Poisson distributed number with mean lambda. java.util.Random is described in http://java.sun.com/j2se/1.5.0/docs/api/java/util/Random.html. Class Utility.JNWRandom also has a JavaDoc which you can create (in NetBeans) by clicking on Build on the menubar and then clicking on Generate Javadoc for “JNW”. Each time you run the model with identical input you should get identical results. The default random number generator seed is 123456789. You can change the random number seed at the General Variables pull-down on the MainGUI. The possible seeds are -9223372036854775808 to 9223372036854775807. That should give you enough to choose from! CLASS Utility.JNWRandom_Non_Singleton The class Utility.JNWRandom is a singleton. Later, it was decided to put separate random number generators on each Link. Therefore, a second class, Utility.JNWRandom_Non_Singleton was created. It is identical to class Utility.JNWRandom except that it is NOT a singleton. It can be instantiated in the normal way

Utility.JNWRandom_Non_Singleton randomNumberGenerator = new Utility.JNWRandom_Non_Singleton ( ) ;

Page 41: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 41 of 79

APPENDIX C: INPUT AND OUTPUT This appendix describes input and output to JNW. Input to JNW is either by reading text files, such as the topology, or though GUIs such as

Figure 1 Example Input GUI

The GUIs prohibit the entry of incorrect data. All data entered in the GUI is entered as a String that is converted to the correct data type, int, or JNWBitSet, etc. Anything that will throw an exception when the input String is converted to the desired data type, for example an integer, will cause the background int offending field to turn red. Bit sets are entered as Strings of zeros, ones, and blanks: Any other entry causes a red background. Data that does not throw an exception IS updated. Only the incorrectly-entered data has it background turned red. The GUI will not close until all the fields have been entered correctly. In the example below the authors name, interactive mode of operation, destination node number, network type, transmission mode, and random number generator seed have been updated. The other three fields are waiting for correct entries.

Page 42: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 42 of 79

Figure 2 Example Input GUI With Errors

Java is extremely flexible in input and output. Unfortunately, this means that simple operations can become programming nightmares. Since the student will often have to read lines of input, a stand method for reading from standard input is provide in Utility.IO.ReadSingleLineFromStandardIO ( ) which returns a String. If a student wants to write output, he can use System.out.println ( String string) which sends the output to the standard output. But it is expected that the student will want to write output or errors to the center panel of the Main GUI. For this purpose use Utility.Out.print ( String string), Utility.Out.println ( String string), Utility.Err.print (String string ), or Utility.Err.println (String string ). In Utility.Out.print or Utility.Out.println the output is always sent to the center panel of the MainGUI. Error message are always sent to System.err.println. But class Utility.Out and Utility.Err have three booleans /**Boolean telling whether to print output sent to the Main GUI central *panel also to the standard output*/ static boolean sendOutputToStandardOutput = false ; /**Boolean telling whether to print error messages also to the Main GUI.*/ static boolean sendErrorsToMainGUI = true ; /**Boolean telling whether to print error messages also to * the standard output.*/ static boolean sendErrorsToStandardOutput = false ; by which the student can direct the output or errors to additional locations.

Page 43: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 43 of 79

Saving Input or Output The student can save the output in the center panel of the MainGUI by either (a) cutting and pasting the center panel into a text file or (b) under “File” on the menubar choose “Write Output Data as Text.” The input data can also be saved by under “Action” on the menubar choose “Copy Input Data to Output.” This will cause the model to write all the input data to the center panel of the MainGUI. The student can then save the center

panel as described in the previous paragraph. Clicking the button on the toolbar will also copy the input to the center panel of the MainGUI. Choosing “File” on the menubar choose “Write Input Data as Text” will write all the input data directly to a file. Choose .rtf as the file name extension.

Page 44: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 44 of 79

APPENDIX D: DATA FORMATS This appendix explains the data formats used throughout the model. Ethernet Frame Format The Ethernet Frame is a full Ethernet frame as shown in Figure 4-17 (b) of Computer Networks, Fourth Edition by Andrew S. Tananbaum. See also http://en.wikipedia.org/wiki/Ethernet .The frame includes an 8 byte preamble including a SOF (start of frame), two 6-byte addresses, the 2-byte length of the frame, data, a pad (if needed) and a full CRC-32 checksum as defined in http://en.wikipedia.org/wiki/Cyclic_redundancy_check . Ethernet headers and redundancy codes are added in class ModelDataLink.EthernetUtilities. AddEthernetHeaderAndTrailer. Data is padded into the data field if the data is too short, but JNWBitSet does not limit the frame length to 1500 bytes. IPv4 Header Format The IPv4 header is defined in Figure 5-53 of Computer Networks, Fourth Edition by Andrew S. Tananbaum. The version is 4, the IHL is 5, the type of service is “00000110,” which is low priority for everything, the identification is 0, the DF flag is set, but not the MF flag, the fragment offset is 0, the time to live is set to 255, the protocol is 7 for UDP and 6 for TCP. The header checksum is performed over the header only. See www.freesoft.org/CIE/Course/Section3/7.htm for a detailed description of the format. The IP header is created in ModelTransport.IPUtilities. ConstructIPHeader. UDP Header Format The UDP header is defined in Figure 6-23 of Computer Networks, Fourth Edition by Andrew S. Tananbaum. The source and destination ports are set in ModelTransport.UDPState to 23, the TELNET port. The checksum is performed over the data, the header and the pseudoheader. The pseudoheader is shown in Figure 6-30 of Computer Networks, Fourth Edition by Andrew S. Tananbaum, except that protocol = 17. See www.protocols.com/pbook/tcpip2.htm for a detailed description of the format. The IP header is created in ModelTransport.UDPUtilities ConstructUDPHeader.

Page 45: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 45 of 79

TCP Header Format The TCP header is defined in Figure 6-29 of Computer Networks, Fourth Edition by Andrew S. Tananbaum. The source and destination ports are set in ModelTransport.TCPState to 23, the TELNET port. The sequence number and acknowledgement numbers change as messages are sent and received. All the flags are set to 0, except the FIN bit which is set to 1 for the last TCP packet of a message. The TCP header length is 5, the checksum is performed over the data, the header and the pseudoheader. The pseudoheader is shown in Figure 6-30 of Computer Networks, Fourth Edition by Andrew S. Tananbaum. The urgent pointer is 0. See www.freesoft.org/CIE/Course/Section4/8.htm for a detailed description of the format. The TCP header is created in ModelTransport.TCPUtilities ConstructTCPHeader.

Page 46: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 46 of 79

APPENDIX E: NOMENCLATURE This model was developed over a long time. In order to ensure understanding some common nomenclature is defined. This nomenclature is to be used in naming methods and variables. Frame, Packet, and Data Nomenclature The figure below defines the frame, packet and data nomenclature. The “data” can be either an email messages, or, when using the load generator, a string of 0s.

Figure1 Definitions of Frame, Packet, and Data for an Ethernet Frame

As much as possible throughout the model, email Strings are called data, IP packets are called IPPacket, and UDP packets are “UDPPacket.” There is also

UDP_IPPacket and TCP_IPPacket. Since presently only an Ethernet interface is implemented, all frames are called “frame.”

Page 47: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 47 of 79

an Ethernet interface is implemented, all frames are called “frame.”

Page 48: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 48 of 79

APPENDIX F: DATA FORMATS AND CONVENTIONS FOR COMMONLY-USED VARIABLES

Generally the Code Conventions for the JavaTM Programming Language of http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html are followed. Variable names follow the convention of Deitel & Deitel, Java How to Program, Prentice Hall. This model was developed over a long time. In order to ensure consistency, commonly-used variables must use the same data formats and they are defined below.

VARIABLE FORMAT RANGE sourceNodeAddress long 0 (000.000.000.000)

to (2**32) -1 (255.255.255.255)

destinationNodeAddress long 0 (000.000.000.000) to (2**32) -1 (255.255.255.255)

sequenceNumber long 0 to (2**32) -1 acknowledgementNumber long 0 to (2**32) -1 sourceNodeNumber int 0 to numberOfNodes

(for example < 255) destinationNodeNumber int 0 to numberOfNodes

(for example < 255) Since IP addresses are 32 bits long it is not always possible to represent an IP address and an int. All class B, C, D, etc. addresses have their highest bit set. If the address is represented as an int or Integer, the number will be negative which can lead to problems. An address must be able to correctly represent any address in an IPV4 address. A Number is intended for addressing the node in the vectorOfNodes. Therefore, it will normally represent a small number, say < 255 So in most situations a node number is adequate, but sometimes a node address is necessary. Vectors are addresses as ints as

node = vectgorOfNodes . get ( sourceNodeNumber ) ‘;

Page 49: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 49 of 79

or with longs as

node = vectorOfNodes . get ( ( int ) sourceNodeAddress ) ‘;

Page 50: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 50 of 79

APPENDIX G: VERSION CONTROL Each class and document has a version control attached. The version numbers begin at 1.000. As the class or document is changed the last two decimals are incremented as 1.001, 1.002, 1.003, etc. But there is no effort to maintain consistent version numbers between the different documents and classes. For example, version 1.010 of a class may be described in version 1.025 of the Users Guide. When a new version is released the decimal after the digit is incremented. Therefore, version 1.100 is the new version number of a major change. All the version numbers on all the documents and classes will be changed to 1.100. If more than 100 changes are made the successor to 1.199 will be 1.1100, 1.1101, and 1.1102, etc. A general description of all the major changes will be posted on the JavaDoc overview page. Another description of the TCP implementation is contained in the slide presentation TCP_IMPLEMENTATION_IN_JNW.ppt.

Page 51: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 51 of 79

APPENDIX H: DESCRIPTION OF THE TCP IMPLEMENTATION

Appendix H describes the implementation of TCP within JNW. EXECUTIVE SUMMARY This report is submitted as part of CS 755, Advanced Networking for the Fall 2007 semester. This project is the major submission for the class. This report describes the implementation written for the Transport Control Protocol (TCP) with the Java Network Workbench (JNW) model. As described below the JNW model already supports UDP transmissions in a local area net (LAN). This TCP implementation must work correctly with the existing UDP implementation, preferably using components of the existing UDP implementation. The implementation developed does use the networking, data link, and physical layers of the existing UDP implementation. The model instantiates TCP connections between pairs of nodes. It breaks an email into segments, adds the TCP and IP headers and passes the message to the destination using the existing UDP components. This minimizes the need for new software and it ensures that there will be no conflict between the UDP and the TCP implementations. Present JNW Model Presently, JNW will route UDP packets through an IP network. UDP transmissions are inherently unreliable “best effort” transmissions. There is no retransmission of lost packets. UDP makes no effort to reorder packets if they arrive out-of-order. When the network topology is read into JNW, it uses Dijkstra's Algorithm to compute routing matrices for every node in the network. When a message is put into the node buffer, the node, based on the destination address, looks up the interface to use to forward the message. TCP The Transmission Control Protocol (TCP) offers reliable transmission service that guarantees error-free packet arrival in the order that they were transmitted. TCP does this by assigning a sequence number to each TCP packets transmitted. At

Page 52: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 52 of 79

the receiver the packets are reordered by their sequence number. TCP then replies with an acknowledgement (ACK) message telling the sender that the packet (or packets) has been successfully received. The sender, if it does not receive an ACK messages within a predetermined time, RTT + 4 D where RTT is the measured round trip time and D is the deviation of the round trip time, will retransmit the packet or several sequential packets. Only when the sender receives an ACK message or exceeds the maximum number of transmission attempts, will the sender stop its effort to send the packet. DESCRIPTION OF PROBLEM The problem is to develop a software implementation that compliments the existing UDP implementation and does not cause conflicts with the existing UDP implementation. Further the new TCP implementation should be a realistic as possible and sufficiently flexible that is can be further developed by later students. SYSTEM DESCRIPTION The new TCP implementation consists of several new software components:

1. TCP utilities (ModelTransport.TCPUtilities) to break a message into segments of maximum length maximumTCPPayloadInBytes, add TCP headers, and compute the TCP header checksum.

2. An array, tcpConnestions, on each node which holds the existing TCP

connections,

3. A method, GUIActions. ReadEMailTextFilesAndPutIntoSourceNodeBufferAction. CreateTCPConection to instantiate the connections if they do not already exist,

4. A method ModelTransport.TCPUtilites. AddTCPHeadersToMessages, which

adds the TCP headers to the message segments

Page 53: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 53 of 79

5. An Event, TCPAttemptSend, which attempts to send the TCP message and resend the message until it either exceeds the maximum number of permissible attempts or an acknowledgement (ACK) message is received.

6. An array in the source node TCP connection describing the messages sent

but not yet acknowledged,

7. A method, Modeltransport.TCPUtilities. ComposeACKPacket, which composes the ACK message for every TCP packet successfully received,

8. A method for deleting the TCPAttemptSend Events when the ACK

message is received,

9. A TCPDestinationBuffer for the destination that a. stores the received TCP packets by sequence number, b. deletes duplicate packets, and c. composes the complete message.

10. A method, ModelDES.DiscreteEventSimulator

.RestoreEventAtNewEventTime, for reinserting the TCPAttemptSend event back into the DES for another transmission attempt.

The user sets the TCP transmission mode by choosing the TCP transmission protocol in the input text file as: FROM: 0 TO:6 PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. character count 319 MESSSAGE-END: FROM: 6 TO:0 PROTOCOL:UDP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. character count 319

Page 54: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 54 of 79

MESSSAGE-END:

The PROTOCOL: field determines the transmission protocol. Only UDP and TCP are permitted. Any other protocol will result in an error message. Both TCP and UDP messages can be sent. When the method GUIActions. ReadEMailTextFilesAndPutIntoSourceNodeBufferAction reads the input emails, it converts the emails to JNWBitSets and passes the bit sets to ModelTransport.TCPUtilites. But ReadEMailTextFilesAndPutIntoSourceNodeBufferAction first ensures that a TCP connection exists between the source and destination by checking the tcpConnections array in the node. If the connection does not already exist, it creates the connection by instantiating a TCPConnection at the source and the destination. If the connections are null as shown below,

Nodes with No TCP Connections

it creates the connections

Page 55: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 55 of 79

Nodes with TCP Connections Between Nodes 0 and 6 ModelTransport.TCPUtilites.AddTCPHeadersToMessages adds the TCP headers to the packets. The TCP headers include the sequence number and acknowledgement numbers which are kept and updated by each side of the TCP connection. The packet is returned to ReadEMailTextFilesAndPutIntoSourceNodeBufferAction where the IP header is added to the packet. ReadEMailTextFilesAndPutIntoSourceNodeBufferAction also sets the FIN bit of the last TCP packet to denote the end of the message.

Page 56: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 56 of 79

Processing of Data into TCP Packets

ReadEMailTextFilesAndPutIntoSourceNodeBufferAction then creates an Event, TCPAttemptSend which attempts to send the TCP packet. The method first checks that the packet is within the sliding window. If not, the attempt is made again later. If the packet is in the window, the TCPAttemptSend put the packet into the interface buffer, starts a MovePacketsFromNodeBufferToInterfaces Event and puts itself back into the discrete event simulator for a later retransmission attempt, at time eventTime + RTT + 4 D. At the destination node, the method ModelTransport. TCPConnection. processReceivedTCPPacket asks whether the packet is an ACK message. If it is an ACK message the method tries to delete data from the TDCDestiationBuffer. Processing Messages If the packet is not an ACK message the TCP connection moves the packet to the Utility.TDCDestiationBuffer. The destination buffer checks to ensure that the packet has not already been received. The buffer puts the packet into the array TDCDestiationBuffer.dataArray in order of sequence number. The dataArray contains the packet sequence numbers, the length of the data, the TCP FIN bit and the packets data. The buffer then updates the

Page 57: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 57 of 79

acknowledgement number of the buffer, checking the acknowledgement number against the sequence number of the packet containing the FIN bit to determine if a complete message has been received. The buffers reports that a complete messages has been received. When requested the buffer returns the complete messages and removes all the messages data from the buffer and returns to waiting for more packets. ACK processing When the destination node receives a packet, it calls Modeltransport.TCPUtilities. ComposeACKPacket which composes an acknowledgement message containing the updated acknowledgement number. When the ACK returns to the source, the source recognizes the ACK number by its zero window size. The node then calls ModelTransport .TCPState. DeleteTransmittedPacketInformation ( long eventTime , long remoteAcknowledgementNumber ) which passes the acknowledgement number received in the ACK message. DeleteTransmittedPacketInformation then removes all the data for any sequence number less that remoteAcknowledgementNumber, and it deletes the corresponding TCPAttemptSend Events from the discrete event simulator an example of which is shown below,

Page 58: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 58 of 79

dataArray Before Receiving Any ACK Message

dataArray After Receiving ACK 477 Message

dataArray After Receiving ACK 777 Message

Page 59: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 59 of 79

PROBLEMS There were several major problems that needed to be addressed in this development. The major problem was in handling the TCPDestinationBuffer. The buffer was originally implemented as a java.util.PriorityQueue. This advantage of this approach is that when a compare method is written to compare two TCP/IP packets based on their sequence number, the java.util.PriorityQueue automatically stores the packets by sequence number. Unfortunately, much more data is needed from the stored packets, their length and whether they have their FIN bit set. There is no easy was to access that data in the java.util.PriorityQueue in the order that the packets are stored-which is VERY important. This necessitated the change to storing the packets in an array. The implementation was changed so that the data is stored in an array.

dataArray in TCPDestinationBuffer One advantage of using a java.util.PriorityQueue is that the queue indefinitely expands rather than overflow. In order to duplicate this capability, the dataArray was designed to automatically expand in size when an overflow will occur. The steps are:

1. Detect overflow condition,

Page 60: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 60 of 79

2. Create new dataArray with five additional rows, 3. Copy all of dataArray into the new dataArray, and 4. Set dataArray = new dataArray.

This method has been repeatedly tested. RESULTS The individual components of the mode have been repeatedly tested. The model has been run against several combinations of payload and window sizes, some of which are show below. Test 1 This test sends a TCP message with the sliding window size larger than the message. All of the message packets should be received at the destination and reassembled into the complete message. sequenceNumber = 0 ; acknowledgementNumber = 0 ; initialWindowSize = 500 ; windowSize = initialWindowSize ; unacknowledgedBytesInTransit = 0 ; windowThreshold = 2000 ; windowSizeIncrement = 200 ; maximumTCPPayloadInBytes = 100 ; alpha = 0.5 ; RTT = 200000 ; // 40 milliseconds D = 0 ; STARTING Network Workbench Version 1.0 Wed Dec 05 10:02:04 EST 2007 STARTING Network Workbench ExecuteEvents ( ) Wed Dec 05 10:02:35 EST 2007 with random number seed 123456789 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 3 routing IPpacket to destination 6 via interface number 10

Page 61: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 61 of 79

FOUR PACKETS ARE SENT At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 4 routing IPpacket to destination 0 via interface number 11 THE FOUR PACKETS ARE ASSEMBLED INTO A MESSAGE E-Mail TCP Message RECEIVED at node 6 is: Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. character count 304

Test 2 Test two decreases the window size to less than the TCP message length. This should result in only part of the message packets being sent. The remaining message packets should arrive later, and the complete message should be assembled. sequenceNumber = 0 ; acknowledgementNumber = 0 ; initialWindowSize = 200 ; windowSize = initialWindowSize ; unacknowledgedBytesInTransit = 0 ; windowThreshold = 2000 ; windowSizeIncrement = 200 ; maximumTCPPayloadInBytes = 100 ; alpha = 0.5 ; RTT = 200000 ; // 40 milliseconds D = 0 ; STARTING Network Workbench Version 1.0 Wed Dec 05 10:11:21 EST 2007 STARTING Network Workbench ExecuteEvents ( ) Wed Dec 05 10:11:35 EST 2007

Page 62: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 62 of 79

with random number seed 123456789 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 3 routing IPpacket to destination 6 via interface number 10 ONLY TWO PACKETS ARE SENT SINCE THAT IS ALL THE SLIDING WINDOW PERMITS At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 6 via interface number 14 TWO ACK MESSAGES ARE RETURNED At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 3 routing IPpacket to destination 0 via interface number 5 At Node 3 routing IPpacket to destination 0 via interface number 5 THE SLIDING WINDOW SIZE INCREASES AND THE REMAINING PACKET IS SENT In WIndow SIZE increaseWindowSize = true oldWindowSize = 200 New sliding window size = 400 In WIndow SIZE increaseWindowSize = false oldWindowSize = 400 New sliding window size = 200 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 3 routing IPpacket to destination 0 via interface number 5 In WIndow SIZE increaseWindowSize = true oldWindowSize = 200 New sliding window size = 400 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 4 routing IPpacket to destination 6 via interface number 14 FINALLY ALL FOUR PACKETS ARE RECEIVED AND ASSEMBLED INTO A MESSAGE E-Mail TCP Message RECEIVED at node 6 is: Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. character count 304 At Node 4 routing IPpacket to destination 0 via interface number 11 THE FINAL ACK RETURNS At Node 3 routing IPpacket to destination 0 via interface number 5 MODEL ENDS at simulation time = 400010 Model execution time 0.2200 seconds.

Test 3 Test three is just a wild test to ensure that the TCPDestinationBuffer works correctly. ReadEMailTextFilesAndPutIntoSourceNodeBufferAction was altered to

Page 63: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 63 of 79

send the message packets in reverse order. The TCPDestinationBuffer should still reassemble the message correctly. sequenceNumber = 0 ; acknowledgementNumber = 0 ; initialWindowSize = 500 ; windowSize = initialWindowSize ; unacknowledgedBytesInTransit = 0 ; windowThreshold = 2000 ; windowSizeIncrement = 200 ; maximumTCPPayloadInBytes = 100 ; alpha = 0.5 ; RTT = 200000 ; // 20 milliseconds D = 0 ; Here the window size must exceed the message length or the message will never be completed. STARTING Network Workbench Version 1.0 Wed Dec 05 10:23:38 EST 2007 STARTING Network Workbench ExecuteEvents ( ) Wed Dec 05 10:23:51 EST 2007 with random number seed 123456789 FOUR PACKETS ARE SENT IN REVERSE ORDER At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 3 routing IPpacket to destination 6 via interface number 10 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 6 via interface number 14 At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 4 routing IPpacket to destination 0 via interface number 11 THE MESSAGES IS ASSEMBLED THOUGH SENT IN REVERSE ORDER E-Mail TCP Message RECEIVED at node 6 is: Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country.

Page 64: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 64 of 79

character count 304 At Node 4 routing IPpacket to destination 0 via interface number 11 At Node 3 routing IPpacket to destination 0 via interface number 5 At Node 3 routing IPpacket to destination 0 via interface number 5 At Node 3 routing IPpacket to destination 0 via interface number 5 At Node 3 routing IPpacket to destination 0 via interface number 5 In WIndow SIZE increaseWindowSize = true oldWindowSize = 500 New sliding window size = 1000 In WIndow SIZE increaseWindowSize = true oldWindowSize = 1000 New sliding window size = 2000 MODEL ENDS at simulation time = 200010 Model execution time 0.1500 seconds.

Many other testes were run, but the lengthy results prohibit their inclusion. CONCLUSION The TCP implementation in JNW is working correctly.

Page 65: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 65 of 79

APPENDIX I: TOPOLOGIES AND MESSAGES TO CUT AND PASTE The topology below defines Figure 8.8 of “Understanding Internet Protocols Through Hands-On Programming,” J. Mark Pullen, Wiley Computer Publishing, 2000. You can use it to cut-and-paste into a text file. // FORMAT: SOURCE NODE NUMBER, DESTINATION NODE NUMBER, CAPACITY IN KBPS // FORMAT: INTERFACE TYPE, BIT ERROR RATE, TRANSMISSION DELAY // Figure 8.8 of Pullen // The delay time is 10 times the number in Figure 8.8 of Pullen // Network type is a router network NETWORK-TYPE:Router_Network //Duplex link between nodes 1 and 2, by the numbering in the book 0,1,10000,Ethernet, 0.000000001 , 60 //Duplex link between nodes 1 and 3, by the numbering in the book 0,2,10000,Ethernet, 0.000000001 , 90 //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between nodes 2 and 5, by the numbering in the book 1,4,10000,Ethernet, 0.000000001 , 30 //Duplex link between nodes 3 and 6, by the numbering in the book 2,5,10000,Ethernet, 0.000000001 , 20 //Duplex link between nodes 4 and 5, by the numbering in the book 3,4,10000,Ethernet, 0.000000001 , 30 //Duplex link between nodes 4 and 6, by the numbering in the book 3,5,10000,Ethernet, 0.000000001 , 40 //Duplex link between nodes 5 and 7, by the numbering in the book 4,6,10000,Ethernet, 0.000000001 , 40 //Duplex link between nodes 6 and 7, by the numbering in the book 5,6,10000,Ethernet, 0.000000001 , 50

The file below defines two TCP messages between nodes 0 and 1. FROM:0 TO:1 PROTOCOL:TCP /FROM:0 /TO:1 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400

Page 66: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 66 of 79

MESSSAGE-END: FROM:1 TO:0 PROTOCOL:TCP /FROM:1 /TO:0 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END:

You can replace “TCP” with “UDP” to pass UDP messages. The file below passes one TCP message between every pair of nodes in Figure 8.8 of Pullen. You can replace “TCP” with “UDP” to pass UDP messages. FROM:0 TO:1 PROTOCOL:TCP /FROM:0 /TO:1 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:0 TO:2 PROTOCOL:TCP /FROM:0 /TO:2 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400

Page 67: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 67 of 79

MESSSAGE-END: FROM:0 TO:3 PROTOCOL:TCP /FROM:0 /TO:3 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:0 TO:4 PROTOCOL:TCP /FROM:0 /TO:4 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:0 TO:5 PROTOCOL:TCP /FROM:0 /TO:5 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:0 TO:6 PROTOCOL:TCP

Page 68: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 68 of 79

/FROM:0 /TO:6 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:1 TO:0 PROTOCOL:TCP /FROM:1 /TO:0 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:1 TO:2 PROTOCOL:TCP /FROM:1 /TO:2 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:1 TO:3 PROTOCOL:TCP /FROM:1 /TO:3 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men

Page 69: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 69 of 79

to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:1 TO:4 PROTOCOL:TCP /FROM:1 /TO:4 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:1 TO:5 PROTOCOL:TCP /FROM:1 /TO:5 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:1 TO:6 PROTOCOL:TCP /FROM:1 /TO:6 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men

Page 70: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 70 of 79

to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:2 TO:1 PROTOCOL:TCP /FROM:2 /TO:1 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:2 TO:0 PROTOCOL:TCP /FROM:2 /TO:2 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:2 TO:3 PROTOCOL:TCP /FROM:2 /TO:3 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:2

Page 71: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 71 of 79

TO:4 PROTOCOL:TCP /FROM:2 /TO:4 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:2 TO:5 PROTOCOL:TCP /FROM:2 /TO:5 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:2 TO:6 PROTOCOL:TCP /FROM:2 /TO:6 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:3 TO:1 PROTOCOL:TCP /FROM:3 /TO:1 /PROTOCOL:TCP Now is the time for all good men

Page 72: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 72 of 79

to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:3 TO:2 PROTOCOL:TCP /FROM:3 /TO:2 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:3 TO:0 PROTOCOL:TCP /FROM:3 /TO:0 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:3 TO:4 PROTOCOL:TCP /FROM:3 /TO:4 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men

Page 73: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 73 of 79

to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:3 TO:5 PROTOCOL:TCP /FROM:3 /TO:5 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:3 TO:6 PROTOCOL:TCP /FROM:3 /TO:6 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:4 TO:1 PROTOCOL:TCP /FROM:4 /TO:1 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END:

Page 74: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 74 of 79

FROM:4 TO:2 PROTOCOL:TCP /FROM:4 /TO:2 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:4 TO:3 PROTOCOL:TCP /FROM:4 /TO:3 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:4 TO:0 PROTOCOL:TCP /FROM:4 /TO:0 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:4 TO:5 PROTOCOL:TCP /FROM:4 /TO:5

Page 75: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 75 of 79

/PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:4 TO:6 PROTOCOL:TCP /FROM:4 /TO:6 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:5 TO:1 PROTOCOL:TCP /FROM:5 /TO:1 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:5 TO:2 PROTOCOL:TCP /FROM:5 /TO:2 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men

Page 76: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 76 of 79

to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:5 TO:3 PROTOCOL:TCP /FROM:5 /TO:3 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:5 TO:4 PROTOCOL:TCP /FROM:5 /TO:4 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:5 TO:0 PROTOCOL:TCP /FROM:5 /TO:0 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400

Page 77: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 77 of 79

MESSSAGE-END: FROM:5 TO:6 PROTOCOL:TCP /FROM:5 /TO:6 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:6 TO:1 PROTOCOL:TCP /FROM:6 /TO:1 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:6 TO:2 PROTOCOL:TCP /FROM:6 /TO:2 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:6 TO:3 PROTOCOL:TCP

Page 78: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 78 of 79

/FROM:6 /TO:3 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:6 TO:4 PROTOCOL:TCP /FROM:6 /TO:4 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:6 TO:5 PROTOCOL:TCP /FROM:6 /TO:5 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: FROM:6 TO:0 PROTOCOL:TCP /FROM:6 /TO:0 /PROTOCOL:TCP Now is the time for all good men to come to the aid of their country. Now is the time for all good men

Page 79: 9/6/2008 JNW USERS GUIDE - George Mason University · //Duplex link between nodes 1 and 4, by the numbering in the book 0,3,10000,Ethernet, 0.000000001 , 20 //Duplex link between

Version 1.109 9/6/2008

Page 79 of 79

to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Now is the time for all good men to come to the aid of their country. Characters: 0400 MESSSAGE-END: