Table Of Contents
Table Of Contents

Duplicating Packets from One Input to One Output

The PacketDuplicator module creates a configured number of duplicates of incoming packets.

In this example network, packets are produced periodically by an active packet source (ActivePacketSource). The packets are pushed into a (PacketDuplicator), which creates 0 or 1 copy of them randomly. Finally, the packets are all sent into a passive packet sink (PassivePacketSink).

network DuplicatorTutorialStep
        producer: ActivePacketSource {
        duplicator: PacketDuplicator {
        consumer: PassivePacketSink {
    connections allowunconnected:
        producer.out -->;
        duplicator.out -->;
[Config Duplicator]
network = DuplicatorTutorialStep
sim-time-limit = 10s

*.producer.packetLength = 1B
*.producer.productionInterval = 1s
*.duplicator.numDuplicates = intuniform(0, 1)