Virtual Transport - adjacentlink/emane GitHub Wiki

Contents


Features

The Virtual Transport creates a virtual interface for use as the emulation/application domain boundary. IP packets routed to the virtual device are encapsulated and transmitted to their respective NEM for downstream processing. Packets received over-the-air are processed up the NEM stack and transmitted to the NEM’s respective virtual transport for injection back into the kernel IP stack.

The newly created virtual interface is assigned an Ethernet address derived from the NEM Id associated with the transport using the following format: 02:02:00:00:XX:XX , where XX:XX is the 16 bit NEM Id. This allows easy mapping of Ethernet MAC addresses to NEM Ids for unicast frames. Multicast and broadcast frames map to the NEM broadcast address 0xFFFF.

Virtual Transport capabilities include the following:

  1. IPv4 and IPv6 Capable - Supports IPv4 and IPv6 virtual interface address assignments and packet processing.

  2. Flow Control - Supports flow control with a corresponding flow control capable NEM layer in order to provide feedback between the emulation stack and application domain socket queues.

  3. Virtual Interface Management - Supports configuring virtual interface addresses or can be configured to allow virtual interfaces to be managed externally, for example via DHCP.

  4. Raw Transport Interoperability - Supports interoperability with Raw Transport emulation/application domain boundaries using ARP caching to learn network/NEM Id associations.

  5. Bitrate Enforcement - Supports bitrate enforcement for use with models that do not limit bitrate based on emulation implementation.

  6. Broadcast Only Mode - Supports forced NEM broadcasting of all IP packet types: unicast, broadcast and multicast.


Configuration Parameters

The following configuration parameters are available to tailor layer functionality:

address

IPv4 or IPv6 virutal device address.

Type: inetaddr
Running-State Modifiable: no
Occurrence Range: [1,1]

arpcacheenable

Enable ARP request/reply monitoring to map Ethernet address to NEM.

Type: bool
Running-State Modifiable: no
Occurrence Range: [1,1]
Value Range: [no,yes]
Default Value(s): yes

arpmodeenable

Enable ARP on the virtual device.

Type: bool
Running-State Modifiable: no
Occurrence Range: [1,1]
Value Range: [no,yes]
Default Value(s): yes

bitrate

Transport bitrate in bps. This is the total allowable throughput for the transport combined in both directions (upstream and downstream). A value of 0 disables the bitrate feature.

Type: uint64
Running-State Modifiable: no
Occurrence Range: [1,1]
Value Range: [0,18446744073709551615]
Default Value(s): 0

broadcastmodeenable

Broadcast all packets to all NEMs.

Type: bool
Running-State Modifiable: no
Occurrence Range: [1,1]
Value Range: [no,yes]
Default Value(s): no

device

Virtual device name.

Type: string
Running-State Modifiable: no
Occurrence Range: [1,1]
Default Value(s): emane0

devicepath

Path to the tuntap device.

Type: string
Running-State Modifiable: no
Occurrence Range: [1,1]
Default Value(s): /dev/net/tun

flowcontrolenable

Enables downstream traffic flow control with a corresponding flow control capable NEM layer.

Type: bool
Running-State Modifiable: no
Occurrence Range: [1,1]
Value Range: [no,yes]
Default Value(s): no

mask

IPv4 or IPv6 virutal device addres network mask.

Type: inetaddr
Running-State Modifiable: no
Occurrence Range: [1,1]


Example XML

Typically the Virtual Transport definition is pretty sparse.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE transport SYSTEM "file:///usr/share/emane/dtd/transport.dtd">
<transport library="transvirtual"/>

Most of the time you will need to specify a different address for each NEM and good place to do that is in the emulator platform definition file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE platform SYSTEM "file:///usr/share/emane/dtd/platform.dtd">
<platform>
  <param name="otamanagerchannelenable" value="on"/>
  <param name="otamanagerdevice" value="eth0"/>
  <param name="otamanagergroup" value="224.1.2.8:45702"/>
  <param name="eventservicegroup" value="224.1.2.8:45703"/>
  <param name="eventservicedevice" value="eth0"/>

  <nem id="1" definition="rfpipenem.xml">
    <transport definition="transvirtual.xml">
      <param name="address" value="fd53:dc9a:f36d:4950:0:0:0:1"/>
    </transport>
  </nem>
</platform>

Statistics

The below statistics can be accessed using emanesh.

