Skip to content

Policy Map QoS

Configure QoS (Quality of Service) policy maps that define traffic classification and handling policies. Policy maps contain classes that specify how different types of traffic should be treated, including setting DSCP values, MPLS experimental bits, and queue limits.

Diagram
NameTypeConstraintMandatoryDefault Value
policy_map_qosList[policy_map_qos]No

policy_map_qos (iosxr.devices.configuration)

Section titled “policy_map_qos (iosxr.devices.configuration)”
NameTypeConstraintMandatoryDefault Value
policy_map_nameStringYes
classesList[classes]No
descriptionStringNo

classes (iosxr.devices.configuration.policy_map_qos)

Section titled “classes (iosxr.devices.configuration.policy_map_qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
typeChoiceqos, trafficYes
bandwidth_remaining_unitChoicepercent, ratioNo
bandwidth_remaining_valueAnyString or Integer[min: 1, max: 4294967295] or String[Regex: ^.*[\$\%]\{.*$]No
police_conform_action_dropBooleantrue, falseNo
police_conform_action_transmitBooleantrue, falseNo
police_exceed_action_dropBooleantrue, falseNo
police_exceed_action_transmitBooleantrue, falseNo
police_rate_unitChoicebps, cellsps, gbps, kbps, mbps, per-million, per-thousand, percent, ppsNo
police_rate_valueAnyString or Integer[min: 0, max: 4294967295] or String[Regex: ^.*[\$\%]\{.*$]No
police_violate_action_dropBooleantrue, falseNo
police_violate_action_transmitBooleantrue, falseNo
priority_levelIntegermin: 1, max: 7No
queue_limitsList[queue_limits]No
service_policy_nameStringNo
set_dscpAnyChoice[af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, ef] or Integer[min: 0, max: 63] or String[Regex: ^.*[\$\%]\{.*$]No
set_mpls_experimental_topmostIntegermin: 0, max: 7No
shape_average_rate_unitChoicebps, cellsps, gbps, kbps, mbps, per-million, per-thousand, percentNo
shape_average_rate_valueAnyString or Integer[min: 1, max: 4294967295] or String[Regex: ^.*[\$\%]\{.*$]No

queue_limits (iosxr.devices.configuration.policy_map_qos.classes)

Section titled “queue_limits (iosxr.devices.configuration.policy_map_qos.classes)”
NameTypeConstraintMandatoryDefault Value
unitChoicebytes, kbytes, mbytes, ms, packets, percent, usYes
valueAnyString or Integer[min: 1, max: 4294967295] or String[Regex: ^.*[\$\%]\{.*$]Yes

Example-1: Configure a basic QoS policy map with class-default settings.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
policy_map_qos:
- policy_map_name: "PM1"
description: "My description"
classes:
- name: "class-default"
type: "qos"
set_mpls_experimental_topmost: 0
set_dscp: "0"
queue_limits:
- value: "100"
unit: "us"

Example-2: Configure comprehensive QoS policy maps with multiple classes and advanced features.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
policy_map_qos:
- policy_map_name: "VOICE_DATA_POLICY"
description: "Primary QoS Policy for Voice and Data"
classes:
- name: "VOICE_CLASS"
type: "qos"
priority_level: 1
set_dscp: "ef"
set_mpls_experimental_topmost: 5
police_rate_value: "100"
police_rate_unit: "mbps"
police_conform_action_transmit: true
police_exceed_action_drop: true
queue_limits:
- value: "10"
unit: "ms"
- name: "VIDEO_CLASS"
type: "qos"
priority_level: 2
set_dscp: "af41"
set_mpls_experimental_topmost: 4
shape_average_rate_value: "50"
shape_average_rate_unit: "mbps"
- name: "class-default"
type: "qos"
set_dscp: "0"
bandwidth_remaining_value: "40"
bandwidth_remaining_unit: "percent"
- policy_map_name: "ENTERPRISE_POLICY"
description: "Enterprise application QoS policy"
classes:
- name: "CRITICAL_APP"
type: "qos"
priority_level: 1
set_dscp: "cs6"
police_rate_value: "1"
police_rate_unit: "gbps"
shape_average_rate_value: "500"
shape_average_rate_unit: "mbps"
queue_limits:
- value: "100"
unit: "mbytes"

Example-3: Configure policy map with multiple queue limit configurations.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
policy_map_qos:
- policy_map_name: "ADVANCED_QOS"
description: "Advanced QoS configuration"
classes:
- name: "premium-class"
type: "qos"
set_dscp: "cs6"
set_mpls_experimental_topmost: 6
queue_limits:
- value: "100"
unit: "us"
- value: "50"
unit: "percent"
- name: "standard-class"
type: "qos"
set_dscp: "af21"
queue_limits:
- value: "500"
unit: "kbytes"