When configuring QoS (Quality of Service) in Microsoft Lync / Skype for Business you need to modify the media port ranges for various Services and Configuration using PowerShell.
Pat Richard has made a brilliant QoS calculator for Lync/Skype for Business here http://www.ehloworld.com/2821. The calculator will provide you with the PowerShell commands required to configure QoS port ranges and the GPO’s. The calculator also gives you the commands to verify the Configuration (which this post is based on).
I needed to verify the QoS configuration on a customers environment with multiple pools. The PowerShell script below will run all of the verify commands in Pat’s script against all pools.
Write-Host "Client P2P Ports - Ignore ClientSipDynamicPort/Range and ClientMediaPort/Range values" -ForegroundColor DarkYellow Get-CsConferencingConfiguration -Identity global | Format-List Identity,*port* Write-Host "Conferencing Server Ports" -ForegroundColor DarkYellow Get-CsService -ConferencingServer | Format-List Identity,AppSharingPortStart,AppSharingPortCount,AudioPortStart,AudioPortCount,VideoPortStart,VideoPortCount Write-Host "Application Server Ports" -ForegroundColor DarkYellow Get-CsService -ApplicationServer | Format-List Identity,AppSharingPortStart,AppSharingPortCount,AudioPortStart,AudioPortCount,VideoPortStart,VideoPortCount Write-Host "Mediation Server Ports" -ForegroundColor DarkYellow Get-CsService -MediationServer | Format-List Identity,AudioPortStart,AudioPortCount Write-Host "QOS Enabled" -ForegroundColor DarkYellow Get-CsMediaConfiguration -Identity global | Format-List Identity,EnableQoS Write-Host "Edge Server Ports - Best practice to leave default start port 50,000, count 10,000" -ForegroundColor DarkYellow Get-CsService -EdgeServer | Format-List Identity,MediaCommunicationPortStart,MediaCommunicationPortCount Write-Host "Web Server Application Server Ports" -ForegroundColor DarkYellow Get-CsService -Webserver | Format-List Identity,AppSharingPortStart,AppSharingPortCount Write-Host "Lync Phone Edition DSCP Tag" -ForegroundColor DarkYellow Get-CsUCPhoneConfiguration -Identity global | Format-List Identity,VoiceDiffServTag
Output below:
Full output below:
Client P2P Ports - Ignore ClientSipDynamicPort/Range and ClientMediaPort/Range values Identity : Global ClientMediaPortRangeEnabled : True ClientMediaPort : 5350 ClientMediaPortRange : 40 ClientAudioPort : 50000 ClientAudioPortRange : 20 ClientVideoPort : 55000 ClientVideoPortRange : 20 ClientAppSharingPort : 60000 ClientAppSharingPortRange : 20 ClientFileTransferPort : 65000 ClientFileTransferPortRange : 20 ClientSipDynamicPort : 7100 ClientSipDynamicPortRange : 3 Conferencing Server Ports Identity : ConferencingServer:FEPOOL.DOMAIN AppSharingPortStart : 60000 AppSharingPortCount : 5000 AudioPortStart : 50000 AudioPortCount : 5000 VideoPortStart : 55000 VideoPortCount : 5000 Application Server Ports Identity : ApplicationServer:FEPOOL.DOMAIN AppSharingPortStart : 60000 AppSharingPortCount : 5000 AudioPortStart : 50000 AudioPortCount : 5000 VideoPortStart : 55000 VideoPortCount : 5000 Mediation Server Ports Identity : MediationServer:MEDPOOL.DOMAIN AudioPortStart : 50000 AudioPortCount : 5000 QOS Enabled Identity : Global EnableQoS : True Edge Server Ports - Best practice to leave default start port 50,000, count 10,000 Identity : EdgeServer:EDGPOOL.DOMAIN MediaCommunicationPortStart : 50000 MediaCommunicationPortCount : 10000 Web Server Application Server Ports Identity : WebServer:FEPOOL.DOMAIN AppSharingPortStart : 60000 AppSharingPortCount : 5000 Identity : WebServer:DIRPOOL.DOMAIN AppSharingPortStart : 60000 AppSharingPortCount : 5000 Lync Phone Edition DSCP Tag Identity : Global VoiceDiffServTag : 46
From the above you can see that the port ranges for all modalities are as follows:
- Audio: 50,000 > 54,999 (50,000 > 50,019 P2P)
- Video: 55,000 > 59,999 (55,000 > 55,019 P2P)
- App Sharing: 60,000 > 64999 (60,000 > 60,019) P2P
- File Transfer: 65,000 > 65,019 (P2P)
Another nice feature of the QoS calculator is aligning the P2P ports with the Server ports.
Technical Architect at Symity