Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Enable and Configure Instances of the Ephemeral Configuration Database

The ephemeral database is an alternate configuration database that enables multiple client applications to concurrently load and commit configuration changes to a Junos device and with significantly greater throughput than when committing data to the candidate configuration database. Junos devices provide a default ephemeral database instance as well as the ability to enable and configure multiple user-defined instances of the ephemeral configuration database.

NETCONF and Junos XML protocol client applications and JET applications can update the ephemeral configuration database. The following sections detail how to enable instances of the ephemeral configuration database, configure the instances using NETCONF and Junos XML protocol operations, and display ephemeral configuration data in the CLI. The sections also discuss how to deactivate and then reactivate an ephemeral instance as well as delete an ephemeral instance. For information about using JET applications to configure the ephemeral configuration database, see the Juniper Extension Toolkit Documentation.

Enable Ephemeral Database Instances

The default ephemeral database instance is automatically enabled on Junos devices that support configuring the ephemeral database. However, you must configure all user-defined instances of the ephemeral configuration database before using them. See Feature Explorer to verify the hardware platforms and software releases that support the ephemeral database.

To enable a user-defined instance of the ephemeral configuration database:

  1. Configure the name of the instance, which must contain only alphanumeric characters, hyphens, and underscores and must not exceed 32 characters in length or use default as the name.
    Note:

    The order in which the configuration lists the ephemeral database instances determines their priority. By default, newly configured instances are placed at the end of the list and have lower priority when resolving conflicting configuration statements. When you configure a new instance, you can specify its placement in the configuration by using the insert command instead of the set command.

    Note:

    Starting in Junos OS Release 17.1R3, 17.2R3, 17.3R3, 17.4R2, and 18.1R1, the name of an user-defined ephemeral database instance cannot be default.

  2. Commit the configuration.
Note:

When you configure statements at the [edit system configuration-database ephemeral] hierarchy level and commit the configuration, all Junos processes must check and evaluate their complete configuration, which might cause a spike in CPU utilization, potentially impacting other critical software processes.

Configure Ephemeral Database Options

You can configure several options for the ephemeral configuration database, which are outlined in this section. You configure the options in the static configuration database.

  1. (Optional) To disable the default instance of the ephemeral configuration database, configure the ignore-ephemeral-default statement.
  2. (Optional) Configure the commit synchronize model as asynchronous (the default) or synchronous.

    The synchronous commit model is slower, but it is more reliable when synchronizing the configuration to a backup Routing Engine.

  3. (Optional) When the device has graceful Routing Engine switchover (GRES) enabled, and the ephemeral database uses the asynchronous commit synchronize model, configure the allow-commit-synchronize-with-gres statement to enable the device to synchronize an ephemeral instance to the other Routing Engine when you request a commit synchronize operation on that instance.
  4. Commit the configuration.
Note:

When you configure statements at the [edit system configuration-database ephemeral] hierarchy level and commit the configuration, all Junos processes must check and evaluate their complete configuration, which might cause a spike in CPU utilization, potentially impacting other critical software processes.

Enable MSTP, RSTP, and VSTP Configuration

On supported devices and releases, you can configure the following protocols in the ephemeral configuration database:

  • Multiple Spanning Tree Protocol (MSTP)

  • Rapid Spanning Tree Protocol (RSTP)

  • VLAN Spanning Tree Protocol (VSTP)

Junos OS Evolved supports configuring these protocols in the ephemeral database in supported releases by default. However, on devices running Junos OS, you must enable support for configuring the protocols in the ephemeral database before using them.

To enable users to configure MSTP, RSTP, and VSTP in the ephemeral database on devices running Junos OS:

  1. In the static configuration database, configure the ephemeral-db-support statement at the [edit protocols layer2-control] hierarchy level.
  2. Commit the configuration.

Open Ephemeral Database Instances

A client application must open an ephemeral database instance before viewing or modifying it. Within a NETCONF or Junos XML protocol session, a client application opens the ephemeral database instance by using the Junos XML protocol <open-configuration> operation with the appropriate child tags. Opening the ephemeral instance automatically acquires an exclusive lock on it.

  • To open the default instance of the ephemeral database, a client application emits the <open-configuration> element and includes the <ephemeral/> child tag.

  • To open a user-defined instance of the ephemeral database, a client application emits the <open-configuration> element and includes the <ephemeral-instance> element and the instance name.

Configure Ephemeral Database Instances

