Route policies are created in the config>router context. There are no default route policies. Each route policy must be explicitly created and applied. Applying route policies can introduce more efficiency as well as more complexity to routers’ .
Figure 38 depicts an example of the route policy process.
Route policies can also match a given route policy entry and continue to search for other entries within either the same route policy or the next route policy by specifying the next-entry or
next-policy option in the entry’s
action command. Policies can be constructed to support multiple states to the evaluation and setting of various route attributes.
Figure 39 depicts the next-policy and next-entry route processes.
When a route's FoM value exceeds the suppress value, then the route is removed from the routing table. The route is considered to be stable when the FoM drops below the reuse value by means of the specified half life parameter. The route is returned to the routing tables. When routes have higher FoM and half life values, they are suppressed for longer periods of time.
Figure 40 depicts an example of a flapping route, the suppress threshold, the half life decay (time), and reuse threshold. The peaks represent route flaps, the slopes represent half life decay.
A:ALA-B>config>router>policy-options# info
----------------------------------------------
community "all-types" members "5000:[1-6][1-9][0-9]"
community "all-normal" members "5000:[1-5][1-9][0-9]"
. . .
as-path "Outside madeup paths" ".* 5001 .*"
as-path "Outside Internet paths" ".* 5002 .*"
policy-statement "RejectOutsideASPaths"
entry 1
from
protocol bgpospf
as-path "Outside madeup paths"
exit
action reject
exit
exit
entry 2
from
protocol bgpospf
as-path "Outside Internet paths"
exit
action reject
exit
exit
entry 3
from
protocol ospf
exit
to
protocol bgpospf
exit
action reject
exit
exit
entry 4
from
protocol isis
exit
to
protocol bgpospf
exit
action reject
exit
exit
default-action accept
exit
exit
policy-statement "aggregate-customer-peer-only"
entry 1
from
community "all-customer-announce"
exit
action accept
exit
exit
default-action reject
exit
exit
----------------------------------------------
A:ALA-B>config>router>policy-options#
Use the following CLI 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 ).
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.
Example:
config>router# policy-options
policy-options# begin
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 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.
|
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.
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#
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 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.
|
A:ALA-B>config>router>policy-options# info
----------------------------------------------
policy-statement "1"
default-action accept
as-path add "test"
community add "365"
damping "flaptest"
next-hop 10.10.10.104
exit
exit
----------------------------------------------
A:ALA-B>config>router>policy-options#
A:ALA-B>config>router>policy-options# info
----------------------------------------------
policy-statement "1"
entry 1
to
protocol bgp
neighbor 10.10.10.104
exit
action accept
exit
exit
entry 2
from
protocol ospf 1
exit
to
protocol ospf
neighbor 10.10.0.91
exit
action accept
exit
exit
default-action accept
. . .
exit
exit
----------------------------------------------
A:ALA-B>config>router>policy-options#
policy-statement "exporttmsgrt"
entry 1
from
protocol vpn-leak
exit
action accept
exit
exit
entry 2
from
protocol tms
exit
action accept
exit
exit
exit
commit
exit
exit
A:ALA-B>config>router>policy-options# info
----------------------------------------------
community "eastern" members "100:200"
community "western" members "100:300"
community "northern" members "100:400"
community "southern" members "100:500"
community "headquarters" members "100:1000"
policy-statement "1"
entry 1
to
protocol bgp
neighbor 10.10.10.104
exit
action accept
. . .
----------------------------------------------
A:ALA-B>config>router>policy-options#
•
|
The suppress value must be greater than the reuse value (see Figure 40).
|
•
|
Damping can be enabled in the config>router>bgp context on the BGP global, group, and neighbor levels. If damping is enabled, but route policy does not specify a damping profile, the default damping profile will be used. This profile is always present and consists of the following parameters:
|
*A:cses-A13>config>router>policy-options# info
----------------------------------------------
damping "damptest123"
half-life 15
max-suppress 60
reuse 750
suppress 1000
exit
----------------------------------------------
*A:cses-A13>config>router>policy-options#
A:ALA-B>config>router>policy-options# info
----------------------------------------------
prefix-list "western"
prefix 10.10.0.1/32 exact
prefix 10.10.0.2/32 exact
prefix 10.10.0.3/32 exact
prefix 10.10.0.4/32 exact
exit
damping "damptest123"
half-life 15
max-suppress 60
reuse 750
exit
----------------------------------------------
A:ALA-B>config>router>policy-options#
•
|
interface matches any join message received on the specified interface
|
•
|
neighbor matches any join message received from the specified neighbor
|
A:ALA-B>config>router# policy-options
A:ALA-B>config>router>policy-options# begin
A:ALA-B>config>router>policy-options# policy-statement foo
A:ALA-B>config>router>policy-options>policy-statement$ entry 10
A:ALA-B>config>router>policy-options>policy-statement>entry$ from
A:ALA-B>config>router>policy-options>policy-statement>entry>from$ group-address 229.50.50.208/32
A:ALA-B>config>router>policy-options>policy-statement>entry>from$ source-address 192.168.0.0
A:ALA-B>config>router>policy-options>policy-statement>entry>from$ exit
A:ALA-B>config>router>policy-options>policy-statement>entry# action reject
A:ALA-B>config>router>policy-options>policy-statement>entry#
A:ALA-B>config>router>policy-options# policy-statement reg-pol
A:ALA-B>config>router>policy-options>policy-statement$ entry 10
A:ALA-B>config>router>policy-options>policy-statement>entry$ from
A:ALA-B>config>router>policy-options>policy-statement>entry>from$ group-address 224.0.0.0/8
A:ALA-B>config>router>policy-options>policy-statement>entry# action accept
A:ALA-B>config>router>policy-options>policy-statement>entry>action# exit
A:ALA-B>config>router>policy-options>policy-statement>entry# exit
A:ALA-B>config>router>policy-options>policy-statement# exit
A:ALA-B>config>router>policy-options# info
----------------------------------------------
...
policy-statement "foo"
entry 10
from
group-address "229.50.50.208/32"
source-address 192.168.0.0
exit
action reject
exit
exit
policy-statement "reg-pol"
entry 10
from
group-address "224.0.0.0/8"
exit
action accept
exit
exit
exit
...
----------------------------------------------
A:ALA-B>config>router>policy-options#
A:ALA-B>config>router>policy-options# policy-statement pim-import
:A:ALA-B>config>router>policy-options>policy-statement$ entry 10
:A:ALA-B>config>router>policy-options>policy-statement>entry$ from
:A:ALA-B>config>router>policy-options>policy-statement>entry>from$ interface port 1/1/1
:A:ALA-B>config>router>policy-options>policy-statement>entry>from$ exit
:A:ALA-B>config>router>policy-options>policy-statement>entry# action reject
:A:ALA-B>config>router>policy-options>policy-statement>entry# exit
:A:ALA-B>config>router>policy-options>policy-statement# exit
:A:ALA-B>config>router>policy-options# policy-statement pim-export
:A:ALA-B>config>router>policy-options>policy-statement$ entry 10
:A:ALA-B>config>router>policy-options>policy-statement>entry$ to
:A:ALA-B>config>router>policy-options>policy-statement>entry>to$ interface port 1/1/1
:A:ALA-B>config>router>policy-options>policy-statement>entry# action reject
:A:ALA-B>config>router>policy-options>policy-statement>entry# exit
:A:ALA-B>config>router>policy-options>policy-statement# exit
:A:ALA-B>configure router pim rp bootstrap-import pim-import
:A:ALA-B>configure router pim rp bootstrap-export pim-export
Editing Policy Statements and Parameters
Route policy statements can be edited
to modify, add, or delete parameters. To enter the mode to edit route policies, you must enter the
begin keyword at the
config>router> policy-options prompt. Other editing commands include:
•
|
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.
|
A:ALA-B>config>router>policy-options>policy-statement# info
----------------------------------------------
description "Level 1"
entry 1
to
protocol bgp
neighbor 10.10.10.104
exit
action accept
exit
exit
entry 2
from
protocol ospf
exit
to
protocol ospf
neighbor 10.10.0.91
exit
action accept
exit
exit
entry 4
description "new entry"
from
protocol isis
area 0.0.0.20
exit
action reject
exit
default-action accept
as-path add "test"
community add "365"
damping "flapper"
next-hop 10.10.10.104
exit
----------------------------------------------
Use the following CLI syntax to delete a policy statement entry:
Example: config>router>policy-options# begin
Use the following CLI syntax to delete a policy statement:
CLI Syntax: config>router>policy-options
Example: config>router>policy-options# begin