Active Configuration: In junos OS, the new configuration changes that we actually made can be compared with an active configuration that is currently running on our junos devices. In order to compare the candidate configuration with an active configuration, 'show | compare' command is used in the configuration mode on juniper device. After entering this command, The plus sign represents variables in the candidate configuration that are not present in the active configuration; we've added them to the file. Whereas, the minus sign shows that we've deleted variables from the file.
Candidate Configuration: We can view the candidate configuration that is present on our juniper device from configuration mode hierarchy. Candidate configuration allows us to make configuration changes without causing operational changes to the current operating configuration. In order to write the current candidate configuration to the permanent storage, we enter a save command along with the path to locate the candidate configuration. We use commit command on configuration mode hierarchy in order to activate candidate configuration. After we enter the commit command, candidate configuration becomes the active configuration.
"Configure private" allows us to enter into the private configuration mode where every user have their own private candidate configuration. Also, when a user commits, only the users own changes are commited.
Commit synchronize command is used when we have two routing engine and we need to apply the candidate configuration to both routing engine. This option is helpful in the event of a Routing Engine failure; the backup Routing Engine now has the latest operational parameters in the network.
Example:
The plus sign represents variables in the candidate configuration that are not present in the active configuration; we've added them to the file. Whereas, the minus sign shows that we've deleted variables from the file.
Commit Check: To verify that the syntax of a Junos configuration is correct, use the configuration mode commit check command:
Ex:
[edit]
user@host#commit check
configuration check succeeds
[edit]
user@host#
If the commit check command finds an error, a message indicates the location of the error.Â
Commit: To save Junos OS configuration changes to the configuration database and to activate the configuration on the device, use the commit configuration mode command. You can issue the commit command from any hierarchy level.
Ex:
[edit]
user@host#commit
commit complete
[edit]
user@host#
When you enter the commit command, the configuration is first checked for syntax errors (commit check). Then, if the syntax is correct, the configuration is activated and becomes the current, operational device configuration. The commit complete message tells us that the process was successful.
We can place the previously configured file in the candidate configuration with the rollback command. To return to a configuration prior to the most recently committed one, include the configuration number, 0 through 49, in the rollback command. The most recently saved configuration is number 0 (which is the default configuration to which the system returns), and the oldest saved configuration is number 49.
Example:
[edit]
user@host# rollback number
load complete
The 'show | compare rollback' command allows us to compare our current configuration with the rollback configuration that we want. This command is used in configuration mode hierarchy.
We use 'rollback 1' command on our configuration mode hierarchy in order to load the previous configuration on our juniper device. This is a kind of life savior command which enables us to get back to our previous configuration.
Command "show | compare" is used in junos device to compare the candidate configuration with the active configuration. Differences between the two files are displayed with either a plus (+) or a minus (-) sign.
The plus sign represents variables in the candidate configuration that are not present in the active configuration; that you've added them to the file.