Unlocking the Power of OPNET Modeler

Similar documents
Unlocking the Power. of OPNET Modeler WM CAMBRIDGE ZHENG LU HONGJI YANG UNIVERSITY PRESS

COMPUTER VISION FOR VISUAL EFFECTS

Understanding Weightless

Hands-On Networking. From Theory to Practice

Programming in Haskell

Synchronization in Wireless Sensor Networks: Parameter Estimation, Performance Benchmarks and Protocols

Python Basics. level 1 Chris Roffey

ENSC 894: COMMUNICATION NETWORKS Simulation of General Packet Radio Service (GPRS) Network Final Project Spring 2014 Sathappan Kathiresan

This page intentionally left blank

Computer Network. The Practical User Guide for. Simulation. Adarshpal S. Hnatyshin. Vasil Y. CRC Press. Taylor Si Francis Croup

Digital Signal Processing System Design: LabVIEW-Based Hybrid Programming Nasser Kehtarnavaz

Functional Programming Using F#

This tutorial teaches you the basics of using Modeler. If you are new to Modeler, this short introduction will help get you started.

The Elements. Java Style

International Journal of Scientific Research and Modern Education (IJSRME) ISSN (Online): ( Volume I, Issue I,

Exploiting Distributed Resources in Wireless, Mobile and Social Networks Frank H. P. Fitzek and Marcos D. Katz

A First Course in Statistical Programming with R

Information and Network Technology Revised Date 07/26/2012 Implementation Date 08/01/2012

Graphics Programming in c++

The Semantic Web Explained

Computer Science Workbench. Editor: Tosiyasu L. Kunii

FUZZY LOGIC WITH ENGINEERING APPLICATIONS

Workbook for C++ THIRD EDITION. Yedidyah Langsam, Ph.D. Brooklyn College of the City University of New York. Custom Publishing

Network Performance Analysis

Guide to RISC Processors

COMPUTATIONAL DYNAMICS

Business Driven Data Communications

Whitestein Series in software Agent Technologies. About whitestein Technologies

COMPONENT-ORIENTED PROGRAMMING

Real-Time Graphics Rendering Engine

Foundations of 3D Graphics Programming

0 Mastering Microsoft Office

Infotech English for computer users

Windows and Graphics Programming with Visual C ++

Essential Angular for ASP.NET Core MVC

DATA AND COMPUTER COMMUNICATIONS

"Charting the Course... MOC /2: Planning, Administering & Advanced Technologies of SharePoint Course Summary

Inside Relational Databases with Examples in Access

Preparation for OPNET Modeling

Web Development with Java

Iterative Methods in Combinatorial Optimization

Administrator s Guide. StorageX 8.0

A Developer s Guide to the Semantic Web

Oracle Copy Inventory Organization

Administrator s Guide. StorageX 7.8

A Structured Programming Approach to Data

Ericsson Multi Activation 6.0 Training Programs. Catalog of Course Descriptions

Fundamentals of Operating Systems. Fifth Edition

Oracle Data Integrator 11g: Integration and Administration Student Guide - Volume I

Cambridge University Press The Elements of UML 2.0 Style Scott W. Ambler Frontmatter More information. The Elements. UML TM2.

Oracle Copy Inventory Organization

Scheduling in Distributed Computing Systems Analysis, Design & Models

ava with Object-Oriented Generic Programming+ Java Java with Object-Oriented + Generic Programming by Paul S. Wang sofpower.com

Microsoft SharePoint End User level 1 course content (3-day)

IBM Content Manager OnDemand for i5/os Common Server Planning and Installation Guide

The Unified Modeling Language User Guide

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS LINUX SYSTEM ADMINISTRATION CSIT 2411

SDP Implementation in MANET using OPNET Modeler 17.5

Low Level X Window Programming

Open-Source Robotics and Process Control Cookbook

Microsoft Computer Vision APIs Distilled

COSO Enterprise Risk Management

Digital Electronics A Practical Approach with VHDL William Kleitz Ninth Edition

"Charting the Course... MOC A: Developing with the SharePoint Framework. Course Summary

Traveling Wave Analysis of Partial Differential Equations

Basic Set of Services provided to AUBG students

MACMILAN MASTER SBUEI

The Internet of Things

Decision Mathematics 1

Using the NCTUns 2.0 Network Simulator/Emulator to Facilitate Network Researches

DATA VISUALIZATION WITH FLASH BUILDER

Practical Experiment with KivaNS: A virtual Laboratory for Simulating IP Routing in Computer Networks Subjects.

Research on Industrial Security Theory

GPU Shader Library. Mali. User Guide. Version: 1.0. Copyright 2009 ARM. All rights reserved. ARM DUI 0510A (ID101409)

GPU Offline Shader Compiler. Mali. User Guide. Version: 2.2. Copyright 2009 ARM. All rights reserved. ARM DUI 0513A (ID101409)

Deep Dive. Cloud Control 12c. Oracle Enterprise Manager ORACLG. Oracle Press. Michael New Edward Whalen Matthew Burke. London Madrid Mexico City Milan

CHAPTER 4 SIMULATION TOOL OPNET MODELER

Developing an Innovative Mobile and Wireless Networks Course

Multi-Core Programming

Objects First with Java

Administrator s Guide. StorageX 7.6


2.1 Gantry Robot Programmable Logic Controller PLC Introduction 8


HTML5 MOBILE WEBSITES

Mastering. Pascal and Delphi Programming

Copyright is owned by the Author of the thesis. Permission is given for a copy to be downloaded by an individual for the purpose of research and

documentation Editing Files and Folders

An Introduction to Programming with IDL

IPHONE FOR PROGRAMMERS: AN APP-DRIVEN APPROACH

Version Monitoring Agent User s Guide SC

FLUID DYNAMICS WITH A COMPUTATIONAL PERSPECTIVE

LOGICAL DATA MODELING

and Networks Data Communications Second Edition Tata McGraw Hill Education Private Limited Managing Director SoftExcel Services Limited, Mumbai

Security Access in Wireless Local Area Networks

Exam Ref Implementing Microsoft Azure Infrastructure Solutions Michael Washam Rick Rainey

"Charting the Course... MOC B Core Solutions of Microsoft Skype for Business Course Summary

ESSENTIAL LibreOffice Tutorials for Teachers

EE , GPU Programming

CSCI 201L Syllabus Principles of Software Development Spring 2018

Transcription:

Unlocking the Power of OPNET Modeler For fast, easy modeling, this practical guide provides all the essential information you need to know. A wide range of topics is covered, including custom protocols, programming in C++, External Model Access (EMA) modeling, and co-simulation with external systems, giving you the guidance not provided in the OPNET documentation. A set of high-level wrapper APIs is also included to simplify programming custom OPNET models, whether you are a newcomer to OPNET or an experienced user needing to model efficiently. From the basic to the advanced, you ll find topics are easy to follow with theory kept to a minimum, many practical tips and answers to frequently asked questions spread throughout the book, and numerous step-by-step case studies and real-world network scenarios included. Zheng Lu received his Ph.D. from the University of Essex, after which he stayed on to research optical networks and wireless sensor networks. He is experienced in modeling network protocols and has many years of experience using OPNET Modeler in his research and laboratory demonstrations. Hongji Yang is currently a Professor at the Software Technology Research Laboratory, De Montfort University. He received his Ph.D. from Durham University in 1994 and was a main contributor to the Distributed Computer Networks project sponsored by the Chinese Ministry of Education, 1982 1986.

Unlocking the Power of OPNET Modeler ZHENG LU HONGJI YANG

cambridge university press Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo, Delhi, Tokyo, Mexico City Cambridge University Press The Edinburgh Building, Cambridge CB2 8RU, UK Published in the United States of America by Cambridge University Press, New York Information on this title: /9780521198745 Cambridge University Press 2012 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 2012 Printed in the United Kingdom at the University Press, Cambridge A catalogue record for this publication is available from the British Library Library of Congress Cataloguing in Publication data Lu, Zheng. Unlocking the power of OPNET modeler / Zheng Lu, Hongji Yang. p. cm. Includes bibliographical references and index. ISBN 978-0-521-19874-5 (hardback) 1. Computer networks Mathematical models. 2. Computer networks Simulation methods. 3. Computer network protocols. I. Yang, Hongji. II. Title. TK5105.5.L825 2011 005.7 13 dc23 2011032466 ISBN 978-0-521-19874-5 Hardback Additional resources for this publication at /9780521198745 Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party Internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.

Contents Preface List of abbreviations xi xiii Part I Preparation for OPNET Modeling 1 1 Introduction 3 1.1 Network modeling and simulation 3 1.2 Introduction to OPNET 4 1.3 OPNET Modeler 5 1.4 Summary 6 1.5 Theoretical background 6 1.5.1 Simulation and principles of simulator 6 1.5.2 Hybrid simulation 9 2 Installation of OPNET Modeler and setting up environments 11 2.1 System requirements for using OPNET Modeler 11 2.2 Installation on Windows 11 2.2.1 Installation of OPNET Modeler 12 2.2.2 Installation and configuration of Microsoft Visual C++ 15 2.2.3 OPNET Modeler preferences for C/C++ compiler 17 2.2.4 Licensing 19 2.3 Installation on Linux 20 2.3.1 Installation of OPNET Modeler 20 2.3.2 Installation and configuration of GCC compiler 21 2.3.3 OPNET Modeler preferences for GCC compiler 21 2.3.4 Licensing 22 2.4 Theoretical background 23 2.4.1 Compilation and linking options 23 2.4.2 Simulation models compilation and linking 23

vi Contents 3 OPNET Modeler user interface 24 3.1 Project management 24 3.2 Modeler preferences 26 3.3 OPNET editors 29 3.3.1 Project Editor 29 3.3.2 Node Editor 31 3.3.3 Process Editor 31 3.3.4 Link Editor 32 3.3.5 Packet Format Editor 32 3.3.6 ICI Editor 34 3.3.7 PDF Editor 35 3.3.8 Probe Editor 35 3.4 Simulation Results Browser 37 3.5 Animation Viewer 37 3.6 Using OPNET documentation 39 Part II Modeling Custom Networks and Protocols 41 4 OPNET programming interfaces 43 4.1 Introduction to OPNET programming 43 4.2 OPNET API categorization 44 4.3 Kernel APIs/Kernel Procedures (KPs) 45 4.3.1 Distribution Package 46 4.3.2 Packet Package 49 4.3.3 Queue Package and Subqueue Package 51 4.3.4 Statistic Package 51 4.3.5 Segmentation and reassembly package 52 4.3.6 Topology package 52 4.3.7 Programming Support APIs 54 4.4 Theoretical background 54 4.4.1 Proto-C specifications 54 4.4.2 Process model and external model access (EMA) program 56 4.4.3 OPNET Modeler model programming external interfaces: co-simulation, external tool support (ETS) and OPNET Development Kit (ODK) 56 5 Creating and simulating custom models using OPNET APIs 58 5.1 General procedure for creating and simulating custom models 58 5.2 Custom models 59 5.2.1 Case 1 59 5.2.2 Case 2 68 5.2.3 Case 3 70

Contents vii 5.2.4 Case 4 74 5.2.5 Case 5 79 5.2.6 Case 6 83 5.2.7 Case 7 95 5.3 Model optimization and validation 96 6 High-level wrapper APIs 100 6.1 Why and how to use wrapper APIs 100 6.2 Wrapper APIs provided with the book 101 6.2.1 Geo_Topo wrapper APIs 102 6.2.2 Routing wrapper APIs 104 6.2.3 Flow wrapper APIs 106 6.3 How to write your own wrapper API 107 7 Modeling with high-level wrapper APIs 110 7.1 Revisit of previous case 110 7.2 Creating connection-oriented communications 112 7.2.1 Single flow 114 7.2.2 Trunk of flows 119 Part III Modeling and Modifying Standard Networks and Protocols 123 8 Modeling wired networks with standard models 125 8.1 Client/server structure 125 8.1.1 Creating a network model 125 8.1.2 Task, application, and profile configurations 127 8.1.3 Choosing and viewing statistic results 131 8.2 Local area network 132 8.3 Wide area IP network 132 8.4 Automatic network deployment 134 8.5 Summary 135 9 Modeling wireless networks with standard models 137 9.1 Basics of wireless modeling 137 9.2 Wireless local area networks (WLANs) 138 9.2.1 Communication within WLANs 138 9.3 Communication between WLANs 140 9.4 Wireless mobile networks 143 9.4.1 Movement via trajectories 143 9.4.2 Facilities for random mobility 146 9.4.3 Movement via programming interfaces 148 9.5 Automatic network deployment 148

viii Contents 10 Modifying standard models 151 10.1 Introduction 151 10.2 Case study 151 Part IV OPNET Modeling Facilities 165 11 Debugging simulation 167 11.1 Debugging facilities in OPNET Modeler 167 11.1.1 Prerequisites for debugging 168 11.1.2 Preparing simulation scenario 168 11.1.3 Debugging with ODB 169 11.1.4 Debugging with CDB/GDB 175 11.1.5 Debugging with Microsoft Visual C++ Debugger 177 11.1.6 Debugging with animation 179 12 OPNET programming in C++ 182 12.1 Proto-C, C, and C++: language and library differences 182 12.2 Memory management differences between Proto-C APIs and C/C++ standard library functions 182 12.3 Proto-C data structures and algorithms packages, C++ standard template libraries (STL) and Boost C++ libraries 184 12.4 Environment configurations for C++ programming in OPNET 185 12.5 Case study on programming OPNET models in C++ 187 13 Traffic in OPNET simulation 194 13.1 Introduction 194 13.2 Explicit traffic 194 13.2.1 Explicit traffic based on application 195 13.2.2 Explicit traffic based on traffic generation parameters 196 13.2.3 Explicit self-similar traffic based on raw packet generator (RPG) model 197 13.3 Background traffic and hybrid simulation 200 13.3.1 Background traffic based on baseline load 201 13.3.2 Background traffic based on traffic flow 202 14 External model access (EMA) 207 14.1 What EMA is and reasons to use it 207 14.2 EMA case study 208 15 OPNET co-simulation with third-party programs 215 15.1 Co-simulation with external programs 215

Contents ix 15.1.1 Introduction 215 15.1.2 Co-simulation with an external C program 216 15.1.3 Creating simulation models 217 15.1.4 Creating an external C co-simulation controller program 221 15.1.5 Running co-simulation 224 15.1.6 Co-simulation with other systems 225 15.2 Co-simulation with MATLAB 225 15.2.1 Setup of environment variables 226 15.2.2 Modifying OPNET models and external code 226 16 Model authoring and security 232 16.1 Introduction 232 16.2 Protecting a model 232 16.3 Making a demo model 234 16.4 Licensing a model 234 References 236 Index 237

Preface Network simulation is an important methodology in network research fields and OPNET Modeler is a very useful tool for network modeling and simulation. OPNET Modeler is generally used by researchers, protocol designers, university teachers and students in the fields of electronic engineering, computer science, management information systems, and related disciplines. The friendly design of its graphical user interface (GUI) makes it nice and easy to start with. However, the complexity of OPNET Modeler and lack of useful support material make it difficult for many users to fully make use of its benefits. OPNET Modeler has its documentation covering many aspects on using the modeler. However, it covers too many aspects in parallel form rather than a step-forward form, making users unable to decide where to start and causing them to lose focus. This book is an effort to partially fill this gap and should be useful for courses on network simulation and OPNET modeling for university students, as well as for the researchers on this topic. The book covers a wide range of knowledge from basic topics to advanced topics. All case studies in the book are step-by-step and progressive. Relevant files and sources can be downloaded from the publisher s website. A set of high-level wrapper APIs are provided to help even new users to write complex models, and experienced users to write large, complex models efficiently. Question-and-answer pairs are spread over the chapters to answer the most common questions users may experience in practice. The book is composed of four parts. Part I: Preparation for OPNET Modeling introduces OPNET and OPNET Modeler. It leads the reader through the required basics on using OPNET Modeler and provides familiarization with OPNET Modeler user interfaces. Part II: Modeling Custom Networks and Protocols first teaches the reader how to create custom models by directly using OPNET API packages. It then introduces a highlevel wrapper API package and demonstrates how to model systems easily using these high-level wrapper API packages instead. Part III: Modeling and Modifying Standard Networks and Protocols teaches the reader how to model networks and protocols based on existing standard OPNET modules and how to modify existing standard models in order to extend standard protocols by adding custom features. Part IV: OPNET Modeling Facilities covers content that is used to facilitate OPNET modeling, including debugging, hybrid simulation, External Model Access (EMA), co-simulation, programming OPNET models in C++, etc.

xii Preface We thank deeply the various people who, during the months over which this endeavor lasted, provided us with useful and helpful assistance. Without their care and consideration, this book would likely not have matured. First, we thank Dr. David K. Hunter and Dr. Yixuan Qin, who gave us useful suggestions and comments before and during the writing of the book. Second, we thank the publisher and people who demonstrated interest in publishing this book. The production team at Cambridge University Press has been great. Many thanks go to people who helped us with the book development, including Mrs. Sarah Marsh and Dr. Julie Lancashire. Dr. Zheng Lu would like to thank his wife Dr. Gui Gui; without her support, he could not have got through that difficult time and thrown himself into finishing the book. Professor Hongji Yang would like to thank his wife, Xiaodong Zhang, for her full support in finishing the writing of this book. Trademark acknowledgments: OPNET is a trademark of OPNET Technologies, Inc. All other product names mentioned herein are the trademarks of their respective owners. The relevant screenshots in this book are used with authorization by OPNET Technologies, Inc. Zheng Lu Hongji Yang

Abbreviations API BSS CDB CMO DB DES EMA ESA ESD Esys ETS FB FPP GDB GUI HB ICI IDE KP LAN MSVC ODB ODK PDF PMO PPP QoS RPG SDK STD STL application programming interface basic service set Microsoft Console Debugger Categorized Memory diagnostic block discrete event simulation External Model Access External Simulation Access External System Definition External System external tool support function block Fractal Point Process GNU Project Debugger graphic user interface header block Interface Control Information Integrated Development Environment Kernel Procedure local area network Microsoft Visual C++ Debugger OPNET Simulation Debugger OPNET Development Kit probability density function Pooled Memory Point to Point Protocol quality of service raw packet generator software development kit state transition diagram Standard Template Library

xiv List of abbreviations SV TB TV UI WAN WLAN state variable termination block temporary variable user interface wide area network wireless local area network