File: ReadMe_QOS.txt

package info (click to toggle)
ptlib 2.10.11~dfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 52,260 kB
  • ctags: 18,682
  • sloc: cpp: 135,528; ansic: 8,092; yacc: 3,059; sh: 2,776; makefile: 1,083; lex: 390
file content (183 lines) | stat: -rw-r--r-- 6,189 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
 README
==========
==========


This document explains the revised QOS implementation for PTLIB and openh323.

============
Update 25.4.05:
802.1p/q is now supported natively however is disabled 
To enable set the Static PUDPSocket::disableQoS = PFalse;

QoS support is now negotiated between the calling parties
and will only functions when both parties have.
1. Enabled QoS within Openh323 (as above)
2. Window XP OS
3. Managed NIC with 802.1p enabled.(May have to Set Manually)

============

Contents:

1) Setting a QOS specification in openh323
2) Diffserv support
3) 802.1Q support
4) Windows 2000 issues
5) Windows XP and Server 2003 issues

1) Setting a QOS specification in openh323
==========================================

The basic approach is as follows:

****

RTP_QOS * rtpqos = new RTP_QOS;
rtpqos->dataQoS.SetWinServiceType(DWORD winServiceType);
rtpqos->dataQoS.SetAvgBytesPerSec(DWORD avgBytesPerSec);
rtpqos->dataQoS.SetMaxFrameBytes(DWORD maxFrameBytes);
rtpqos->dataQoS.SetPeakBytesPerSec(DWORD peakBytesPerSec);
rtpqos->dataQoS.SetDSCP(int DSCPvalue);

[If desired:
rtpqos->controlQoS.SetWinServiceType(...)
etc.]

H323Capability * cap = new xxxxx;
cap->AttachQoS(rtpqos);

SetCapability(....);

****

Notes:

i) winServiceType is either SERVICETYPE_GUARANTEED,
SERVICETYPE_CONTROLLEDLOAD, SERVICETYPE_BESTEFFORT, or
SERVICETYPE_PNOTSPECIFIED

ii) for Windows XP or Windows Server 2003, if setting aaaaa as
SERVICETYPE_GUARANTEED or SERVICETYPE_CONTROLLEDLOAD then avgBytesPerSec,
maxFrameBytes, and peakBytesPerSec MUST be set to appropriate values

iii) Calling SetDSCP(DSCPvalue) has no effect on Windows XP or Windows Server
2003 but on other platforms (earlier versions of Windows, and Linux) it will
set the DSCP directly. SetDSCP(-1) clears the effect of any previous call to
SetDSCP()

iv) on platforms other than WinXP or Windows Server 2003, if SetDSCP(...) is
not called but SetWinServiceType(...) is, then an appropriate DSCP
substitution will be made. The substitutions can be changed globally by
calling PQoS::SetDSCPAlternative(DWORD winServiceType, UINT DSCP)

v) if an RTP_QOS is not attached to a capability, the
H323Endpoint::rtpIpTypeofService will be used to set IP_TOS but this has no
effect on WinXP or Windows Server 2003 (and see below for notes relating to
Windows 2000)


2) Diffserv support
===================

Setting of DSCP on packets is supported for most Windows and Linux platforms.
The mechanism is platform-dependent:

Windows XP and Windows Server 2003:
-----------------------------------

Based on the parameters passed to PQoS::SetWinServiceType(...),
PQoS::SetAvgBytesPerSec(...), PQoS::SetMaxFrameBytes(...) and
PQoS::SetPeakBytesPerSec(...)

Linux and earlier versions of Windows:
--------------------------------------

Based either on:

a) the parameter passed to PQoS::SetDSCP(...), or
b) the parameter passed to PQoS::SetWinServiceType(...) plus (optionally) the
parameters passed to any calls to PQoS::SetDSCPAlternative(...)

Unsupported Windows versions
----------------------------

Windows ME - setsockopt/IP_TOS appears to be unsupported and it is impossible
to turn off RSVP signalling for GQOS
Windows NT4 without SP4 - there is a known problem using setsockopt/IP_TOS on
unconnected UDP sockets. SP4 solves this problem (see Microsoft KB article
Q196358).


3) 802.1Q support
=================

Where enabled, 802.1Q is supported on Windows XP and Windows Server 2003 based
on the same calls as for Diffserv support on these platforms

A note for developers
---------------------

In principle, it is possible to support 802.1Q on Windows 2000, but this is
not implemented for the following reason.

Currently, Winsock support in openh323 writes to UDP sockets using sendto(...)
on unconnected UDP sockets. As a result, setting QOS using GQOS (which enables
802.1Q) requires that the QUALITYOFSERVICE structure include a QOS_DESTADDR.
QOS_DESTADDR is not supported on Windows 2000.

If anyone wants to rewrite pwlib winsock support to use WSASendTo, or openh323
to use connected UDP sockets, it should then - in principle - be possible to
remove the requirement for QOS_DESTADDR and use the GQOS API on Windows 2000.
However, note the "in principle". This principle has not been tested!


4) Windows 2000 support
=======================

Diffserv support on Windows 2000 is implemented using the traditional
setsockopt(...) approach with an IP_TOS parameter. The reason for using this
approach rather than the GQOS API is explained in the note to section 3 above.

In order to enable the use of setsockopt(...) with IP_TOS on Windows 2000, it
is necessary to set the following registry setting (unset by default):

HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\DisableUserTOSSetting
= 0

After setting this, you will need to reboot the machine.

A note for those horrified by this
----------------------------------

Unfortunately, even if someone does enable the use of GQOS on Windows 2000, it
will still be necessary to make a non-default registry setting. This is
because by default, Windows 2000 implements RSVP (ie intserv rather than
diffserv). On the grounds that nobody actually uses intserv, PTLIB disables
RSVP in its calls to GQOS, but then to enable diffserv it is necessary to set:

HKLM\System\CurrentControlSet\Services\Qossp\EnablePriorityBoost = 1

Sorry! Blame Microsoft...


5) Windows XP and Server 2003 support
=====================================

The approach used for QOS support on these platforms does not allow the DSCP
or 802.1Q COS to be set directly. However, it should be possible for the
system administrator to modify the DSCP that is used for any of the service
types specified in the call to PQoS::SetWinServiceType(...).

To do this:

* run "mmc"
* go to File\Add/Remove Snap-in
* add the Group Policy object (shows up as Local Computer Policy)
* within Local COmputer Policy, go to:

Computer Configuration\Administrative Templates\Netrwork\QoS Packet Scheduler.

This will allow you to configure DSCP and Layer-2 priority values (802.1Q
COS). Note that only Guaranteed service type, Controlled load service type,
and Best effort service type are supported.