Table Of Contents
Table Of Contents

RED Dropper

This step demonstrates the RedDropper module, which implements the Random Early Detection algorithm.

Packets are created by an active packet source (ActivePacketSource), which pushes packets to the dropper module. The dropper module drops packets with a probability depending on the number of packets contained in the queue (PacketQueue) connected to its output. The packets are collected by an active packet sink (ActivePacketSink).

network RedDropperTutorialStep
{
    submodules:
        producer: ActivePacketSource {
            @display("p=100,100");
        }
        dropper: RedDropper {
            @display("p=300,100");
        }
        queue: PacketQueue {
            @display("p=500,100");
        }
        collector: ActivePacketSink {
            @display("p=700,100");
        }
    connections:
        producer.out --> dropper.in;
        dropper.out --> queue.in;
        queue.out --> collector.in;
}
[Config RedDropper]
network = RedDropperTutorialStep
sim-time-limit = 100s

*.producer.packetLength = 1B
*.producer.productionInterval = exponential(1s)
*.dropper.minth = 1
*.dropper.maxth = 3
*.dropper.maxp = 0.1
*.dropper.wq = 0.5
*.collector.collectionInterval = exponential(1s)