Вы находитесь на странице: 1из 102

LAB MANUAL

Introduction

NOTICES Product Information Training Manual for: Introduction to Modeler Software Release: 11.0.A PL3 Manual Version: 3 Technical Support Telephone: Facsimile: E-mail: Web: 240.497.1200 240.497.1064 support@opnet.com http://www.opnet.com

MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Destination Control Statement This Training Manual and the OPNET Software were manufactured in the United States by OPNET. The initial export of this Training Manual and the OPNET Software, and any subsequent relocation to another country shall comply with United States law relating to the export of technical data, equipment, software and know-how. Restricted Rights Legend USE BY AGENCIES OF THE UNITED STATES GOVERNMENT: For purposes of use of this Training Manual and OPNET Software by agencies of the United States government (or those authorized to use of this Training Manual and OPNET Software on behalf of an agency), the OPNET Software is Commercial Computer Software within the meaning of DFARs 227.7202 and 252.227-7014(a)(1) and FARs 52.227-19. Use, reproduction and disclosure is subject to DFAR and FAR provisions relating to Commercial Computer Software and the License Agreement between OPNET and the agencies using OPNET Software. OPNET software is provided with a RESTRICTED RIGHTS NOTICE for government use. Trademarks OPNET, OPNET Technologies, Inc., OPNET Modeler, Service Provider Guru, OPNET Development Kit, WDM Guru, NetBiz, and IT Guru are trademarks of OPNET Technologies, Inc. All other trademarks used in the Training Manual are the property of their respective owners and used herein for identification purposes only. CONFIDENTIAL INFORMATION DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. This document contains confidential information and may contain information that is proprietary, privileged, and/or exempt from disclosure under applicable law. This document is intended for the exclusive use of the person to whom it is disclosed. If you are an unauthorized person, you are hereby notified that any viewing, copying, disclosure or distribution of this information may be subject to legal action. All unauthorized persons must immediately destroy the original documentation without making any copies or further unauthorized disclosure.
2

OPNET Technologies, Inc. (OPNET) is the sole owner of all proprietary rights in this Training Manual (the Training Manual) and the OPNET Modeler software (the OPNET Software). Terms and Conditions of Use Access to and use of the Training Manual and/or the OPNET Software is restricted to authorized users who are employees or direct contractors of a Licensee who has accepted the terms and conditions of OPNETs Software Master License Agreement. As a condition of having access to or use of the Training Manual and/or the OPNET Software all users agree to be subject the terms of OPNETs Software Master License Agreement. Users shall not copy or reproduce, in whole or in part, or permit access to or disclose the Training Manual or the OPNET Software to any other person without the prior written consent of OPNET. Liability Statement The terms and conditions governing the licensing of OPNET Software consist of those set forth in the written contracts and license agreements between OPNET and its customers. No representations in this Training Manual or statements of capability, suitability for use, accuracy or performance, shall be a warranty by OPNET unless contained in a written agreement signed by OPNET. OPNET DISCLAIMS ALL EXPRESS OR IMPLIED WARRANTIES AS TO THE TRAINING MANUAL AND THE OPNET SOFTWARE INCLUDING IMPLIED WARRANTIES OF

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

Lab 1: Using The Project Editor


Objectives
1. Play with the different features of the Project Editor. 2. Use the Device Creator and model derivation to create new node models. 3. Modify attributes values in order to reflect particular behavior. 4. Use the online documentation.

Instructions
Browse the Topology 1. Open an existing project. a. Select File / Open b. Choose C: \op_models\project_environment on the left. c. Make sure project_environment_ref is selected on the right. d. Click Open.

.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

2. Load a world map. a. Select View / Background / Set Border Map b. Choose world. c. Click OK. 3. Practice moving between subnets. a. Double-click on the North America subnet icon to enter it. b. Then right-click anywhere in the workspace and choose Go To Parent Subnet to return. 4. Use zooming features to identify U.S. cities. a. From the top level, enter the subnet labeled North America; then enter the United States subnet; now use the various zoom features to identify each subnet. b. Use the Zoom + toolbar button to zoom to a rectangle. c. Use the Zoom toolbar button to return to the previous zoom level. d. Use the Page Up and Page Down buttons on the keyboard to incrementally zoom in and out. 5. Adjust the sizes of the icons to prevent your model from looking too crowded as you zoom out. a. Select a groups of objects by drawing a rectangle around them b. Select View / Layout / Scale Node Icons Interactively c. By adjusting the slider bar and other settings, you can change the sizes of the icons, and how they scale as you zoom out and how they change as they overlap with each other. 6. Label the Los Angeles subnet with an annotation. a. Select Topology / Open Annotation Palette. b. Press the T button to add a text box. c. Type in Los Angeles and click File / Save. d. Place the annotation on the workspace. Draw a box to represent the size of the annotation box. e. Right-click anywhere in the workspace to end the Annotation operation. f. Close the annotation palette window.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

Using the Device Creator


1. Open device creator. a. Select Topology / Device Creator b. The following dialog box appears.

2. Configure settings for the device to be created. a. Select a device category: click Vendor Device. b. Select vendor: click Cisco. c. Select the type of Cisco device you would like to create: click Cisco 4700. d. Rename the model and set the interfaces as follows: Leave all other values at their defaults. Model name ATM Ethernet FDDI Token Ring Frame Relay SLIP : : : : : : : CS_4700_4s_e6_fr2_sl4 0 6 0 0 2 4

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

3. Create the device. a. Click Execute button. b. Check the box labeled Launch object palette my_model_list and click OK. Deriving a New Model 1. Choose the desired model in the object palette. a. Select Cisco from the pull-down menu in the Object Palette.

b. Scroll down the palette until you see the icon for the <Cisco 4700> set of routers. c. Double-click on the <Cisco 4700> icon to see the available models based on that device. (There should be three. If you need to return to the previous view click on the Up arrow button.) d. Select the model from which to derive a new device model. i. Right-click on the CS_4700_4s_e6_fr2_sl2_tr2 model. ii. Click the Derive New button. 2. Set a particular attribute value in the derived model. a. Change the IP Datagram Switching Rate. Find attribute IP Processing Information in the Attributes Table. b. Left click in the Initial Value column and change the value from () to Edit... c. In the IP Processing Information Table dialog box that appears, change the value for Datagram Switching Rate (packets/sec) to 250,000. d. Click OK. 3. Save the derived model. a. Click the Save button.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

b. Type in the name CS_6000_4s_e6_fr2_sl2_tr2. c. Click Save. d. Click Close. Configuring the Palette Add your two new models to a palette. 1. Select my_model_list from the pull-down menu at the top in the Object Palette. 2. Configure the palette to include other desired node models. a. Click on Configure Palette b. Click on Node Models and include the following nodes (click in the Status column to toggle a model from not included to included) i. CS_6000_4s_e6_fr2_sl2_tr2 ii. ethernet_server iii. ethernet_wkstn c. Click OK. 3. Include the desired link models. a. Click on Link Models and include the following links: i. 10BaseT ii. PPP_DS1 b. Click OK. 4. Name and save the palette. a. Click Save As b. Name the palette new_palette. c. Click Save. d. Click OK.

5. Close the Object Palette.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

Setting Attribute Values Locate an object model in the Chicago subnet. a. In your project, you should be in the United States network. If you do not see the various US city names, follow the steps in the beginning of the lab to return to this view. b. Enter the subnet named Chicago by double-clicking it. 2. View attributes of each model. a. Right-click on a model. b. Select Edit Attributes. (Note that there are different attributes for different devices.) 3. Practice changing attributes of multiple devices at once. Configure all workstations. a. Right-click on any workstation and choose Select Similar Nodes. b. With all workstations selected, again right-click on any one, and choose Edit Attributes. c. Important: check the Apply changes to selected objects box. d. Expand Applications. e. Click on the word None in the Application: Supported Profiles row; Choose Edit.

f. In the Application: Supported Profiles Table, set the number of rows to 1.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

g. Under Profile Name, click on None and select Engineer. This profile will automatically be created. h. Click OK until both attribute dialog boxes are closed. 4. Configure the server to support all applications: a. Right-click the server and select Edit Attributes. b. Expand Applications and change the value for Application: Supported Services from None to All. c. Click OK. Using the Product Documentation 1. Under the Help menu, select Product Documentation. 2. Press the Search button (the one with binoculars and a document in the background) on the toolbar of Adobe Reader; this will search the entire reference guide and list each document containing the given string of text.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

3. Enter a string of text for which to search. a. Type in the string background traffic. b. Click the Search button. 4. View the list of results, and click on one of them to jump to that section of the documentation. Summary You have learned some of the basics of navigating through a scenario. Youve used the Device Creator and derived a new node object to create your own version of some devices, then added them to your own object palette. You have also learned some of the basics of editing attributes, including how to apply your changes to multiple objects. END OF LAB 1

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

10

Lab 2: Building a First Network


Overview
Lansing Hotel Reservation Services is a hotel reservation company headquartered in Dallas, Texas. Lansing employees are experiencing high delays using the companys proprietary hotel reservation application, and customers are threatening to use other services if the problem is not fixed. Your task is to identify the problem and propose a solution. Lansings current network consists of four offices, three of which contain 28 interconnected Dell workstations. The offices are connected via 56K lines. The Application Servers, which all users access to run Lansings proprietary software (as well as other important applications), are located in the companys Dallas HQ.

Objectives
1. Build the topology. 2. Choose results. 3. Run a simulation. 4. View the results.

Instructions
Build the Topology 1. Create a new project a. Select File / New / Project; click OK. b. Set Project Name = Hotel_net; set Scenario name = 56K; click OK. 2. Configure project settings in the Startup Wizard; set up an empty scenario with the map of the US in the background. a. In the Initial Topology dialog box, click on Create empty scenario; click Next. b. In the Choose Network Scale dialog box, click on Choose from maps; click Next.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

11

c. In the Choose Map box, select usa from the pull-down menu labeled Border Map; click Next.

d. In the Select Technologies box, scroll down and include Hotel_net_palette by changing the No to Yes; click Next. e. In the Review box, review the settings and click Finish. 3. Zoom to the Eastern US. a. Click on the Zoom + button on the toolbar. b. Click and drag a rectangle over the Midwestern portion of the US. If you are unhappy with this zoom level, you can use the Page Up and Page Down keys on the keyboard to incrementally zoom out or in.

4. Deploy the subnet to Minneapolis. a. Open the Object Palette; if it is not already open, either click on the Object Palette button, or select Topology / Open Object Palette. b. Click on the fixed subnet icon in the object palette. c. Click on Minneapolis, placing the subnet on Minneapolis. d. Right-click anywhere in the workspace to stop deploying additional subnets.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

12

5. Configure the subnet settings. a. Reduce the size of the subnet in Minneapolis (represented by the blue box around the subnet). i. Right-click on the subnet and select Advanced Edit Attributes. ii. Change the x span and y span to 0.002. iii. Click OK. b. Enter the subnet by double-clicking on it. c. Change Grid Properties so that you are zoomed in on a building-sized area: i. Select View / Background / Set Properties

ii. Change Units from Degrees to Feet. iii. Change Resolution to 8. iv. Change Division to 10. v. Close the Background Properties dialog box by clicking on Close at the bottom. d. Now you can see the distance between points on the screen. Each grid box represents 10 square feet. e. Exit out of the subnet; either right-click on the workspace and choose Go To Parent Subnet, or click on the Go To Parent Subnet button. 6. Deploy a similar subnet in Dallas. a. Copy the Minneapolis subnet by selecting it and hitting Ctrl-C.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

13

b. Paste another subnet on Dallas by hitting Ctrl-V on the keyboard and then clicking above Dallas. c. You now have an empty subnet to represent the Corporate HQ in Dallas. 7. Use Rapid Configuration to create a LAN in Minneapolis. a. Enter the Minneapolis subnet by double-clicking it. b. In the Minneapolis subnet, create a LAN consisting of 28 Dell workstations connected to a 3Com switch in a star topology and connect the switch to a router as shown below using the following instructions.

i. Select Topology / Rapid Configuration ii. Change Configuration from Bus to Star. iii. Press OK. iv. In the Rapid Configuration dialog box, enter the following information (if you do not see these choices, ask an instructor for assistance): 1. Center node model = 3C_SSII_3900_4s_ae36_ge3 2. Periphery node model = Dell_wkstn 3. Link model = 100BaseT 4. Number = 28 5. Leave the values in the Placement section as they are. 6. Click OK.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

14

8. Add a router to the LAN. a. Click on the CS7505_Router router in the Object Palette. b. Click on some empty area in the workspace to deploy the router at that location. c. Right-click to stop deploying more routers. d. Change name of the router to router: i. Right-click on the router. ii. Choose Set Name. iii. Type router and click OK. e. Connect the Router to the switch in the center of the LAN with a 100BaseT link: i. Click on the 100BaseT link in the object palette. ii. Click on the router and then on the switch. iii. Right-click in the workspace to stop deploying new links. 9. Deploy similar LANs in Detroit and Atlanta. a. Go back to WAN view of network: Right-click in workspace and select Go To Parent Subnet. b. Copy the Minneapolis subnet to Detroit and Atlanta. i. Select the Minneapolis subnet. ii. Copy it using Edit / Copy or Ctrl-C. iii. Choose Edit / Paste or Ctrl-V. iv. Click on Detroit. v. Repeat these steps to copy this subnet to Atlanta.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

15

10. Rename the subnets. Name the subnets Minneapolis, Detroit, Atlanta and Dallas. a. Right-click on the subnet; choose Set Name. b. Enter the appropriate name and then click OK.

11. Deploy a LAN to the Dallas subnet consisting of six Sun servers, a switch in the center and a router as shown below.

a. First add the six Sun servers to the Dallas subnet. i. Double-click on Dallas subnet. ii. Open the Object Palette (if it is not already open). iii. Click on Sun_Enterprise_10000_server and click in the workplace 6 times to deploy six servers. iv. Right-click in the workspace to stop deploying more servers.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

16

b. Deploy a 3C_SSII_3900_4s_ae36_ge3 switch and connect to the servers. i. Double-click on the object named <3Com SSII 3900-36> in the Object Palette. ii. Click on 3C_SSII_3900_4s_ae36_ge3 and then click in the middle of the servers. iii. Right-click in the workspace to stop deploying more switches. iv. Click on the upward arrow in the object palette to go back to the main palette window.

v. Click on the 100BaseT link in the Object Palette. vi. For each server, click on the server and then on the switch. vii. Right-click in the workspace to stop deploying any more links. b. Place a CS7505_Router on the workspace and connect it to the switch with a 100BaseT link. i. Click on the CS7505_Router in the Object Palette. ii. Click in an empty space in the workspace to deploy the router. iii. Right-click in the workspace to stop deploying more routers. iv. Click on the 100BaseT link in the Object Palette. v. Click on the switch in the center and then on the router just placed. vi. Right-click in the workspace to stop deploying more links. vii. Set the name of the new router to router. 12. Place an IP cloud as the WAN to connect the LAN sites. a. Go back to WAN view of network. i. Right-click in the workspace. ii. Select Go to Parent Subnet.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

17

b. Place an IP Cloud in the middle of the 4 subnets, to represent the wide area network. c. Click on the Object Palette icon to open it (if the Object Palette is not open already). Deploy one ip32_cloud onto the workspace. d. Connect the Dallas subnet to the cloud with a PPP_DS1_link. e. Important: When prompted for which node within the subnet to connect the link to, choose the node name ending in router and click OK. f. Connect the cloud to the other 3 subnets using a PPP_56K_link. g. Again, when prompted for which node within the subnet to connect the link, choose the node name ending in router and click OK.

h. Choose File / Save, leave the default filename and click Save. 13. Traffic for this network has been preconfigured. Two gray utility boxes can be found in the object palette. The utility hotel_app_config represents some application traffic to be sent across the network. The utility hotel_prof_config represents users of these applications. You must put one of each of these utility boxes in the network model. a. Drag the icon labeled hotel_app_config from the object palette onto the workspace. b. Right-click in an empty area in the workspace to end the operation. c. Right-click on the node and select Set Name. Enter App Config. d. Place the hotel_prof_config node in the workspace. e. Right-click in an empty area in the workspace to end the operation. f. Right-click on the node and select Set Name. Enter Prof Config.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

18

14. Verify Links: Press the Verify Links button , or select Topology / Verify Links; click OK. If any incorrect links are found, a red X will appear over the link. If all links are correct, a message will appear at the bottom of the screen to say that All links and paths are connected properly.

Choose Results 1. Choose a set of statistics to view. a. Select DES / Choose Individual Statistics b. Expand Global Statistics. c. Expand DB Entry and select Response Time (sec). d. Expand DB Query and select Response Time (sec). e. Click OK.

2. Save the project; press Ctrl-S or select File / Save.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

19

Run Simulations 1. Configure the Simulation. a. Select DES / Configure/Run Discrete Event Simulation; verify that duration is set to 1 hour.

b. Run the Simulation; press Run. c. When the simulation is complete, the Close button at the bottom of the box will become active. Click Close. 2. Save the project: press Ctrl-S or select File / Save. View Results 1. Find out how long it took for users to complete a task called DB Entry during the simulation. (A database entry and query were preconfigured to run across your network during the simulation.) a. Right-click on the workspace and select View Results. b. Check the box next to Global Statistics / DB Entry / Response Time (sec). c. Click Show. d. Move panel to the right (click and hold on header bar). e. NOTE: If this graph is not available, then no database entries were successfully completed during your simulation. Check the Simulation Log (DES / Open DES Log) for errors and ask an instructor for assistance.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

20

2. Add a line to this panel to show the average response time for a database entry: a. In the View Results panel, change As Is to average. b. Click on the Add button, and then click on the graph that was created in the previous step.

3. Follow the steps listed above to view the data points for a database querys response time. Add the average to this graph.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

21

4. Check your results and then save again. a. Let us assume that this response time is too high for your needs. Lets try to improve the response time of the Lansing Hotel Reservation Services by upgrading the links in the WAN. b. We will determine whether Lansing should upgrade to a DS1 link or a DS3 link. 5. Click Close in the View Results window. Duplicate the Scenario 1. Select Scenarios / Duplicate Scenario from the Menu Bar. 2. Name the new Scenario DS1 and then click OK. You now have a carbon copy of the previous scenario. Upgrade the Links 1. Upgrade the WAN links from 56K to DS1. a. Right-click on the link connecting the Detroit Subnet and the IP Cloud and choose Select Similar Links. This selects all three 56K links in the network model. b. Change the data rate of all three links to DS1.

i. Right-click on any one of the three links again and select Edit Attributes. ii. Change the model from PPP_56k_link to PPP_DS1_link. iii. Check the box that says Apply changes to selected objects.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

22

iv. Click OK. v. If you get a dialog box asking Do you want to continue?, then click OK. 2. Run the simulation a. Click on the simulation icon and select Run, or select DES / Configure/Run Discrete Event Simulation and press Run. b. Click Close when the simulation finishes. c. Save the project. 3. View the results. a. Right-click in an empty area in the workspace and select View Results. b. First check DB Query.Response Time. i. Change the Filter from As Is to average. ii. Select Global Statistics / DB Query / Response Time (sec). iii. Then click Show. c. Second check DB Entry.Response Time: i. Unselect the previous statistic before selecting the second one. ii. Select Global Statistics / DB Entry / Response Time (sec). iii. Click Show again.

d. An upgrade to DS1 links would greatly help Lansing Hotel Reservation Services. The question still remains though whether they should upgrade to DS3 links. e. Click Close in the View Results window.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

23

