Opnet Tutorial
Opnet Tutorial
Opnet Tutorial
A Simple Tutorial
Objectives
1) This tutorial focuses on the use of Opnets Project Editor 2) The Project Editor will allow you to quickly create, simulate, and analyze the performance of a computer network 3) By the end of this tutorial, you should be able to
1) Build a network quickly 2) Collect statistics about the networks performance 3) Analyze these statistics
Objectives
1) In this tutorial
1) 2) 3) 4) We will build a small network Choose statistics to collect Run a simulation Analyze the results
Creating a Project
! From the File menu, choose New ! Select Project and click OK ! Name the project <Sample_your initials> and the scenario first_floor. (Include your initials in the project name to distinguish it from other students.) Click OK ! Click Next in the Startup Wizard
Scenario
The scenario Wizard dialog box is shown Box
Initial Topology Network Scale Specify Size Model Family Review Check values
Value
Create Empty Scenario Office 100 m x 100 m Ethernet Click Next Click Next Clicl Next Click Next Click OK
Adding Components
Now that the general network topology has been constructed, you need to add a server. You can now use the second method of creating network objects, that is, dragging them from the object palette into the workspace.
Adding Components
1) If it is not already open, open the object palette by clicking on the Object Palette action button (first button on the left) 2) Find the ethernet_server object in the palette and drag it into the workspace 3) You dont need additional copies of this model, so right-click to turn off node creation
Adding Components
You also need to connect the server to the star network. 1) Find the 10BaseT link object in the palette, click on it and drag it to the workspace 2) Click on the server object, then click on the switch object in the center of the star. A link is drawn, connecting the two objects. 3) Right-click to turn off link creation.
Adding Components
Finally, you need to add configuration objects to specify the application traffic that will exist on the network 1) Find the Application Config object in the palette and drag it into the workspace 2) Right-click to indicate you are finished placing this kind of object 3) Find the Profile Config object in the palette and drag it into the workspace 4) Close the object palette
Editing Attributes
1) You can change the properties of objects such as hubs, switches, work station, etc. by editing the attributes 2) Right click on the object you want to edit 3) Choose Edit attributes
Adding Traffic
1) Edit the Profile Configuration 2) Edit the Profile Configuration in the new window 3) Put number 2 in rows 4) Set the values as shown in the following slide
Statistics
Statistics
Adding Traffic
1) Now that you are done with Application and Profile, next you need to add traffic in each work station
1) Select node_1 2) Edit attribute 3) Do this for all the workstations
Adding Traffic
Then enter 2 for the number of row. It should be on the the bottom left side. Then click on each Profile name and choose Software Development for row 1 and Telecom row row 2. It should look similar to the next page. Hit ok for everything.
Statistics
1) Now that you added the traffic, you are ready to collect some statistics 2) There are two ways to collect statistics
1) You can collect statistics from individual nodes in your network (object statistics) 2) From the entire network as a whole (global statistics)
Server Statistics
1) To collect statistics related to the servers load:
1) Right-click on the server node and select Choose Individual Statistics from the servers Object pop-up menu 2) Click the plus sign next to Ethernet in the Choose Results dialog box.
Server Statistics
1) Click the check box next to Load (bits/sec) to turn collection on for that statistic 2) Click OK to dismiss the dialog box
Network Statistics
1) To collect statistics related to the Ethernet Hub:
1) Right-click on the hub node and select Choose Individual Statistics from the hubs Object pop-up menu 2) Click the plus sign next to Node Statistic in the Choose Results dialog box 3) Then click the plus sign next to Ethernet in the Choose Results dialog box
Network Statistics
1) Click the check box next to Collision count and Utilization 2) Click OK to dismiss the dialog box
Global Statistics
1) Global statistics can be used to gather information about the network as a whole. For example, you can find out the delay for the entire network by collecting the global Delay statistic:
1) Right-click in the project workspace and select Choose Individual Statistics from the Workspace pop-up menu 2) Click the plus sign next to Global Statistics in the Choose Results dialog box
Global Statistics
3) Click the plus sign next to Ethernet 4) Check the box next to Delay (sec) to turn on collection 5) Click OK to dismiss the Choose Results dialog box Hit Save to save the project Note: If you cant save your project, go to Edit/Preferences, find the model_dirs row and click on the Value field. In the new pop-up window, make sure the first directory of the list is a place where the tool can save your project (You can create a new directory on C:\your_name and put that directory as the first entry in the list)
Simulation Results
Once your simulation has finished executing, you will want to see the information collected for each statistic You can view results graphically in the Project Editor by selecting View Results from the Workspace pop-up menu.
View Results
To view the server Ethernet load for the simulation: 1) Right-click on the server node choose View Results from the servers Object pop-up menu. The nodes View Results dialog box opens. 2) Click on the arrow next to Ethernet under Office network. 3) Click on the box next to Load (bits/sec) to indicate that you want to view that result. 4) Click the Show button in the View Results dialog box. The graph of the server load appears in the Project Editor
View Results
To view the Ethernet Hub Collision count and Utilization: 1) Right-click on the Ethernet Hub choose View Results from the servers Object pop-up menu. The nodes View Results dialog box opens 2) Click on the arrow next to Ethernet under Office network 3) Click on the box next to collision count and utilization to indicate that you want to view that result 4) Select average ant then click the Show button in the View Results dialog box. The graph should look this:
View Results
When you are finished viewing the Ethernet Hub graph, close this dialog box and the View Results dialog box. You also should look at the Global Ethernet Delay on the network. To view this statistic:
1) Right-click in the workspace, then select View Results from the pop-up menu 2) Check the box next to Global Statistics, Ethernet, Delay, select average then click the Show button to view the average delay of the packets on the Ethernet network as a whole
Animation
View animation: To view animation, click on Simulation and select Record Animation For Subnet. You have to do this before you run the program
Animation
Animation
Then run the simulation. After the simulation finishes, click on Result and choose Play Animation.
Animation
Debugging
1) A good debugging tool is the Simulation Log. You can check for warnings and errors 2) Click on Result 3) Then Click on Open Simulation Log