Table Of Contents
Table Of Contents

Automatic Multipath Stream Configuration

Goals

In this example we demonstrate the automatic stream redundancy configuration based on multiple paths from source to destination.

The Model

In this case we use an automatic stream redundancy configurator that takes the different paths for each redundant stream as an argument. The automatic configurator sets the parameters of all stream identification, stream merging, stream splitting, string encoding and stream decoding components of all network nodes.

Here is the network:

../../../../../_images/Network14.png

Here is the configuration:

[General]
network = AutomaticMultipathConfigurationShowcase
sim-time-limit = 0.1s
description = "Automatic multipath stataic stream redundancy configuration"

# disable automatic MAC forwarding table configuration
*.macForwardingTableConfigurator.typename = ""

# all Ethernet interfaces have 100 Mbps speed
*.*.eth[*].bitrate = 100Mbps

# packet error rate of all links is 20%
**.channel.per = 0.2

# enable frame replication and elimination
*.*.hasStreamRedundancy = true

# source application
*.source.numApps = 1
*.source.app[0].typename = "UdpSourceApp"
*.source.app[0].io.destAddress = "destination"
*.source.app[0].io.destPort = 1000
*.source.app[0].source.displayStringTextFormat = "sent %p pk (%l)"
*.source.app[0].source.packetLength = 1200B
*.source.app[0].source.productionInterval = truncnormal(100us,50us)

# destination application
*.destination.numApps = 1
*.destination.app[0].typename = "UdpSinkApp"
*.destination.app[0].io.localPort = 1000

# all interfaces must have the same address to accept packets from all streams
*.destination.eth[*].address = "0A-AA-12-34-56-78"

# visualizer
*.visualizer.infoVisualizer.modules = "*.source.app[0].source or *.destination.app[0].sink"

# enable stream policing in layer 2
*.*.bridging.streamRelay.typename = "StreamRelayLayer"
*.*.bridging.streamCoder.typename = "StreamCoderLayer"

# enable automatic stream redundancy configurator
*.streamRedundancyConfigurator.typename = "StreamRedundancyConfigurator"

# seamless stream redundancy configuration
*.streamRedundancyConfigurator.configuration = [{name: "S1", packetFilter: "*", source: "source", destination: "destination",
                                                 trees: [[["source", "s1", "s2a", "s3a", "destination"]],
                                                         [["source", "s1", "s2b", "s3b", "destination"]],
                                                         [["source", "s1", "s2a", "s2b", "s3b", "destination"]],
                                                         [["source", "s1", "s2b", "s2a", "s3a", "destination"]]]}]

# visualizer
*.visualizer.streamRedundancyConfigurationVisualizer.displayTrees = true
*.visualizer.streamRedundancyConfigurationVisualizer.lineColor = "black"

Results

Here is the number of received and sent packets:

../../../../../_images/packetsreceivedsent2.svg

Here is the ratio of received and sent packets:

../../../../../_images/packetratio2.png

The expected number of successfully received packets relative to the number of sent packets is verified by the python scripts. The expected result is around 0.657.

Sources: omnetpp.ini, AutomaticMultipathConfigurationShowcase.ned

Try It Yourself

If you already have INET and OMNeT++ installed, start the IDE by typing omnetpp, import the INET project into the IDE, then navigate to the inet/showcases/tsn/framereplication/automaticmultipathconfiguration folder in the Project Explorer. There, you can view and edit the showcase files, run simulations, and analyze results.

Otherwise, there is an easy way to install INET and OMNeT++ using opp_env, and run the simulation interactively. Ensure that opp_env is installed on your system, then execute:

$ opp_env run inet-4.4 --init -w inet-workspace --install --chdir \
   -c 'cd inet-4.4.*/showcases/tsn/framereplication/automaticmultipathconfiguration && inet'

This command creates an inet-workspace directory, installs the appropriate versions of INET and OMNeT++ within it, and launches the inet command in the showcase directory for interactive simulation.

Alternatively, for a more hands-on experience, you can first set up the workspace and then open an interactive shell:

$ opp_env install --init -w inet-workspace inet-4.4
$ cd inet-workspace
$ opp_env shell

Inside the shell, start the IDE by typing omnetpp, import the INET project, then start exploring.

Discussion

Use this page in the GitHub issue tracker for commenting on this showcase.