Switch User Manual
Overview sFlow Configuration
SecureStack C3 Configuration Guide 28-3
Packet Flow Sampling
ThepacketflowsamplingmechanismcarriedoutbyeachsFlowInstanceensuresthatanypacket
observedataDataSourcehasanequalchanceofbeingsampled,irrespectiveofthepacketflow(s)
towhichitbelongs.
Packetflowsamplingisaccomplishedasfollows:
1. Whenapacketarrivesonaninterface,the
NetworkDevicemakesafilteringdecisionto
determinewhetherthepacketshouldbedropped.
2. Ifthepacketisnotfiltered(dropped),adest inationinterfaceisassignedbytheswitching/
routingfunction.
3. Atthispoint,adecisionismadeonwhetherornottosamplethepacket.Themechanism
involvesa counter
thatisdecrementedwitheachpacket.Whenthecounterreacheszeroa
sampleistaken.
4. Whenasampleistaken,thecounterindicatinghowmany packetstoskipbeforetakingthe
nextsampleisreset.Thevalueofthecounterissettoarandomintegerwherethesequenceof
random
integersusedovertimeistheSamplingRate.
PacketflowsamplingresultsinthegenerationofPacketFlowRecords.APacketFlowRecord
containsinformationabouttheattributesofapacketflow, including:
• Informationonthepacketitself—apacketheader,packetlength,andpacketencapsulation.
• Informationaboutthepaththe
packettookthroughthedevice,includinginformationrelating
totheselectionoftheforwardingpath.
Counter Sampling
Theprimaryobjectiveofthecountersamplingisto,inanefficientway,periodicallyexport
countersassociatedwithDataSources.AmaximumsamplingintervalisassignedtoeachsFlow
InstanceassociatedwithaDataSource.
Countersamplingisaccomplishedasfollows:
1. ThesFlowAgentkeepalistofcountersourcesbeing
sampled.
2. WhenaPacketFl owSampleisgenerated,thesFlowAgentexaminesthelistofcounter
sourcesandaddscounterstothesampledatagram, leastrecentlysampledfirst.
Countersareonlyaddedtothedatagramifthesourcesarewithinashortperiod,5seconds
say,offailingtomeetthe
requiredsamplinginterval.
3. Periodically,sayeverysecond,thesFlowAgentexaminesthelistofcountersourcesandsends
anycountersthatneedtobesenttomeetthesamplingintervalrequirement.
ThesetofcountersisafixedsetdefinedinSection5ofthedocumententitled“sFlowVersion5”
available
fromsFlow.org(http://www.sflow.org).
Usage Notes
Althoughtheswitchhardwarehasthecapabilitytosamplepacketsonanyport,toensurethat
CPUutilitizationisnotcompromised,thenumberofsFlowsamplersthatcanbeconfiguredper
switchorstackofswitchesislimitedtoamaximumof32.Thereisnolimitationonthenumberof
pollersthatcanbeconfigured.
Undercertaincircumstances,theswitchwilldroppacketsamplesthatthesFlowim plementation
isnotabletocountandthereforecannotcorrectlyreportsample_poolanddropsfieldsofflow
samplessenttothesFlowCollector.Underheavyload,thissamplelosscouldbesignificantand
couldthereforeaffecttheaccuracyofthesamplinganalysis.