Table Of Contents
Table Of Contents

Automatic Stream Configuration with Failure Protection

Goals

In this example we demonstrate the automatic stream redundancy configuration based on the link and node failure protection requirements.

INET version: 4.4

The Model

In this case we use a different automatic stream redundancy configurator that takes the link and node failure protection requirements for each redundany stream as an argument. The automatic configurator computes the different paths that each stream must take in order to be protected against any of the listed failures so that at least one working path remains.

Here is the network:

../../../../../_images/Network13.png

Here is the configuration:

[General]
network = AutomaticFailureProtectionShowcase
sim-time-limit = 0.1s
description = "Automatic static stream redundancy configuration with failure protection"

# 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 all automatic configurators
*.streamRedundancyConfigurator.typename = "StreamRedundancyConfigurator"
*.failureProtectionConfigurator.typename = "FailureProtectionConfigurator"

# TSN configuration
*.failureProtectionConfigurator.gateScheduleConfiguratorModule = ""
# 64B = 8B (UDP) + 20B (IP) + 4B (802.1R) + 6B (802.1Q) + 14B + 4B (ETH MAC) + 8B (ETH PHY)
*.failureProtectionConfigurator.configuration = [{name: "S1", application: "app[0]", source: "source", destination: "destination",
                                                  pcp: 0, packetFilter: "*", # TODO rename to something identification related
                                                  packetLength: 100B + 64B, packetInterval: 5ms, maxLatency: 100us,
                                                  nodeFailureProtection: [{any: 1, of: "s2a or s2b or s3a or s3b"}],
                                                  # this link failure protection is somewhat redundant for demonstration purposes
                                                  linkFailureProtection: [{any: 1, of: "*->* and not source->s1"},
                                                                          {any: 2, of: "s1->s2a or s2a->s2b or s2b->s3b"},
                                                                          {any: 2, of: "s1->s2b or s2b->s2a or s2a->s3a"}]}]

# visualizer
*.visualizer.failureProtectionConfigurationVisualizer.displayTrees = true
*.visualizer.failureProtectionConfigurationVisualizer.lineStyle = "dashed"
*.visualizer.streamRedundancyConfigurationVisualizer.displayTrees = true
*.visualizer.streamRedundancyConfigurationVisualizer.lineColor = "black"

Results

Here is the number of received and sent packets:

../../../../../_images/packetsreceivedsent1.svg

Here is the ratio of received and sent packets:

../../../../../_images/packetratio1.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, AutomaticFailureProtectionShowcase.ned

Discussion

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