Duplicate the Scenario 1. Select Scenarios / Duplicate Scenario from the Menu Bar. 2. Name the new Scenario DS3 and click OK. Upgrade the Links 1. Upgrade the links from DS1 to DS3. a. Right-click on the link connecting the Detroit Subnet and the IP Cloud and choose Select Similar Links. b. Change the data rate of the links to DS3 links. i. Right-click on the link again and select Edit Attributes. ii. Change the model from PPP_DS1_link to PPP_DS3_link. iii. Then check the box that says Apply changes to selected objects. iv. Click OK. 2. Run the simulation. a. Click on the simulation icon and click Run, or select DES / Configure/Run Discrete Event Simulation and then click Run. b. Click Close when the simulation finishes. c. Save the project. 3. Create the first panel. a. Right-click in an empty area in the workspace and select Compare Results. b. Check Global Statistics / DB Query / Response time (sec). c. Change As Is to average. d. Click Show. 4. Create the second panel: a. Unselect the statistic previously selected. b. Check Global Statistics / DB Entry / Response time (sec). c. Click on Show.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

24

5. Take note of the results. By comparing the results from these scenarios, we are going to see if adding bandwidth improved response time.

a. Compare the DB Query and Entry Response Times from the three scenarios. b. Note the average response time is almost identical for both the PPP_DS1_link and the PPP_DS3_link. c. It is clearly visible that an improvement of the links in Lansing Hotel Reservation Services WAN will greatly help the company, cutting the DB Query and Entry Response Times by more than half. d. It is also evident that it is much more cost effective to upgrade to a DS1 link rather than a DS3 link, for the response time is not much different. e. Therefore by modeling their network, Lansing Hotel Reservation Services can now make an informed decision on how to upgrade their network, and still save money. 6. Click Close in the View Results window. 7. Click on the Hide/Show Graph Panels Button to hide all the graphs.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

25

Generating Web Reports 1. Generate a Web report for the DS3 scenario; since we have already run the simulation, select DES / Results / Generate Web Report, then press OK. When the report is generated, it will be written in the status bar. 2. Launch Web browser by selecting DES / Results / Launch Last Web Report. 3. View DB Query Response Time; if you have more than one Web report, you will start at your Simulation Reports Home Page and would then have to select the simulation report you wish to view. (If this is the first report ever generated, you will bypass this home page).

4. In the Results window in the top left corner, select Report: User_Selected. 5. In Report window in bottom left, select Global Statistics / DB Query and then on the right, select DB Query Response Time (sec). 6. Exit the browser. END OF LAB 2

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

26

Lab 3: Using Other Editors


Objective
1. Browsing the different OPNET editors.

Instructions
The Project Editor 1. Re-open the project Hotel_net a. Select File / Open b. Select Project from the pull-down menu at the top. c. On the left side, choose C: \op_models and then select Hotel_net from the right side; click Open. The Node Editor There are two ways to open the node editor. 1. Access it from the project editor. a. Enter the Dallas subnet by double-clicking on it. b. Then double-click on any server node. (The node editor opens with our model in it. Notice that the name of this model in the top left corner is actually ethernet_server_adv. The server model used in the lab was derived from that model.) c. Close the node editor by going to File / Close. 2. Open the model from the File menu. a. Select File / Open b. Select Node Model from the pull-down menu at the top and select C:\OPNET\11.0.A\models\std\ethernet from the left side.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

27

c. Select ethernet_server_adv from the right; click Open.

d. Do not close the node editor. The Process Editor There are also two ways to open the Process Editor. 1. Access it from the node editor. a. Double-click on the appropriate module, in this case the mac queue. (A new editor opens with our process model in it. Notice that the name of this model in the top left corner is ethernet_mac_v2.) b. Close the window; select File / Close. 2. Open the model from the File menu. a. Select File / Open b. Select Process Model from the pull-down menu at the top.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

28

c. Select C:\OPNET\11.0.A\models\std\ethernet from the left side and then ethernet_mac_v2 from the right; click Open.

d. Close the window: select File / Close. The Link Editor 1. Open up a 10BaseT link model in the Link Editor. a. Select File / Open b. Select Link Model from the pull-down menu at the top. c. Select C:\OPNET\11.0.A\models\std\ethernet from the left side. Select 10BaseT_adv from the right and click Open. (This is the parent to the 10BaseT.)

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

29

d. Read the Comments about this model. e. You can use this editor to define a new link in a similar method to the Derive New process. 2. Close the Link Model; select File / Close. The Packet Format Editor 1. Open the ethernet packet format model. a. Select File / Open b. Select Packet Format from the pull-down menu at the top. c. Select C:\OPNET\11.0.A\models\std\ethcoax from the left side. Select ethernet from the right side and click Open.

d. Notice the different fields and their sizes; right-click on a field to view the attributes of that field. 2. Close the file; select File / Close. The ICI Editor ICIs can be used to transmit information between protocol layers. 1. Open the ICI model tcp_open_ind. a. Select File / Open b. Select ICI Format from the pull-down menu at the top. c. Select C:\OPNET\11.0A\models\std\tcp from the left side. Select tcp_open_ind from the right side and click Open.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

30

2. This ICI is used when a client wants to open a new TCP connection. At the client side, the TCP layer will use this ICI to indicate to the lower layer (IP layer) that an IP datagram has to be created and sent based on the information contained in the ICI (remote addr, remote port).

3. Close the ICI Editor; select File / Close. The Probe Model Editor 1. Open the probe file bank_net_ref-process. a. Select File / Open b. Select Probe Model from the pull-down menu at the top. c. Select C: \op_models\bank_net from the left side. Select bank_net_ref-process from the right side and click Open.

2. View the attributes of the probes. a. Right-click on each object and choose Edit Attributes. b. Examine the statistic that is being collected.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

31

c. Close the file; select File / Close. The Simulation Sequence Editor 1. Open the simulation sequence file Hotel_net_ref-DS3. a. Select File / Open b. Select Simulation Sequence from the pull-down menu at the top. c. Select C: \op_models\Hotel_Net from the left side. Select Hotel_net_ref-DS3 from the right side and click Open. 2. View the properties of the simulation object. a. Right-click on the icon and select Edit Attributes. b. Notice the extended capabilities from our original method for configuring a simulation.

3. Close the file; select File / Close. END OF LAB 3


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

32

Lab 4: Node Modeling


Overview
This lab models the flow of bank transactions (represented as packets) from Washington, D.C. to Philadelphia. In order to measure the performance of this simple network in a meaningful manner, the user must define specific questions that their model is designed to answer. Design the lab to answer the following questions. 1. Does the queue size of the WDC transmitter steadily increase? 2. What is the throughput (in bits/second) at the WDC transmitter? 3. What is the throughput (in bits/second) at the Philadelphia receiver? 4. What is the utilization of the DC to Philadelphia link? Bank transactions originate in Washington, D.C. (WDC) and are routed to Philadelphia via a telephone line and modem capable of transmitting 9,600 bits/second. The size of a transaction varies according to a normal distribution with a mean size of 3,200 bits and a variance of 400 bits. Transactions are modeled as exponential interarrivals, with a mean interarrival time of 0.5 sec/trans. The goal is to analyze performance of a system in steady state. Create a transaction packet with two fields, source node and destination node. Each field has a size of 64 bits.

Objectives
1. Use the Packet Format Editor to create a new packet format. 2. Use the Node Model Editor to create new node models. 3. Use the Link Model Editor to create a new link model.

Instructions
Create the Packet Format 1. Open the Packet Format Editor to create a new packet format. a. Choose File / New / Packet Format. b. Click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

33

2. Create two packet fields. a. Click on the Create New Field button. b. Left-click in the workspace to create a field. c. Create two fields in this manner. d. Right-click to stop deploying more fields. 3. Set the attributes for field_0. a. Right-click on field_0 and select Edit Attributes. b. Set the name to Source Node. c. Set size to 64 bits. d. Click OK. 4. Set the attributes for field_1. a. Right-click on field_1 and select Edit Attributes. b. Set the name to Destination Node. c. Set size to 64 bits. d. Click OK. 5. Save the packet format. a. Choose File / Save As b. Name the packet <your initials>_trans_pkt (e.g., mbh_trans_pkt). c. Click Save.

6. Close the packet format editor; choose File / Close.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

34

Create the Transmitter Node Model 1. Open the node editor to create a new node. a. Choose File / New / Node Model b. Click OK. 2. Create a generator. a. Click the Create Processor button on the toolbar. b. Left-click in the workspace. c. Right-click to stop deploying more processors. 3. Create a point-to-point transmitter. a. Click the Create Point-to-point Transmitter button on the toolbar. b. Left-click in the workspace. c. Right-click to stop deploying more point-to-point transmitters. 4. Create packet stream. a. Click the Create Packet Stream button on the toolbar. b. Left-click on each of the two modules. c. Right-click to stop deploying more packet streams. 5. Save the node model. a. Choose File / Save As b. Name the model transmitter_nd. c. Click Save.

6. Configure Node Interfaces.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

35

a. Select Interfaces / Node Interfaces. b. In the Node Types table, set the value for Supported column as follows: i. mobile = no ii. satellite = no c. Click OK. Set Attribute Values for the Generator Module 1. Edit attributes of the generator (processor module). a. Set name = gen. b. Set process model = simple_source. c. Click in Value column for Packet Interarrival Time and select Edit d. Set the Distribution Name = exponential and Mean outcome = .5; click OK. e. Click in the Value column for Packet Size and select Edit f. Set the following values: i. Distribution Name = normal ii. Mean Outcome = 3200 iii. Variance = 400 g. Click OK. h. Set the Packet Format = <initials>_trans_pkt. This is the packet format you created earlier in the lab. i. Click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

36

Set Attribute Values for the Transmitter Module 1. Edit attributes of the transmitter module. a. Set the name = trans. b. Click in the Value field () for channel and set the data rate = unspecified. (You will need to type it into the field and press Enter.)

c. Click under packet formats. You will see the following dialog box:

Make sure to uncheck these boxes first

i. Uncheck the box to Support all packet formats. (This will un-support all formatted packet formats.) ii. Uncheck the box to Support unformatted packets. (This will un-support all unformatted packet formats, so no packet formats are supported.) iii. Scroll down to <initials>_trans_pkt and toggle Status to supported. (This will cause only your packet format to be supported.)
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

