NetFlow Analyzer lets you create child policies under the parent policies.
To configure a traffic policy (also referred to as a policy map), use the policy-map command. The policy-map command allows you to specify the traffic policy name and also allows you to enter policy-map configuration mode (a prerequisite for enabling QoS features such as traffic policing or traffic shaping).
Associate the Traffic Policy with the Traffic Class
After using the policy-map command, use the class command to associate the traffic class (created in the "Creating a Traffic Class" section) with the traffic policy.
The syntax of the class command is as follows:
class class-name
no class class-name
For the class-name argument, use the name of the class you created when you used the class-map command to create the previous traffic class (Step 3 of the "Creating a Traffic Class" section).
After entering the class command, you are automatically in policy-map class configuration mode. The policy-map class configuration mode is the mode used for enabling the specific QoS features.
Procedure
To create a traffic policy (or policy map) and enable one or more QoS features, perform the following steps.
Command or Action | Purpose | |
Step 1 | Router> enable | Enables privileged EXEC mode. |
Step 2 | Router# configure terminal | Enters global configuration mode. |
Step 3 | Router(config)# policy-map policy-name | Creates or specifies the name of the traffic policy and enters policy-map configuration mode. |
Step 4 | Router(config-pmap)# class {class-name |class-default} | Specifies the name of a traffic class (previously created in the "Creating a Traffic Class" section) and enters policy-map class configuration mode. |
Use one or more of the following commands to enable the specific QoS feature you want to use. | ||
Step 5 | Router(config-pmap-c)# bandwidth {bandwidth-kbps | percent percent } | (Optional) Specifies a minimum bandwidth guarantee to a traffic class in periods of congestion. A minimum bandwidth guarantee can be specified in kbps or by a percentage of the overall available bandwidth. |
Step 6 | Router(config-pmap-c)# fair-queue number-of-queues | (Optional) Specifies the number of queues to be reserved for a traffic class. |
Step 7 | Router (config-pmap-c)# police bps [burst-normal][burst-max] conform-action action exceed-action action [violate-action action] | (Optional) Configures traffic policing. |
Step 8 | Router(config-pmap-c)# priority{bandwidth-kbps | percent percentage} [burst] | (Optional) Gives priority to a class of traffic belonging to a policy map. |
Step 9 | Router(config-pmap-c)# queue-limit number-of-packets | (Optional) Specifies or modifies the maximum number of packets the queue can hold for a class configured in a policy map. |
Step 10 | Router(config-pmap-c)# random-detect [dscp-based | prec-based] | (Optional) Enables Weighted Random Early Detection (WRED) or distributed WRED (DWRED). |
Step 11 | Router(config-pmap-c)# set atm-clp | (Optional) Sets the cell loss priority (CLP) bit when a policy map is configured. |
Step 12 | Router(config-pmap-c)# set cos{cos-value | from-field [table table-map-name]} | (Optional) Sets the Layer 2 class of service (CoS) value of an outgoing packet. |
Step 13 | Router(config-pmap-c)# set discard-class value | (Optional) Marks a packet with a discard-class value. |
Step 14 | Router(config-pmap-c)# set [ip] dscp {dscp-value | from-field [table table-map-name]} | (Optional) Marks a packet by setting the differentiated services code point (DSCP) value in the type of service (ToS) byte. |
Step 15 | Router(config-pmap-c)# set fr-de | (Optional) Changes the discard eligible (DE) bit setting in the address field of a Frame Relay frame to 1 for all traffic leaving an interface. |
Step 16 | Router(config-pmap-c)# set precedence{precedence-value | from-field[table table-map-name]} | (Optional) Sets the precedence value in the packet header. |
Step 17 | Route(config-pmap-c)# set mpls experimental value | (Optional) Designates the value to which the MPLS bits are set if the packets match the specified policy map. |
Step 18 | Router (config-pmap-c)# set qos-group{group-id | from-field [table table-map-name]} | (Optional) Sets a QoS group identifier (ID) that can be used later to classify packets. |
Step 19 | Router(config-pmap-c)# service-policy policy-map-name | (Optional) Specifies the name of a traffic policy used as a matching criterion (for nesting traffic policies [hierarchical traffic policies] within one another). |
Step 20 | Router(config-pmap-c)# shape {average | peak } mean-rate [burst-size [excess-burst-size ]] | (Optional) Shapes traffic to the indicated bit rate according to the algorithm specified. |
Step 21 | Router(config-pmap-c)# exit | (Optional) Exits policy-map class configuration mode. |
Traffic policy can be nested within another traffic policy using the service-policy command. It’s called Hierarchical traffic policy. This policy that holds another policy is the parent policy and the nested one is called child policy.
Sample configuration of policy with parent-child relationship: