RED(8) Linux RED(8) NAME red−RandomEarlyDetection SYNOPSIS tcqdisc...redlimitbytes[minbytes][maxbytes]avpktbytes[burstpackets][ecn] [harddrop][bandwidthrate][probabilitychance][adaptive] DESCRIPTION RandomEarlyDetectionisaclasslessqdiscwhichmanagesitsqueuesizesmartly.Regularqueues simplydroppacketsfromthetailwhentheyarefull,whichmaynotbetheoptimalbehaviour. REDalsoperformstaildrop,butdoessoinamoregradualway. Oncethequeuehitsacertainaveragelength,packetsenqueuedhaveaconfigurablechanceof beingmarked(whichmaymeandropped).Thischanceincreaseslinearlyuptoapointcalledthe maxaveragequeuelength,althoughthequeuemightgetbigger. Thishasahostofbenefitsoversimpletaildrop,whilenotbeingprocessorintensive.Itprevents synchronousretransmitsafteraburstintraffic,whichcausefurtherretransmits,etc. Thegoalistohaveasmallqueuesize,whichisgoodforinteractivitywhilenotdisturbing TCP/IPtrafficwithtoomanysuddendropsafteraburstoftraffic. DependingonifECNisconfigured,markingeithermeansdroppingorpurelymarkingapacketas overlimit. ALGORITHM Theaveragequeuesizeisusedfordeterminingthemarkingprobability.Thisiscalculatedusing anExponentialWeightedMovingAverage,whichcanbemoreorlesssensitivetobursts. Whentheaveragequeuesizeisbelowminbytes,nopacketwilleverbemarked.Whenitexceeds min,theprobabilityofdoingsoclimbslinearlyuptoprobability,untiltheaveragequeuesize hitsmaxbytes.Becauseprobabilityisnormallynotsetto100%,thequeuesizemightconceivablyriseabovemaxbytes,sothelimitparameterisprovidedtosetahardmaximumforthesize ofthequeue. PARAMETERS min Averagequeuesizeatwhichmarkingbecomesapossibility.Defaultstomax/3 max Atthisaveragequeuesize,themarkingprobabilityismaximal.Shouldbeatleasttwice mintopreventsynchronousretransmits,higherforlowmin.Defaulttolimit/4 probability Maximumprobabilityformarking,specifiedasafloatingpointnumberfrom0.0to1.0. Suggestedvaluesare0.01or0.02(1or2%,respectively).Default:0.02 limit Hardlimitonthereal(notaverage)queuesizeinbytes.Furtherpacketsaredropped. Shouldbesethigherthanmax+burst.Itisadvisedtosetthisafewtimeshigherthan max. burst Usedfordetermininghowfasttheaveragequeuesizeisinfluencedbytherealqueuesize. Largervaluesmakethecalculationmoresluggish,allowinglongerburstsoftrafficbefore markingstarts.Reallifeexperimentssupportthefollowingguideline: (min+min+max)/(3*avpkt). avpkt Specifiedinbytes.Usedwithbursttodeterminethetimeconstantforaveragequeuesize calculations.1000isagoodvalue. iproute2 13December2001 1 RED(8) Linux RED(8) bandwidth Thisrateisusedforcalculatingtheaveragequeuesizeaftersomeidletime.Shouldbeset tothebandwidthofyourinterface.DoesnotmeanthatREDwillshapeforyou! Optional.Default:10Mbit ecn Asmentionedbefore,REDcaneither’mark’or’drop’.ExplicitCongestionNotification allowsREDtonotifyremotehoststhattheirrateexceedstheamountofbandwidthavailable.Non-ECNcapablehostscanonlybenotifiedbydroppingapacket.Ifthisparame-terisspecified,packetswhichindicatethattheirhostshonorECNwillonlybemarked andnotdropped,unlessthequeuesizehitslimitbytes.Recommended. harddrop Ifaverageflowqueuesizeisabovemaxbytes,thisparameterforcesadropinsteadofecn marking. adaptive (Addedinlinux-3.3)SetsREDinadaptivemodeasdescribedin http://icir.org/floyd/papers/adaptiveRed.pdf GoalofAdaptiveREDistomake’probability’dynamicvaluebetween1%and50%toreachthetargetaveragequeue: (max-min)/2 EXAMPLE #tcqdiscadddeveth0parent1:1handle10:red limit400000min30000max90000avpkt1000 burst55ecnadaptivebandwidth10Mbit SEEALSO tc(8),tc-choke(8) SOURCES o Floyd,S.,andJacobson,V.,RandomEarlyDetectiongatewaysforCongestionAvoidance. http://www.aciri.org/floyd/papers/red/red.html o SomechangestothealgorithmbyAlexeyN.Kuznetsov. o AdaptiveRED:http://icir.org/floyd/papers/adaptiveRed.pdf AUTHORS AlexeyN.Kuznetsov,<kuznet@ms2.inr.ac.ru>,AlexeyMakarenko <makar@phoenix.kharkov.ua>,JHadiSalim<hadi@nortelnetworks.com>,EricDumazet <eric.dumazet@gmail.com>.Thismanpagemaintainedbyberthubert<ahu@ds9a.nl> iproute2 13December2001 2