Anda di halaman 1dari 12

BlogHome|INEHome|Members|ContactUs|Subscribe

FreeResources
ViewArchives
AllAccessPass
CCIEBloggers
May
22

UnderstandingSingleRateandDualRateTrafficPolicing
21Comments
PostedbyPetrLapukhov,4xCCIE/CCDEinQoS
Tweet
Thisblogpostreviewsandcomparestwomostcommontypesoftrafficcontractssinglerateand
dualrateagreementsandtheirrespectiveimplementationsusingsinglerateanddualrate(tworate)policing.
Wearealsogoingtobrieflydiscusseffectsofpacketremarkingonendtoendthroughputandfinallylookat
someexamplesofIOSconfiguration.

WhatisTrafficContract
Serviceprovidersnetworktopologytypicallyfollowscore/aggregationmodel,wherenetworkcorehasmeshed
topologyandaggregationlayersusesomevariationoftreetopology.Thisdesignresultsinbandwidth
aggregationwhenflowsconvergetowardthecore.Therefore,toavoidnetworkresourceoversubscription,
accurateadmissioncontrolisnecessaryatthenetworkedge.Theadmissionoperationwastrivialwithcircuit
switchedTDMbasednetworks,butbecamesignificantlymorecomplicatedinpacketswitchednetworks.Ina
packetnetwork,thereisnosuchthingasaconstanttrafficflowrate,asflowsonlyexisttemporarilywhen
packetsaretransmitted.Inpacketnetworks,itiscommonforserviceproviderstoconnectcustomerusinga
subrateconnection.Subrateaconnectionthatprovidesonlyafractionofthemaximumpossiblelink
bandwidth,e.g.1Mbpsona100Mbpsconnection.
Implementingsubrateaccessrequiresspecialagreementbetweenserviceproviderandcustomera
specificationknownastrafficcontract.TrafficcontractsareenforcedbothatcustomerandSPsidesbyusing
trafficshapingandpolicingrespectively.TrafficcontractsmayvaryandincludemultipleQoSparameters,but
therearetwomostcommontypesthatwearegoingtolookattoday:singlerateanddualratetrafficcontracts.
SingleRateTrafficContract
Singleratetrafficcontractisnormallydefinedforasubrateconnectionoveraphysicallinkwithmaximum
transmissionrateofAR(AccessRate).Therearethreemainparametersassociatedwiththistypeofcontract:
CommittedInformationRate(CIR).Definestheaveragetrafficratethatacustomerisallowedtosend
trafficintothenetwork.Noticethetermaverageaspacketsarestillbeingsentatthelinerate(AR),and
theinformationrateisdefinedbyaveragingmeasurementoversometimeinterval.Perthedefinition,CIR
isassumedtobelessthanAR
CommittedBurstSize(Bc).Thisvaluedefinesthemaximumamountofcontiguouspacketsthata
customerisallowedtosendinasinglebatch.Packettrafficiscommonlybursty,e.g.TCPconnectionis
normallyclockedbytherateofincomingTCPACKs,andtheburstsizeistypicallytwosegments,
thoughthesendermaysenduptoafullTCPwindow,whenpossible.Afteracustomerhassenta
contiguousblockofBcbytes,itmustpauseforsometimebeforesendingthenextbatch.Thisis
normallyimplementedusingtrafficshapingatcustomerside.

