Configuring route policy components

This section describes the syntax needed to configure the route policy components.

Beginning the policy statement

Use the following syntax to begin a policy statement configuration. In order for a policy statement to be complete an entry must be specified (see Configuring an entry).

config>router>policy-options
    begin
    policy-statement name
        description text

The following error message displays when the you try to modify a policy options command without entering begin first.

A:ALA-B>config>router>policy-options# policy-statement ‟allow all”
MINOR: CLI The policy
-options must be in edit mode by calling begin before any changes can be made.

The following example displays policy statement configuration command usage. These commands are configured in the config>router context.

config>router# policy-options
policy-options# begin

There are no default policy statement options. All parameters must be explicitly configured.

Creating a route policy

To enter the mode to create or edit route policies, you must enter the begin keyword at the config>router>policy-options prompt. Other editing commands include the following:

  • The commit command saves changes made to route policies during a session.

  • The abort command discards changes that have been made to route policies during a session.

The following error message displays when the you try to modify a policy options command without entering begin first.

A:ALA-B>config>router>policy-options# policy-statement ‟allow all”
MINOR: CLI The policy
-options must be in edit mode by calling begin before any changes can 
A:ALA-B>config>router>policy-options# info
#------------------------------------------
# Policy
#------------------------------------------

        policy-options
            begin
            policy-statement "allow all"
description "General Policy"
...
            exit
exit
----------------------------------------------
A:ALA-B>config>router>policy-options#

Configuring a default action

Specifying a default action is optional. The default action controls those packets not matching any policy statement entries. If no default action is specified for the policy, then the action associated with the protocol to which the routing policy was applied is performed.

A policy statement must include at least one entry (see Configuring an entry).

To enter the mode to create or edit route policies, you must enter the begin keyword at the config>router>policy-options prompt. Other editing commands include the following:

  • The commit command saves changes made to route policies during a session.

  • The abort command discards changes that have been made to route policies during a session.

Configuring an entry

An entry action must be specified. The other parameters in the entry>action context are optional. See Route policy command reference for the commands and syntax.

Entry configuration output

The following is a sample of entry parameters and includes the default action parameters which were displayed in Configuring a default action.

A:ALA-B>config>router>policy-options# info
----------------------------------------------
            prefix-list "host"
                prefix 10.0.0.0/8 longer
            exit
            prefix-list "group"
                prefix 10.6.6.6/32 exact
            exit
            policy-statement "block-igmp"
                description "Reject-Reports-From-Specific-Group-And-Host"
                entry 1
                    from
                        host-ip "host"
                    exit
                    action next-entry
                    exit
                exit
                entry 2
                    from
                        group-address "group"
                    exit
                    action reject
                exit
                default-action accept 
                exit
            exit
----------------------------------------------
A:ALA-B>config>router>policy-options#
A:ALA-B>config>router>policy-options# info
----------------------------------------------
            prefix-list "host"
                prefix 10.0.0.0/8 longer
            exit
            prefix-list "group"
                prefix 10.6.6.6/32 exact
            exit
----------------------------------------------
A:ALA-B>config>router>policy-options#