[Contents] [Prev] [Next] [Index] [Report an Error]


Creating Classifier Groups and Policy Rules

Classifier groups contain the policy rules that make up a policy list. A policy rule is an association between a policy action and an optional CLACL. The CLACL defines the packet flow on which the policy action is taken.

A policy list might contain multiple classifier groups—you can specify the precedence in which classifier groups are evaluated. Classifier groups are evaluated starting with the lowest precedence value. Classifier groups with equal precedence are evaluated in the order of creation.

NOTE: For IP policies, the forward command supports the order keyword, which enables you to order multiple forward rules within a single classifier group. (See Creating Multiple Forwarding Solutions with IP Policy Lists.)


From Policy Configuration mode, you can assign a precedence value to a CLACL by using the precedence keyword when you create a classifier group. The default precedence value is 100. For example:

host1(config-policy-list)#classifier-group ipCLACL25 precedence 21
host1(config-policy-list-classifier-group)#

The classifier-group command puts you in Classifier Group Configuration mode. In this mode you configure the policy rules that make up the policy list. For example:

host1(config-policy-list-classifier-group)#forward next-hop 172.18.20.54 

To stop and start a policy rule without losing statistics, you can suspend the rule. Suspending a rule maintains the policy rule with its current statistics, but the rule no longer affects packets in the forwarding path.

From Classifier Group Configuration mode, you can suspend a rule by using the suspend version of that policy rule command. The no suspend version reactivates a suspended rule. For example:

host1(config-policy-list-classifier-group)#suspend forward next-hop 172.18.20.54 
host1(config-policy-list-classifier-group)#no suspend forward next-hop 
172.18.20.54

You can add, remove, or suspend policy rules while the policy is attached to one or more interfaces. The modified policy takes effect once you exit Policy Configuration mode.

Policy Rule Support

Table 9 shows the policy rule commands that you can use for each type of policy list. Yes and No indicate whether the command is supported. NA indicates that the command does not apply to that type of interface.




Table 9: Policy Rule Commands  
Policy Command
Frame Relay
GRE
IP
IPv6
L2TP
MPLS
VLAN

color

Yes

Yes

Yes

Yes

Yes

Yes

Yes

filter

Yes

Yes

Yes

Yes

Yes

Yes

Yes

forward

Yes

Yes

Yes

Yes

Yes

Yes

Yes

log

No

No

Yes

No

No

No

No

mark

NA

Yes

Yes

Yes

NA

NA

NA

mark-de

Yes

NA

NA

NA

NA

NA

NA

mark-exp

NA

NA

NA

NA

NA

Yes

NA

mark-user-priority

NA

NA

NA

NA

NA

NA

Yes

next-hop

NA

No

Yes (input policies only)

No

NA

NA

NA

next-interface

NA

No

Yes (input and secondary input policies only)

No

NA

NA

NA

rate-limit-profile

No

No

Yes

Yes

Yes

Yes

No

traffic-class

Yes

Yes

Yes

Yes

Yes

Yes

Yes

user-packet-class

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Rules That Provide Routing Solutions

The next interface, next hop, filter, and forward rules provide routing solutions for traffic matching a classifier. A classifier can have only one action that provides a routing solution.

If you configure two routing solution rules, such as filter and forward, in the same classifier group, the router displays a warning message, and the rule configured last replaces the previous rule.

Creating Multiple Forwarding Solutions with IP Policy Lists

By default, the router uses a single route table lookup to determine the forwarding solution for packets. For IP policy lists only, the forward command enables you to configure one or more unique forwarding solutions (interfaces or next-hop addresses) that override the route table lookup. By creating a group of forwarding solutions, you can ensure that there is a reachable solution for the packets.

You can use the order keyword to specify the order of the group of forwarding solutions within a single forward rule. If no order value is specified, then the default order of 100 is assigned to a solution. The router evaluates the forwarding solutions in the group, starting at the solution with the lowest order value, and then uses the first reachable solution. To be considered a reachable solution, a solution must be a reachable interface or a next-hop address that has a route in the routing table. If no solutions are reachable, the traffic is dropped.

The following guidelines apply when you create a group of forwarding solutions in an IP policy list:

In the following sample classifier group of a policy list, the forwarding solution of ATM interface 0/0.1 has the lowest order value in the group, and would therefore be selected as the solution for the policy list. However, if this interface is not reachable, the router then attempts to use the solution with the next higher order; which would be ATM interface 12/0.1. If none of the solutions in the group is reachable, the traffic is dropped.

host1(config-policy-list)#classifier-group westfordClacl precedence 200 
host1(config-policy-list-classifier-group)#forward interface atm 0/0.1 order 10 
host1(config-policy-list-classifier-group)#forward interface atm 12/0.1 order 50 
host1(config-policy-list-classifier-group)#forward interface atm 3/0.25 order 300 

NOTE: You can use the suspend version of the command to suspend an individual entry in a group of forwarding solutions. The forward rule remains "active" as long as there is a reachable or active entry in the group of forwarding solutions. If you suspend all entries in the group, the status of the forward rule is changed to "suspended."

Classifier Group Command

Use the command described in this section to create classifier groups. See Rate Limiting Individual or Aggregate Packet Flows for examples of using this command to rate limit traffic flows.

classifier-group

Policy Rule Commands

Use the commands described in this section to specify policy rules for classifier groups.

NOTE: The commands listed in this section replace the Policy List Configuration mode versions of the command. For example, the color command replaces the Policy List Configuration mode version of the color command. The original command may be removed completely in a future release.


color

filter

forward
    forward interface
    forward next-hop

log

mark

mark-de

mark-exp

mark-user-priority

next-hop

next-interface

rate-limit-profile

traffic-class

user-packet-class


[Contents] [Prev] [Next] [Index] [Report an Error]