37

iv. Click OK three times. 2. Save file; select File / Save. Create the Receiver Node Model 1. Create a new node model. a. Select File / New / Node Model. b. Click OK. 2. Create a point-to-point receiver. a. Click the Create Point-to-point Receiver button on the toolbar and click in the workspace. b. Right-click to stop deploying more receivers. 3. Create a sink. a. Click the Create Processor button on the toolbar and click in the workspace. b. Right-click to stop deploying more processors. 4. Create packet stream. a. Click the Create Packet Stream button on the toolbar and click on each of the two modules. b. Right-click to stop deploying more packet streams. 5. Save the node model. a. Choose File / Save As and name the model receiver_nd. b. Click Save.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

38

6. Configure Node Interfaces. a. Select Interfaces / Node Interfaces. b. In the Node Types table, set the value for Supported column as follows: i. mobile = no ii. satellite = no c. Click OK. Set Attribute Values for the Receiver Module 1. Edit attributes of receiver module (point-to-point receiver). a. Set name = rec. b. Click in the Value field () for channel and set data rate as unspecified. c. Click under packet formats and make sure that the two check boxes on bottom left of the window are unchecked. d. Scroll down to <initials>_trans_pkt and toggle the Status to supported. e. Click OK three times. Set Attribute Values for the Sink Processor Module 1. Set attributes of the sink. a. Right-click the processor module and select Edit Attributes. b. Set the name to sink. i. Press the Enter key on the keyboard. c. Click OK.

2. Save file; select File / Save.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

39

Promote Node Statistics 1. Promote receiver node statistics. a. In the receiver_nd node editor window, choose Interfaces / Node Statistics. b. Click in the first field of the Orig. Name column. c. Choose the statistic: point-to-point receiver:rec.channel [0]. throughput (bits/sec).

d. Click Promote. e. Click OK. 2. Promote transmitter node statistics. a. Choose File / Save and close the receiver_nd Node Editor window. b. In the transmitter_nd node window, select Interfaces / Node Statistics.

c. Click in the first field of the Orig. Name column.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

40

d. Choose the statistic: point-to-point transmitter:trans.channel [0].queue size (bits). e. Click Promote. f. Click OK. 3. Choose File / Save. 4. Close the transmitter_nd Node Editor window. Create a New Link Model 1. Choose File / New / Link Model; click OK. 2. In the Supported Link Types Table, change the value for Supported from yes to no for the bus, bus tap and ptdup Link types. This means that this link will only be available as a simplex point-to-point link. 3. In the Attributes Table, scroll down to the attribute data rate and change the Initial Value to 9600. 4. Set the following pipeline stage models. a. ecc model b. error model d. txdel model = dpt_ecc = dpt_error = dpt_txdel

c. propdel model = dpt_propdel Pipeline Stages calculate effects such as propagation delay, interference noise, transmission delay, etc. when transmitting a packet. In this step, we are configuring this link to use the default point-to-point behavior. 5. Include the link_delay external file. a. Select File / Declare External Files b. Find link_delay in the list. c. Put a check mark next to it. d. Click OK. There are some functions that Modeler needs that are included in the link_delay.ex.c file.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

41

6. Save the new link model; choose File / Save As and name the file pt_base_9600 and then click Save.

7. Select File / Close to close the link model editor. Create a New Project 1. Create a new project. a. Select File / New / Project from the pull-down menu. b. Click OK. c. Name the new project bank_net. d. Name the initial scenario Baseline and click OK. e. When the Startup Wizard appears, click Quit. 2. Set background map. a. Select View / Background / Set Border Map / usa and click OK. b. Zoom in on Washington / Philadelphia Region. i. Click the Zoom + button. ii. Draw a box around the region.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

42

3. Create a custom object palette. a. Click the Object Palette button. b. Click the Configure Palette button in the object palette. c. Click Clear to start with a blank palette. d. Click Node Models button and include the receiver_nd and transmitter_nd; click OK. e. Click Link Models button and include pt_base_9600; click OK. f. Click Save As in the Configure Palette window, when prompted, name the palette bank_net. Click Save; click OK (to close Configure Palette window).

4. Place nodes and link. a. Place a transmitter_nd near Washington D.C. b. Place a receiver_nd near Philadelphia. c. Name the two WDC_src and Philly_dest respectively.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

43

d. Draw a link (pt_base_9600) from Washington to Philadelphia.

e. Close the object palette. 5. Verify links. a. Press Verify Links button. b. Click OK. If a red X appears on any of your links, ask an instructor for assistance. 6. Save the project. a. Choose File / Save. b. Name the project bank_net. c. Click Save. Choose Statistics to be Collected 1. In the Project Editor, select DES / Choose Individual Statistics 2. Choose to collect receiver throughput in bits/sec, transmitter queue size and link utilization. a. Expand Node Statistics. b. Expand point-to-point receiver. c. Select throughput (bits/sec). d. Expand point-to-point transmitter.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

44

e. Select queue size (bits). f. Expand Link Statistics. g. Expand point-to-point. h. Select utilization.

i. Click OK. 3. Select DES / Choose Statistics (Advanced). 4. Add a Node Statistic Probe. a. Click *once* on the Create Node Statistic Probe button. It will create a new line under the Node Statistic Probes heading.

b. Right-click on the newly added line and select Edit Attributes. c. Set the name attribute to DC_thruput and press Enter. Then click OK.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

45

d. Right-click on the probe and select Choose Probed Object. e. In the new window, click on the plus next to WDC_src. Click on trans and then click OK.

f. Right-click on the probe and select Edit Attributes. g. Set the submodule attribute to channel[0]. h. Click OK. i. Right-click the probe and select Choose Statistic. j. Select the statistic: point-to-point transmitter.throughput (bits/sec). k. Click OK. 5. Select File / Save. 6. Close the Probe Editor. Configure and Run the Simulation 1. Run the simulation. a. From the menu, select DES / Configure/Run Discrete Event Simulation b. Configure the simulation as follows. Set Duration = 2000 seconds. c. Click Run. 2. When the simulation completes, click Close in the Simulation Sequence window. 3. Right-click on the workspace and select View Results. 4. Change the filter from As Is to average for the following graphs: a. Object Statistics / Philly_dest / point-to-point receiver / throughput (bits/sec). b. Object Statistics / WDC_src / point-to-point transmitter / queue size. c. Object Statistics / WDC_src / trans / channel [0] / point-to-point transmitter / throughput (bits/sec). d. Object Statistics / WDC_src->Philly_dest [0] / point-to-point / utilization.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

46

5. To find answers, we need to look at the load offered to the 9600 baud modem at the WDC node. Load = (1 pk/ 0.5 sec)(3200 bits/pk) = 6400 bits/sec. 1. Does the queue size of the WDC transmitter steadily increase? No. [Clearly, 6400 bits/sec is less than 9600 bits/sec.] In a later lab, we'll learn how to increase the packet/sec until the queue size is steadily increasing. 6400 bits/second [Since the load is less than data rate of transmitter, throughput = load] 6400 bits/second [Whatever is transmitted, is received. For point-to-point links, throughput at a transmitter should always equal throughput at the respective receiver.] 67% [Calculated by load over capacity, (6400 bits/sec) / (9600 bits/sec).]

2. What is the throughput (in bits/second) at the WDC transmitter?

3. What is the throughput (in bits/second) at the Philadelphia receiver?

4. What is the utilization of the D.C. to Philadelphia link?

Do your results match the expected behavior of the model?

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

47

Additional Exercise (Optional)


Another source of bank transactions in Baltimore also transmits to Philadelphia using identical equipment to the Washington, D.C. site. Adjust the receiver model in Philadelphia to accept an additional connection from the Baltimore site. The following steps provide a good workflow to model this scenario. 1. Duplicate the current scenario. 2. Create a new site in Baltimore. 3. Add an additional receiver module to the receiver node in Philadelphia, and configure the receiver and node model to behave correctly. 4. Connect the Baltimore and Philadelphia sites. 5. Run the simulation. 6. Compare the results for the two sites.

END OF LAB 4

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

48

Lab 5: Process Modeling

Objectives
1. Use the Process Editor to create a modified version of the sink process model. 2. Add a new statistic to compute end-to-end (ETE) delay.

Overview
1. Create modified sink process model to compute ETE delay. 2. When there is a packet arrival, get the packet, obtain the creation time, write out its ETE delay as a global statistic and destroy the packet. 3. Incorporate new sink process model into existing node model. 4. Create ETE delay statistic probe. 5. Run simulation for a duration of 2,000 seconds to ensure convergence. 6. Filter the View Results graphs to answer questions.

Instructions
Create a New Process Model 1. Create a new process model. a. Select File / New / Process Model. b. Click OK. 2. Draw states and transitions in the process model diagram. a. Click on the Create State button and then click 3 times on the workspace to place three states on the workspace. b. Right-click to stop deploying more states. c. Click on the Create Transition button. Starting at st_0, connect st_0 to st_1. d. Starting at st_1, create a transition to st_2. Note: You can create a curved line by clicking on the workspace as you draw the transition. When you reach the next state (in this case st_2), click again and the transition will have a curved shape if you havent drawn a straight line.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

49

e. Starting at st_2, create a transition back to st_1. f. Right-click to stop creating more transitions. 3. Right-click on each state and select Edit Attributes and enter the following values. a. For st_0, set the following attributes with associated values. i. name = INIT ii. status = forced b. For st_1, set the following attributes with associated values. i. name = ETE_Destroy ii. status = forced c. For st_2, set the following attributes. i. name = WAIT ii. status = unforced 4. Set transition conditions. a. Right-click on the transition going from the WAIT state to the ETE_Destroy state and select Edit Attributes. b. Set the condition attribute to PK_ARRIVAL (the name of the macro for this transition) and press Enter. c. Then click OK. 5. Save the process model. a. Click on File / Save As b. Enter the filename as ETE_Destroy and then click Save again.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

50

