📄 qos.tex
字号:
\subsubsection{Introduction}Asterisk support different QoS settings on application level on various protocolon any of signaling and media. Type of Service (TOS) byte can be set onoutgoing IP packets for various protocols. The TOS byte is used by the networkto provide some level of Quality of Service (QoS) even if the network iscongested with other traffic.Also asterisk running on Linux can set 802.1p CoS marks in VLAN packets for allused VoIP protocols. It is useful when you are working in switched environment.In fact asterisk only set priority for Linux socket. For mapping this priorityand VLAN CoS mark you need to use this command:\begin{verbatim}vconfig set_egress_map [vlan-device] [skb-priority] [vlan-qos]\end{verbatim}In table behind shown all voice channels and other modules of asterisk, thatsupport QoS settings for network traffic and type of traffic which can haveQoS settings.\begin{verbatim} Channel Drivers+==============+===========+=====+=====+=====+| | Signaling |Audio|Video| Text|+==============+===========+=====+=====+=====+|chan_sip | + | + | + | + ||--------------+-----------+-----+-----+-----+|chan_skinny | + | + | + | ||--------------+-----------+-----+-----+-----+|chan_mgcp | + | + | | ||--------------+-----------+-----+-----+-----+|chan_unistim | + | + | | ||--------------+-----------+-----+-----+-----+|chan_h323 | | + | | ||--------------+-----------+-----+-----+-----+|chan_iax2 | + |+==============+=============================+ Other+==============+=============================+| dundi.conf | + (tos setting) ||--------------+-----------------------------+| iaxprov.conf | + (tos setting) |+==============+=============================+\end{verbatim}\subsubsection{IP TOS values}The allowable values for any of the tos* parameters are: CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43 and ef (expedited forwarding),The tos* parameters also take numeric values.Note, that on Linux system you can use ef value in case your asterisk is runningfrom a user other then root only when you have compiled asterisk with libcap.The lowdelay, throughput, reliability, mincost, and none values are removedin current releases.\subsubsection{802.1p CoS values}As far as 802.1p uses 3 bites from VLAN header, there are parameter can takeinteger values from 0 to 7.\subsubsection{Recommended values}Recommended values shown above and also included in sample configuration files:\begin{verbatim}+============+=========+======+| | tos | cos |+============+=========+======+|Signaling | cs3 | 3 ||Audio | ef | 5 ||Video | af41 | 4 ||Text | af41 | 3 ||Other | ef | |+============+=========+======+\end{verbatim}\subsubsection{IAX2}In iax.conf, there is a "tos" parameter that sets the global default TOSfor IAX packets generated by chan\_iax2. Since IAX connections combinesignalling, audio, and video into one UDP stream, it is not possibleto set the TOS separately for the different types of traffic.In iaxprov.conf, there is a "tos" parameter that tells the IAXy what TOSto set on packets it generates. As with the parameter in iax.conf,IAX packets generated by an IAXy cannot have different TOS settingsbased upon the type of packet. However different IAXy devices canhave different TOS settings.\subsubsection{SIP}In sip.conf, there are three parameters that control the TOS settings:"tos\_sip", "tos\_audio", "tos\_video" and "tos\_text". tos\_sip controlswhat TOS SIP call signaling packets are set to. tos\_audio, tos\_videoand tos\_text controls what TOS RTP audio, video or text accordinglypackets are set to.There are four parameters to control 802.1p CoS: "cos\_sip", "cos\_audio","cos\_video" and "cos\_text". It behavior the same as written above.\subsubsection{Other RTP channels}chan\_mgcp, chan\_h323, chan\_skinny and chan\_unistim also support TOS andCoS via setting tos and cos parameters in correspond to module config files. Naming style and behavior same as for chan\_sip.\subsubsection{Reference}IEEE 802.1Q Standard:\url{http://standards.ieee.org/getieee802/download/802.1Q-1998.pdf}Related protocols: IEEE 802.3, 802.2, 802.1D, 802.1QRFC 2474 - "Definition of the Differentiated Services Field(DS field) in the IPv4 and IPv6 Headers", Nichols, K., et al,December 1998.IANA Assignments, DSCP registryDifferentiated Services Field Codepoints\url{http://www.iana.org/assignments/dscp-registry}To get the most out of setting the TOS on packets generated byAsterisk, you will need to ensure that your network handles packetswith a TOS properly. For Cisco devices, see the previously mentioned"Enterprise QoS Solution Reference Network Design Guide". For Linuxsystems see the "Linux Advanced Routing \& Traffic Control HOWTO" at \url{http://www.lartc.org/}.For more information on Quality ofService for VoIP networks see the "Enterprise QoS Solution ReferenceNetwork Design Guide" version 3.3 from Cisco at:\url{http://www.cisco.com/application/pdf/en/us/guest/netsol/ns432/c649/ccmigration\_09186a008049b062.pdf}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -