RED(8) Linux RED(8) NAME red−RandomEarlyDetection SYNOPSIS tcqdisc...redlimitbytesminbytesmaxbytesavpktbytesburstpackets[ecn][bandwidthrate]probabilitychance DESCRIPTION RandomEarlyDetectionisaclasslessqdiscwhichmanagesitsqueuesizesmartly.Regularqueues simplydroppacketsfromthetailwhentheyarefull,whichmaynotbetheoptimalbehaviour. REDalsoperformstaildrop,butdoessoinamoregradualway. Oncethequeuehitsacertainaveragelength,packetsenqueuedhaveaconfigurablechanceof beingmarked(whichmaymeandropped).Thischanceincreaseslinearlyuptoapointcalledthe maxaveragequeuelength,althoughthequeuemightgetbigger. Thishasahostofbenefitsoversimpletaildrop,whilenotbeingprocessorintensive.Itprevents synchronousretransmitsafteraburstintraffic,whichcausefurtherretransmits,etc. Thegoalisthehaveasmallqueuesize,whichisgoodforinteractivitywhilenotdisturbing TCP/IPtrafficwithtoomanysuddendropsafteraburstoftraffic. DependingonifECNisconfigured,markingeithermeansdroppingorpurelymarkingapacketas overlimit. ALGORITHM Theaveragequeuesizeisusedfordeterminingthemarkingprobability.Thisiscalculatedusing anExponentialWeightedMovingAverage,whichcanbemoreorlesssensitivetobursts. Whentheaveragequeuesizeisbelowminbytes,nopacketwilleverbemarked.Whenitexceeds min,theprobabilityofdoingsoclimbslinearlyuptoprobability,untiltheaveragequeuesize hitsmaxbytes.Becauseprobabilityisnormallynotsetto100%,thequeuesizemightconceivablyriseabovemaxbytes,sothelimitparameterisprovidedtosetahardmaximumforthesize ofthequeue. PARAMETERS minAveragequeuesizeatwhichmarkingbecomesapossibility. maxAtthisaveragequeuesize,themarkingprobabilityismaximal.Shouldbeatleasttwice mintopreventsynchronousretransmits,higherforlowmin. probability Maximumprobabilityformarking,specifiedasafloatingpointnumberfrom0.0to1.0. Suggestedvaluesare0.01or0.02(1or2%,respectively). limitHardlimitonthereal(notaverage)queuesizeinbytes.Furtherpacketsaredropped. Shouldbesethigherthanmax+burst.Itisadvisedtosetthisafewtimeshigherthan max. burstUsedfordetermininghowfasttheaveragequeuesizeisinfluencedbytherealqueuesize. Largervaluesmakethecalculationmoresluggish,allowinglongerburstsoftrafficbefore markingstarts.Reallifeexperimentssupportthefollowingguideline: (min+min+max)/(3*avpkt). avpktSpecifiedinbytes.Usedwithbursttodeterminethetimeconstantforaveragequeuesize calculations.1000isagoodvalue. iproute2 13December2001 1 RED(8) Linux RED(8) bandwidth Thisrateisusedforcalculatingtheaveragequeuesizeaftersomeidletime.Shouldbeset tothebandwidthofyourinterface.DoesnotmeanthatREDwillshapeforyou! Optional. ecnAsmentionedbefore,REDcaneither’mark’or’drop’.ExplicitCongestionNotification allowsREDtonotifyremotehoststhattheirrateexceedstheamountofbandwidthavailable.Non-ECNcapablehostscanonlybenotifiedbydroppingapacket.Ifthisparame-terisspecified,packetswhichindicatethattheirhostshonorECNwillonlybemarked andnotdropped,unlessthequeuesizehitslimitbytes.NeedsatcbinarywithREDsupportcompiledin.Recommended. SEEALSO tc(8) SOURCES oFloyd,S.,andJacobson,V.,RandomEarlyDetectiongatewaysforCongestionAvoidance. http://www.aciri.org/floyd/papers/red/red.html oSomechangestothealgorithmbyAlexeyN.Kuznetsov. AUTHORS AlexeyN.Kuznetsov,<kuznet@ms2.inr.ac.ru>,AlexeyMakarenko <makar@phoenix.kharkov.ua>,JHadiSalim<hadi@nortelnetworks.com>.Thismanpagemaintainedbyberthubert<ahu@ds9a.nl> iproute2 13December2001 2