@ -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.
\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),
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.
The tos* parameters also take numeric values.
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.
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 { MGCP}
Also support TOS and CoS.
\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.
The lowdelay, throughput, reliability, mincost, and none values are
removed in current releases.
\subsubsection { SIP}
\subsubsection { 802.1p CoS values}
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.
As 802.1p uses 3 bites from VLAN header, there are parameter can take
integer values from 0 to 7.
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}
\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}