6. Enter code to define the condition of state transition. a. Click the Header Block (HB) button. b. Enter the following line of code to define the macro:
#define PK_ARRIVAL (op_intrpt_type ( ) == OPC_INTRPT_STRM)

Note: A #define statement has the following syntax: #define <space> <Macro name> <space> <Macros definition> Thus, we are setting the Macro called PK_ARRIVAL to represent the condition that the type of interrupt that was received was a stream interrupt.

c. Select File / Save (In the Header Block window). 7. Create temporary variables for use in the process model code. a. Click the Temporary Variable (TV) button. b. Enter the following:
double ete_delay; double creation_time; double current_time; int stream_index; Packet* pkptr;

c. Select File / Save (in the Temporary Variables window).


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

51

8. Edit the enter executives of a state. a. Double-click the top half of the ETE_Destroy state. b. Enter the following in the Enter Execs window:
/* Get stream index number. */ stream_index = op_intrpt_strm( ); /* Get pointer to packet from stream index. */ pkptr = op_pk_get(stream_index); /* Destroy packet. */ op_pk_destroy(pkptr);

You will be adding more to the Enter Execs window later to calculate and collect statistics (ETE Delay).

c. Click File / Save (In the Enter Execs window).

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

52

Define a New Statistic to Compute ETE Delay 1. Name the statistic. a. Select Interfaces / Global Statistics. b. In the Declare Global Statistics table enter the following. Stat Name = ETE Delay Count = N/A Low Bound = 0.0 Mode = Single Draw Style = discrete High Bound = disabled

c. Click OK. 2. Create statistic variable. a. Click on the State Variables (SV) button. b. In the state variables table, enter Type = Stathandle Name = ete_gsh

c. Click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

53

3. Register this statistic to enable writing values to it. a. Double-click on the top half of the INIT state.
b. Enter the following in the Enter Execs window: /* Register handle for statistic collection. */ ete_gsh = op_stat_reg("ETE Delay", OPC_STAT_INDEX_NONE, OPC_STAT_GLOBAL);

c. Note that the name in quotes, ETE Delay must exactly match the stat name entered in step 1. d. Click File / Save (in the Enter Execs window). 4. Write values to the stathandle in the appropriate location. a. Double-click on the top half of the ETE_Destroy state.
b. Enter the following in the Enter Execs window before the code for

op_pk_destroy(pkptr);
/* Get creation time of packet. */ creation_time = op_pk_creation_time_get(pkptr);

/* Get current simulation time. */ current_time = op_sim_time( ); /* Calculate ETE Delay. */ ete_delay = (current_time - creation_time); /* Write statistics. */ op_stat_write(ete_gsh, ete_delay);

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

54

c. Click File / Save (in the Enter Execs window). d. Click the Compile Process Model button. e. Click on Close and then close the Process Model window. Modify an Existing Project to Include New Changes 1. Open the existing project. a. Select File / Open and then Project from the pull-down menu at the top. b. Select C: \op_models from the left and bank_net from the right and then click Open. 2. Duplicate an existing scenario. a. Select Scenarios / Switch To Scenario and choose Baseline. b. Select Scenarios / Duplicate Scenario and name the new scenario as process; click OK. 3. Edit the node model to contain the newly defined process model. a. Double-click on the Philly_dest node to enter the Node editor. b. Right-click on the sink module and select Edit Attributes and set values as follows. i. name = ETE_Destroy ii. process model = ETE_Destroy

iii. Click OK. 4. Select File / Save in the Node Editor. 5. Close the Node Editor. 6. In the Project Editor, select File / Save.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

55

Configure the Probe Model 1. Select DES / Choose Statistics (Advanced). 2. Create a Global Statistic Probe. 3. Right-click on the probe and select Edit Attributes. 4. Change the name attribute to ETE Delay and then press Enter; Click OK. 5. Right-click on the probe and select Choose Statistic.

6. Select the statistic = ETE Delay. 7. Click OK. 8. Select File / Save in the Probe Editor. 9. Close the Probe Editor. Configure and Run the Simulation 1. Configure the simulation as follows. a. Select DES / Configure/Run Discrete Event Simulation b. Set Duration = 2000 seconds. 2. Click Run and then Close when it completes.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

56

Review the Problem Inputs and Expected Outputs 1. Review the problem specification. a. Transmitter data rate is 9600 bits/second. b. The size of a transaction varies according to a normal distribution with a mean size of 3200 bits and a variance of 400 bits. c. Transactions are modeled as exponential interarrivals, with an arrival rate of two transactions per second. 2. What are the questions to be answered by simulation? a. What is the average end-to-end delay for all packets? ________ b. What percentage of the packets incurred an end-to-end delay of less than one second? ______ View Results 1. Right-click on the workspace and select View Results. 2. Graph some of the result statistics in the View Results window. a. Select Global Statistics / ETE Delay and click Show. b. Change the filter from As Is to average and click Show again. c. Change filter to Cumulative Distribution (CDF) and click Show again. 3. In the CDF graph, place the mouse pointer on the point where the blue curve intersects with the 1 second mark on the horizontal axis. The tool tips box will pop up and tell you the values of the horizontal and vertical axes where your mouse pointer is located.

END OF LAB 5

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

57

Lab 6: Collecting Scalar Statistics

Objectives
1. Creating an attribute for a process model. 2. Collecting Scalar Statistics.

Overview
1. Modify the bank_net project to include a custom generator that has an attribute transaction_rate, the transaction rate in transactions per second. 2. Answer the following questions: a. Are your results the same with this customized generator as with the ideal generator? Hint: Run the simulation with the same probe file as before. Verify that results are the same. b. What is the maximum generation rate such that the average ETE delay for all transactions is less than 5 seconds? Hint: Run multiple simulations with different transaction rates, collecting scalar data.

Instructions
Create a New Process Model 1. Create a new process model. a. Select File / New / Process Model. b. Click OK. 2. Draw states and transitions in the process model diagram. a. Left-click on the Create State button and place three states on the workspace. b. Right-click in the workspace to stop deploying more states. c. Click on the Create Transition button and connect the states as follows. i. Starting at st_0, connect st_0 to st_1. ii. Starting at st_1, create a transition to st_2. iii. Starting at st_2, create a transition back to st_1. d. Right-click in the workspace to stop deploying more transitions.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

58

3. Right-click on each state, select Edit Attributes and set the attribute values. a. For st_0, set the following attributes with associated values. i. name = INIT ii. status = forced b. For st_1, set the following attributes with associated values. i. name = WAIT ii. status = unforced c. For st_2, set the following attributes with associated values. i. name = SEND ii. status = forced 4. Set transition conditions. a. Right-click on the transition going from the WAIT state to the SEND state and select Edit Attributes. b. Set the condition attribute to NEXT_IA_TIMER_EXPIRES (the name of the macro for this transition) and then click OK.

5. Save the process model. a. Choose File / Save As b. Name the file as transmitter_scalar_lab and click Save.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

59

6. Enter code to define the condition of state transition. a. Click the Header Block (HB) button. b. Enter the following line of code to define the macro. Note that this should be entered all on one line in the editor.
#define NEXT_IA_TIMER_EXPIRES (op_intrpt_type ( ) == OPC_INTRPT_SELF)

c. Select File / Save (in the Header Block window). 7. Create temporary variables for use in the process model code. a. Click on the Temporary Variable (TV) button. b. Enter the following:
double tr; Packet* pkptr;

c. Click File / Save (in the Temporary Variables window). 8. Create state variables for use in the process model code. a. Click on the State Variable (SV) button. b. In thestate variables table enter: Type = Distribution* Type = Distribution* Name = pksize_dist_ptr Name = ia_dist_ptr

c. Click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

60

9. Define attributes for the process model. a. Select Interfaces / Model Attributes. b. In the Model Attributes table, enter the following. i. Attribute Name = Transaction Rate ii. Type = double iii. Units = trans/sec iv. Default Value = 1.0

c. Click OK. 10. Edit the enter executives of the INIT state. a. Double-click the top half of the INIT state. b. Enter the following in the Enter Execs window.
/* Get the value of the attribute Transaction Rate. */ op_ima_obj_attr_get (op_id_self( ), Transaction Rate, &tr); /* Load exp distribution for Interarrival Time. */ ia_dist_ptr = op_dist_load (exponential, 1.0 / tr, 0.0); /* Load normal distribution for Packet Size. */ pksize_dist_ptr = op_dist_load (normal, 3200, 400);

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

61

c. Click File / Save (in the Enter Execs window). 11. Edit the enter executives of the WAIT state. a. Double-click the top half of the WAIT state. b. Enter the following in the Enter Execs window:
/* Schedule next wake-up call. */ op_intrpt_schedule_self (op_sim_time ( ) + op_dist_outcome(ia_dist_ptr), 0);

c. Click File / Save (In the Enter Exec window).

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

62

12. Edit the enter executives of the SEND state. a. Double-click the top half of the SEND state. b. Enter the following in the Enter Execs window: Remark: Replace <initials> with your initials

/* Create a packet of a specific format. */ pkptr = op_pk_create_fmt(<initials>_trans_pkt); /* Set the size of the packet. */ op_pk_bulk_size_set (pkptr, (int) op_dist_outcome (pksize_dist_ptr)); /* Send the packet to outstream 0. */ op_pk_send (pkptr, 0);

c. Click File / Save (In the Enter Execs window).

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

63

13. Enable the begsim interrupt attribute. a. To do so, select Interfaces / Process Interfaces. b. Change the Initial Value for begsim intrpt attribute from disabled to enabled.

c. Click OK. 14. Compile the process model. You can either use the Compile Process Model button or select Compile / Compile Code. Click Close when compilation finishes. 15. Close the Process Editor. Modify the Existing bank_net Project to Contain New Changes 1. Open the existing bank_net project. a. Select File / Open and select Project from the pull-down menu at the top. b. Choose C: \op_models from the left. c. Choose bank_net from the right and click Open. 2. Duplicate the existing process scenario. a. Switch to scenario process: Select Scenarios / Switch To Scenario / process. b. Select Scenarios / Duplicate Scenario from the menu bar. c. Name the new scenario scalar and click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

