OcNOS-SP : Quality of Service Guide : Quality of Service Configuration Guide : Configuring QoS
Configuring QoS
The configuration process involving several commands is described in the following chapter.
Configuring Ingress QoS Procedures
Following section explains the configuration details involved to achieve the ingress QoS treatment as explained in Chapter 6, Modifying Internal Priority at Ingress and Chapter 7, Remarking Packet Priority at Ingress.
The configuration steps involved are described below:
Configuring trust level on switch ports
Configuring internal priority for untagged traffic on switch ports
Configuring ingress decode mapping profile
Binding ingress decode mapping profile
Configuring policy-map to modify internal or packet priority
Configuring trust level on switch ports
Switch ports support two trust levels. By default, trust level is based on PCP value. However, trust level based on DSCP value is configurable per port.
Trust level to DSCP value can be configured through the command:
trust dscp
When trust DSCP is configured on the port, internal priority will be derived from DSCP value of IPv4 packet based on default dscp-to-queue profile configuration. Drop precedence for untagged traffic will be derived from DSCP value of IPv4 packet based on default dscp-to-queue profile configuration. For tagged traffic, drop precedence will continue to be based on DEI bit on the packet.
Configuring internal priority for untagged traffic on switch ports
For tagged traffic, internal priority will be derived from PCP value of the packet. Untagged traffic will not carry PCP value and are assigned with internal priority zero by default. Internal priority can be assigned to untagged traffic with following port level configuration:
qos untagged-priority <0-7>
With untagged priority configured on switch port, internal priority will be selected for untagged traffic based on the configured value.
An example of the configuration is shown below:
(config)#interface xe1
(config-if)#switchport
(config-if)#qos untagged-priority 3
(config-if)#exit
In the example configuration, untagged traffic received on xe1 will be assigned with internal priority 3 and will be transmitted out of queue 3 at egress port.
Configuring Ingress Decode Mapping Profile
In order to modify the priority and drop precedence values used within the device, user-defined decode mapping profiles can be created or global decode mapping profile contents can be modified.
Three types of decode mapping profiles are supported based on packet priority encoded in tagged IPv4 and in MPLS traffic.
Configuring PCP-to-TC Mapping Profile
User-defined profile can be created or global profile can be modified for PCP-to-TC through the following command:
qos profile cos-to-queue (NAME | default)
Inside this command PCP-to-TC mapping can be configured using the values:
cos <0-7> queue <0-7>
Here, CoS is the PCP value and the queue value is the traffic-class being configured.
An example of the configuration is shown below:
(config)#qos profile cos-to-queue profile1
(config-ingress-cos-map)#cos 3 queue 4
(config-ingress-cos-map)#cos 2 queue 1
(config-ingress-cos-map)#exit
Note: This mapping profile is applicable only to switch ports.
Configuring DSCP-to-TC, DP, DSCP Mapping Profile
User-defined profiles can be created or global profiles can be modified for DSCP-to-TC, DP, and DSCP using the following command:
qos profile dscp-to-queue (NAME | default)
Inside this command DSCP-to-TC, DP, and DSCP mapping can be configured using the command:
dscp <0-63> queue <0-7> (color (green | yellow | red)|) (dscp <0-63>|)
An example configuration is shown below:
(config)#qos profile dscp-to-queue profile2
(config-ingress-dscp-map)#dscp 8 queue 2
(config-ingress-dscp-map)#dscp 25 queue 4 color yellow
(config-ingress-dscp-map)#exit
Note: This mapping profile is applicable only on router ports. However, the default mapping profile is applicable on switch ports as well, if trust level on the switch port is set to DSCP.
For IP, ingress stage remarking of DSCP values can be achieved by configuring the output DSCP in the command, however, this remarking can be overwritten by policy-map based remarking or by egress remarking.
For MPLS, ingress stage remarking of DSCP values used to derive EXP value when it enters the MPLS network using queue-to-exp mapping.
An example configuration is shown below:
(config)#qos profile dscp-to-queue profile1
(config-ingress-dscp-map)#dscp 10 queue 5 dscp 24
(config-ingress-dscp-map)#exit
In the example, configuration profile is bound to ingress router port, then traffic with DSCP 10 will be set with internal priority 5 and remarked DSCP value 24 will be used to calculate EXP value (Remark_DSCP/8= Queue) using queue-exp mapping at ingress node Egress Network interface (MPLS Network).
Example:
(config-ingress-dscp-map)#dscp 10 queue 3 dscp 24
Remark_DSCP = 24
EXP calculation:
(Remark_DSCP/8=EXP) = 24/8 = 3
Queue to EXP mapping always one-to-one when enters MPLS network, EXP value assigned to 3.
Refer to Table 9-7 and Table 9-8 for a list of the default EXP encapsulation mappings:
Configuring EXP-to-TC, DP Mapping Profile
Global profile can be modified for EXP-to-TC and DP through the following command:
qos profile exp-to-queue default
Inside this command, PCP-to-TC mapping can be configured using the command:
exp <0-7> queue <0-7> (color (green | yellow | red)|)
An example configuration is shown below:
(config)#qos profile exp-to-queue default
(config-ingress-exp-queue-map)#exp 3 queue 4 color yellow
(config-ingress-exp-queue-map)#exp 2 queue 1
(config-ingress-exp-queue-map)#exit
Note: This mapping profile is applicable only on label-switched router ports.
Binding Ingress Decode Mapping Profile
User-defined mapping profiles will be effective only when they are bound to ingress ports or any services.
User-defined profiles can be bound to port using the command:
qos map-profile (cos-to-queue | dscp-to-queue) NAME
An example of binding user-defined map to port is shown below:
(config)#interface xe1
(config-if)#switchport
(config-if)#qos map-profile cos-to-queue profile1
PCP-to-TC decode profiles can be bound to VPLS service instances or attachment circuits. Profile binding to these services can be achieved using the commands:
vpls-qos map-profile cos-to-queue NAME
vc-qos map-profile cos-to-queue NAME
An example of binding a PCP-to-TC mapping profile to a VPLS service is shown below:
(config)#mpls vpls vpls1 1
(config-vpls)#vpls-qos map-profile cos-to-queue cq-profile-1
An example of binding a PCP-to-TC profile to an attachment circuit is shown below:
(config)#interface xe1
(config-if)#switchport
(config-if)# mpls-vpls MPLS-VPLS service-template VPLS-10
(config-if-vpls)#vc-qos map-profile cos-to-queue cq-profile-2
Profile configured on the VPLS service is effective for all attachment circuits associated with VPLS service. However, if a profile is bound to an attachment circuit, then that profile takes higher priority for that attachment circuit.
Traffic received on VPLS service will be affected by QoS treatment by configurations in the following order:
1. Set queue through policy-map configuration. Refer below section for details.
2. PCP-to-TC profile configuration bound to attachment circuit.
3. PCP-to-TC profile configuration bound to VPLS service.
4. PCP-to-TC profile configuration bound to ingress port.
5. PCP-to-TC profile configuration.
Configuring Policy-map to Modify Internal or Packet Priority
QoS policy-map frame work can be used to modify the internal priority or remark the packet priority. For policy-map configuration, refer to Chapter 2, Configuring a QoS Policy-map. Set action has following two options:
Modify internal priority - Internal priority or traffic class can be set using the command set queue <0-7> and this command will modify only the internal priority and the configuration is not carried forward to next device.
Remark packet priority - Packet priority can be set at the ingress processing through set cos <0-7> and set dscp <0-63> to modify PCP value for tagged traffic received on switch port and DSCP value for IPv4 traffic received on router port. Both commands implicitly modify internal priority. Value for internal priority is derived from cos-to-queue profile bound to switch port and DSCP-to-queue profile bound to router port. If profile is not explicitly bound on the interface, internal priority will be derived from default cos-to-queue profile or default dscp-to-queue profile based on interface type. On VLAN interface, set cos will update only internal priority if the traffic is routed. Even if the traffic is routed to another VLAN interface, set cos will not set the packet priority on newly constructed VLAN header and it will be 0 or subject to egress remarking configuration. If traffic is switched, then set cos on VLAN interface will update both internal priority and packet priority. Qumran does not support remarking on MPLS traffic.
Configuration example for modifying traffic class is shown below:
(config)#policy-map p-1
(config-pmap-qos)#class c-1
(config-pmap-c-qos)#set queue 5
(config-pmap-c-qos)#exit
The commands set cos and set dscp can be configured similarly.
Configuring Egress QoS Procedures
Following section explains the configuration details involved to achieve the egress QoS treatment as explained in Chapter 8, Remarking Packet Priority at Egress.
Configuration steps involved are described below:
Configuring egress remarking
Configuring egress encode mapping profile
Binding egress encode mapping profile
Configuring and binding EXP encapsulation profile
Configuring Egress Remarking
Qumran supports remarking through egress processing. Remarking is configurable separately for tagged traffic and IPv4 traffic. Remarking can be enabled on the device through global configuration or per interface configuration. Commands provide the flexibility to configure enable remarking globally but selectively disable on certain ports or enable only on certain ports.
An example of enabling egress remarking globally is shown below:
(config)#qos remark cos
This configuration takes effect on all egress switch ports and tagged traffic transmitted through the port will be egress remarked.
The syntax of the command is:
qos remark (cos | dscp)
An example of enabling egress remarking on an egress port is shown below:
(config)#interface xe1
(config-if)#switchport
(config-if)# qos remark cos enable
This configuration takes effect on xe1 and tagged traffic transmitted through xe1 will be egress remarked.
The syntax of the command is:
qos remark (cos | dscp) (enable | disable)
Configuring Egress Encode Mapping Profile
In order to modify the default encoding packet priority values when remarking is enabled on the device, a user-defined encode mapping profile can be created or global decode mapping profile content can be modified.
Two types of encode mapping profiles are supported in Qumran device.
Configuring TC, DP-to-PCP mapping profile
User-defined profile can be created or global profile can be modified for TC, DP-to-PCP using the following command:
qos profile queue-color-to-cos (NAME | default)
In this profile mode TC, DP-to-PCP mapping can be configured through the command:
queue <0-7> (color (green | yellow)| red) cos <0-7>
Here, the queue value is the traffic class, color is the drop precedence, and CoS is the PCP value to be remarked.
An example of a configuration is shown below:
(config)#qos profile queue-color-to-cos profile1
(config-egress-cos-map)#queue 4 cos 3
(config-egress-cos-map)#queue 1 color yellow cos 2
(config-egress-cos-map)#exit
Note: This mapping profile is applicable only on switch ports.
Configuring DSCP, DP to DSCP mapping profile
User-defined profiles can be created or global profiles can be modified for DSCP, DP-to-DSCP using the following command:
qos profile dscp-to-dscp (NAME | default)
Inside this profile mode DSCP, DP-to-DSCP mapping can be configured using the command:
dscp <0-63> (color (green | yellow)| red) dscp <0-63>
A configuration example is shown below:
(config)#qos profile dscp-to-dscp profile2
(config-egress-dscp-map)#dscp 8 dscp 7
(config-egress-dscp-map)#dscp 24 color yellow dscp 30
(config-egress-dscp-map)#exit
Note: This mapping profile is applicable only on router ports.
Note: When ingress DSCP-to-TC, DP, or DSCP profiles with ingress DSCP remarking is bound to an ingress router port, remarked DSCP values will be input for egress DSCP and DP-to-DSCP profiles on the egress interface.
An example of this case is shown below:
(config)#qos profile dscp-to-queue profile1
(config-ingress-dscp-map)#dscp 10 queue 3 dscp 24
If this profile is bound to ingress router port, then traffic with DSCP 10 will be set with internal priority 3 and DSCP will be remarked to 24 at ingress stage.
(config)#qos profile dscp-to-dscp profile2
(config-egress-dscp-map)#dscp 24 dscp 30
If the above profile is bound to egress router port, then the mapping entry will match the traffic with remarked DSCP 24 and will effectively update the DSCP value to 30 while egressing the traffic. As a result, traffic with DSCP value 10 will be remarked to DSCP value 30.
Binding egress encode mapping profile
For user-defined mapping profiles to work, they must be bound to egress ports and egress remarking must be enabled.
User-defined profiles can be bound to ports using the following command:
qos map-profile (queue-color-to-cos | dscp-to-dscp) NAME
An example of binding a user-defined map to a port is shown below:
(config)#interface xe1
(config-if)#qos map-profile dscp-to-dscp profile1
TC and DP-to-PCP encode profiles can be bound to a VPLS service instance or attachment circuit. Profile binding to these services can be achieved using the following commands:
vpls-qos map-profile queue-color-to-cos NAME
vc-qos map-profile queue-color-to-cos NAME
An example of binding PCP-to-TC mapping a profile to a VPLS service is shown below:
(config)# mpls-vpls MPLS-VPLS service-template VPLS-10
(config-vpls)#vpls-qos map-profile queue-color-to-cos qc-profile-1
An example of binding TC, DP-to-PCP profile to attachment circuit is shown below:
(config)#interface xe1
(config-if)#switchport
(config-if)#mpls-vpls vpls1 service-template st1
(config-if-vpls)#vc-qos map-profile queue-color-to-cos qc-profile-2
QoS egress remarking treatment on VPLS service has multiple configurations available and the priority of configuration is similar to the one explained in Binding Ingress Decode Mapping Profile.
Configuring and Binding EXP Encapsulation Profile
When a packet enters an MPLS network side from access side, the MPLS label will be encapsulated to the packet. Qumran supports inheriting packet priority to MPLS header from DSCP values for IPv4 traffic. For tagged traffic, packet priority is inherited by the MPLS header from the traffic class and drop precedence.
Qumran supports both global EXP encapsulation mapping profile and user-defined EXP encapsulation mapping profiles per egress port.
User-defined profiles can be created or global profile can be modified for EXP encapsulation using the following command:
qos profile exp-encap (NAME | default)
Inside this profile mode, DSCP to EXP mapping for L3 traffic and queue, color to EXP mapping for L2 traffic can be configured using the following ranges:
l3 dscp <0-63> exp <0-7>
l2 queue <0-7> (color (green|yellow|red)|) exp <0-7>
An example of binding a user-defined map to an egress port of ingress LER is shown below:
(config)#interface xe1
(config-if)#label-switching
(config-if)#qos map-profile exp-encap profile1
Note: This profile is applicable only on network facing ports of the ingress LER device.