View
224
Download
0
Category
Preview:
DESCRIPTION
IP Quality of Service - Asterisk Project
Citation preview
27/7/2015 IPQualityofServiceAsteriskProjectAsteriskProjectWiki
https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service 1/3
CrparMalcolmDavenport,derniremodificationlejuil.08,2015
AsteriskProject / / GeneralConfigurationInformation
IP Quality of Service
IntroductionAsterisksupportsdifferentQoSsettingsattheapplicationlevelforvariousprotocolsonbothsignalingandmedia.TheTypeofService(TOS)bytecanbesetonoutgoingIPpacketsforvariousprotocols.TheTOSbyteisusedbythenetworktoprovidesomelevelofQualityofService(QoS)evenifthenetworkiscongestedwithothertraffic.
AsteriskrunningonLinuxcanalsoset802.1pCoSmarksinVLANpacketsfortheVoIPprotocolsituses.Thisisusefulwhenworkinginaswitchedenvironment.InfactAsteriskonlysetpriorityforLinuxsocket.FormappingthispriorityandVLANCoSmarkyouneedtousethiscommand:
ThetablebelowshowsallVoIPchanneldriversandotherAsteriskmodulesthatsupportQoSsettingsfornetworktraffic.Italsoshowsthetype(s)oftrafficforwhicheachmodulecansupportsettingQoSsettings:
Signaling Audio Video Text
chan_sip + + + +
chan_skinny + + +
chan_mgcp + +
chan_unistm + +
chan_h323 +
chan_iax2 +
chan_pjsip + + +
DUNDI +(tossetting)
IAXProv +(tossetting)
IPTOSvalues
Theallowablevaluesforanyofthetosparametersare:CS0,CS1,CS2,CS3,CS4,CS5,CS6,CS7,AF11,AF12,AF13,AF21,AF22,AF23,AF31,AF32,AF33,AF41,AF42,AF43andef(expeditedforwarding),*
Thetosparametersalsotakenumericvalues.*
NotethatonaLinuxsystem,AsteriskmustbecompiledwithlibcapinordertousetheeftossettingifAsteriskisnotrunasroot.
Thelowdelay,throughput,reliability,mincost,andnonevalueshavebeenremovedincurrentreleases.
ToSdecimalequivalencetable:
name decimalvalue
cs0 0
cs1 32
af11 40
af12 48
af13 56
cs2 64
af21 72
af22 80
af23 88
vconfigset_egress_map[vlandevice][skbpriority][vlanqos]
27/7/2015 IPQualityofServiceAsteriskProjectAsteriskProjectWiki
https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service 2/3
cs3 96
af31 104
af32 112
af33 120
cs4 128
af41 136
af42 144
af43 152
cs5 160
ef 184
cs6 192
cs7 224
802.1pCoSvalues
Because802.1puses3bitsoftheVLANheader,thisparametercantakeintegervaluesfrom0to7.
Recommendedvalues
Therecommendedvaluesshownbelowarealsoincludedinsampleconfigurationfiles:
tos cos
Signaling cs3 3
Audio ef 5
Video af41 4
Text af41 3
Other ef
IAX2
Iniax.conf,thereisa"tos"parameterthatsetstheglobaldefaultTOSforIAXpacketsgeneratedbychan_iax2.SinceIAXconnectionscombinesignalling,audio,andvideointooneUDPstream,itisnotpossibletosettheTOSseparatelyforthedifferenttypesoftraffic.
Iniaxprov.conf,thereisa"tos"parameterthattellstheIAXywhatTOStosetonpacketsitgenerates.Aswiththeparameteriniax.conf,IAXpacketsgeneratedbyanIAXycannothavedifferentTOSsettingsbaseduponthetypeofpacket.HoweverdifferentIAXydevicescanhavedifferentTOSsettings.
CHAN_SIP
Inchan_sip,therearefourparametersthatcontroltheTOSsettings:"tos_sip","tos_audio","tos_video"and"tos_text".tos_sipcontrolswhatTOSSIPcallsignalingpacketsaresetto.tos_audio,tos_videoandtos_textcontrolwhatTOSvaluesareusedforRTPaudio,video,andtextpackets,respectively.Therearefourparameterstocontrol802.1pCoS:"cos_sip","cos_audio","cos_video"and"cos_text".ThebehavioroftheseparametersisthesameasfortheSIPTOSsettingsdescribedabove.
CHAN_PJSIP
Inchan_pjsip,therearethreeparametersthatcontroltheTOSsettings:atosoptionforatype=transportthatcontrolstheTOSofSIPsignalingpackets,atos_audiooptionforatype=endpointthatcontrolstheTOSofRTPaudiopackets,andatos_videooptionforatype=endpointthatcontrolstheTOSofvideopackets.
Similarly,therearethereparametersthatcontrolthe802.1pCoSsettings:acosoptionforatype=transportthatcontrolsthe802.1pvalueforSIPsignalingpackets,acos_audiooptionforatype=endpointthatcontrolsthe802.1pvalueofRTPaudiopackets,and
27/7/2015 IPQualityofServiceAsteriskProjectAsteriskProjectWiki
https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service 3/3
acos_videooptionforatype=endpointthatcontrolsthe802.1pvalueforvideopackets.
OtherRTPchannels
chan_mgcp,chan_h323,chan_skinnyandchan_unistimalsosupportTOSandCoSviasettingtosandcosparametersintheircorrespondingconfigurationfiles.Namingstyleandbehaviorarethesameasforchan_sip.
Reference
IEEE802.1QStandard:http://standards.ieee.org/getieee802/download/802.1Q1998.pdfRelatedprotocols:IEEE802.3,802.2,802.1D,802.1Q
RFC2474"DefinitionoftheDifferentiatedServicesField(DSfield)intheIPv4andIPv6Headers",Nichols,K.,etal,December1998.
IANAAssignments,DSCPregistryDifferentiatedServicesFieldCodepointshttp://www.iana.org/assignments/dscpregistryTogetthemostoutofsettingtheTOSonpacketsgeneratedbyAsterisk,youwillneedtoensurethatyournetworkhandlespacketswithaTOSproperly.ForCiscodevices,seethepreviouslymentioned"EnterpriseQoSSolutionReferenceNetworkDesignGuide".ForLinuxsystemsseethe"LinuxAdvancedRouting&TrafficControlHOWTO"athttp://www.lartc.org/.FormoreinformationonQualityofServiceforVoIPnetworksseethe"EnterpriseQoSSolutionReferenceNetworkDesignGuide"version3.3fromCiscoat:http://www.cisco.com/application/pdf/en/us/guest/netsol/ns432/c649/ccmigration_09186a008049b062.pdf
Changestoachan_pjsiptype=transportrequireanAsteriskrestarttobeaffected.TheyarenotaffectedbysimplyreloadingAsterisk.
Recommended