-
- Managing Configuration Files
- Exclusive Configuration Change Access (Configuration Lock) and Access Session Locking
- Configuration Generation Performance Enhancement
- Configuration Replace and Configuration Rollback
- Contextual Configuration Diff Utility
- Configuration Change Notification and Logging
- Configuration Partitioning
- Finding Feature Information
- Contents
- Prerequisites for Contextual Configuration Diff Utility
- Restrictions for Contextual Configuration Diff Utility
- Information About Contextual Configuration Diff Utility
- How to Use the Contextual Configuration Diff Utility
- Configuration Examples for the Contextual Configuration Diff Utility
- Additional References
- Feature Information for Contextual Configuration Diff Utility
Contextual Configuration Diff Utility
The Contextual Configuration Diff Utility feature provides the ability to perform a line-by-line comparison of any two configuration files (accessible through the Cisco IOS XE Integrated File System [IFS]) and generate a list of the differences between them. The generated output includes information regarding configuration lines that have been added, modified, or deleted, and the configuration modes within which a changed configuration line exists.
Finding Feature Information
For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "Feature Information for Contextual Configuration Diff Utility" section.
Use Cisco Feature Navigator to find information about platform support and Cisco IOS XE software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•Prerequisites for Contextual Configuration Diff Utility
•Restrictions for Contextual Configuration Diff Utility
•Information About Contextual Configuration Diff Utility
•How to Use the Contextual Configuration Diff Utility
•Configuration Examples for the Contextual Configuration Diff Utility
•Feature Information for Contextual Configuration Diff Utility
Prerequisites for Contextual Configuration Diff Utility
The format of the configuration files used for the Contextual Configuration Diff Utility feature must comply with standard Cisco IOS XE configuration file indentation rules as follows:
•Start all commands on a new line with no indentation, unless the command is within a configuration submode.
•Indent commands within a first-level configuration submode one space.
•Indent commands within a second-level configuration submode two spaces.
•Indent commands within subsequent submodes accordingly.
The router must have a contiguous block of memory larger than the combined size of the two configuration files being compared.
Restrictions for Contextual Configuration Diff Utility
If the router does not have a contiguous block of memory larger than the combined size of the two configuration files being compared, the diff operation fails.
Information About Contextual Configuration Diff Utility
Before using the Contextual Configuration Diff Utility feature, you should understand the following concepts:
•Benefits of the Contextual Configuration Diff Utility
•Contextual Configuration Diff Utility Output Format
Benefits of the Contextual Configuration Diff Utility
The Contextual Configuration Diff Utility feature provides the ability to perform a line-by-line comparison of any two configuration files (accessible through the Cisco IOS XE File System [IFS]) and generate a list of the differences between them. The generated output includes information regarding the following items:
•Configuration lines that have been added, modified, or deleted.
•Configuration modes within which a changed configuration line exists.
•Location changes of configuration lines that are order-sensitive. For example, the ip access-list and community-lists commands are order-sensitive commands dependent on where they are listed within a configuration file in relation to other Cisco IOS XE commands of similar type.
Contextual Configuration Diff Utility Output Format
Diff Operation
The Contextual Configuration Diff Utility feature uses the filenames of two configuration files as input. A diff operation is performed on the specified files and a list of differences between the two files is generated as output. Interpreting the output is dependent on the order in which the two files are configured (show archive config differences command). In this section, we assume that the filename of the file entered first is file1 and the filename of the file entered second is file2. Each entry in the generated output list is prefixed with a unique text symbol to indicate the type of difference found. The text symbols and their meanings are as follows:
•A minus symbol (-) indicates that the configuration line exists in file1 but not in file2.
•A plus symbol (+) indicates that the configuration line exists in file2 but not in file1.
•An exclamation point (!) with descriptive comments is used to identify order-sensitive configuration lines whose location is different in file1 than in file2.
Incremental Diff Operation
Some applications require that the generated output of a diff operation contain configuration lines that are unmodified (in other words, without the minus and plus symbols). For these applications, an incremental diff operation can be performed, which compares a specified configuration file to the running configuration file (show archive config incremental-diffs command).
When an incremental diff operation is performed, a list of the configuration lines that do not appear in the running configuration file (in other words, configuration lines that only appear in the specified file that is being compared to the running configuration file) is generated as output. An exclamation point (!) with descriptive comments is used to identify order-sensitive configuration lines whose location is different in the specified configuration file than in the running configuration file.
How to Use the Contextual Configuration Diff Utility
This section provides the following procedure:
•Using the Contextual Configuration Diff Utility (required)
Using the Contextual Configuration Diff Utility
This task describes how to use the Contextual Configuration Diff Utility feature.
SUMMARY STEPS
1. enable
2. show archive config differences [file1 path [file2 path][ignorecase]]
or
show archive config incremental-diffs [file path]
3. exit
DETAILED STEPS
Configuration Examples for the Contextual Configuration Diff Utility
This section contains the following configuration examples:
•Incremental Diff Operation: Example
Diff Operation: Example
In this example, a diff operation is performed on the running and startup configuration files. Table 1 shows the configuration files used for this example.
The following is sample output from the show archive config differences command. This sample output displays the results of the diff operation performed on the configuration files in Table 1.
Router# show archive config differences system:running-config nvram:startup-config
+ip subnet-zero
+ip name-server 10.4.4.4
+voice dnis-map 1
+dnis 111
interface FastEthernet1/0
+no ip address
+shutdown
+ip default-gateway 10.5.5.5
+ip classless
+access-list 110 deny ip any host 10.1.1.1
+access-list 110 deny ip any host 10.1.1.2
+access-list 110 deny ip any host 10.1.1.3
+snmp-server community private RW
-no ip subnet-zero
interface FastEthernet1/0
-ip address 10.7.7.7 255.0.0.0
-no ip classless
-snmp-server community public RO
Incremental Diff Operation: Example
In this example, an incremental diff operation is performed on the startup and running configuration files. Table 2 shows the configuration files used for this example.
The following is sample output from the show archive config incremental-diffs command. This sample output displays the results of the incremental diff operation performed on the configuration files in Table 2.
Router# show archive config incremental-diffs startup-config
ip subnet-zero
ip name-server 10.4.4.4
voice dnis-map 1
dnis 111
interface FastEthernet1/0
no ip address
shutdown
ip default-gateway 10.5.5.5
ip classless
access-list 110 deny ip any host 10.1.1.1
access-list 110 deny ip any host 10.1.1.2
access-list 110 deny ip any host 10.1.1.3
snmp-server community private RW
Additional References
This section provides references related to the Contextual Configuration Diff Utility feature.
Related Documents
|
|
---|---|
Information about managing configuration files |
|
Commands for managing configuration files |
Standards
|
|
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
MIBs
RFCs
|
|
---|---|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. |
— |
Technical Assistance
Feature Information for Contextual Configuration Diff Utility
Table 3 lists the features in this module and provides links to specific configuration information.
Note Table 3 lists only the Cisco IOS XE software release that introduced support for a given feature in a given Cisco IOS XE software release. Unless noted otherwise, subsequent releases of that Cisco IOS XE software release also support that feature.
|
|
|
---|---|---|
Contextual Configuration Diff Utility |
Cisco IOS XE Release 2.1 |
The Contextual Configuration Diff Utility feature provides the ability to perform a line-by-line comparison of any two configuration files and generate a list of the differences between them. The generated output includes information regarding configuration lines that have been added, modified, or deleted, and the configuration modes within which a changed configuration line exists. In Cisco IOS XE Release 2.1, this feature was introduced on Cisco ASR 1000 Series Routers. The following sections provide information about this feature: •Benefits of the Contextual Configuration Diff Utility •Contextual Configuration Diff Utility Output Format •Using the Contextual Configuration Diff Utility The following commands were modified by this feature: show archive config differences, show archive config incremental-diffs. |