mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
HUGE improvements to QoS/CoS handling by IgorG
- Refer to the proper documentation - Implement separate signalling/media QoS/CoS in many channels using RTP - Improve warnings and verbose messages - Deprecate some old settings Minor modifications by me, a big effort from IgorG. Thanks! Reported by: IgorG Patches: qoscleanup-89394-4-trunk.patch uploaded by IgorG (license 20) Tested by: IgorG (closes issue #11145) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
151
doc/tex/qos.tex
151
doc/tex/qos.tex
@@ -1,31 +1,85 @@
|
||||
\subsubsection{Introduction}
|
||||
|
||||
Asterisk can set the Type of Service (TOS) byte on outgoing IP packets
|
||||
for various protocols. The TOS byte is used by the network to provide
|
||||
some level of Quality of Service (QoS) even if the network is
|
||||
congested with other traffic.
|
||||
Asterisk support different QoS settings on application level on various protocol
|
||||
on any of signaling and media. Type of Service (TOS) byte can be set on
|
||||
outgoing IP packets for various protocols. The TOS byte is used by the network
|
||||
to provide some level of Quality of Service (QoS) even if the network is
|
||||
congested with other traffic.
|
||||
|
||||
Also asterisk running on Linux can set 802.1p CoS marks in VLAN packets
|
||||
for all used VoIP protocols. It is useful when you are working in switched
|
||||
enviropment. For maping skb-$>$priority and VLAN CoS mark you need to use
|
||||
command "vconfig set\_egress\_map [vlan-device] [skb-priority] [vlan-qos]".
|
||||
Also asterisk running on Linux can set 802.1p CoS marks in VLAN packets for all
|
||||
used VoIP protocols. It is useful when you are working in switched environment.
|
||||
In fact asterisk only set priority for Linux socket. For mapping this priority
|
||||
and VLAN CoS mark you need to use this command:
|
||||
|
||||
\subsubsection{SIP}
|
||||
\begin{verbatim}
|
||||
vconfig set_egress_map [vlan-device] [skb-priority] [vlan-qos]
|
||||
\end{verbatim}
|
||||
|
||||
In sip.conf, there are three parameters that control the TOS settings:
|
||||
"tos\_sip", "tos\_audio" and "tos\_video". tos\_sip controls what TOS SIP
|
||||
call signalling packets are set to. tos\_audio controls what TOS RTP audio
|
||||
packets are set to. tos\_video controls what TOS RTP video packets are
|
||||
set to.
|
||||
In table behind shown all voice channels and other modules of asterisk, that
|
||||
support QoS settings for network traffic and type of traffic which can have
|
||||
QoS settings.
|
||||
|
||||
There are four parameters to control 802.1p CoS: "cos\_sip", "cos\_audio",
|
||||
"cos\_video" and "cos\_text". It's behavior the same as writen above.
|
||||
\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}
|
||||
|
||||
There is a "tos" parameter that is supported for backwards
|
||||
compatibility. The tos parameter should be avoided in sip.conf
|
||||
because it sets all three tos settings in sip.conf to the same value.
|
||||
|
||||
\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 not use ef value if your asterisk running
|
||||
from user other then root.
|
||||
|
||||
The lowdelay, throughput, reliability, mincost, and none values are removed
|
||||
in current releases.
|
||||
|
||||
\subsubsection{802.1p CoS values}
|
||||
|
||||
As far as 802.1p uses 3 bites from VLAN header, there are parameter can take
|
||||
integer 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 TOS
|
||||
for IAX packets generated by chan\_iax2. Since IAX connections combine
|
||||
signalling, audio, and video into one UDP stream, it is not possible
|
||||
@@ -37,56 +91,22 @@ IAX packets generated by an IAXy cannot have different TOS settings
|
||||
based upon the type of packet. However different IAXy devices can
|
||||
have different TOS settings.
|
||||
|
||||
\subsubsection{H.323}
|
||||
Also support TOS and CoS.
|
||||
\subsubsection{SIP}
|
||||
|
||||
\subsubsection{MGCP}
|
||||
Also support TOS and CoS.
|
||||
In sip.conf, there are three parameters that control the TOS settings:
|
||||
"tos\_sip", "tos\_audio", "tos\_video" and "tos\_text". tos\_sip controls
|
||||
what TOS SIP call signaling packets are set to. tos\_audio, tos\_video
|
||||
and tos\_text controls what TOS RTP audio, video or text accordingly
|
||||
packets are set to.
|
||||
|
||||
\subsubsection{IP TOS values}
|
||||
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.
|
||||
|
||||
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),
|
||||
\subsubsection{Other RTP channels}
|
||||
|
||||
The tos* parameters also take numeric values.
|
||||
|
||||
The lowdelay, throughput, reliability, mincost, and none values are
|
||||
removed in current releases.
|
||||
|
||||
\subsubsection{802.1p CoS values}
|
||||
|
||||
As 802.1p uses 3 bites from VLAN header, there are parameter can take
|
||||
integer values from 0 to 7.
|
||||
|
||||
|
||||
\begin{verbatim}
|
||||
+==============+============+==============+
|
||||
|Configuration | Parameter | Recommended |
|
||||
|File | Setting | |
|
||||
+--------------+------------+--------------+
|
||||
| | tos_sip | cs3 |
|
||||
| | tos_audio | ef |
|
||||
| | tos_video | af41 |
|
||||
| sip.conf | tos_text | af41 |
|
||||
| | cos_sip | 4 |
|
||||
| | cos_audio | 6 |
|
||||
| | cos_video | 5 |
|
||||
| | cos_text | 0 |
|
||||
+--------------+------------+--------------+
|
||||
| iax.conf | tos | ef |
|
||||
| | cos | 6 |
|
||||
+--------------+------------+--------------+
|
||||
| iaxprov.conf | tos | ef |
|
||||
+--------------+------------+--------------+
|
||||
| mgcp.conf | tos | ef |
|
||||
| | cos | 6 |
|
||||
+--------------+------------+--------------+
|
||||
| h323.conf | tos | ef |
|
||||
| | cos | 6 |
|
||||
+==============+============+==============+
|
||||
\end{verbatim}
|
||||
chan\_mgcp, chan\_h323, chan\_skinny and chan\_unistim also support TOS and
|
||||
CoS via setting tos and cos parameters in correspond to module config
|
||||
files. Naming style and behavior same as for chan\_sip.
|
||||
|
||||
\subsubsection{Reference}
|
||||
|
||||
@@ -113,4 +133,3 @@ For more information on Quality of
|
||||
Service for VoIP networks see the "Enterprise QoS Solution Reference
|
||||
Network Design Guide" version 3.3 from Cisco at:
|
||||
\url{http://www.cisco.com/application/pdf/en/us/guest/netsol/ns432/c649/ccmigration\_09186a008049b062.pdf}
|
||||
|
||||
|
Reference in New Issue
Block a user