64

3. Edit attributes on WDC_src. a. Double click on WDC_src node to enter the Node Editor. b. Right-click on the gen module and select Edit Attributes to change the following. i. name = gen_scalar ii. process model = transmitter_scalar_lab c. Click OK. 4. Save and close the node model. a. Select File / Save in the Node Editor. b. Close the Node Editor. Configure the Probe Model 1. Select DES / Choose Statistics (Advanced). 2. Enable the scalar mode to the ETE delay statistic: a. Right-click on ETE Delay global statistic and select Edit Attributes. b. Change the following attributes. i. scalar data = enabled ii. scalar type = sample mean

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

65

c. Click OK. 3. Create an Attribute Probe. a. Right-click on the probe and select Choose Attributed Object. b. Expand WDC_src and select gen_scalar module.

c. Click OK. d. Right-click on the probe and select Edit Attributes. Make the following changes: i. name = Transaction Rate ii. attribute = Transaction Rate e. Click OK. 4. Save and close the probe model. a. Select File / Save. b. Select File / Close. Configure and Run the Simulation 1. Configure advanced simulation settings. a. Select DES / Configure/Run Discrete Event Simulation (Advanced). b. Right-click on the simulation icon (scenario) and select Edit Attributes.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

66

2. Select inputs to the simulation. a. Expand the Inputs item in the tree on the left; left click on the Object Attributes tree node that appears.

b. Click on the Update button and then on the Add button. c. Click on the Add field to add the attribute called WDC_src.gen_scalar.Transaction Rate. d. Click OK. e. Click in the Value column and then click on the Set Multiple Values button; enter the following values: i. Value ii. Limit iii. Step =1 =3 = .2

f. Click OK. 3. Select the outputs from the simulation.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

67

a. On the left part of the window, expand the Outputs item in the tree; left click to select the Statistics Collection tree item that appears. b. The following dialog box appears:

c. Set Scalar file = bank_net-scalar, and check the option to Clear scalar file before running simulation set d. Click OK to close this window. 4. Run the simulation. a. Note that the icon is made of two arrows now, meaning that several simulations are scheduled. b. Click on the Execute Simulation Sequence icon. A window message must appear for indicating that 11 simulations have to be done. Click Yes to run them. We get these 11 simulations because earlier we entered the range for the transaction rate from 1 (Value) and to 3 (Limit). We set the increment value (step) to 0.2. This leads to a total of 11 simulation runs. c. When simulations completes click Close. View Results 1. Create an analysis panel to view results. a. Select File / New / Analysis Configuration and then click OK. b. Select File / Load Output Scalar File c. One file will be available: bank_net-scalar (the one used to collect your results). Click on it. d. Click on Create a graph of Two Scalars button.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

68

e. A new window must appear asking you to choose the statistics to be plotted on the graph.

f. Change the Horizontal field to use top.WDC_src.gen_scalar.Transaction Rate. g. Click OK.

END OF LAB 6

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

69

Lab 7: Wireless Modeling


Overview
1. This lab will model a mobile paging system. 2. The following parameters will have to be addressed in the model. a. Telephones initiate pages addressed to a specific mobile pager. b. The pages are relayed through a central base station. c. A radio tower broadcasts the pages. d. If the appropriate mobile pager receives the page, an ack is transmitted back to the radio tower. e. The radio tower relays the ack back to the base station and a successful page statistic is recorded.

Objectives
1. Create the acknowledgement and page packet formats. 2. Create the necessary antenna pattern, PDF, and link parameter models. 3. Use the provided node models and the newly created parameter models to build the mobile paging network. 4. Configure the radio transmitters and receivers. 5. Create trajectories for the mobile pagers.
6. Choose results, run the simulation, and view the results.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

70

Project Specifications
1. Telephone Node Specification a. Generates pages on a custom probability density function (PDF). b. Determines destination of page based on a custom PDF. Encapsulates an ack in the page. Sends the pages on the single output port to the base station. 2. Base Station Specification a. Receives pages on one of eight input ports. b. Receives acks on one input port (paired with the output port) and records the Percentage of Successful Pages (i.e., the number of acks received/pages sent). 3. Radio Tower Specification a. Receives pages from the base station via an input port and broadcasts them to the mobiles. b. Receives acks from the mobiles and forwards them to the base station via an output port. 4. Mobile Specification a. Receives pages and checks destination. b. If the mobile is the destination, decapsulates the ack and transmits it.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

71

Instructions
Create the ack Packet Format 1. Create a new packet format. a. Select File / New / Packet Format. b. Click OK. 2. Add data fields to the packet format. a. Click on the Create New Field button on the toolbar. Then move the mouse pointer into the editor workspace. A frame will appear in the workspace. Click to create a packet field. b. Click again to create another packet field. c. Right-click in the workspace to stop creating more packets fields. d. Select File / Save As and name it <your initials>_ack_packet and click Save.

3. Edit the newly created data fields. a. Right-click on the field_0 and select Edit Attributes. Enter the following values. i. Name = Source Node. ii. Size = 64. iii. Click OK. b. Right-click on the field_1 and select Edit Attributes. Enter the following values. i. Name = Destination Node. ii. Size = 64. c. Click OK. 4. Save and close the Packet Format. a. Choose File / Save. b. Choose File / Close.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

72

Create the page Packet Format 1. Use the same procedure that was described in previous page to create a new packet format with three fields and set the first two fields to the same values as the ack packet format. a. First field: Name = Source Node Size = 64

b. Second field: Name = Destination Node. Size = 64 2. Use the following steps to set the third field. a. Right-click on the third field and select Edit Attributes. b. Set the name as Ack Packet. c. Set the value of the type attribute to packet. d. Set the value of the size attribute to inherited. e. Click OK. 3. Save this Packet Format. a. Choose File / Save As b. Name it as <your initials>_page_packet. c. Click Save.

4. Close the Packet Editor.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

73

Create a New Link Model 1. Create a new link model. a. Select File / New / Link Model. b. Click OK. 2. Configure the link model. a. In the Supported Link Types table, select no for Supported value of bus and bus tap Link Type. b. In the Attributes table scroll down to packet formats. c. Click on the Initial Value column for packet formats, another window pops up. In that window, deselect the check boxes next to Support all packet formats and Support unformatted packets. d. Set the status of <your_initials>_ack_packet and <your_initials>_page_packet to supported and click OK. e. Scroll up in the Attributes table, set the data rate value to 16384 and press Enter. f. In the Attributes table, select the following models. i. ecc model ii. error model iii. propdel model iv. txdel model = dpt_ecc. = dpt_error. = dpt_propdel. = dpt_txdel.

Pipeline Stages calculate effects such as propagation delay, interference noise, transmission delay, etc. when transmitting a packet. In this step, we are configuring this link to use the default point-to-point behavior. 3. Include necessary external files for the configured Pipeline Stages. a. Select File / Declare External Files b. Find link_delay in the list. c. Put a check mark next to it to include it. d. Click OK. There are some functions that Modeler needs that are included in the link_delay.ex.c file. 4. Save the link model. a. Select File / Save As b. Name the file as <your initials>_page_link and then click Save.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

74

5. Close the link model. Create a New PDF 1. Create a new probability density function (PDF). a. Select File / New / PDF Model. b. Click OK. 2. Add an impulse to the function. a. Click on Add an Impulse to the Function button on the toolbar. b. A dialog box appears. Enter 0 for Impulse Abscissa in that window and click OK. c. Enter 0.5 for Impulse Area and click OK. This will set 50% probability for Mobile 0 pager. 3. Using the method described in step 2, set the following probabilities for the rest of the pagers. (Click Add an Impulse to the Function button again, and enter the appropriate values below.) a. Mobile 1 = 15% (Impulse Abscissa = 1, Impulse Area = .15) b. Mobile 2 = 25% (Impulse Abscissa = 2, Impulse Area = .25) c. Mobile 3 = 10% (Impulse Abscissa = 3, Impulse Area = .10) 4. Normalize the PDF by clicking on the Normalize the Function button on the toolbar. 5. Save the PDF. a. Save this PDF as <your initials>_page_dest_pdf.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

75

b. This PDF will be used to choose a destination when generating packets. (Each mobile has an attribute mobile ID set with the corresponding value: mobile_0 : 0, mobile_1 : 1, )

6. Create a new PDF in order to model the page interarrival time. Each telephone will use this PDF in order to determine the next page generation time. a. Clear the model; select Edit / Clear Model. b. From the left side of the graph to the right side, left-click several times on the panel to create the following PDF:

c. If you make a mistake, just click again from left to right to redraw the portion you want to correct.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

76

7. Normalize the PDF by clicking on the Normalize the Function button on the toolbar. 8. Save this PDF. a. Select File / Save As b. Name it as <your initials>_page_pk_pdf. c. Click Save. 9. Close the PDF Editor. Choose Statistics 1. Open the page_net project. a. Select File / Open and Project from the pull-down menu at the top. b. Choose C: \op_model\Page_Net from the left side. c. Choose page_net from the right side and click Open. d. The scenario Original will show up. 2. Choose statistics to collect. a. Right-click on the workspace, and then select Choose Individual DES Statistics. b. Expand Global Statistics and select % of Packets Successfully Transmitted. To be successfully transmitted, an ack generated by the mobile must come back to the original sender (e.g., a telephone). c. Click OK. Run the Simulation 1. Configure the simulation. a. Select DES / Configure/Run Discrete Event Simulation b. Check that Duration has been set to 100 seconds. c. Set the Simulation Kernel popup to read Optimized, so that the simulation uses the optimized kernel when running the simulation. d. Click on the Inputs tree item on the left and click on the Terrain Modeling tree item that appears. e. Check that the Use Terrain Modeling Module option is not checked. 2. Run the simulation. a. Click Run. b. Click Close when the simulation finishes.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

77