ExcessiveBurstSize(Be).Thisisanonmandatoryparameterthatcouldbeusedtoimproveadmission
controlfairness.Letssayacustomerconnectionhasbeenidleforsometime,andthencustomergot
newtraffictosend.Regardlessofthepreviousidleinterval,onlyBcbytescouldbesentinasingleburst,
andafterthatcustomerneedstowaitandaccumulatemoresendingcredit.Byallowingcustomerto
accumulateuptoBeextrabytesduringlongerthannormalwaitintervals,itispossibletocompensatefor
idletimesandsendBc+Bebytesmomentarilyforashorttime.Noticethatlongertermaverageratestill
remainsequaltoCIR,theexcessiveburstingmechanismonlyallowsforoccasionalbursting.
PayattentiontotheimplicitvalueofTc=Bc/CIRthistimeintervalisknownasmeteringaveraginginterval.It
definesatimewindowtocountbytesintrafficflowforthepurposeoffindingtheaveragerate.Youmayfind
moreinformationabouttheuseofTcwithtrafficpolicing,lookatthefollowingpublication:ThemeaningofBc
withTrafficPolicing.Normally,eitherTcorBcvalueisexplicitlydefinedinthecontract,andforIPnetworks
thisvalueshouldbelargeenoughtoallowefficientworkofTCPendtoendbetweencustomerlocations.
Therefore,thelowestvalueofTc(orBc)iseffectivelybasedontheSPSLAsandRTTtimesfromone
customersitetoanother.Attheveryleast,theequationBc>=CIR*RTTshouldhold,whereRTTisthe
maximumroundtriptimesitetosite,pertheSLA.Atthismoment,itisworthremindingthatQoStoolsare
usedtocontrolconnectionqualityendtoendbetweentwodifferentsitesconnectedtothesameSP,or
differentSPsthatsharesomesortofQoSagreements.Itisimportanttopointoutthatthatinordertoallowfor
anyQoS,completenetworkshouldbeunderthecontrolofaserviceprovider.
WhatabouttheBevalue?Ifthisoneiseverusedincontract,itdefinestheamountofunusedtimeintervals
thatcouldbereclaimedbackbythesender.IfthecustomerisallowedtoreclaimbackN*Tcintervals,then
BecouldbefoundsimplyasN*Bc.Mostcommonly,ifBeisused,Nequalsto1,whichmeansthecustomer
mayreclaimasinglewastedTcinterval.ThemoreyougrowBe,themorefairwouldthebandwidthutilization
looktoacustomer,butthesporadicpeakrateswouldtendtoexceedCIRmorethannormal.Thereisno
bestvalueforBe,itdependsontypeoftraffic.
Implementationwise,singleratetrafficpolicingisimplementedbytrackingthecurrentburstsizeusingtoken
bucketmechanics,anddiscardingpacketsthatexceedCIR.Thesocalled,Singlerate,ThreeColorMarker
(srTCM)istheRFCnameforingresstoolusedtoimplementadmissioncontrolatthenetworkedge.The
threecolortermmeansthatanyincomingburstcouldbeclassifiedaseitherconforming(green,underBc),
exceeding(yellow,overBcbutunderBe)orviolating(red,overBe).Dependingontheimplementation,
exceedingpacketscouldbeadmitted,buthavetheirQoSmarkingchangedtoshowhigherdropprecedence
inthenetworkcore.HereishowthesrTCMimplementationlookslikeonadiagram:

PayattentiontothefactthatthereisasingleflowofthetokensthatfillstheBcbucket(CBS,committedburst
size)firstandthencontinuestofillingtheBebucket(EBS,excessburstsize).Thesecondbucketisonlyfilled
iftherewasenoughidletimetoletthefirstbucketfillupcompletely.Everyarrivingpacketisfirstcomparedto
CBSandthentotheEBStodeterminethenextaction.TheTiintervalisthespecialperiodictimerthatis
usedtoaddtokenstothetokenbuckets.Ideally,Tishouldbe1/CIR,butthisisnormallynotpossibledueto
limitedresolutionofhardwareclock,soasmallenoughvalueofTiischosen.
DualRateTrafficContract
ThedrawbackofsingleratetrafficcontractsisthatSPshouldbecautionsassigningCIRbandwidth,andmay

