Vyatta NOS documentation

Learn how to install, configure, and operate Vyatta Network Operating System (Vyatta NOS), which helps to drive our virtual networking and physical platforms portfolio.

A simple QoS configuration example

An example of a simple multi-part QoS configuration, to show you how you can put different elements together.

#
# Define the maximum bandwidth that profile-1 can use
#
set policy qos name policy-1 shaper profile profile-1 bandwidth 1Gbit
#
# Set up second stage classification based on a packet's DSCP value, putting 
# packets into eight different profile queues
#
set policy qos name policy-1 shaper profile profile-1 map dscp 0-7 to 7
set policy qos name policy-1 shaper profile profile-1 map dscp 8-15 to 6
set policy qos name policy-1 shaper profile profile-1 map dscp 16-23 to 5
set policy qos name policy-1 shaper profile profile-1 map dscp 24-31 to 4
set policy qos name policy-1 shaper profile profile-1 map dscp 32-39 to 3
set policy qos name policy-1 shaper profile profile-1 map dscp 40-47 to 2
set policy qos name policy-1 shaper profile profile-1 map dscp 48-55 to 1
set policy qos name policy-1 shaper profile profile-1 map dscp 56-63 to 0
#
# Assign the eight profile queues to one of the four traffic-classes
#
set policy qos name policy-1 shaper profile profile-1 queue 0 traffic-class 0
set policy qos name policy-1 shaper profile profile-1 queue 1 traffic-class 0
set policy qos name policy-1 shaper profile profile-1 queue 2 traffic-class 1
set policy qos name policy-1 shaper profile profile-1 queue 3 traffic-class 1
set policy qos name policy-1 shaper profile profile-1 queue 4 traffic-class 2
set policy qos name policy-1 shaper profile profile-1 queue 5 traffic-class 2
set policy qos name policy-1 shaper profile profile-1 queue 6 traffic-class 3
set policy qos name policy-1 shaper profile profile-1 queue 7 traffic-class 3
#
# Define the maximum bandwidth that each traffic-class can use 
#
set policy qos name policy-1 shaper profile profile-1 traffic-class 0 bandwidth 500Kbit
set policy qos name policy-1 shaper profile profile-1 traffic-class 1 bandwidth 300Kbit
set policy qos name policy-1 shaper profile profile-1 traffic-class 2 bandwidth 200Kbit
set policy qos name policy-1 shaper profile profile-1 traffic-class 0 bandwidth 100Kbit
#
# For the two queues that are assigned to traffic-class 0, give them a weighting so that
# queue 0 gets 70% of traffic-class 0's 500Kbit/second bandwidth, and queue 1 only gets
# 30%
#
set policy qos name policy-1 shaper profile profile-1 queue 0 weight 70
set policy qos name policy-1 shaper profile profile-1 queue 1 weight 30
#
# Set the weighting for the queues assigned to traffic-class 1
#
set policy qos name policy-1 shaper profile profile-1 queue 2 weight 60
set policy qos name policy-1 shaper profile profile-1 queue 3 weight 40
#
# Set the weighting for the queues assigned to traffic-class 2
#
set policy qos name policy-1 shaper profile profile-1 queue 4 weight 5
set policy qos name policy-1 shaper profile profile-1 queue 5 weight 3
#
# Set the weighting for the queues assigned to traffic-class 3
#
set policy qos name policy-1 shaper profile profile-1 queue 6 weight 2
set policy qos name policy-1 shaper profile profile-1 queue 7 weight 1
#
# Set the policy's default profile
#
set policy qos name policy-1 shaper default profile-1
#
# Attach the policy to an interface
#
set interface dataplane dp0s4 policy qos policy-1