Comparing Configuration Changes with a Prior Version
In configuration mode only, when you have made changes to the configuration and want to compare the candidate configuration with a prior version, you can use the compare command to display the configuration. The compare command compares the candidate configuration with either the current committed configuration or a configuration file and displays the differences between the two configurations. To compare configurations, specify the compare command after the pipe:
filename is the full path to a configuration file. The file must be in the proper format: a hierarchy of statements.
n is the index into the list of previously committed configurations. The most recently saved configuration is number 0, and the oldest saved configuration is number 49. If you do not specify arguments, the candidate configuration is compared against the active configuration file (
The comparison output uses the following conventions:
Statements that are only in the candidate configuration are prefixed with a plus sign (+).
Statements that are only in the comparison file are prefixed with a minus sign (-).
Statements that are unchanged are prefixed with a single blank space ( ).
The following example shows various changes, then a comparison of the candidate configuration with the active configuration, showing only the changes made at the [edit protocols bgp] hierarchy level: