The most commonly used PHB is AF (Assured Forwarding). Assured Forwarding is made up of 4 Classes from 1-4 –where 1 is the highest priority. These classes are then further segmented by 3 (low, medium and high) Drop Precedence markings.

Drop Precedence

This is defined as the likelihood of packets getting dropped when congestion occurs on multiple streams within the same class. There are 3 drop precedence level:-

Low Drop – Low likelihood of packets being dropped

Medium Drop – Medium likelihood of packets being dropped

High Drop – Highest likelihood of packets being dropped

Thus looking at the class and drop precedence combination a complete understanding of DSCP is possible as indicated in the table below.

Forwarding Type

Class

Bits

(012)

Bits

(345)

AF Class

Label

Drop

Precedence

Use

Assured Forwarding

Class 1

001

010

AF11

Low Drop

Voice

Payload

100

AF12

Medium Drop

110

AF13

High Drop

Class 2

010

010

AF21

Low Drop

Video

100

AF22

Medium Drop

110

AF23

High Drop

Class 3

011

010

AF31

Low Drop

Voice

Signalling

100

AF32

Medium Drop

110

AF33

High Drop

Class 4

100

010

AF41

Low Drop

General

Data

100

AF42

Medium Drop

110

AF43

High Drop

Expedited Forwarding

101

111

EF46

N\A

Voice

How the AF Class Label is calculated

The first 3 bits make up the first digit, the next 2 bits make up the second digit, the last digit is ignored by the AF classes.

DSCP is usually set for audio, video and app sharing. You could enable it for peer to peer file transfers as well. A combination of EF and AF classes is used by Lync in what is now simply called DSCP

EF class 46 is universal voice DSCP marker (the highest class) and AF class 34 is used for video. Since I want to keep things really simple I will enforce EF class 46 to the application and then specify the port range 49152 – 57500 for Audio. Video will get AF Class 34 using port 57501 – 65535.To avoid further confusion, AF 46 and EF 36 will simply be refered to as DSCP 46 and DSCP 34.

Let’s get started then…

Setting up Server QoS

By default the App sharing range overlaps both Audio and Video. If QoS is to be enabled on all three types of communication the port overlapping in not allowed. So I split the Video port range into 2 equal parts as below

Communication Type

Default Port Range

New Port Range

Audio

49152-57500

49152-57500

Video

57501-65535

57501-61518

Application Sharing

49152-65535

61519-65535

To show the configured ranges run the command Get-CsService -ConferencingServer

On this page we can select the application to add the DSCP markings to, however I have opted to attach the DSCP marking on traffic based on the ports used as a simpler approach.

Now repeat this for all the communication types as below

For the Edge server you will have to do Policy local as it’s not on the domain. You need the following policies

Policy

DSCP

Executable

Source IP

Protocol

Destination Port Range

Lync Edge Peer to Peer Audio

46

MediaRelaySvc.exe

–

TCP and UDP

20000:20039

Lync Edge Peer to Peer Video

34

MediaRelaySvc.exe

Edge internal IP

TCP and UDP

20040:20079

Lync Edge Conferencing Audio

46

MediaRelaySvc.exe

Edge internal IP

TCP and UDP

49152:57500

Lync Edge Conferencing Video

34

MediaRelaySvc.exe

Edge internal IP

TCP and UDP

57501:61518

Lync Edge Application Sharing

34

TCP and UDP

61519:65535

Configuring Port Ranges on Lync Clients

Firstly the port ranges can be viewed from the command Get-CsConferencingConfiguration

These are not enabled by default (ClientMediaPortRangeEnabled = False) and thus the ranges being used by default are from 1024 – 65535

Once again the communication type is determined based on the port range specified as will be seen later. Also keep in mind that you don’t want these ports overlapping. Client Media ports are used by OCS R2 (as they can’t determine different traffic types) and Lync uses the Audio, Video, App sharing and File transfer Ports. File transfer is only specified in Peer-to-Peer traffic.

Windows XP

You can’t run policy-based QOS on XP (or Windows Server 2003). For QOS on these clients you need to run QOS Packet Scheduler on the client computer and a Domain policy must allow the computer to use QOS Services.

At a command prompt, type the following command, and then press Enter:

Set-CsMediaConfiguration -EnableQoS $true

Use Group Policy to set Differentiated Services Code Point (DSCP) values that mark the IP packets if you need values other than the defaults to match your environment for Guaranteed service type packets (used for audio) and Controlled load service type packets (used for video). By default, the following settings are applied when you enable QoS:

SERVICETYPE_GUARANTEED (DSCP 40, 0x28)

SERVICETYPE_CONTROLLEDLOAD (DSCP 24, 0x18)

The client must be stopped and restarted for the change to take effect.

The most commonly used PHB is AF (Assured Forwarding). Assured Forwarding is made up of 4 Classes from 1-4 –where 1 is the highest priority. These classes are then further segmented by 3 (low, medium and high) Drop Precedence markings.

Drop Precedence

This is defined as the likelihood of packets getting dropped when congestion occurs on multiple streams within the same class. There are 3 drop precedence level:-

Low Drop – Low likelihood of packets being dropped

Medium Drop – Medium likelihood of packets being dropped

High Drop – Highest likelihood of packets being dropped

Thus looking at the class and drop precedence combination a complete understanding of DSCP is possible as indicated in the table below.

Forwarding Type

Class

Bits

(012)

Bits

(345)

AF Class

Label

Drop

Precedence

Use

Assured Forwarding

Class 1

001

010

AF11

Low Drop

Voice

Payload

100

AF12

Medium Drop

110

AF13

High Drop

Class 2

010

010

AF21

Low Drop

Video

100

AF22

Medium Drop

110

AF23

High Drop

Class 3

011

010

AF31

Low Drop

Voice

Signalling

100

AF32

Medium Drop

110

AF33

High Drop

Class 4

100

010

AF41

Low Drop

General

Data

100

AF42

Medium Drop

110

AF43

High Drop

How the AF Class Label is calculated

The first 3 bits make up the first digit, the next 2 bits make up the second digit, the last bit is ignored.