General Troubleshooting

Tools

If a SITL simulation isn’t working as expected, you can get some insight into what’s going on in the system by using a packet capture program such as Ethereal (www.ethereal.com) or its successor Wireshark (www.wireshark.org). These programs are available for both Windows and Linux. You can run these programs on any of the computers involved in the SITL simulation to see what packets are being transmitted.

Packet capture is built into the SITL gateway node. You can use this capability to verify packets on both the real and simulated sides of the gateway. See “Tracing Packet Flow” on page 14 for details.

Another useful tool is the OPNET Simulation Debugger (ODB), which is included with Riverbed Modeler. There are two special trace labels for SITL:

  • sitl—The command ltrace sitl causes ODB to print out all packets converted by SITL, both real-to-simulated and simulated-to-real.

  • sitl_timing—The command ltrace sitl_timing causes ODB to print out timing information for every packet that goes through SITL. The output is similar to this:

    === SITL PACKET (1)<<<--- ID=   48, sim=  15.573728, real=  14.993882, delta=   0.579846, delay=   0.000118
    === SITL PACKET (2)--->>> ID=   48, sim=  15.573728, real=  14.991457, delta=   0.582270, delay=   0.000161
    

    The first line of this example shows an inbound packet entering interface 1 and the second line shows a packet outbound from interface 2. The information fields are

    • ID—packet ID
    • sim—simulation time at which SITL sent the packet to the simulation (inbound packets) or to the real network (outbound packets), in seconds
    • real—real time at which SITL sent the packet to the simulation (inbound packets) or to the real network (outbound packets), in seconds (measured from start of simulation)
    • delta—difference between simulation time and real time (sim – real). This value shows how well the simulation is keeping up with real time. Large negative values indicate that the simulation is falling behind.
    • delay—length of time it took the packet to go through SITL. On the inbound side, this time starts when the packet is received from pcap and ends when the packet is sent down the SITL link into the simulation. On the outbound side, it starts when the packet is received from the simulation and ends when the packet is handed over to pcap.

    Note that this trace will work only with low packet rates. Tracing large numbers of packets will slow down the simulation, producing unrepresentative timing values.

ODB also can show packet animations, which might be helpful in determining where the packets are in the model at a given time.

Methodology

If your simulation doesn’t seem to communicate with the physical hardware, you should check to see which packets are reaching the SITL gateway:

  • On the physical hardware side, you can use Wireshark to view or capture the packets. If the packet is supposed to originate in the real network and you don’t see it there, neither will SITL.
  • If you see the packet in Wireshark or if the packet originates in the simulation and you don’t see it in Wireshark, check to see if it reaches the other side of the SITL gateway by using ODB and the ltrace sitl command or other mechanisms.
  • If you see the packet on the physical side, but not on the simulation side, check the filters.
  • If you see the packet on the simulation side, but not on the physical side, contact Technical Support.

Caveats

SITL will process only those packets that actually reach the physical Ethernet interface, so you will have to make sure your packets are properly routed. Furthermore, your filters should be set as narrow as possible to avoid processing useless packets in the simulation. However, you should make sure that the packets you are interested in are not filtered out. Remember that the filters specify which packets should be allowed into the simulation, not which ones should be kept out.

Do not use the Ethernet address of the SITL gateway or that of the underlying physical hardware for any of your simulated nodes or interfaces. For simulation purposes you can ignore their existence. A packet coming from a real device will transparently go through SITL and reach the first simulated device as if there was a magical link, half physical, half simulated, between them.

In a real–sim–real scenario, the way SITL processes a packet depends on the packet’s destination, as follows.

  • Incoming packets with a destination outside the simulation (which effectively are just passing through the simulation) are parsed only at the first two protocol layers, Ethernet and IP. The IP payload is preserved intact through the simulation.
  • Packets with a destination inside the simulation are completely translated. In this case, you must make sure either that all protocols present in the packet are supported by the default conversion functions or that you have written and installed a custom conversion function for the unsupported protocols.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com