13.07.2015 Views

Interfacing Simulations with Live Devices and Traffic Using OPNET's ...

Interfacing Simulations with Live Devices and Traffic Using OPNET's ...

Interfacing Simulations with Live Devices and Traffic Using OPNET's ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Session 1578<strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong><strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong>System-in-the-LoopR&D Solutions for Commercial <strong>and</strong> DefenseNetworksCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in anyCONFIDENTIAL ─ format RESTRICTED <strong>with</strong>out the ACCESS: prior written This information consent of OPNET may not Technologies, be disclosed, copied, Inc. or transmitted in anyformat <strong>with</strong>out © the 2007 prior OPNET written Technologies, consent of OPNET Inc. Technologies, Inc.© 2010 OPNET Technologies, Inc.


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopAgenda• Overview of System-in-the-Loop• Benefits of System-in-the-Loop• Demo 1 (Demo of Use Case)• System-in-the-Loop Architecture <strong>and</strong> Workflow• Configuring a System-in-the-Loop Simulation• Lab 1: Configuring System-in-the-Loop• Writing Custom Code for System-in-the-Loop• Debugging in System-in-the-Loop• Lab 2: Writing Custom Translation Code <strong>and</strong> Debugging• Further Discussion / FeedbackCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.2


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopOverview of System-in-the-Loop (SITL)• What is SITL?• A way for a real network of devices to communicate <strong>with</strong> a simulatednetwork of devices via the exchange of packets• Supported scenarios:• real to real (i.e., a real network of devicesoriginating traffic that transits through asimulated network <strong>and</strong> then terminating inanother or the same real network)real networksimulatednetworkreal network• simulated to simulatedsimulatednetworkreal networksimulatednetwork• simulated to realsimulated networkreal networkCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.3


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopOverview of SITL (cont.)Real network interfaceis mapped to “EdgeRouter” interface, so thatreal packets received atthe network interface areimmediately received atthe router’s interfaceOPNET’s SITL modulesupports more than onephysical interface on thesimulating machineAllows multiple interfacesto map to differentnetwork addresses in thesimulated networkCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.4


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopAgenda• Overview of System-in-the-Loop• Benefits of System-in-the-Loop• Demo 1 (Demo of Use Case)• System-in-the-Loop Architecture <strong>and</strong> Workflow• Configuring a System-in-the-Loop Simulation• Lab 1: Configuring System-in-the-Loop• Writing Custom Code for System-in-the-Loop• Debugging in System-in-the-Loop• Lab 2: Writing Custom Translation Code <strong>and</strong> Debugging• Further Discussion / FeedbackCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.5


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopBenefits of SITL ─ Why Use It?• Interoperability…an intermediate, natural step between testing anetwork device or protocol entirely in simulation <strong>and</strong> building a realprototype or production device <strong>and</strong> testing it separately• Some sample use cases:• See the effects of a simulated network on a real application• Use simulation as a traffic generator to load a real network• Control or interrogate simulated nodes externally• Test a new protocol running on a prototype device <strong>with</strong> simulated devicesrunning the same protocol• Test the performance of a new protocol being developed by driving realnetwork traffic over a simulated network• Scalability – augment a network of a few nodes <strong>with</strong> a large number ofsimulated nodes• Any other use cases from the audience?CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.6


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopBenefits of Simulation in SITL• Model effects of a simulated network on a real application• Various network effects• Packet loss• Delay• Jitter• Duplicate delivery• Etc.• Easy to configure/set up via simulation• Network effects on a real application are immediately apparent• No need to be interpreted from simulation statisticsCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.7


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopDemonstration• <strong>Using</strong> System-in-the-Loop in the “real to simulated to real” case• Real application flowing across an OPNET simulationCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.8


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopAgenda• Overview of System-in-the-Loop• Benefits of System-in-the-Loop• Demonstration of SITL use• System-in-the-Loop Architecture <strong>and</strong> Workflow• Configuring a System-in-the-Loop Simulation• Lab 1: Configuring System-in-the-Loop• Writing Custom Code for System-in-the-Loop• Debugging in System-in-the-Loop• Lab 2: Writing Custom Translation Code <strong>and</strong> Debugging• Further Discussion / FeedbackCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.9


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopSystem-in-the-Loop Architecture <strong>and</strong>Workflow• The OPNET discrete event simulation kernel is responsible for:• Mapping packets received on an external network interface to a simulatedinterface <strong>and</strong> the other way around• Exchanging packets <strong>with</strong> the discrete event simulation via this mapped interface• Filtering out extraneous packets not meant for the simulation• Making sure the simulation runs as close as possible to real time• Helps maintain valid behavior <strong>with</strong> respect to the “real” world• OPNET model code responsible for providing the protocol- or devicespecificknowledge• For converting real packets to/from• OPNET St<strong>and</strong>ard Model Library packets• User-customized packets for custom models• Developing any custom protocol or device models that will be communicating<strong>with</strong> unsupported devices or protocols• OPNET provides defaults for st<strong>and</strong>ard conversions for well-known protocolsCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.10


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopSITL Packet FlowReal-to-Real exampleReal NetworkSITL moduleReal timeSim timeOPNET simulation <strong>and</strong> SITL“linkage”to model libraryReal packet arrives at network interfaceof workstation running simulationt o t 1Real packet received at corresponding device interface<strong>and</strong> is converted to a simulation packetSimulation packet is routed in simulation,where it experiences real-time delays <strong>and</strong>protocol effectsReal packet sent out on correspondingnetwork interface of simulation workstationt 3t 2Simulation packet arrives at another deviceinterface that is mapped to another externalnetwork interface, where it is converted to areal packetCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.11


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopPacket Information Retention• When converting between real & simulated packets• Ethernet header is preserved <strong>and</strong> used in simulation• IP datagram is preserved (if present)Ethernet HeaderIP HeaderDataCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.12


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopProtocol <strong>and</strong> Platform Support•Protocols currently supported by OPNET st<strong>and</strong>ardmodels in combination <strong>with</strong> SITL:• Ethernet <strong>and</strong> ARP are supported as of 14.0• IPv4 <strong>and</strong> basic IPv6 Headers are fully supported by DES (except forfragmentation)• TCP is fully supported• Higher layer protocol conversion (real-to-sim <strong>and</strong> sim-to-real) support• ICMP – ping• ICMPv6 – ping, router solicitations, router advertisements• OSPFv2• RIPv1, v2• IGMP• UDP• Limited support of WLAN data packets (no control packets) using AirPcapadapters• Users can add support for their own protocolsCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.13


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopProtocol <strong>and</strong> Platform Support•Virtually all application-layer protocols supported in“real to real” case• Simulation is used only as a transit network• Real data is sent through network <strong>with</strong>out need for conversion above IP level• But the datagrams can experience simulated network effects•Platforms currently supported by SITL:• Windows 32 bit <strong>and</strong> 64 bit.• Both desktop <strong>and</strong> server are supported• RedHat Linux 32 bit <strong>and</strong> 64 bit.• Centos is also supported.CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.14


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopBest Practices• Issues when preparing a model for a SITL co-simulation• Simulation must be capable of running at real time or faster• Increase Windows OS priority of simulation to “high”• Set preference “sim_process_priority” in OPNET Modeler to high• Isolating machine running OPNET simulation• Close any unnecessary applications to free up memory <strong>and</strong> processing power• Limit unnecessary network traffic going into or out of the machine running theOPNET simulation• “Next hop” from simulated interface should be a layer-2 (or higher) deviceCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.15


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopBest Practices (cont.)• Issues when preparing a model for a SITL co-simulation (cont.)• IP addressing has to be consistent across simulated <strong>and</strong> real network• Should manually assign Ethernet <strong>and</strong> IP addresses prior to running simulation• Do not reuse the Ethernet adapter address for SITL gateway or simulation nodes• Custom models may need to be modified to remove assumption that all nodes in thenetwork appear in the simulation• Nodes in the “real” network don’t necessarily have representations in the simulation• Packets coming from “real” network don’t contain simulation-level data (e.g.,creation time, creation module, packet ownership, segmentation info, etc.)• Turn off St<strong>and</strong>ard Model Library simulation efficiencies in most cases(e.g., “OSPF Sim Efficiency” – you don’t want to stop hello messages)CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.16


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopAgenda• Overview of System-in-the-Loop• Benefits of System-in-the-Loop• Demonstration of SITL use• System-in-the-Loop Architecture <strong>and</strong> Workflow• Configuring a System-in-the-Loop Simulation• Lab 1: Configuring System-in-the-Loop• Writing Custom Code for System-in-the-Loop• Debugging in System-in-the-Loop• Lab 2: Writing Custom Translation Code <strong>and</strong> Debugging• Further Discussion / FeedbackCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.17


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopConfiguring a System-in-the-LoopSimulation• Create simulated network• Add SITL gateway interface(s)• Add SITL links between gateways <strong>and</strong> other simulation nodes• Confirm network object(s) in simulation connected to SITL gateway havecorrect addressing• Configure SITL gateway interface(s) in the modelCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.18


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopConfigure Nodes <strong>and</strong> Simulation• Configure a workstation• Edit Attributes• IP > IP Host Parameters > Interface Information to IP address <strong>and</strong> subnetmask• Ethernet > Ethernet Parameters > Address to MAC address• Configure a router• Edit Attributes• IP > IP Routing Parameters > Interface Information• Configure simulation preferences• DES > Configure/Run DES dialog box• Execution > Advanced > Kernel Preferences > Real-time execution ratio: 1• Configure IP Settings• IP address <strong>and</strong> subnet mask need to be consistent <strong>with</strong> real network• Turn off extraneous network services (e.g., NetBios)CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.19


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopConfigure SITL gateway interface• Network Adapter• Ethernet adapter on the computer running theOPNET simulation• Filter String• String specifying what type of packets shouldbe passed to the simulation• In this case: arp or ip or ipv6• Translation functions• From Real Packet Translation Function• To Real Packet Translation Function• Translation Initialization Function• For more information about SITL gatewayattributes, click on the “?” next to theattributeCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.20


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopLab 1• Ping scenario configuration demonstration• Create new project• Add <strong>and</strong> configure workstation node• Configure IP <strong>and</strong> Ethernet settings on simulating workstation• Add <strong>and</strong> configure SITL gateway• Configure <strong>and</strong> run simulation• Observe pings being exchanged between a real machine <strong>and</strong> the OPNETsimulationCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.21


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopAgenda• Overview of System-in-the-Loop• Benefits of System-in-the-Loop• Demonstration of SITL use• System-in-the-Loop Architecture <strong>and</strong> Workflow• Configuring a System-in-the-Loop Simulation• Lab 1: Configuring System-in-the-Loop• Advanced Topics• Writing Custom Code for System-in-the-Loop• Debugging in System-in-the-Loop• Lab 2: Writing Custom Translation Code <strong>and</strong> Debugging• Further Discussion / FeedbackCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.22


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopWLAN Support• SITL has limited support for WLAN Data Packets• Support for AirPcap Tx WLAN adapter• WLAN data packets are supported for both send <strong>and</strong> receive• Only infrastructure mode is supported• No WLAN control packets are sent or received• SITL uses an existing connection <strong>with</strong> an access point• Set the BSSID gateway attributeCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.23


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopPerformance Analysis using packet traces• SITL can create packet trace files• Works for both the simulated <strong>and</strong> the real side• Packets traveling in both directions are traced• On the real side, entire packets are saved in Pcap (Tcpdump) format• These can be read by Wireshark• On the simulated side, only packet headers are saved in CSV format• CSV format is the same as the one used by the Packet Analyzer• Both trace files can then be read by ACE Analyst to do performanceanalysisCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.24


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopModel Enhancements for TCP Segmentation• No need for real payloads when packets don’t leave the simulation.Implemented by the old op_sar package• New oms_sar package allows real-world payloads to be sent/received• Useful for SITL scenarios where a simulation interacts <strong>with</strong> a realdevice• Also useful for sending <strong>and</strong> receiving real payloads <strong>with</strong> HLA• Serialization <strong>and</strong> de-serialization of real payload at the TCP layer• Must register callback functions for serialization/de-serialization• “TCP Real Payload Support” attribute controls this feature• Enable – simulation should always use oms_sar• Disable – simulation should always use op_sar• Auto – Determines if external connections exist <strong>and</strong> uses the appropriatepackageCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.25


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopWriting Custom Code for System-in-the-Loop• Writing custom code• If SITL does not support a protocol, you can exp<strong>and</strong> upon its capabilities, justlike <strong>with</strong> st<strong>and</strong>ard models• Need to write• Process model• Packet conversion functions• Process model• Write a process model to h<strong>and</strong>le the packet appropriately• Read fields for the protocol from the OPNET-formatted packet• Update any statistics that you wish to gather• Process the data in the packet so the packet can be understood by thesimulation• Packet conversion functions• Write a set of packet conversion functions to translate between real <strong>and</strong>simulated instances of that type of packetCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.26


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopWriting Packet Conversion Code• Can utilize SITL’s packet conversion code as a base• Eliminates need to translate lower-layer protocols such as IP, TCP• Un-translated portion of packet placed in “data” field• For a list of relevant packet conversion code functions, check SITL guide• Include sitl_packet_translation.h• Write custom translation functions• Conversion function pair: real-to-sim <strong>and</strong> sim-to-real• Test function• Initialization function• In the simulation• In the project, declare the external file• Edit attributes on SITL gateway node• From Real Packet Translation Function• To Real Packet Translation Function• For information on how to parse packets, see WinPcap documentationCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.27


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopDebugging in System-in-the-Loop• There are several tools available for debugging a SITL simulation• Discrete Event Simulation Log• Check for messages from simulated nodes• Example: OSPF Efficiency being turned on or off• SITL gateway generates log messages on unsupported packet types• Statistics• If packets are going through a simulation, use statistics on intermediatesimulation nodes to ensure packets are flowing through those nodes• SITL provides its own set of statistics• OPNET debugger• Tracing the route of packets• “ltrace sitl”• Wireshark• See all packets coming into <strong>and</strong> out of the physical interfaces used by SITLCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.28


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopDebugging in System-in-the-Loop (cont.)• OPNET Debugger• Tracing packets through a simulation• Obtain packet ID of packets going through SITL gateway• Use “pktrace” to follow packet through the simulation• “ltrace sitl”• Prints out translated contents of all packets transiting through the SITLgatewayCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.29


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopDebugging in System-in-the-Loop (cont.)• Wireshark• Network packet analyzer (http://www.wireshark.org)• Install <strong>and</strong> run on machine running OPNET• See all real frames being sent to the simulation• If the packets cannot be seen in Wireshark, then they did not reach themachine running Wireshark <strong>and</strong> SITLCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.30


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopDebugging in System-in-the-Loop (cont.)• Packet Traces• Two attributes control the writing of trace files• “Real Packet Capture Trace File Name” – PCAP format• “Simulated Packet Capture Trace File Name” – CSV format• Trace files can be used to determine which packets are processed by SITL <strong>and</strong>which packets cannot be translatedCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.31


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopLab 2• Writing Custom Translation Code <strong>and</strong> Debugging• Open project created in Lab 1• Configure workstation node <strong>and</strong> SITL gateway• Add custom translation code• Configure <strong>and</strong> run simulation• Send packets to simulation• Observe how packets are translated in ODB• Observe what packets are being sent/received in WiresharkCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.32


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopAgenda• Overview of System-in-the-Loop• Benefits of System-in-the-Loop• Demonstration of SITL use• System-in-the-Loop Architecture <strong>and</strong> Workflow• Configuring a System-in-the-Loop Simulation• Lab 1: Configuring System-in-the-Loop• Writing Custom Code for System-in-the-Loop• Debugging in System-in-the-Loop• Lab 2: Writing Custom Translation Code <strong>and</strong> Debugging• Further Discussion / FeedbackCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.33


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopRelated OPNET Solutions• OPNET SITL can also be used <strong>with</strong> 3D Network Visualizer (3DNV)<strong>and</strong> HLACONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.34


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopFurther Discussion• Comments, thoughts, questions?• Who here has also tried implementing SITL?• If so, what issues/difficulties have you faced?• Are there specific requirements that you want SITL to address?• Additional feedback• Please fill out feedback formsCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.35


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopDocumentation References• For more information about OPNET’s System-in-the-Loop, please consult theOPNET documentation• Overview• Modules > System in the Loop (SITL)• APIs• Modules > System in the Loop (SITL) > Kernel Procedures• Programmers Reference > Kernel Procedures > Packet Package• Models• Model Library• OPNET Debugger• Modeler Reference > External Interfaces > Simulation Execution > OPNET SimulationDebugger (ODB)• Other supplemental information• Packet Translation• WinPCap documentation: http://www.winpcap.org• Wireshark• Wireshark documentation: http://www.wireshark.orgCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.36


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopRelated OPNETWORK Sessions• 1550 ─ Accelerating <strong>Simulations</strong> <strong>Using</strong> Efficient ModelingTechniques• 1587 ─ Introduction to 3D Network Visualizer• 1588 ─ Creating Custom 3D Network Visualizations <strong>with</strong> OPNETModeler ®CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.37


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopTake-Away Points• Allows integration of simulated <strong>and</strong> real networks• Exchange of network frames• Some uses cases…• Interoperability• Scale the number of devices in real network using simulated ones• Test protocols <strong>and</strong> devices• Observe simulated network effects on real application• Use simulation as a traffic generator• And many more…CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.38


1578 <strong>Interfacing</strong> <strong>Simulations</strong> <strong>with</strong> <strong>Live</strong> <strong>Devices</strong> <strong>and</strong> <strong>Traffic</strong> <strong>Using</strong> <strong>OPNET's</strong> System-in-the-LoopOPNET Solutions for OPNET System-inthe-Loop• OPNET Modeler <strong>with</strong> System-in-the-Loop Module• OPNET Modeler Wireless Suite <strong>with</strong> System-in-the-Loop Module• OPNET Modeler Wireless Suite for Defense <strong>with</strong> System-in-the-LoopModuleCONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format <strong>with</strong>out the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!