ON THIS PAGE
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:
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.
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:
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.<rpc> <open-configuration> <ephemeral/> </open-configuration> </rpc>
-
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.<rpc> <open-configuration> <ephemeral-instance>instance-name</ephemeral-instance> </open-configuration> </rpc>
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:
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.user@host> show ephemeral-configuration instance default
-
To view the configuration data in a user-defined instance of the ephemeral configuration database, issue the
show ephemeral-configuration instance instance-name
command.user@host> show ephemeral-configuration instance instance-name
-
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.user@host> show ephemeral-configuration merge
-
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.user@host> show ephemeral-configuration instance default system
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.user@host> show ephemeral-configuration
-
To view the configuration data in a user-defined instance of the ephemeral configuration database, issue the
show ephemeral-configuration instance-name
command.user@host> show ephemeral-configuration instance-name
-
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.user@host> show ephemeral-configuration | display merge
Table 1 outlines the show ephemeral-configuration
commands for the
various releases.
Action |
Junos OS Release 18.2R1 and Later |
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.
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:
To reactivate an ephemeral instance and thus merge its configuration with the static configuration database again:
-
Activate the ephemeral database instance.
-
Activate the default ephemeral instance by deleting the
ignore-ephemeral-default
statement.[edit system configuration-database ephemeral] user@host# delete ignore-ephemeral-default
-
Activate a user-defined ephemeral instance by issuing the
activate
command and specifying the instance name.[edit system configuration-database ephemeral] user@host# activate instance instance-name
-
-
Commit the configuration.
[edit system configuration-database ephemeral] user@host# commit
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:
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.
[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.show
ephemeral-configuration
operational mode command uses a different
syntax and supports filtering for displaying specific hierarchy
levels.<load-configuration>
action
attribute values of override
and
replace
in addition to the previously supported values of
merge
and set
.