ON THIS PAGE
Enable and Configure Instances of the Ephemeral Configuration Database
The ephemeral database is an alternate configuration database. It 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 any user-defined instances of the ephemeral configuration database before you can use the instance. 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 commit statements at the [edit system configuration-database
ephemeral] hierarchy level, all Junos processes must check and
evaluate their complete configuration. As a result, there might be 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. You configure the options in the static configuration database.
When you commit statements at the [edit system configuration-database
ephemeral] hierarchy level, all Junos processes must check and
evaluate their complete configuration. As a result, there might be 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 configure the device to enable support for these protocols in the ephemeral database.
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. A client can load configuration data in any of
the supported formats including Junos XML elements, formatted ASCII text,
set commands, or 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 using the
show configuration command in operational mode, the output
does not include ephemeral configuration data. To display the data in a specific
ephemeral database instance or display a merged view of the static and ephemeral
configuration databases, use variations of the show
ephemeral-configuration CLI command.
Table 1 summarizes the show ephemeral-configuration commands.
|
Action |
|
|---|---|
|
View the configuration data in the default ephemeral instance. |
|
|
View the configuration data in a user-defined ephemeral instance. |
|
|
View the complete post-inheritance configuration merged with the configuration data in all instances of the ephemeral database. |
|
|
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:
|
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 device preserves the files and configuration data;
however, the device does not merge the configuration data 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-defaultstatement.[edit system configuration-database ephemeral] user@host# delete ignore-ephemeral-default
-
Activate a user-defined ephemeral instance by issuing the
activatecommand 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 delete an ephemeral instance in an earlier release, we recommend that you delete the ephemeral instance's configuration data 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.
synchronous. In
earlier releases, the default is asynchronous.[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.