Quality of Service | 861Create a QoS PolicyThere are two types of QoS policies: input and output.Input QoS policies regulate Layer 3 and Layer 2 ingress traffic. The regulation mechanisms for input QoSpolicies are rate policing and setting priority values. There are two types of input QoS policies: Layer 3 andLayer 2.• Layer 3 QoS input policies allow you to rate police and set a DSCP or dot1p value.• Layer 2 QoS input policies allow you to rate police and set a dot1p value.Output QoS policies regulate Layer 3 egress traffic. The regulation mechanisms for output QoS policiesare rate limiting, rate shaping, and WRED.Create an input QoS policyTo create an input QoS policy:1. Create a Layer 3 input QoS policy using the command qos-policy-input from CONFIGURATIONmode. Create a Layer 2 input QoS policy by specifying the keyword layer2 after the commandqos-policy-input.2. Once you create an input QoS policy, do one or more of the following:• Configure policy-based rate policing• Set a DSCP value for egress packets• Set a dot1p value for egress packetsConfigure policy-based rate policingRate police ingress traffic using the command rate-police from QOS-POLICY-IN mode.Set a DSCP value for egress packetsSet a DSCP value for egress packets based on ingress QoS classification, as shown in Figure 41-2. The 6bits that are used for DSCP are also used to identify the queue in which traffic is buffered. When you set aDSCP value, FTOS displays an informational message advising you of the queue to which you shouldapply the QoS policy (using the command service-queue from POLICY-MAP-IN mode). If you apply theQoS policy to a queue other than the one specified in the informational message, FTOS replaces the first 3bits in the DSCP field with the queue ID you specified.Note: When changing a "service-queue" configuration in a QoS policy map, all QoS rules are deleted andre-added automatically to ensure that the order of the rules is maintained. As a result, the MatchedPackets value shown in the "show qos statistics" command is reset.