effectivelyundersellitself,byofferinglessbandwidththanitcanactuallyserviceatanygivenmomentof
type.Thereasonforthisisthefactthatnotallcustomerssendtrafficsimultaneously,sonetworklinksmay
effectivelybecomeunderutilizedevenattheweakspots.Thisbringstheideaofdualratetrafficcontract:
supplycustomerwithtwosendingrates,butonlyguaranteethesmallerone.Incaseofcongestioninthe
network,discardtrafficthatexceedsthecommittedratemoreaggressivelyandsignalthecustomertoslow
downtothecommittedrate.ThisprinciplewasfirstwidelyimplementedinFrameRelaynetworks,butcould
beeasilyreplicatedusinganypacketswitchingtechnology.Therearefourmainparametersinadualrate
trafficcontract.
CommittedinformationRate(CIR).Samemeaningaswithasingleratecontract.
Committedburstsize(Bc).Samemeaningaswithasingleratecontract,andonceagain,Tcthe
averagingintervalisimplicitlydefinedasTc=Bc/CIR.
PeakInformationRate(PIR).Additionalparameterdefinesthemaximumaveragesendingrateforthe
customer.TrafficburststhatexceedCIRbutremainunderPIRareallowedinthenetwork,butmarkedfor
moreaggressivediscarding.Markingdependsonthetransporttechnology,e.g.itcouldbeDSCPbits,
ATMCLPorFrameRelayDEbit.
ExcessiveBurstSize(Be).Thisvaluehasdifferentmeaning,comparedtoasingleratecontract.Beis
themaximumsizeofthepacketburstthatcouldbeacceptedtosustainthePIRrate.Effectively,Be
definesthesecondaveraginginterval,Te=Be/PIR,theaveragingrateforPIRmetering.Keepinmindthat
justlikewithanypacketnetworkspacketsaresentattheAR,theactualphysicalrateCIRandPIRare
justaveragevalues.
Comparedtoasingleratetrafficcontract,dualratehastwomajordifferences.Firstly,incomingtrafficbursts
aremeteredandcomparedtoCIRandPIRratessimultaneously,usingthecorrespondingBcandBeburst
sizes.Dependingonthecomparisonresults,differentactionscouldbetakenwithregardstothepackets.
Normally,ifaburstisunderCIR,itisadmittedintothenetworkwithoutanymodifications.Iftheburstexceeds
CIR,butremainsunderPIR(e.g.currentburstisstillunderBe),thebursthasmarkingchanged,butstill
admittedintothenetwork.Finally,iftheburstexceedsPIR,itistypicallybeingdiscarded.Dualratecontracts
arenormallyimplementedusingsomesortoftworate,threecolormarker(trTCM),thatcomparesincoming
burststoBcandBeanddecidesonthecolortobeassigned:conforming(green,underBc),exceeding
(yellow,underBe)orviolating(red,overBe).TrafficburststhatexceedBcwillhavetheirmarkingchangedto
signalizedhigherdropprecedence.ThevaluesforBcandBeshouldbeselectedtobenolessthanRTT*CIR
andRTT*PIRrespectively,toallowforefficientTCPperformanceendtoend.Hereishowatworatethree
colormarkerimplementationwouldlooklikeifusingatokenbucketmodel:

Ascomparedtoasingleratemodel,thisoneusestwoseparateflowoftokensfillingtheCBS(Bc)andEBS
(Be)buckets.Overflowingtokensaresimplyspilledannotstoredeverywhere,thereisnofairness
mechanismintrTCM.EveryincomingpacketiscomparedtotheamountoftokensinCBSandEBS,butthis
timeitresultsincomparingthetrafficflowtoseparatepredefinedrates.
HandlingExceedingPacketsinSPNetwork
Thedualratecontractsresultintwointerestingproblems.Firstly,theexceedingpacketsshouldbehandled
differentlyintheSPnetwork.Secondly,congestionneedstobesignaledtothecustomerreactionpoint.Lets
startwiththepacketburstthatweremarkedasexceedingonthereceptionfromthecustomer.Under

congestion,thosepacketsshouldhavemorechancesofbeingdropped,ascomparedtoconforming
packets.Thisbehaviorcouldbeimplementedintwodifferentways:
Assigningthepacketsintoseparatequeues,e.g.assignthemtoabesteffortqueue.Whilethislooks
logical,itmayresultinpacketreordering.ImagineaTCPflowgoingbetweencustomersite,consuming
maximumallowedbandwidth(PIR).Someofthepacketburstinthisconnectionmayactuallyconformto
CIR,whileothersmaybemarkedasexceeding.Asaresult,flowpacketsmaybeorderedevenunder
moderatecongestioninthenetwork.Inresult,thiswillaffectTCPperformanceaspacketreorderingmay
triggerTCPCongestionAvoidanceprocess,resultinginlessthanpossibleTCPsendingrate.The
problemisthatTCPcannotreliabletellifpacketreorderingisaresultofpacketdropornetwork
queueing.
Assigningthepacketstoalowerdropthresholdinthesamequeueastheconformingtraffic.Thiscould
beimplementedinmanydifferentways,e.g.usingdifferentWREDthresholdsfordifferentDSCPvalues
orhavingdifferentdroplimitforDEmarkedFrameRelaypackets.Usingthismethodwillreducechances
ofpacketreorderingbutmayincreaseendtoenddelayforalltraffic.Duetotheseriousimpactofpacket
reorderingonTCPcongestionavoidancemechanism,usingthismethodistherecommendedtreatment.
Signalinganetworkcongestionmightbedifficultinsomenetworks.Noteverypacketswitchingtechnology
supportsthisfeature,andmanyofthemmaysupportdifferentsignaling.Inthemostsimplecase,thereisno
explicitcongestionsignaling,likeinIPnetworks(ignoringtheobsoleteICMPsourcequenchmessage).Inthis
case,upperlevelprotocolissupposedtorecognizequalitydegradationandrespondbyslowingsendingrate.
ThisisautomaticallydonebythecommonlyusedTCPprotocol.Asanotherexample,youmayconsiderthe
useofRTPandRTCPprotocols,whereRTCPisusedtocontrolcallqualityandmaychangecodecsin
responsetonetworkconditiondegradation.ConsiderFrameRelaynextcongestionmaybesignaledusing
BECNbittosignaltrafficsourcetoslowdownitssendingrate.NoticethatinFrameRelaytherearenofurther
hintsaboutcongestion,e.g.noindicationonhowfarthesendershouldgodown,sothereactionpointmay
onlyimplementapreprogrammedresponse.Therearenumerousotherimplementationofexplicitcongestion
notification,suchasonesusedinATMorDataCenterbridging,ormorewellknownTCPECN.Those,
however,areoutofthescopeofthisblogpost.WewillmainlyconsidertheFrameRelayBECNsandinbuilt
TCPcongestionresponse.
WhatisthedifferencebetweenTcintrafficshapinginpolicing
ThevalueofTcisoftenusedintrafficshapingcalculating.However,themeaningandtheuseoftheshaping
timeintervalisdifferentfrompolicingTc.Whentrafficismetered,Tcdefinesthelengthofslidingwindowover
atimeaxisthatiseffectivelyusedtofindtheaveragetrafficrate.Withtrafficshaping,Tcdefinestheperiodic
schedulingintervaltobeusedwhenemittingtrafficburstsbytheshapersleakybucketalgorithm.Whenyou
matchshapingsettingsagainsttheingresspolicing,youneedtomakesurethatshapingTcdoesnotexceed
theconfiguredpolicingTcotherwise,theshapermayproduceburststhatarealwaysrejectedbythepolicer.
ThesamelogicappliestotheBeburstvaluesusedintrafficshapingandpolicing.Thereisasubstantial
differenceinCiscoIOSimplementation.Fortrafficshaping,sBc+sBeisthemaximumamountofbitsyoucan
sendduringasingleinterval.ThiscumulativeburstwillbecomparedtoeitherpolicingpBcvalueorpolicing
pBevalueindependently,whenusingingressMQCpolicing.Therefore,youneedtomakesurethat
pBe>=sBc+sBe,ortheexcessiveburstmayberejectedbythepolicer.Finally,noticethatifshapingBeisset
toavalueabove(ARCIR)*TcitwilltakemorethansingleTcintervaltoschedulesendingofexcessivetraffic.
Effectively,duringasingleTcintervalashapercannotsendmorethanAR*Tcbits,whichmeansthe
maximumexcessiveburstvalueis(ARCIR)*TcduringasingleTc.SettingBeoverthisvaluewillresultin
excessiveburstingsplitacrossmultipleschedulingintervals.
ImplementingSingleRateTrafficContractsinCiscoIOS
WellbeusingFrameRelayastheSPaccesstechnologyforourexamples.Letsassumethatwehavea
trafficcontractforCIR=256KbpsandanormalburstsizeofBc=25600bits.Thecontractshouldbe
implementedonaT1connectionwithabitrateof1544000bps.Thesevaluestranslateinpolicingaveraging
intervalofTc=25600/256000=100ms(1/10ofsecond).Thecontactneedstobeenforcedoncustomerside
usingtrafficshapingwithaTcvalue<=100mstobeadmittedbySP.Let'salsoassumethattheSPagreesto
allowexcessiveburstingtocompensateforasingleidleTcinterval.Thefinalvaluesbecomeswilllookas
following(noticethatpolicingvaluesaregiveninbytes,tomatchCiscoIOSsyntax).
Shaping:
CIR=256000bps
Bc=25600bits

Be=Bc=25600bits.
Policing:
CIR=256000bps
Bc=3200bytes
Be=6400bytes(toallowadmissionofshapingBc+Be)

LookathowthispolicycouldbeimplementedoncustomersideusinglegacyFrameRelayTrafficShaping:
mapclassframerelaySHAPE_256K
framerelaycir256000
framerelaybc25600
framerelaybe25600
framerelaymincir256000
!
interfaceSerial0/0/0
framerelaytrafficshaping
!
interfaceSerial0/0/0.1
framerelayinterfacedlci101
classSHAPE_256K

NoticethatwesetMinCIRvalueintheFRTSmapclasstothesamevalueasCIRtoensurethatpotential
QoSpolicywoulduseproperabsolutebandwidthvalues.HereishowaningressSPpolicywouldlooklikeif
MQCtrafficpolicingisused:
classmapDLCI_101
matchfrdlci101
!
policymapPOLICE_INTERFACE
classDLCI_101
policecir256000bc3200be6400
conformactiontransmit
exceedactionsetfrdetransmit
violateactiondrop
!
interfaceSerial0/0/0
servicepolicyinputPOLICE_INTERACE

NoticetheuseofMQCsyntaxandclassmapmatchingFRDLCI.CiscoIOSsupportsfeatureknownas
FrameRelayTrafficPolicing(FRTP)thatcouldbeusedtoimplementthesamefunctionsusingthe"legacy"
mapclasssyntax,buttheuseofMQCismorecommonnowadays.Howwouldtheshapingimplementation
lookifwewereusingMQCfortrafficshaping?
policymapSHAPE_256K
classclassdefault
shapeaverage2560002560025600
!
mapclassframerelaySHAPE_256K
servicepolicyoutputSHAPE_256K
!
interfaceSerial0/0/0.1
framerelayinterfacedlci101
classSHAPE_256K

IfyouarelookingformoreinformationonFRTSflavors,takealookatthefollowingblogpost:Thefourflavors
ofFrameRelayTrafficShaping
ImplementingDualRateTrafficContractsinCiscoIOS
Let'stakethetrafficcontractfrompreviousexamplewithCIR=256KbpsandAR=1544Kbpsandnormalburst
sizeof25600bits.Next,addPIR=512KbpstothesevaluesalongwithBe=51200.Makeaquicklistof
shaping/policingvalues:
Shaping:
minCIR=256000bps
CIR=512000bps
Bc=51200bits
Be=0bits.

Policing:
CIR=256000bps
PIR=512000bps
Bc=3200bytes
Be=6400bytes

Payspecialattentiontotheshapingparameters.Firstofall,Be=0,whichmeanssporadicsendingof
excessivetrafficburstsisdisabled.Secondly,theCIRissetto512Kbps,orinotherwordstotheSP'sPeak
Rate.Thismeansthecustomerisallowedtosendattherateof512Kbpsatanytime.TheminCIRissetto
256Kbps,meaningthecustomerwillthrottledowntocontractedCIRuponreceptionofBECNs(if
configured).TheBcsizecorrespondstothepolicingBesizeincaseofcongestion,theshaperwill
automaticallyshrinktheburstsizedowntothevaluematchingtheCIR.HereishowalegacyFRTS
configurationwouldlookoncustomerside:
mapclassframerelaySHAPE_256K
framerelaycir512000
framerelaybc51200
framerelaybe0
framerelaymincir256000
framerelayadaptiveshapingbecn
!
interfaceSerial0/0/0
framerelaytrafficshaping
!
interfaceSerial0/0/0.1
framerelayinterfacedlci101
classSHAPE_256K

Onceagain,noticethatshapingCIRequalstheSP'sPIRandshapingminCIRcorrespondstotheactualSP
CIR.Alsonoticethatadaptiveshapingisnowenabledunderthemapclasstoallowdynamicresponseto
BECNmessages.TheSPsideconfigurationwouldlookasfollowing,usingMQCsyntax:
classmapDLCI_101
matchfrdlci101
!
policymapPOLICE_INTERFACE
classDLCI_101
policecir256000bc3200pir512000be6400
conformactiontransmit
exceedactionsetfrdetransmit
violateactiondrop
!
interfaceSerial0/0/0
servicepolicyinputPOLICE_INTERACE

