Help Center Help Articles Professional Support Community RMA & Warranty Downloads Tech Specs

EdgeRouter - Quality of Service (QoS) Shaper for Upload/Download and VoIP

Overview

Readers will learn how to configure the Quality of Service (QoS) Shaper Traffic Policy.

NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Knowledge of the Command Line Interface (CLI) and basic networking knowledge is required. Please see the Related Articles below for more information.
Device used in this article:

Configuring Shaper Policies

Back to Top

ATTENTION: Traffic to which QoS policies have been applied cannot also take advantage of the EdgeRouter's Offloading feature.See the Hardware Offloading article for more information.

topology.png

Example network demonstrating the directions in which the different QoS Shaper policies are applied.

EdgeOS can use various QoS (Quality of Service) policies are to limit traffic in different ways. In the example above, the EdgeRouter is configured with two interfaces, WAN (eth0) and LAN (eth1). The Shaper policies are applied in the egress (out) direction on the interfaces and can be configured to limit the upload and download speeds of hosts. The upload speed is limited by applying a Shaper policy to the WAN interface, whereas the download speed is limited by applying the policy to the LAN interface.

With a Shaping policy, the traffic is buffered to conform to a certain bitrate. Shaping uses the Hierarchical Token Bucket  technique and the policy can be customized to provide different bandwidth guarantees to different traffic classes.

Some of the options that are available when configuring Shaping are:

  • class Match on a certain traffic type (for example a DSCP value).
  • queue-type Can be either set to Fair Queue, Tail Drop, RED or Priority queuing.
  • bandwidth The guaranteed bandwidth set as a flat rate or percentage.
  • ceiling The bandwidth limit set as a flat rate or percentage.

Follow the steps below to create a Shaping policy that limits the download speed to 100Mbit/s and the upload speed to 50Mbit/s while also guaranteeing bandwidth to VoIP related traffic:

CLI: Access the Command Line Interface.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. Define the download policy name and specify the available bandwidth for default traffic.

set traffic-policy shaper download bandwidth 100mbit
set traffic-policy shaper download default bandwidth 75%
set traffic-policy shaper download default ceiling 100%

3. Specify the available bandwidth for VoIP related traffic.

set traffic-policy shaper download class 10 bandwidth 20%
set traffic-policy shaper download class 10 ceiling 100%
set traffic-policy shaper download class 10 match rtp ip dscp 46

set traffic-policy shaper download class 20 bandwidth 5%
set traffic-policy shaper download class 20 ceiling 100%
set traffic-policy shaper download class 20 match sip ip dscp 24
NOTE:This example policy will guarantee 75% of the available download bandwidth (set to 100Mbit/s in this example) to default traffic. Traffic marked with IP DSCP value 46 and 24 will be guaranteed 25% and 5% of the bandwidth. 

4. Define the upload policy name and specify the available bandwidth for default and VoIP related traffic.

set traffic-policy shaper upload bandwidth 50mbit
set traffic-policy shaper upload default bandwidth 50%
set traffic-policy shaper upload default ceiling 100%

set traffic-policy shaper upload class 10 bandwidth 40%
set traffic-policy shaper upload class 10 ceiling 100%
set traffic-policy shaper upload class 10 match rtp ip dscp 46

set traffic-policy shaper upload class 20 bandwidth 10%
set traffic-policy shaper upload class 20 ceiling 100%
set traffic-policy shaper upload class 20 match sip ip dscp 24
NOTE:This example policy will guarantee 50% of the available upload bandwidth (set to 50Mbit/s in this example) to default traffic. Traffic marked with IP DSCP value 46 and 24 will be guaranteed 40% and 10% of the bandwidth. 

5. Attach the download policy to the LAN interface in the egress (out) direction.

set interfaces ethernet eth1 traffic-policy out download

6. Attach the upload policy to the WAN interface in the egress (out) direction.

set interfaces ethernet eth0 traffic-policy out upload

7. Commit the changes and save the configuration.

commit ; save

Related Articles

Back to Top

EdgeRouter - Quality of Service (QoS)

EdgeRouter - Quality of Service (QoS) Advanced Queue

EdgeRouter - Hardware Offloading

EdgeRouter - How to Access the EdgeRouter

EdgeRouter - Access the CLI from the Web UI

Intro to Networking - How to Establish a Connection Using SSH

Was this article helpful?
49 out of 63 found this helpful