![]() |
Managing Configuration Files Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
|
||||||||||||||||||||||||
Contextual Configuration Diff Utility
![]() |
|||||||||||||||||||||||||
Contents
Contextual Configuration Diff UtilityLast Updated: January 23, 2013
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 InformationYour software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and 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 table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for Contextual Configuration Diff UtilityThe 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:
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 UtilityIf the device 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
Benefits of the Contextual Configuration Diff UtilityThe 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:
Contextual Configuration Diff Utility Output FormatDiff OperationThe 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 by using the show archive config differences command. Interpreting the output is dependent on the order in which the two files are specified in the 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:
Incremental Diff OperationSome 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 by using the show archive config incremental-diffs command, which compares a specified configuration file to the running configuration file (). 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 appear only in the specified file that is being compared to the running configuration file) is generated as output. An exclamation point (!) with descriptive comments identifies 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 UtilityPerforming a Line-by-Line File Comparison Using the Contextual Configuration Diff UtilitySUMMARY STEPS
DETAILED STEPS Configuration Examples for the Contextual Configuration Diff UtilityDiff Operation ExampleIn this example, a diff operation is performed on the running and startup configuration files. The table below shows the configuration files used for this example.
The following is sample output from the show archive config differencescommand. This sample output displays the results of the diff operation performed on the configuration files in the table below.
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 ExampleIn this example, an incremental diff operation is performed on the startup and running configuration files. The table below shows the configuration files used for this example.
The following is sample output from the show archive config incremental-diffscommand. This sample output displays the results of the incremental diff operation performed on the configuration files in the table below.
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 ReferencesMIBsTechnical Assistance
Feature Information for Contextual Configuration Diff UtilityThe following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R) Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. © 2013 Cisco Systems, Inc. All rights reserved.
|
|||||||||||||||||||||||||
|
|