Name Type Clearable Description
avgDownstreamPacketSizeBroadcastGenerated float yes Average layer generated downstream broadcast packet size
avgDownstreamPacketSizeBroadcastRx float yes Average downstream broadcast packet size received
avgDownstreamPacketSizeBroadcastTx float yes Average downstream broadcast packet size transmitted
avgDownstreamPacketSizeGenerated float yes Average layer generated downstream packet size
avgDownstreamPacketSizeRx float yes Average downstream packet size received
avgDownstreamPacketSizeTx float yes Average downstream packet size transmitted
avgDownstreamPacketSizeUnicastGenerated float yes Average layer generated downstream unicast packet size
avgDownstreamPacketSizeUnicastRx float yes Average downstream unicast packet size received
avgDownstreamPacketSizeUnicastTx float yes Average downstream unicast packet size transmitted
avgDownstreamProcessingDelay float yes Average downstream processing delay
avgProcessAPIQueueDepth double yes Average API queue depth for a processUpstreamPacket, processUpstreamControl, processDownstreamPacket, processDownstreamControl, processEvent and processTimedEvent.
avgProcessAPIQueueWait double yes Average API queue wait for a processUpstreamPacket, processUpstreamControl, processDownstreamPacket, processDownstreamControl, processEvent and processTimedEvent in microseconds.
avgTimedEventLatency double yes
avgTimedEventLatencyRatio double yes Average ratio of the delta between the scheduled timer expiration and the actual firing over the requested duration. An average ratio approaching 1 indicates that timer latencies are large in comparison to the requested durations.
avgUpstreamPacketSizeBroadcastRx float yes Average upstream broadcast packet size received
avgUpstreamPacketSizeBroadcastTx float yes Average upstream broadcast packet size transmitted
avgUpstreamPacketSizeRx float yes Average upstream packet size received
avgUpstreamPacketSizeTx float yes Average upstream packet size
avgUpstreamPacketSizeUnicastRx float yes Average upstream unicast packet size received
avgUpstreamPacketSizeUnicastTx float yes Average upstream unicast packet size transmitted
avgUpstreamProcessingDelay float yes Average upstream processing delay
numDownstreamBytesBroadcastGenerated uint64 yes Number of layer generated downstream broadcast bytes
numDownstreamBytesBroadcastRx uint64 yes Number of downstream broadcast bytes received
numDownstreamBytesBroadcastTx uint64 yes Number of downstream broadcast bytes transmitted
numDownstreamBytesGenerated uint64 yes Number of layer generated downstream bytes
numDownstreamBytesRx uint64 yes Number of downstream bytes received
numDownstreamBytesTx uint64 yes Number of downstream bytes transmitted
numDownstreamBytesUnicastGenerated uint64 yes Number of layer generated downstream unicast bytes
numDownstreamBytesUnicastRx uint64 yes Number of downstream unicast bytes received
numDownstreamBytesUnicastTx uint64 yes Number of downstream unicast bytes transmitted
numDownstreamPacketsBroadcastDrop uint64 yes Number of downstream broadcast packets dropped
numDownstreamPacketsBroadcastGenerated uint64 yes Number of layer generated downstream broadcast packets
numDownstreamPacketsBroadcastRx uint64 yes Number of downstream broadcast packets received
numDownstreamPacketsBroadcastTx uint64 yes Number of downstream broadcast packets transmitted
numDownstreamPacketsDrop uint64 yes number of downstream packets dropped
numDownstreamPacketsGenerated uint64 yes Number of layer generated downstream packets
numDownstreamPacketsRx uint64 yes Number of downstream packets received
numDownstreamPacketsTx uint64 yes Number of downstream packets transmitted
numDownstreamPacketsUnicastDrop uint64 yes Number of downstream unicast packets dropped
numDownstreamPacketsUnicastGenerated uint64 yes Number of layer generated downstream unicast packets
numDownstreamPacketsUnicastRx uint64 yes Number of downstream unicast packets received
numDownstreamPacketsUnicastTx uint64 yes Number of downstream unicast packets transmitted
numDownstreamProcessingDelay uint64 yes
numUpstreamBytesBroadcastRx uint64 yes Number of upstream broadcast bytes received
numUpstreamBytesBroadcastTx uint64 yes Number of updtream broadcast bytes transmitted
numUpstreamBytesRx uint64 yes Number of upstream bytes received
numUpstreamBytesTx uint64 yes Number of upstream bytes transmitted
numUpstreamBytesUnicastRx uint64 yes Number upstream unicast bytes received
numUpstreamBytesUnicastTx uint64 yes Number of upstream unicast bytes transmitted
numUpstreamPacketsBroadcastDrop uint64 yes Number of upstream broadcast packets dropped
numUpstreamPacketsBroadcastRx uint64 yes Number of upstream broadcast packets received
numUpstreamPacketsBroadcastTx uint64 yes Number of upstream broadcast packets transmitted
numUpstreamPacketsDrop uint64 yes Number upstream packets droppped
numUpstreamPacketsRx uint64 yes Number of upstream packets received
numUpstreamPacketsTx uint64 yes Number of upstream packets transmitted
numUpstreamPacketsUnicastDrop uint64 yes Number of upstream unicast packets dropped
numUpstreamPacketsUnicastRx uint64 yes Number upstream unicast packets received
numUpstreamPacketsUnicastTx uint64 yes Number of upstream unicast packets transmitted
numUpstreamProcessingDelay uint64 yes
processedConfiguration uint64 yes
processedDownstreamControl uint64 yes
processedDownstreamPackets uint64 yes
processedEvents uint64 yes
processedTimedEvents uint64 yes
processedUpstreamControl uint64 yes
processedUpstreamPackets uint64 yes

Statistic Tables

The below statistics can be accessed using emanesh.

Name Clearable Description
BroadcastPacketAcceptTable yes Broadcast packets accepted
BroadcastPacketDropTable yes Broadcast packets dropped by reason code
EventReceptionTable yes Received event counts
UnicastPacketAcceptTable yes Unicast packets accepted
UnicastPacketDropTable yes Unicast packets dropped by reason code
⚠️ **GitHub.com Fallback** ⚠️