Skip to content
Tom Barbette edited this page Oct 3, 2018 · 2 revisions

RED Element Documentation

NAME

RED — Click element; drops packets according to RED

SYNOPSIS

RED(MIN_THRESH, MAX_THRESH, MAX_P [, KEYWORDS])

Ports: 1 input, 1-2 outputs
Processing: agnostic, but output 1 is push

DESCRIPTION

Implements the Random Early Detection packet dropping algorithm.

A RED element is associated with one or more Storage elements (usually Queues). It maintains a running average of the sum of the queue lengths, and marks packets with a probability proportional to that sum. By default, the Queues are found with flow-based router context. If the RED is a push element, it uses the nearest downstream Queues; if it is a pull element, it uses the nearest upstream Queues.

Marked packets are dropped, or emitted on output 1 if RED has two output ports.

Arguments are:

  • MIN_THRESH — Integer. When the average queue length less than or equal to MIN_THRESH, input packets are never marked.

  • MAX_THRESH — Integer; must be greater than or equal to MIN_THRESH. When the average queue length equals MAX_THRESH, input packets are marked with probability MAX_P. When the average queue length is between MIN_THRESH and MAX_THRESH, input packets are marked with probability linearly varying from 0 to MAX_P. For behavior above MAX_THRESH, see the SIMPLE argument.

  • MAX_P — Real number between 0 and 1. The probability of dropping a packet if the average queue length equals MAX_THRESH.

  • QUEUES — This argument is a space-separated list of Storage element names. RED will use those elements' queue lengths, rather than any elements found via flow-based router context.

  • STABILITY — Unsigned. This number determines how stable the average queue size is -- that is, how quickly it changes due to fluctuations in the instantaneous queue size. Higher numbers mean more stability. The corresponding conventional RED parameter is w_q; STABILITY equals -log_2(w_q).

    STABILITY should equal

         -log_2 (1 - e^(-1/K)),
    

    where K is the link bandwidth in packets per second. Default STABILITY is 4. This is very low (unstable) for most purposes; it corresponds to a link bandwidth of roughly 15 packets per second, or a w_q of 0.25. The NS default setting for w_q is 0.002, corresponding to a STABILITY of roughly 9.

    A STABILITY of 0 means always use the instantaneous queue length.

  • GENTLE — Boolean. If true (the default), implement the Gentle RED variant first proposed by Sally Floyd in October 1997. In this variant, when the average queue length is between MAX_THRESH and 2*MAX_THRESH, input packets are dropped with probability linearly varying from MAX_P to 100%; at lengths above 2*MAX_THRESH all packets are dropped. If GENTLE is false, then at lengths above MAX_THRESH all packets are dropped.

EXAMPLES

  ... -> RED(5, 50, 0.02) -> Queue(200) -> ...

ELEMENT HANDLERS

  • min_thresh (read/write) — Returns or sets the MIN_THRESH configuration parameter.
  • max_thresh (read/write) — Returns or sets the MAX_THRESH configuration parameter.
  • max_p (read/write) — Returns or sets the MAX_P configuration parameter.
  • drops (read-only) — Returns the number of packets dropped so far.
  • queues (read-only) — Returns the Queues associated with this RED element, listed one per line.
  • avg_queue_size (read-only) — Returns the current average queue size.
  • stats (read-only) — Returns some human-readable statistics.

SEE ALSO

AdaptiveRED, Queue

Sally Floyd and Van Jacobson. Random Early Detection Gateways for Congestion Avoidance. ACM Transactions on Networking, 1(4), August 1993, pp 397-413.

Sally Floyd. "Optimum functions for computing the drop probability", October 1997. http://www.icir.org/floyd/REDfunc.txt.

Generated by click-elem2man from ../elements/aqm/red.hh:9 on 2018/10/03.

Clone this wiki locally