EdgeRouter - Quality of Service for Voice Over IP (QoS for VoIP)


Overview


Readers will learn how to set QoS parameters for VoIP applications using the EdgeRouter.

NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Please see the Related Articles below for more information.
 
Device used in this article:

QoS Configuration


Traffic to which QoS policies have been applied is ineligible for offloading. This means that applying QoS policies will lead to a decrease in performance and an increase in CPU load.

These instructions assume:

  • eth0 is the connection to the internet.
  • eth1 is the local area network.
  • Downstream bandwidth is 50mbps.
  • Upstream bandwidth is 20mbps.
  • You want to guaranty 25% of your downstream bandwidth to SIP RTP.
  • You want to guaranty 50% of your upstream bandwidth to SIP RTP.
  • You want to allow SIP RTP to use up to 100% of your upstream bandwidth.
  • You want to guaranty 5% of your downstream bandwidth to SIP Signalling.
  • You want to guaranty 10% of your downstream bandwidth to SIP Signalling.
  • You want to allow SIP Signalling to use up to 100% of your downstream bandwidth.
  • Your PBX or phone tags RTP Audio with DSCP 46 (EF).
  • Your PBX or phone tags SIP Signalling with DSCP 24 (CS3).  If your PBX or phone tags SIP signalling with DSCP 26 (AF31), then change dscp 24 to dscp 26 in the instructions below.
 Class DSCP

CS1

8

AF11 10
AF12 12
AF13 14
CS2 16
AF21 18
AF22 20
AF23 22
CS3 24
AF31 26
 Class DSCP
AF32 28
AF33 30
CS4 32
AF41 34
AF42 36
AF43 38
CS5 40
EF 46
CS6 48
CS7 56

Assured Forwarding (AF) and Class Selector (CS) values to DSCP table.

CLI: Access the command line interface (CLI). You can do this using the CLI button in the GUI or by using a program such as PuTTY.

1. Enter configuration mode.

configure

2. Set-up the details of the downstream QoS policy.

set traffic-policy shaper downstream description downstream-policy
set traffic-policy shaper downstream bandwidth 50mbps
set traffic-policy shaper downstream class 10 description rtp
set traffic-policy shaper downstream class 10 bandwidth 25%
set traffic-policy shaper downstream class 10 ceiling 100%
set traffic-policy shaper downstream class 10 match voip-rtp ip dscp 46
set traffic-policy shaper downstream class 20 description sip
set traffic-policy shaper downstream class 20 bandwidth 5%
set traffic-policy shaper downstream class 20 ceiling 100%
set traffic-policy shaper downstream class 20 match voip-sip ip dscp 24
set traffic-policy shaper downstream default bandwidth 70%
set traffic-policy shaper downstream default ceiling 100%

3. Set-up the details of the upstream QoS policy.

set traffic-policy shaper upstream description upstream-policy
set traffic-policy shaper upstream bandwidth 20mbps
set traffic-policy shaper upstream class 10 description rtp
set traffic-policy shaper upstream class 10 bandwidth 50%
set traffic-policy shaper upstream class 10 ceiling 100%
set traffic-policy shaper upstream class 10 match voip-rtp ip dscp 46
set traffic-policy shaper upstream class 20 description sip
set traffic-policy shaper upstream class 20 bandwidth 10%
set traffic-policy shaper upstream class 20 ceiling 100%
set traffic-policy shaper upstream class 20 match voip-sip ip dscp 24
set traffic-policy shaper upstream default bandwidth 40%
set traffic-policy shaper upstream default ceiling 100%

4. Apply the policies to the interfaces in the egress (out) direction.

set interfaces ethernet eth0 traffic-policy out upstream
set interfaces ethernet eth1 traffic-policy out downstream

5. Commit the changes and save the configuration

commit ; save

Related Articles


Back to Top

Intro to Networking - How to Establish a Connection Using SSH   

EdgeRouter - Hardware Offloading