Client applications update the ephemeral configuration database using NETCONF and Junos XML protocol operations. Only a subset of the operations’ attributes and options are available for use when updating the ephemeral configuration database. For example, options and attributes that reference groups, interface ranges, or commit scripts, or that roll back the configuration cannot be used with the ephemeral database.

Client applications load and commit configuration data to an open instance of the ephemeral configuration database. Configuration data can be uploaded in any of the supported formats including Junos XML elements, formatted ASCII text, set commands, or JavaScript Object Notation (JSON). By default, if a client disconnects from a session or closes the ephemeral database instance before committing new changes, the device discards any uncommitted data, but configuration data that has already been committed to the ephemeral database instance by that client is unaffected.

To update, commit, and close an open instance of the ephemeral configuration database, client applications perform the following tasks:

  1. Load configuration data into the ephemeral database instance by performing one or more load operations.

    Client applications emit the <load-configuration> operation in a Junos XML protocol session or the <load-configuration> or <edit-config> operation in a NETCONF session and include the appropriate attributes and tags for the data.

    Note:

    The ephemeral configuration database supports the action attribute values override and replace starting in Junos OS Release 18.1R1 and supports the update attribute on supported devices starting in Junos OS Release 21.1R1.

    Note:

    The only acceptable format for action="set" is "text". For more information about the <load-configuration> operation, see <load-configuration>.

    Note:

    The target value <candidate/> can refer to either the open configuration database, or if there is no open database, to the candidate configuration. If a client application issues the Junos XML protocol <open-configuration> operation to open an ephemeral instance before executing the <edit-config> operation, the device performs the <edit-config> operation on the open instance of the ephemeral configuration database. Otherwise, the device performs the operation on the candidate configuration.

  2. (Optional) Review the updated configuration in the open ephemeral instance by emitting the <get-configuration/> operation in a Junos XML protocol session or the <get-configuration/> or <get-config> operation in a NETCONF session.
  3. Commit the configuration changes by emitting the <commit-configuration/> operation in a Junos XML protocol session or the <commit-configuration/> or <commit/> operation in a NETCONF session.

    Include the <synchronize/> tag in the <commit-configuration> element to synchronize the data to a backup Routing Engine or to other members of a Virtual Chassis.

    Note:

    Starting in Junos OS Release 22.1R1, to automatically synchronize an ephemeral instance's configuration to the other Routing Engine every time you commit the instance, include the synchronize statement at the [edit system commit] hierarchy level within the configuration for the specific ephemeral instance.

    Note:

    After a client application commits changes to the ephemeral database instance, the device merges the ephemeral data into the active configuration according to the rules of prioritization.

  4. Repeat steps 1 through 3 for any subsequent updates to the ephemeral database instance.
  5. Close the ephemeral database instance, which releases the exclusive lock.

Display Ephemeral Configuration Data in the CLI

The active device configuration is a merged view of the static and ephemeral configuration databases. However, when you display the configuration in the CLI using the show configuration command in operational mode, the output does not include ephemeral configuration data. You can display the data in a specific instance of the ephemeral database or display a merged view of the static and ephemeral configuration databases in the CLI by using variations of the show ephemeral-configuration command.

Starting in Junos OS Release 18.2R1, the show ephemeral-configuration operational mode command uses a different syntax and supports filtering for displaying specific hierarchy levels. The new syntax is as follows:

  • To view the configuration data in the default instance of the ephemeral configuration database, issue the show ephemeral-configuration instance default command.

  • To view the configuration data in a user-defined instance of the ephemeral configuration database, issue the show ephemeral-configuration instance instance-name command.

  • To view the complete post-inheritance configuration merged with the configuration data in all instances of the ephemeral database, issue the show ephemeral-configuration merge command.

  • To specify the scope of the configuration data to display in a specific ephemeral instance, append the statement path of the requested hierarchy to the command. For example, the following command displays the configuration data at the [edit system] hierarchy level in the default instance of the ephemeral configuration database.

In Junos OS Release 18.1 and earlier releases:

  • To view the configuration data in the default instance of the ephemeral configuration database, issue the show ephemeral-configuration command.

  • To view the configuration data in a user-defined instance of the ephemeral configuration database, issue the show ephemeral-configuration instance-name command.

  • To view the complete post-inheritance configuration merged with the configuration data in all instances of the ephemeral database, issue the show ephemeral-configuration | display merge command.

Table 1 outlines the show ephemeral-configuration commands for the various releases.

