Each term can include a then statement, which defines the actions to take if a route matches all the conditions in the from and to statements:
- [edit]
-
policy-options {
-
-
policy-statement policy-name {
-
- term term-name {
-
- from {
- family family-name;
-
match-conditions;
- policy subroutine-policy-name;
- prefix-list name;
- route-filter destination-prefix match-type <actions>;
- source-address-filter destination-prefix match-type <actions>;
- }
-
- to {
-
match-conditions;
- policy subroutine-policy-name;
- }
-
- then {
-
actions;
- }
- }
- }
- }
If a term does not have from and to statements, all routes are considered to match, and the actions apply to them all.
The then statement is optional.
You can specify one or more actions. There are three types of actions:
![]() |
Note: When you specify an action that manipulates the route characteristics, the changes occur in a copy of the source route. The source route itself does not change. The effect of the action is visible only after the route is imported into or exported from the routing table. To view the source route before the routing policy has been applied, use the show route receive-protocol command. To view a route after an export policy has been applied, use the show route advertised-protocol command. During policy evaluation, the characteristics in the copy of the source route always change immediately after the action is evaluated. However, the route is not copied to the routing table or a routing protocol until the completion of the policy evaluation is complete. |
If you do not include a then statement, one of the following occurs:
The following sections discuss the following action attributes: