Table Of Contents
Table Of Contents

Peeking Under the Hood

Goals

This showcase demonstrates that the filtering and policing modules can work outside the context of a network node. Doing so may facilitate assembling and validating specific complex filtering and policing behaviors which can be difficult to replicate in a complete network.

INET version: 4.4

The Model

In this configuration we directly connect a per-stream filtering module to multiple packet sources.

Here is the network:

../../../../../_images/Network22.png

Here is the configuration:

[General]
network = PeekingUnderTheHoodShowcase
sim-time-limit = 1s
description = "Per-stream filtering several packet sources with sinusoidally changing datarate"

*.numSources = 3
*.sources[*].packetLength = 100B
*.sources[0].productionInterval = replaceUnit(sin(dropUnit(simTime() * 1)) + sin(dropUnit(simTime() * 8)) + 10, "ms") / 100
*.sources[1].productionInterval = replaceUnit(sin(dropUnit(simTime() * 2)) + 1.5, "ms") / 10
*.sources[2].productionInterval = replaceUnit(sin(dropUnit(simTime() * 3)) + 1.5, "ms") / 10

*.identifier.mapping = [{packetFilter: "sources[0]*", stream: "s0"},
                        {packetFilter: "sources[1]*", stream: "s1"},
                        {packetFilter: "sources[2]*", stream: "s2"}]

*.filter.typename = "SimpleIeee8021qFilter"
*.filter.numStreams = 3
*.filter.classifier.mapping = {s0: 0, s1: 1, s2: 2}

**.initialNumTokens = 0
*.filter.meter[*].typename = "SingleRateTwoColorMeter"
*.filter.meter[*].committedInformationRate = 8Mbps
*.filter.meter[*].committedBurstSize = 100kB

Results

Here are the results:

../../../../../_images/TrafficClass1.png
../../../../../_images/TrafficClass2.png
../../../../../_images/TrafficClass3.png

Sources: omnetpp.ini, PeekingUnderTheHoodShowcase.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/streamfiltering/underthehood 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/streamfiltering/underthehood && 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.