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
Section titled “Diagram”Classes
Section titled “Classes”configuration (iosxr.devices)
Section titled “configuration (iosxr.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| policy_map_qos | List | [policy_map_qos] | No |
policy_map_qos (iosxr.devices.configuration)
Section titled “policy_map_qos (iosxr.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| policy_map_name | String | Yes | ||
| classes | List | [classes] | No | |
| description | String | No |
classes (iosxr.devices.configuration.policy_map_qos)
Section titled “classes (iosxr.devices.configuration.policy_map_qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| type | Choice | qos, traffic | Yes | |
| bandwidth_remaining_unit | Choice | percent, ratio | No | |
| bandwidth_remaining_value | Any | String or Integer[min: 1, max: 4294967295] or String[Regex: ^.*[\$\%]\{.*$] | No | |
| police_conform_action_drop | Boolean | true, false | No | |
| police_conform_action_transmit | Boolean | true, false | No | |
| police_exceed_action_drop | Boolean | true, false | No | |
| police_exceed_action_transmit | Boolean | true, false | No | |
| police_rate_unit | Choice | bps, cellsps, gbps, kbps, mbps, per-million, per-thousand, percent, pps | No | |
| police_rate_value | Any | String or Integer[min: 0, max: 4294967295] or String[Regex: ^.*[\$\%]\{.*$] | No | |
| police_violate_action_drop | Boolean | true, false | No | |
| police_violate_action_transmit | Boolean | true, false | No | |
| priority_level | Integer | min: 1, max: 7 | No | |
| queue_limits | List | [queue_limits] | No | |
| service_policy_name | String | No | ||
| set_dscp | Any | Choice[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_topmost | Integer | min: 0, max: 7 | No | |
| shape_average_rate_unit | Choice | bps, cellsps, gbps, kbps, mbps, per-million, per-thousand, percent | No | |
| shape_average_rate_value | Any | String 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)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| unit | Choice | bytes, kbytes, mbytes, ms, packets, percent, us | Yes | |
| value | Any | String or Integer[min: 1, max: 4294967295] or String[Regex: ^.*[\$\%]\{.*$] | Yes |
Example YAML Code:
Section titled “Example YAML Code:”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"