View Results 1. View results in graph panels. a. Once the simulation is finished, right-click on the workspace then select View Results. b. Select Global Statistics / % of Packets Successfully Transmitted. Click Show. c. Unselect this statistic, then select both received power and signal / noise ratio statistics under Object Statistics / subnet_0 / mobile_1 / page_rx / channel [0] / radio receiver. d. Click Show.

2. Hide the graphs and close the dialog box. a. Use the Hide/Show Graph Panels button instead of closing the graphs. b. Click on Close button to close the View Results window. Use TMM 1. Duplicate the scenario. The new scenario will show the effect of terrain on wireless communications using the free space line-of-sight propagation model. a. Select Scenarios / Duplicate Scenario b. Name the new scenario TMM_with_terrain_Free_Space_LOS and click OK. 2. Select the directory to find the terrain data. a. Select Topology / Terrain / Specify Terrain Data Directory b. In the bottom pull-down menu, choose USGS DEM. c. Click Browse
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

78

d. Choose the folder C: \op_models and click OK. e. The Data coverage information should update with a coverage area in degrees, latitude and longitude. f. Click OK. 3. Set the terrain elevation map. a. Select Topology / Terrain / Set Elevation Maps b. Change the value for the DC_Elevation_map under Selected column from no to yes. c. Click OK.

4. Save the file; select File / Save. View a Terrain Profile 1. Set the object models to take the terrain data into account. a. Select Edit / Select All In Subnet. b. Right-click on the radio tower and select Advanced Edit Attributes. c. Change the altitude modeling attribute from relative to subnet-platform to relative to terrain. Important: Check the Apply changes to selected objects box. Click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

79

2. View a sample terrain profile. a. Select Topology / Terrain / View Terrain Profile. b. Click on any two points on the workspace.

c. Click Close when you are finished. Run the Simulation 1. Set the propagation model. a. Enable the Free Space with Line Of Sight check propagation model; select Topology / Terrain / Set Propagation Model b. Change the Default propagation model to Free Space. c. Change the Parameter Set value for the Free Space Propagation Model to use freespace-lineofsight-on. d. Click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

80

2. Configure and run the simulation. a. Select DES / Configure/Run Discrete Event Simulation b. Click on the Inputs tree item on the left and click on the Terrain Modeling tree item that appears as the tree expands. Put a check mark for Use Terrain Modeling Module. c. Run the simulation. d. Close the window when the simulation finishes. View Results 1. As you have used the Hide/Show Graph Panels button, you do not have to use the View Results menu in this case. 2. The same graphs with the previous results should appear. Since you have already identified the desired output graphs, you will use these current graphs as templates to load the data from the most recent simulation. a. Select DES / Panel Operations / Panel Templates / Create From All Panels.

(Note that your results may vary.)

b. Select DES / Panel Operations / Panel Templates / Load With Latest Results. c. Again use the Hide/Show Graph Panels button to hide the graphs. Use Longley Rice Propagation Model 1. Duplicate the scenario and use the Longley Rice propagation model instead of the Free Space Line-of-Sight propagation model. a. Select Scenarios / Duplicate Scenario b. Name the new scenario TMM_with_terrain_Longley_Rice; click OK.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

81

2. Set the Longley Rice propagation model in the duplicate scenario. a. Select Topology / Terrain / Set Propagation Model b. Change the Default propagation model from Free Space to Longley Rice; click OK. 3. Run the simulation using the same steps as in the previous scenario. View Results 1. Create a template from the previous graphs, and load the newest simulation results into the templates as done in the previous scenario.

2. Look at the graph. Can you easily tell the difference between the graphs in the various scenarios? Instead of looking at each graph separately, overlay the graphs of the scenarios to compare results in the graphs. a. Compare results between scenarios; right-click on the workspace then select Compare Results.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

82

b. Select % Packets Successfully Transmitted statistic. Change from All Scenarios to Select Scenarios; then click Show.

c. Unselect scenario TMM_with_terrain_Longley_Rice and select scenarios Original and TMM_with_terrain_Free_Space_LOS. Click OK.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

83

d. Use the same technique for comparing received power and signal / noise ratio statistics.

4. Finally, compare for the same scenarios above, the % of Packets Successfully Transmitted for Original and TMM_with_terrain_Longley_Rice.

The percentage of packets successfully transmitted was the same between the original model and the Longley-Rice model. However, between these two scenarios, the received power is quite different, but this does not necessarily cause a transmission to fail. One modification could be to decide not to accept a packet if the SNR (Signal / Noise Ratio) is below 70. To do so, you will have to modify the default pipeline stage used to check the acceptance of a received packet. 5. Click on Close in the View Results window. 6. Click on Hide/Show Graph Panels button.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

84

Modify Pipeline Stages 1. Open the default pipeline stage for wireless error correction. a. Select File / Open and Pipeline Stage (C code) from the drop down menu at the top. b. Choose C:\OPNET\11.0.A\models\std\wireless from the left side. c. Choose dra_ecc from the right side and click Open. 2. Choose File / Save As, name it my_dra_ecc, and save it to c:\op_models 3. Change the default pipeline stage for error correction so that the model does not successfully transmit the packet if the signal-to-noise ratio (SNR) is below 70. Make the following changes in the code: a. line 26: Change the function name: from dra_ecc_mt to my_dra_ecc_mt b. line 32: Add a new variable : double computed_snr;

c. line 58: Insert the following lines of code BEFORE the KP op_td_set_int
/* Get the last computed SNR. */ computed_snr = op_td_get_dbl (pkptr, OPC_TDA_RA_SNR); if (computed_snr <= 70) accept = OPC_FALSE;

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

85

d. Compile the modified pipeline stage by using the compile source file button. e. Click Close when compilation finishes and then select File / Close. 4. Change the node model to use the modified pipeline stage. a. From the project (scenario TMM_with_terrain_Longley_Rice), double-click on mobile_1 to enter its node model. Right-click on the receiver module (page_rx) and select Edit Attributes. b. Change the default pipeline for ecc model attribute from dra_ecc to my_dra_ecc; click OK. c. Select File /Save and then close the Node Editor. 5. Run the simulation. a. Select DES / Configure/Run Discrete Event Simulation b. Click on Run. 6. Compare the % of Packets Successfully Transmitted for all scenarios. a. Right-click on the workspace and select Compare Results. b. Select Global Statistics / % of Packets Successfully Transmitted. c. Click Show

END OF LAB 7

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

86

Lab 8: Debugging Techniques (Part I)


Objectives
1. Learn the basics of the OPNET Simulation Debugger (ODB). 2. Use evstop and fulltrace ODB commands.

Overview
1. This lab will use the Packet Switching Tutorial model. 2. In this scenario, packets are evenly routed between four nodes via a hub. This hub actually acts more like a switch, in that it does not broadcast packets, but sends them to the appropriate destination.

3. Run the simulation in debug mode to correct two types of problem: a. Structural: The simulation aborts (part 1). b. Behavioral: The results are not the expected ones (part 2).

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

87

Instructions
Browse the Topology 1. Open the exiting project 1502. a. Select File / Open and Project from the drop down menu at the top. b. Choose C: \op_models\debug from the left side. c. Select 1502 from the right side and click Open. 2. Examine one of the peripheral nodes. a. Each peripheral node is using the same node model. Double-click on any of these nodes (node_0, node_1) to open the corresponding node model. The src module is generating packets sent to the proc module. Packets are then sent outside the node by using the xmt transmitter module. On the other hand, the rcv receiver module is receiving packets coming from the outside (in this case, from the hub). Packets are then sent to the proc module that will compute the ETE delay before destroying the packet.

b. Select File / Close to close the node model. 3. Double-click on the hub node to open its node model.

Following the graphical description shown above, up to 4 links could be connected to this node at the network level. A packet received on any receiver module is sent to the hub module that will route the packet to one output interface (based on information contained in the packet itself).
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

88

4. Select File / Close to close the node model. Run a First Simulation without debug Mode Enabled 1. Verify that the OPNET Simulation Debugger (ODB) is not enabled and run the simulation. a. Select DES / Configure/Run Discrete Event Simulation b. In the tree on the left side, expand the Execution item by clicking on the + to its left; left click on the OPNET Debugger sub-item that appears. In the controls that appear in the dialog box, make sure that the checkbox to Use OPNET Simulation Debugger (ODB) is unchecked.

c. Click Run to execute the simulation. 2. Inspect the error message. Note that the crash is occurring due to the fact that a packet does not exist. (Specifically, a packet pointer references a null variable in the proc module of one of the peripheral nodes.)

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

89

Run the Simulation with debug Mode Enabled 1. Enable ODB and run the simulation. a. Select DES / Configure/Run Discrete Event Simulation, expand the Execution tree item, and select the OPNET Debugger sub-item that appears. b. Select Use OPNET Simulation Debugger (ODB) and Pause for user input before closing OPNET Console when simulation ends at the bottom and click Run.

2. Since you are using debug mode, the simulation is waiting for ODB commands. When the odb prompt appears, type in the following: odb> evstop 13 and then press Enter odb> cont and then press Enter

The first command sets a breakpoint for event number 13. The second one allows the simulation to continue until reaching this event number.
___________________________ (ODB 10.5.A: Event) ___________________________

* Time * Event intrpt)

: :

