[Contents] [Prev] [Next] [Index] [Report an Error]

Generating a Persistent or Transient Configuration Change

You can use a commit script to specify configuration rules that you always want to enforce. If a rule is broken, then the commit script corrects the problem by changing the candidate configuration with a persistent or transient configuration change.

A change is persistent in the sense that if you subsequently remove or disable the commit script and then issue a new commit command, the change persists in the configuration and continues to affect routing operations. In short, if the commit script is removed, the persistent change is not removed with it.

A transient change, in contrast, causes a change to be generated in the checkout configuration but not in the candidate configuration. The checkout configuration is the configuration database that is inspected for standard JUNOS syntax just before a configuration becomes active. The change is transient in the sense that if you subsequently remove or disable the associated commit script and then issue a new commit command, the change no longer exists in the checkout or active configuration and no longer affects the routing platform components. In short, if the commit script is removed, the transient change is removed with it. You can use transient changes to eliminate the need to repeatedly configure and display well-known policies, thus allowing these policies to be enforced implicitly. For example, if Multiprotocol Label Switching (MPLS) must be enabled on every interface with an International Organization for Standardization (ISO) protocol enabled, the change can be transient, so that the repetitive or redundant configuration data need not be carried or displayed in the candidate configuration. Furthermore, transient changes allow you to write script instructions that apply the change only if a set of conditions is met.

Table 11 describes the differences between persistent and transient configuration changes.

To generate changes, you can use the <jcs:emit-change> template, which implicitly includes <change> and <transient-change> XML elements; or you can explicitly include <change> and <transient-change> XML elements. Using the <jcs:emit-change> template allows you to set the hierarchical context of the change once rather than multiple times. This concept is demonstrated later in this chapter.

The <change> and <transient-change> elements are similar to the <load-configuration> element in the JUNOScript API. The possible contents of the <change> and <transient-change> elements are the same as the contents of the <configuration> tag element in the JUNOScript <load-configuration> operation. For complete details about the <load-configuration> element, see the JUNOS XML API Configuration Reference.

This chapter discusses the following topics:


[Contents] [Prev] [Next] [Index] [Report an Error]