Overview
Enterasys B5 CLI Reference 24-3
Packet Flow Sampling
ThepacketflowsamplingmechanismcarriedoutbyeachsFlowInstanceensuresthatanypacket
observedataDataSourcehasanequalchanceofbeingsampled,irrespectiveofthepacketflow(s)
towhichitbelongs.
Packetflowsamplingisaccomplishedasfollows:
1. Whenapacketarrivesonaninterface,the
NetworkDevicemakesafilteringdecisionto
determinewhetherthepacketshouldbedropped.
2. Ifthepacketisnotfiltered(dropped),adestinationinterfaceisassignedbytheswitching/
routingfunction.
3. Atthispoint,adecisionismadeonwhetherornottosamplethepacket.Themechanism
involvesacounter
thatisdecrementedwitheachpacket.Whenthecounterreacheszeroa
sampleistaken.
4. Whenasampleistaken,thecounterindicatinghowmanypacketstoskipbeforetakingthe
nextsampleisreset.Thevalueofthecounterissettoarandomintegerwherethesequenceof
random
integersusedovertime istheSamplingRate.
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. WhenaPacketFlow Sampleisgenerated,thesFlowAgentexaminesthelistofcounter
sourcesandaddscounterstothesampledatagram,leastrecentlysampledfirst.
Countersareonlyaddedtothedatagramifthesourcesarewithinashortperiod,5seconds
say,offailingtomeetthe
requiredsamplinginterval.
3. Periodically,sayeverysecond,thesFlowAgentexaminesthelistofcountersourcesandsends
anycountersthatneedtobesenttomeetthesamplingintervalrequirement.
ThesetofcountersisafixedsetdefinedinSection5ofthedocumententitled“sFlowVersion5”
available
fromsFlow.org(http://www.sflow.org).
Usage Notes
sFlowisdisabledbydefault,andthereforemustbemanuallyenabled.
Althoughtheswitchhardwarehasthecapabilitytosamplepacketsonanyport,toensurethat
CPUutilitizationisnotcompromised,thenumberofsFlowsamplersthatcanbeconfiguredper
switchorstackofswitchesislimitedtoa
maximumof32.Thereisnolimitationonthenumberof
pollersthatcanbeconfigured.
Undercertaincircumstances,theswitchwilldroppacketsamplesthatthesFlowimplementation
isnotabletocountandthereforecannotcorrectlyreportsample_poolanddropsfieldsofflow