SITL Gateway

The SITL node model represents a piece of external hardware with which the simulation exchanges packets. The gateway model is named sitl_virtual_gateway_to_real_world.

There can be more than one SITL gateway in a simulation. Typically, each one connects to a different piece of external hardware. However, several SITL gateways can connect to the same external hardware, with different filters to help separate the incoming packets. Also, because ARP is used to resolve MAC addresses, multiple pieces of external hardware can connect through the same SITL gateway.

Because the gateway model expects Ethernet packets, each SITL gateway node in the simulation must connect either to an Ethernet workstation or to the Ethernet interface of a router or switch.

The attributes of particular interest in SITL network models are as listed in the following table.

Table 1: Critical sitl_virtual_gateway_to_real_world Node Attributes

Attribute Description
Filter String String specifying which packets should be passed into the simulation. This string must use standard Berkeley Packet Filter (BPF) format.
Network Adapter Network adapter that SITL will use to send and receive packets. This attribute will show the adapter, MAC address, and IPv4/IPv6 addresses set on the adapter.

Filter Strings

To avoid processing unwanted packets, make the filter string as strict as possible. Ideally, only packets of the desired protocol and from the desired source computer should be passed.

Note: For some interfaces, ARP packets must be processed by the DES model in order for other packets to reach the SITL node.

The filter string is based on the syntax used for tcpdump packet capture filters. Some common syntax is as follows:

  • "udp" means accept UDP packets
  • "udp [2:2] == 2047" means accept UDP packets whose destination port (i.e., offset of 2 bytes : field size of 2 bytes) is 2047
  • "ether src 8:0:20:9a:8:a0" means accept only Ethernet packets from MAC address 8:0:20:9a:8:a0
  • "tcp" means accept TCP packets
  • "icmp[0] == 8" means accept ICMP packets whose code is 8 (i.e., echo request)
  • "icmp[0] == 0" means accept ICMP packets whose code is 0 (i.e., echo reply)
  • "ip" means accept packets with IP datagrams

The full syntax for filter strings is described in the WinPcap manual, available at www.winpcap.org/docs/.

Example 1

To pass ping request and reply packets:

(icmp and (icmp[0] == 8 or icmp[0] == 0))

Example 2

To block Riverbed license ports a, b, and c:

not (udp [2:2] == 2047 or udp [2:2] == 2123 or udp [2:2] == 2345)

This string ignores UDP packets whose destination ports are 2047, 2123, or 2345 (the Riverbed license ports).

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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