6 This document explains the revised QOS implementation for PTLIB and openh323.
10 1) Setting a QOS specification in openh323
13 4) Windows 2000 issues
14 5) Windows XP and Server 2003 issues
16 1) Setting a QOS specification in openh323
17 ==========================================
19 The basic approach is as follows:
23 RTP_QOS * rtpqos = new RTP_QOS;
24 rtpqos->dataQoS.SetWinServiceType(DWORD winServiceType);
25 rtpqos->dataQoS.SetAvgBytesPerSec(DWORD avgBytesPerSec);
26 rtpqos->dataQoS.SetMaxFrameBytes(DWORD maxFrameBytes);
27 rtpqos->dataQoS.SetPeakBytesPerSec(DWORD peakBytesPerSec);
28 rtpqos->dataQoS.SetDSCP(int DSCPvalue);
31 rtpqos->controlQoS.SetWinServiceType(...)
34 H323Capability * cap = new xxxxx;
35 cap->AttachQoS(rtpqos);
43 i) winServiceType is either SERVICETYPE_GUARANTEED,
44 SERVICETYPE_CONTROLLEDLOAD, SERVICETYPE_BESTEFFORT, or
45 SERVICETYPE_PNOTSPECIFIED
47 ii) for Windows XP or Windows Server 2003, if setting aaaaa as
48 SERVICETYPE_GUARANTEED or SERVICETYPE_CONTROLLEDLOAD then avgBytesPerSec,
49 maxFrameBytes, and peakBytesPerSec MUST be set to appropriate values
51 iii) Calling SetDSCP(DSCPvalue) has no effect on Windows XP or Windows Server
52 2003 but on other platforms (earlier versions of Windows, and Linux) it will
53 set the DSCP directly. SetDSCP(-1) clears the effect of any previous call to
56 iv) on platforms other than WinXP or Windows Server 2003, if SetDSCP(...) is
57 not called but SetWinServiceType(...) is, then an appropriate DSCP
58 substitution will be made. The substitutions can be changed globally by
59 calling PQoS::SetDSCPAlternative(DWORD winServiceType, UINT DSCP)
61 v) if an RTP_QOS is not attached to a capability, the
62 H323Endpoint::rtpIpTypeofService will be used to set IP_TOS but this has no
63 effect on WinXP or Windows Server 2003 (and see below for notes relating to
70 Setting of DSCP on packets is supported for most Windows and Linux platforms.
71 The mechanism is platform-dependent:
73 Windows XP and Windows Server 2003:
74 -----------------------------------
76 Based on the parameters passed to PQoS::SetWinServiceType(...),
77 PQoS::SetAvgBytesPerSec(...), PQoS::SetMaxFrameBytes(...) and
78 PQoS::SetPeakBytesPerSec(...)
80 Linux and earlier versions of Windows:
81 --------------------------------------
85 a) the parameter passed to PQoS::SetDSCP(...), or
86 b) the parameter passed to PQoS::SetWinServiceType(...) plus (optionally) the
87 parameters passed to any calls to PQoS::SetDSCPAlternative(...)
89 Unsupported Windows versions
90 ----------------------------
92 Windows ME - setsockopt/IP_TOS appears to be unsupported and it is impossible
93 to turn off RSVP signalling for GQOS
94 Windows NT4 without SP4 - there is a known problem using setsockopt/IP_TOS on
95 unconnected UDP sockets. SP4 solves this problem (see Microsoft KB article
102 Where enabled, 802.1Q is supported on Windows XP and Windows Server 2003 based
103 on the same calls as for Diffserv support on these platforms
105 A note for developers
106 ---------------------
108 In principle, it is possible to support 802.1Q on Windows 2000, but this is
109 not implemented for the following reason.
111 Currently, Winsock support in openh323 writes to UDP sockets using sendto(...)
112 on unconnected UDP sockets. As a result, setting QOS using GQOS (which enables
113 802.1Q) requires that the QUALITYOFSERVICE structure include a QOS_DESTADDR.
114 QOS_DESTADDR is not supported on Windows 2000.
116 If anyone wants to rewrite pwlib winsock support to use WSASendTo, or openh323
117 to use connected UDP sockets, it should then - in principle - be possible to
118 remove the requirement for QOS_DESTADDR and use the GQOS API on Windows 2000.
119 However, note the "in principle". This principle has not been tested!
122 4) Windows 2000 support
123 =======================
125 Diffserv support on Windows 2000 is implemented using the traditional
126 setsockopt(...) approach with an IP_TOS parameter. The reason for using this
127 approach rather than the GQOS API is explained in the note to section 3 above.
129 In order to enable the use of setsockopt(...) with IP_TOS on Windows 2000, it
130 is necessary to set the following registry setting (unset by default):
132 HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\DisableUserTOSSetting
135 After setting this, you will need to reboot the machine.
137 A note for those horrified by this
138 ----------------------------------
140 Unfortunately, even if someone does enable the use of GQOS on Windows 2000, it
141 will still be necessary to make a non-default registry setting. This is
142 because by default, Windows 2000 implements RSVP (ie intserv rather than
143 diffserv). On the grounds that nobody actually uses intserv, PTLIB disables
144 RSVP in its calls to GQOS, but then to enable diffserv it is necessary to set:
146 HKLM\System\CurrentControlSet\Services\Qossp\EnablePriorityBoost = 1
148 Sorry! Blame Microsoft...
151 5) Windows XP and Server 2003 support
152 =====================================
154 The approach used for QOS support on these platforms does not allow the DSCP
155 or 802.1Q COS to be set directly. However, it should be possible for the
156 system administrator to modify the DSCP that is used for any of the service
157 types specified in the call to PQoS::SetWinServiceType(...).
162 * go to File\Add/Remove Snap-in
163 * add the Group Policy object (shows up as Local Computer Policy)
164 * within Local COmputer Policy, go to:
166 Computer Configuration\Administrative Templates\Netrwork\QoS Packet Scheduler.
168 This will allow you to configure DSCP and Layer-2 priority values (802.1Q
169 COS). Note that only Guaranteed service type, Controlled load service type,
170 and Best effort service type are supported.