10 sec, [00d 00h 00m 10s . 000ms 000us 000ns 000ps] execution ID (13), schedule ID (#13), type (stream execution ID (9), top.pksw1.node_0.src (processor)

* Source :

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

90

From the information banner, event 13 is a stream interrupt from incoming stream 1. Remember, a stream interrupt means a packet arrival. 3. Type in the following before executing event number 13: odb> fulltrace and then press Enter odb> next and then press Enter

The first command turns on all trace information to be printed to the standard output. The second one executes the next event (and only the next one). Inspect FullTrace Information 1. Examine the information that was printed after typing the next command.
_________state (xmt): enter executives_________

* op_pk_get (instrm_index) strm. index strm. is empty. (0)

* op_dist_outcome (dist_ptr) dist. ptr. distribution 3.00 0000000000e+000)) outcome (2.0) (0x01D581C0) (uniform_int (0.000000000000e+000,

2. Observe that the packet arrived on stream 1, but op_pk_get() attempts to access stream 0 which is empty. This is the problem! 3. Keep hitting the Enter key on the keyboard until the console window closes and then click Close in the Simulation Sequence window.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

91

Correct the Error 1. Fix the peripheral node to access the correct stream. a. Double-click on any peripheral node to edit the pksw_node node model. b. Double-click on module proc to edit the pksw_periph_proc process model.

c. Double-click on the top half of the xmt state to edit its Enter Execs window. d. Change the following: pkptr = op_pk_get (RCV_IN_STRM)

to pkptr = op_pk_get (SRC_IN_STRM)

2. Save and recompile the process model since the underlying code has changed. a. Select File / Save. b. Use the Compile button to compile the process model. c. Click Close when compilation finishes. 3. Rerun the simulation without using debug mode as before. The simulation runs without any errors. END OF LAB 8
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

92

Lab 9: Debugging Techniques (Part II)


Objectives
1. Use Entity Information. 2. Trace packets.

Overview
During the first lab, you corrected a structural problem (the simulation aborted). For this lab, you must check that the results are those expected. For this scenario, packets must be evenly routed to all peripheral nodes.

Instructions
View Results 1. Open the existing project 1502 and switch to scenario lab2. a. If the project 1502 is not already open, select File / Open and follow the steps mentioned previously to open the project. b. Switch to the second scenario; select Scenarios / Switch To Scenario and select lab2. button to inspect results. TO HIDE THE 2. Click on Hide/Show Graph Panels GRAPHS, PLEASE USE THE SAME BUTTON, NOT THE CLOSE BUTTON ON THE TOP RIGHT OF THE WINDOW PANEL. If you do click the Close button in the top right of the graph panel, make sure to click Hide in the dialog box that appears. This lab will make use of graph templates instead of rebuilding the desired graphs again and again.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

93

3. Note that link utilization from peripheral nodes to the hub show nearly identical values. This is expected behavior, as all the peripheral nodes are sending packets to the hub at a constant rate. 4. Note that link utilization from the hub to the peripheral nodes shows that all packets are being switched to node_0.This is problematic behavior, since each packets destination is chosen according to a uniform distribution.

5. Problem: Unexpected simulation results.


CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

94

All packets are received by node_0. The error may indicate a problem with setting destination address field in packets. Use pkprint to investigate contents of packet fields. Trace a Packet in debug Mode 1. Execute simulation in ODB. a. Select DES / Configure/Run Discrete Event Simulation b. Expand the Execution tree item and click on the OPNET Debugger item that appears. c. Select the checkboxes labeled Use OPNET Simulation Debugger (ODB) and Pause for user input before closing OPNET Console when simulation ends. d. Click Run to start the simulation. 2. Set a trace for packet 0 by typing: odb> pktrace 0 and then press Enter

This will print out information to the screen whenever an event that involves packet 0 occurs. This will allow us to see what happens to a packet from creation to destruction. The intention is to see if we can tell why all packets are getting routed to node_0. Keep typing next and hitting Enter until an event that involves packet 0 is encountered (event 9). Note that packet ID 0 is created.
____________________________ (ODB 10.5.A: Event) ___________________________ * Time * Event : : 10 sec, [00d 00h 00m 10s . 000ms 000us 000ns 000ps] execution ID (9), schedule ID (#9), type (self intrpt) execution ID (0), top.pksw1.node_0.src (processor) code (0) top.pksw1.node_0.src (processor)

* Source : * Data :

> Module :

odb> next

* op_pk_create_fmt (format_name) format name packet ID (pksw_format_ref) (0)

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

95

3. Type n and press Enter. (Note that you can abbreviate next with the letter n.) Repeat this several times until you see the following:

odb> n ____________________________ (ODB 10.5.A: Event) ___________________________ * Time * Event : : 10 sec, [00d 00h 00m 10s . 000ms 000us 000ns 000ps] execution ID (12), schedule ID (#12), type (self intrpt) execution ID (6), top.pksw1.node_3.src (processor) code (0) top.pksw1.node_3.src (processor) [process id: 6]

* Source : * Data :

> Module :

odb> n ____________________________ (ODB 10.5.A: Event) ___________________________ * Time * Event : : 10 sec, [00d 00h 00m 10s . 000ms 000us 000ns 000ps] execution ID (13), schedule ID (#13), type (self intrpt) execution ID (9), top.pksw1.node_0.src (processor) instrm (1), packet ID (0) top.pksw1.node_0.src (processor)

* Source : * Data :

> Module :

odb> n * op_pk_get (instrm_index) strm. index (1)

4. Use pkprint to print the contents of a packet: odb> pkprint 0 and press Enter

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

96

odb> pkprint 0 * packet contents: ID tree ID address format : : : : 0 0 0x1B1A6C0 pksw_format_ref top.pksw1.node_0.src 10 top.pksw1.node_0.src 10 1024.000000 1056.000000 top.pksw1.node_0.strm_1 NONE on off NONE

creation module : creation time stamp module stamp time bulk size total size owner ICI ID ID trace tree ID trace encap flags : : : : : : : : : :

Index 0

Name dest_address

Type integer

Value 2

Size 32

5. The hub receives packet at event 33, so stop the simulation at event 33. (Note: The fact that the hub receives the packet at event 33 is not something you would know ahead of time. Normally, you would keep tracing packet 0 to see all of the events that happen to it, then start the simulation over again, and skip ahead to the events of interest.) odb> evstop 33 and then press Enter odb> cont and then press Enter

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

97

odb> evstop 33

odb> cont . . .

____________________________ (ODB 10.5.A: Event) __________________________

* Time * Event intrpt)

: :

10.11 sec, [00d 00h 00m 10s . 110ms 000us 000ns 000ps] execution ID (33), schedule ID (#37), type (stream execution ID (26), top.pksw1.hub.rcv0 (pt-pt receiver) instrm (0), packet ID (0) top.pksw1.hub.hub (processor)

* Source : * Data :

> Module :

breakpoint trapped : "stop at event (33)"

6. Continue tracing. a. Type next to continue tracing. b. Observe further manipulation of packet.
odb> next

* op_pk_get (instrm_index) strm. index packet ID (0) (0)

* op_pk_nfd_set (pkptr, fd_name, ...) packet ID field name field type field value field size (0) (dest_address) (integer) (0) (32)

7. Use pkprint to observe contents of packet fields.


packet ID (0) (0) stream index

* op_pk_send (pkptr, outstrm_index)

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

98

odb> pkprint 0 and press Enter

odb> pkprint 0 * packet contents: ID tree ID address format : : : : 0 0 0x1B1A6C0 pksw_format_ref top.pksw1.node_0.src 10 top.pksw1.node_0.src 10 1024 1056 top.pksw1.hub.strm_1 NONE on off NONE

creation module : creation time stamp module stamp time bulk size total size owner ICI ID ID trace tree ID trace encap flags : : : : : : : : : :

Index 0

Name dest_address

Type integer

Value 0

Size 32

Observe: Value of packet field has been changed from its originally set value of 2 to 0. Packet is therefore sent on stream 0, not on stream 2 as expected. The hub should not be changing any of the packet fields. Rather, it should just read the value and send it to the correct stream. There seems to be an error in our hubs process model. 8. Exit debugger: odb> exit Correct the Error 1. Enter the hub model to fix the problem. a. First hit on the Hide/Show Graph Panels button to hide all the graphs. b. Then double-click on the hub in the project editor to go to the node model for the hub.
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

99

c. Double-click on the hub module in the node editor to go to the process model for the hub. d. Double-click on the top half of route_pk state to edit its Enter Execs window. 2. Note that the destination address should not be set in this code. Also note that the destination address variable is not initialized before the call is made to set the destination address in the packet. Correct the code to obtain the destination address to which the packet should be sent instead of changing the destination address within this process model. a. Change the following code fragment: op_pk_nfd_set (pkptr, dest_address, dest_address); to op_pk_nfd_get (pkptr, dest_address, &dest_address);

b. Select File / Save. c. Compile the process model by using the Compile button; click Close when the compilation finishes. 3. Close the Process Model and the Node Model. Run the Simulation 1. Run the simulation from the GUI without debug mode enabled.

2. Close the Simulation Sequence window when simulation completes.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

100

View Results 1. Load the newest simulation results into the previously created graphs using graph templates. a. Click on Hide/Show Graph Panels button to show all graphs. b. Select DES / Panel Operations / Panel Templates / Create From All Panels. c. Select DES / Panel Operations / Panel Templates/ Load With Latest Results. d. Note that the link utilization from the link to the peripheral nodes shows similar usage of all links.

END OF LAB 9

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

101

Lab 10: ODK Example


Objectives
To illustrate a simple ODK example that highlights T1 links in the network.

Overview
Our OPNET engineers created a library using ODK that cause a new menu and a new button to appear in the Modeler Project Editor window. Pressing this button or selecting the menu option will cause all T1 links in the network to be highlighted. 1. Add a library created by ODK to the mod_dirs. 2. Open a project. 3. Use the new button to highlight the T1 links.

Instructions
Add a Folder to mod_dirs The files required for the Highlight T1 Links operation are in a folder that is not in Modelers list of model directories (mod_dirs). Tell Modeler to look in this folder to find the library. 1. From any Modeler window, choose File / Model Files / Add Model Directory. 2. Select the folder C:\op_models\highlight_T1_links, and click OK. 3. You do not need to include subdirectories (since there are none), and do not make it the default directory (i.e., leave both boxes unchecked). 4. Close and reopen Modeler. This is necessary for Modeler to load the library file that was added. In general, Modeler will not have to be restarted when adding model directories. Highlight the Links 1. Open the Project Hotel_net_ref, and switch to the scenario T1 2. You will notice a new button on the toolbar, and a new menu titled Highlight Links. 3. Select either the menu option, or press the toolbar button, and you will see the three T1 links get highlighted pink. END OF LAB 10
CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyright 2004 OPNET Technologies, Inc.

102

Вам также может понравиться