Routing Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Routing Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Modify routing policies

Want to summarize with AI?

Log in

Explains how to update attached and unattached policies safely, preserve references, and use nondestructive editing behavior to avoid unintended policy replacement.


Modifying routing policies is the process of changing route policies that

  • updates an attached policy by respecifying it at the attach point to avoid a gap where default behavior applies

  • allows a nonattached policy to reference sets or policies that you define later, while requiring all references to exist when you attach the policy, and

  • supports nondestructive edits by using rpl set-exit-as-abort so exit aborts changes instead of applying and replacing the existing policy.


Attached policy modification

You may need to change a policy that is already used at an attach point. If you remove and create the policy again, there may be a time when the attach point has no policy. During this gap, the system uses the default behavior.

To avoid this gap, set the policy again at the attach point. This process ensures that the system updates the policy without any time when no policy is applied.

Note

You cannot remove a route policy or set that is used at an attach point. The system does not remove the policy and shows an error because removing the policy would create an undefined reference.


Nonattached policy modification

If you do not attach a policy to an attach point, you can reference sets or policies that do not exist yet. Build configurations in stages and define any missing sets or policies later.

For example, a policy can use apply to reference another policy that you plan to create later, and a policy statement can reference a set that is not defined yet.

When you attach a policy, ensure that all referenced policies and sets exist. If you attach a policy that references an undefined policy or set, the system rejects the configuration.


Nondestructive editing of routing policy

Nondestructive editing changes the behavior of the exit command in routing policy configuration mode. With nondestructive editing, exit aborts the edit rather than applying it.

By default, the exit command acts as end-policy , end-set , or end-if . When you use exit in routing policy configuration mode, the system applies your changes. This updates the configuration and replaces the existing policy.

Use rpl set-exit-as-abort command to override the default behavior of exit command in routing policy configuration mode.