Description

This article highlights the benefits of using next-policy when configuring multiple import policies in Firewall setups.

Symptoms

The firewall will not allow transit learning on import-policy 1 because the final term in this policy is set to "reject," effectively halting further evaluation and preventing the subsequent import-policy 2 from being processed.

 

Solution

For example, consider the following scenario:

 

You have multiple policies applied to a group: import_policies [ POLICY_NEW POLICY_1 POLICY_2 POLICY_3 ]

 

from {

                       instance POLICY_1 ;

                       route-filter 10.159.151.240/28 exact;

                   }

                   then accept;

               }

               term other {

                    then reject; >>> instead of reject, next policy.

 

Configuring the next policy statement in an import policy is beneficial because it ensures that all policy statements in a policy chain are processed. When multiple policies are chained together using instance-import or instance-export, all policy statements except the last one should not have a terminating action like accept or reject. Instead, they should use next policy as the action statement. This approach prevents the device from stopping the policy processing prematurely and ensures that all specified policies are evaluated.

 

Key Reference for Flow Control Actions:

 

Flow Control Action

Description

accept

Accept the route and propagate it. After a route is accepted, no other terms in the routing policy and no other routing policies are evaluated.

reject

Reject the route and do not propagate it. After a route is rejected, no other terms in the routing policy and no other routing policies are evaluated.

next policy

Skip to and evaluate the next routing policy. Any accept or reject action specified in the then statement is skipped. Any actions in the then statement that manipulate route characteristics are applied to the route.

next policy is the default control action if a match occurs, you do not specify a flow control action, and there are no further terms in the current routing policy.

 

Modification History

2024-12-09 : Article Created