Configuring a route policy

The import route policy command allows you to filter routes being imported by the local router from its neighbors. If no match is found, the local router does not import any routes.

The export route policy command allows you to determine which routes are exported from the route table to RIP. By default, RIP does not export routes it has learned to its neighbors. If no export policy is specified, non-RIP routes are not exported from the routing table manager to RIP.

If multiple policy names are specified, the policies are evaluated in the order they are specified. The first policy that matches is applied. If multiple export commands are issued, the last command entered overrides the previous command. A maximum of five policy names can be specified.

This section only provides brief instructions to configure route policies. For more information, see the Route policies chapter.

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:

Use the following syntax to configure a policy to use for the RIP global, group, and neighbor import and export commands.

config>router>policy-options
    begin
    commit
    abort
    policy-statement name
    description text
    default-action {accept|reject}
    entry entry-id
        description text
        action {accept|reject}
        from
        to

Use the following syntax to enter the edit mode.

config>router> policy-options
    begin
Example

The following shows the command usage to configure a policy statement. Policy option commands are configured in the config>router context. Use the commit command to save the changes.

config>router>policy-options# begin
    policy-options# policy-statement ‟RIP-policy”
    policy-options>policy-statement$ description "this is a test RIP policy”
    policy-options>policy-statement>default# entry 1
    policy-options>policy-statement>entry$ action accept
    policy-options>policy-statement>entry# exit
    policy-options>policy-statement# default-action reject
    policy-options>policy-statement# exit
    policy-options# commit
ALA-A>config>router>policy-options# info
----------------------------------------------
policy-statement "RIP-policy"
description "this is a test RIP policy"
entry 1
action accept
exit
exit
default-action reject
exit
----------------------------------------------
ALA-A>config>router>policy-options>policy-statement#