Service Policy Configuration

A service policy is configured using the policy-map command to specify a service policy name. The traffic class is associated with the service policy with the class command.

The QoS policies for the service policy are defined in policy map submode. The QoS policies that can be applied in the service policy in policy map submode are detailed in this section.

The policy-map syntax is as follows:

policy-map policy-name no policy-map policy-name

The class command syntax is as follows:

class class-name no class class-name

If a default class is configured, all traffic that fails to meet the matching criteria belongs to the default class. Step 1. Create a policy map that can be attached to one or more interfaces to specify a service policy:

Router(config)# policy-map policy-map-name

Step 2. Specify the name of the class map previously designated in the class-map command: Router(config-pmap)# class class-map-name Step 3. Specify the default class to be created as part of the service policy: Router(config-pmap)# class class-default NOTE

Steps 4 through 15 are the policy map class submode configuration options.

Step 4. Specify a minimum bandwidth guarantee to a traffic class. A minimum bandwidth guarantee can be specified in kilobits per second or by a percentage of the overall available bandwidth:

Router(config-pmap-c)# bandwidth {bandwidth-kbps | percent percent}

Step 5. Set a command to its default value:

Router(config-pmap-c)# default command

Step 6. Specify the number of queues to be reserved for the class:

Router(config-pmap-c)# fair-queue number-of-queues

Step 7. Specify a maximum bandwidth usage by a traffic class through the use of a token bucket algorithm:

Router(config-pmap-c)# police bps burst-normal burst-max conform-action action exceed-action action violate-action action

The following action is enforced by the police command on incoming packets: drop— Drops the packet.

set-prec-transmitnew-prec— Sets the IP precedence and transmits the packet.

set-qos-transmitnew-^os— Sets the QoS group and transmits the packet.

set-dscp-transmit— Sets the DSCP value and transmits the packet.

set-atm-clp— Sets the ATM CLP bit from 0 to 1 on the packet.

transmit— Transmits the packet.

Step 8. Specify the guaranteed allowed bandwidth (in Kbps or percentage) for priority traffic. The optional bytes argument controls the size of the burst allowed to pass through the system without being considered in excess of the configured Kbps rate:

Router(config-pmap-c)# priority {kbps | percent percent} [bytes]

Step 9. Specify the maximum number of packets queued for a traffic class (in the absence of the random-detect command):

Router(config-pmap-c)# queue-limit packets

Step 10. Enable a WRED drop policy for a traffic class that has a bandwidth guarantee:

Router(config-pmap-c)# random-detect

Step 11. Set the ATM cell loss priority bit to 1:

Router(config-pmap-c)# set atm-clp

Step 12. Specify a CoS value or values to associate with the packet. The number is in the range 0-7:

Router(config-pmap-c)# set cos cos-value

Step 13. Specify the IP DSCP of packets within a traffic class. The IP DSCP value can be any value between 0 and 63:

Router(config-pmap-c)# set ip dscp ip-dscp-value

Step 14. Specify the IP precedence of packets within a traffic class. The IP precedence value can be any value between 0 and 7:

Router(config-pmap-c)# set ip precedence ip-precedence-value Step 15. Designate the value to which the MPLS bits are set if the packets match the specified policy map: Router(config-pmap-c)# set mpls experimental value Step 16. Exit policy map configuration mode:

Router(config-pmap-c)# end

For example, use the following code to configure a policy map so that the value in the MPLS experimental field of each packet that is matched by the class map critical is set to 4:

Router(config)# policy-map set_experimental_4

Router(config-pmap)# class critical Router(config-pmap-c)# set mpls experimental 4

Router(config-pmap-c)# end

Continue reading here: Packet Based Mpls Vpns

Was this article helpful?

0 0