Whichlooksverysimilartothesinglerateexample,justnowPIRisexplicitlyconfigured.Finally,let'sseehow
theshapingconfigurationwouldlooklikewhenusingMQCsyntax:
policymapSHAPE_256K
classclassdefault
shapeaverage512000512000
shapeadaptive256000
!
mapclassframerelaySHAPE_256K
servicepolicyoutputSHAPE_256K
!
interfaceSerial0/0/0.1
framerelayinterfacedlci101
classSHAPE_256K

NoticetheuseofadaptiveshapinginMQCsyntax.Thiscommandwillonlyworkifyouapplyshapingusing
themapclassmodel,andwon'tworkifyousimplyapplyapolicytointerface.Itisalsopossibletorewritethe
shapingconfigurationusingthe"shapepeak"command(seemoreaboutthiscommandintheblogposttitled
Understandingthe"shapepeak"command:
policymapSHAPE_256K
classclassdefault
shapepeak2560002560025600
shapeadaptive256000
!
mapclassframerelaySHAPE_256K
servicepolicyoutputSHAPE_256K

!
interfaceSerial0/0/0.1
framerelayinterfacedlci101
classSHAPE_256K

UsingthissyntaxallowsforclearlyshowingtheBcandBeportionsofthetrafficcontract,eventhoughthe
resultwillbethesameasifusingthe"shapeaverage"command.
Summary
Thisblogpostillustratedthetwomostcommonlyusedtypesoftrafficcontractsintheirbasicformsand
explainedtheconceptsofvariousburstsusedinthespecification.Furthermore,therearesomeexamplesof
enforcingthetrafficcontractsonbothcustomerandSPsides.
Tags:ccieqos,framerelaytrafficshaping,srTCM,trafficcontract,trafficpolicing,trTCM
DownloadthispageasaPDF

AboutPetrLapukhov,4xCCIE/CCDE:

PetrLapukhov'scareerinITbegainin1988withafocusoncomputerprogramming,andprogressedinto
networkingwithhisfirstexposuretoNovellNetWarein1991.InitiallyinvolvedwithKazanStateUniversity's
campusnetworksupportandUNIXsystemadministration,hewentthroughthepathofbecominganetworking
consultant,takingpartinmanynetworkdeploymentprojects.Petrcurrentlyhasover12yearsofexperience
workingintheCisconetworkingfield,andistheonlypersonintheworldtohaveobtainedfourCCIEsinunder
twoyears,passingeachonhisfirstattempt.Petrisanexceptionalcaseinthathehasbeenworkingwithallof
thetechnologiescoveredinhisfourCCIEtracks(R&S,Security,SP,andVoice)onadailybasisformany
years.Whennotactivelyteachingclasses,developingselfpacedproducts,studyingfortheCCDEPractical&
theCCIEStorageLabExam,andcompletinghisPhDinAppliedMathematics.
FindallpostsbyPetrLapukhov,4xCCIE/CCDE|VisitWebsite

Youcanleavearesponse,ortrackbackfromyourownsite.

21ResponsestoUnderstandingSingleRateandDualRateTrafficPolicing

1.

Ashsays:
May22,2011at6:22am
Perfect!!!
Reply

2.

Ashsays:
May22,2011at6:23am
Wasextremelyhelpful.
Reply

3.

TiFFolksays:
May22,2011at6:54am
Nicetopic,Petr!Happytoseenewtechpostsonthisblog
DoyouhaveanyplanstocontinueBGPtopic?Asyousaid:

We
didntnotconcentrateonthedetailedmechanicsofBGPfastpeeringsessiondeactivatione.g.formultihop
sessionsandwedidnotcovertheMP
BGPspecificfeatures.SomeMP

BGPextensionssuchastheadditional
importscanintervalandedgecontrolplaneinterworkinghavetheireffectsonend
to

endconvergence,butthisis
atopicforanotherdiscussion.
Reply
PetrLapukhov,4xCCIE/CCDEsays:
May22,2011at9:38am
Absolutely,ImworkingonapostdedicatedtoBGPmeshdesignsandfastconvergence
Reply
4.

Waynesays:
May22,2011at7:18am
Petr,
IntrTCMyouhaveS1andS2,andS.Canyoupleaseclarifytheirdefinition?
Reply
PetrLapukhov,4xCCIE/CCDEsays:
May22,2011at9:49am
Wayne,S1andS2aretheamountsoftokensaddedtoeachbucketduringeveryreplenishinterval
Ti.Ideally,asingletokenshouldbeaddedevery1/CIRmsintervaltoCBSbucket,butitsnot
possibletosethardwaretimesupportanyresolutionfortokenbucketalgorithm.Therefore,thetoken
bucketschedulernormallyrunseveryTimsandCIR*TitokensareaddedtoCBSbucketwhile
PIR*TitotheEBSbucket(fordualratepolicing).Itisalsopossibletoimplementtokenbucket
differently,butusingfixedtimerensuresthatcomputationcomplexityiskeptthesame,regardlessof
thepacketrate.
Reply

5.

DeepakArorasays:
May22,2011at10:46pm
AnyplansforredoingCCIPQOSclassordoinganewCCIEQOSDeevDiveclass?
Reply
BrianMcGahan,CCIE#8593says:
May23,2011at9:08am
@DeepakYestoboth.
Reply

6.

Mattsays:
May24,2011at7:01am
HiPetr,
Nicearticle,howeverthereisonethingthatisnotcleartome:inthecaseoftheSingleRateTraffic
Contracts,whyshouldthepBeequalssBc+sBe?YouwroteabovethatduringaTc,thepolicerwilllet
throughpBc+pBesoIamconfusedastowhypBecantbeequaltojustsBe?
Thanks,
Matt

Reply
PetrLapukhov,4xCCIE/CCDEsays:
May24,2011at12:13pm
Matt,IthinkImighthavemadeamistakethere.Atanygiventime,thepolicercomparescurrent
burstwith*either*Bc*or*Bethatswhatdisplayedonthediagram.Therefore,thepolicerBe
shouldbeatleastaslargeasthetotalamountofbitemittedbytheshaper,whichcouldbeashigh
assBc+sBe(or,tobemoreaccurate,itsasmuchasAR*Tc).
Reply
Mattsays:
May25,2011at1:48am
Well,lookingattheformulainthediagram(andrackingmybrainonit!),aslongasCBSisbig
enough,thenwearentgoingtodecrementEBS.OnlyonceCBSistoolowwillwedecrement
EBS.SowearereallygoingtoletthroughCBS+EBS,no?
LookingatciscosdocumentationthatalsothewayIunderstandit.
http://www.cisco.com/en/US/docs/ios/qos/command/reference/qos_n1.html#wp1060117
Reply
Turgaysays:
June9,2011at9:50pm
ThankYouforreplyonmypreviousquestion.
ButIhavethesamequestionasMatt.IagreethatpolicerBeshouldbeaboveorequalthensBc
+sBeinthecaseofdualratecontract.Butinmyopinionthisistrueforsinglerateonlyifwe
considertheburstasindivisible.IftheburstconsistsofseveralframespolicersBeshouldbe
aboveorequalsBe.
Reply
7.

Turgaysays:
May26,2011at11:28pm
HelloPetr,
Idontunderstandoneissuewithpolicingandshaping.
WhataCiscodevicewoulddoifitreceivespacketwhosesizeisgreaterthanallowedburst?For
example,
CIR=128000bps
Bc=1280bits=160bytes
Be=0
Ifshaperneedssendapacketof1500bytesitwillneveraccumulaterequiredquantityoftokens.Sothe
packetisntschedulefromqueueforever.
Reply
PetrLapukhov,4xCCIE/CCDEsays:
May27,2011at10:48am
Inshort,theshaper/policerburstshouldalwaysbeabovemaximumpacketsize.Normally,thisis
basedoncommonMTU,butkeepinmindthatIPpacketcouldbeaslargeas64Kbytes,
theoretically.WhileshaperwillstillemitpacketseveniftheBc<MTU(therearecertain
approximations)thepolicerwillnotadmitasinglepacketiftheBc<MTU.
Reply

8.

Alsays:
February21,2012at5:44am

Withregardstodualrate3colorpolicers,Idontunderstandthebelow:
ThevaluesforBcandBeshouldbeselectedtobenolessthanRTT*CIRandRTT*PIRrespectively,to
allowforefficientTCPperformanceendtoend.
WhatistheconsequenceofhavingBc<RTT*CIR?
Also,greatarticle,thankyou!
Regards,
Al
Reply
9.

Babaksays:
March18,2012at11:15am
SorryanotherquestionjustpoppedupandIthinkthisisbecauseIamtryingtograsptheconceptso
hard.Thisisaverybasicquestionthatstemsfrommyconfusion:
Theconceptbehindpolicingistokeepthebitrateatanaverageconstantanddroporremarktheexcess.
Nowifwewanttoconfigureapolicerateofforexample64Kbps,wedefinetlyhavetospecifytheBcin
ordertoreachthatrate.AmIcorrect?Inotherwords,weneedtospecifytheBctobe1secondworthof
trafficconvertedtobytesor64000/8=8000Bytes.Isthiscorrect?
NowwhathappenswhenwedonotspecifytheBcinthepolicecommand?IassumethattheIOSdefault
istosettheBctooneforthofthepolicerate.Forexampleifpolicerate=64000KbpsthentheIOS
defaultistosettheBCaccordingtothefollowingformula:
BCdefault=64000/(4*8)=2000Bytes
Doesthismeanthatouractualpolicerateis64000/4=16Kbps?
Thanksagainforansweringthesequestions.
Reply
VinothKumarsays:
February20,2013at8:41pm
@Babak,
Ihadasimilarquestion.Didyoufindanyanswersfortheoneyoupostedlastyear.Ihavea
customerforwhomwehaveconfigured8MbpsonthePEasingresspolicer.Theyleftthedecision
onIOSanditselectedabcas250000whichis2MegaBitsperintervalwith4intervalsfor1second.
NowmyquestionisiftheIOSwouldworktoreach8Mbpsoveronesecondorwouldhave
challenges.
Vinoth
Reply

10.

Thomassays:
November21,2012at3:33pm
Youseemtohaveatypoinoneofthediagrams.ItsaysSize1=Size1S.IthinkyoumeanEBS=EBS
S.
IbloggedaboutthisbackinJanuaryof2010becausetheInternetseemedtobemissingarticlesabout
thatwereactually*accurate*:
http://blog.habets.pp.se/2010/01/ShapingandpolicingonCisco
YourblogposthereseemstoalsoaddsanitytothefieldofQoS,butIexpectnothinglessfromyouPetr.

Reply
11.

AndresCervantessays:
May22,2013at9:58am
IhavenotbeenabletoundestoodwhyusingthenewMQCmodelBechangesfrom25600bitsto
6400bytes.
Be=6400bytes(toallowadmissionofshapingBc+Be)
Howdidyoucameupwiththismumberpleaseexplainme.
Reply

12.

AndresCervantessays:
May22,2013at10:12am
FromwhatIunderstoodtheBebucketgetfillwithtokensthatoverflowtheBCbucket,thenifIdonot
haveinformationtosendduringaTcatmynextTcIwillbeabletospillthetokenstotheBebucketbut
fromyourexampleBeitsonly6400bytesthenIwillneverbeabletorecoveroneTcthatasforthe
exampletheprovideragreetocompensateforidletimes.
ThenBeshouldbeequaltoBcevenifyouusethenewformatthatistheonlywayIwillbeableto
recoveryafulltimeslotafteridletime.
Reply

13.

Jeysays:
May28,2013at9:21am
HiPetr
Idounderstandhowshapingandpolicingworks,howeverIamindoubtaboutsomethingwhengiven2
timeintervals,letssay400msforCIRandNormalburstandthenPIRBetimeintervalsetto200ms.
Itisalmostliketask10.26inWorkbook1.
IunderstandtheBeiscalculatedfromthePIRvaluebutalsoreadthatwhenyoudoatworatepolicer
thatitequals2*Bc.
Couldyouexplainthis?
Reply

LeaveaReply
Name(required)
Mail(willnotbepublished)(required)

SubmitComment

Search
Search

Submit

Categories
SelectCategory

CCIEBloggers
BrianDennis,CCIEx5#2210
Routing&Switching
Voice
Security
ServiceProvider
ISPDial
BrianMcGahan,CCIEx4#8593,CCDE#2013::13
Design
DataCenter
Routing&Switching
Security
ServiceProvider
MarkSnow,CCIEx4#14073
DataCenter
Collaboration
Security
Voice
PetrLapukhov,CCIEx4#16379,CCDE#2010::7
Design
Routing&Switching
Security
ServiceProvider
Voice

PopularPosts
Nopoststodisplay

twitter.com/ine
Follow
2011INE,Inc.,AllRightsReserved