Table 1: show ephemeral-configuration Command

Action

Junos OS Release 18.2R1 and Later
and Junos OS Evolved

Junos OS Release 18.1 and Earlier

View the configuration data in the default ephemeral instance

show ephemeral-configuration instance default

show ephemeral-configuration

View the configuration data in a user-defined ephemeral instance

show ephemeral-configuration instance instance-name

show ephemeral-configuration instance-name

View the complete post-inheritance configuration merged with the configuration data in all instances of the ephemeral database

show ephemeral-configuration merge

show ephemeral-configuration | display merge

Deactivate Ephemeral Database Instances

When you enable and configure an ephemeral instance, the Junos device stores the instance's configuration data in files, which is similar to the operation of the static configuration database. You can deactivate a specific ephemeral instance within the static configuration database. When you deactivate an instance and commit the configuration, the device preserves the instance's configuration data and files, but it does not merge the instance's configuration with the static configuration database. If you later reactivate the instance in the static configuration database, the device merges the instance's existing configuration data with the static configuration database.

Note:

On devices running Junos OS Release 22.1R1 or later and devices running Junos OS Evolved, when you deactivate the entire [edit system configuration-database ephemeral] hierarchy level and commit the configuration, the device deletes the files and corresponding configuration data for all user-defined ephemeral instances. In earlier Junos OS releases, the files and configuration data are preserved; however, the configuration data is not merged with the static configuration database. Deactivating the hierarchy does not affect the default ephemeral instance's files.

To deactivate the default ephemeral instance or a user-defined ephemeral instance in the static configuration database:

  1. Deactivate the ephemeral database instance.
    • Deactivate the default ephemeral instance by configuring the ignore-ephemeral-default statement.

    • Deactivate a user-defined ephemeral instance by issuing the deactivate command and specifying the instance name.

  2. Commit the configuration.

To reactivate an ephemeral instance and thus merge its configuration with the static configuration database again:

  1. Activate the ephemeral database instance.

    • Activate the default ephemeral instance by deleting the ignore-ephemeral-default statement.

    • Activate a user-defined ephemeral instance by issuing the activate command and specifying the instance name.

  2. Commit the configuration.

Delete Ephemeral Database Instances

When you enable and configure an ephemeral instance, the Junos device stores the instance's configuration data in files, which is similar to the operation of the static configuration database. On devices running Junos OS Release 22.1R1 or later and devices running Junos OS Evolved, when you delete an ephemeral instance from the static configuration database and commit the configuration, the device also deletes the ephemeral instance's files and corresponding configuration data. Thus, if you later configure an ephemeral instance with the same name, there is no existing configuration data associated with this instance name.

However, in earlier Junos OS releases, when you delete an ephemeral instance, the device preserves the ephemeral instance's files. Thus, if you later configure an ephemeral instance with the same name, the device restores the configuration data associated with the instance name from the corresponding files. If you intend to delete an ephemeral instance in an earlier release, we recommend that you delete the configuration data in the ephemeral instance before you delete the instance from the static configuration database.

To delete the default ephemeral instance or a user-defined ephemeral instance from the static configuration database:

  1. Delete the ephemeral database instance.
    • Delete the default ephemeral instance by configuring the delete-ephemeral-default and ignore-ephemeral-default statements.

      Note:

      The delete-ephemeral-default statement is supported on devices running Junos OS Release 22.1R1 or later and devices running Junos OS Evolved.

    • Delete a user-defined ephemeral instance by issuing the delete command and specifying the instance name.

  2. Commit the configuration.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
22.1R1
Starting in Junos OS Release 22.1R1, when you deactivate the entire [edit system configuration-database ephemeral] hierarchy level, Junos OS deletes the files and corresponding configuration data for all user-defined ephemeral instances. In earlier releases, the files and configuration data are preserved; however, the configuration data is not merged with the static configuration database.
22.1R1
Starting in Junos OS Release 22.1R1, when you delete an ephemeral instance in the static configuration database, the instance's configuration files are also deleted. In earlier releases, the configuration files are preserved.
18.2R1
Starting in Junos OS Release 18.2R1, the show ephemeral-configuration operational mode command uses a different syntax and supports filtering for displaying specific hierarchy levels.
18.1R1
Starting in Junos OS Release 18.1R1, the ephemeral configuration database supports loading configuration data using the <load-configuration> action attribute values of override and replace in addition to the previously supported values of merge and set.