Networks Training

  • About
  • My Books
  • SUGGESTED TRAINING
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / Cisco IOS / Comparing Cisco IOS Configurations (Config Compare Tools)

Comparing Cisco IOS Configurations (Config Compare Tools)

Written By Harris Andrea

In our day to day work as network administrators it is often necessary to compare configuration files of Cisco routers, switches, firewalls etc.

configuration file comparison tools

As we know, a characteristic of Cisco IOS is that the configuration files are stored in text format, but still a line by line comparison of different config files is tedious and in many cases almost impossible.

Imagine a situation whereby you have stored several different router configurations somewhere and you want to compare the differences.

Or maybe your support vendor or technician has made recently some configuration changes on your main ASA firewall device and you want to check what they changed compared to previous configs.

For these reasons it would be useful to present some methods and tools that allow us to perform such config comparison tasks with full automation.

Table of Contents

  • Configuration Files Comparison Tools
    • Compare It by Grigsoft
    • Solarwinds Config Compare Tool
    • Network00 Online Tool
    • WinMerge
    • DiffMerge
  • Comparing using Cisco IOS Commands
    • Related Posts

Configuration Files Comparison Tools

One option to help us compare Cisco configuration files is to export the config files in text format and then use a software tool to perform line by line comparison for us between different files.

The easiest way to export a configuration file in text format is to execute the command “show run” or “show startup“, press the “space bar” key several times until the end of the configuration and then copy and paste the lines from the Terminal screen to a text editor.

Then you can import this text configuration file into a specialized comparison tool such as the ones below:

Compare It by Grigsoft

A free program available on the Internet to compare text files is Compare It 4. It can be downloaded from the official site: http://www.grigsoft.com/wincmp3.htm

MORE READING:  Cisco IOS DHCP Configuration

compare it tool

For text files, it will present the two configuration texts side-by-side with differences shown in colors and sections for easy visualization. 

This tool can also compare binary files, image files, PDF, word, excel etc.

Solarwinds Config Compare Tool

solarwinds comparison tool

Solarwinds is a well know vendor of networking and IT management software.

The Config Compare Tool is part of the SolarWinds Engineer’s Toolset which is a package of several useful tools for networking and IT. 

The tool runs directly on the target device and compares the currently running configuration with the stored “startup configuration”.

You will need to enter the device (router, switch etc) IP and login credentials so the tool can connect and compare the two configs (running and startup).

Network00 Online Tool

This is an online tool so no installation is needed. It can compare two Cisco configurations. You can copy and paste the configurations in two windows and just click “compare”

WinMerge

winmerge

This is another open source free and popular tool which does comparison and merging.

It even comes in portable version so you don’t even have to install anything.

It provides the classical side-by-side comparison windows showing the two text files and the highlighted changes and differences. It can even compare folders of several files.

DiffMerge

diffmerge

This is another useful comparison tool that works on Windows, MAC OS X and Linux. It is a paid tool but very cheap ($19).

It can find differences in multiple files, merge files and also find differences in folders.

Comparing using Cisco IOS Commands

From IOS version 12.3 (4)T and later, the comparison can be made directly on the IOS command line.
The commands to compare the running configuration from the startup configuration are the following:

MORE READING:  How to Configure SNMP on Cisco Devices (Routers, Switches)

Example 1

Router> enable
Router # show archive config differences system: running-config nvram: startup-config

Contextual Config Diffs:
+ ip dhcp excluded-address 172.16.1.106 172.16.1.254
– ip dhcp excluded-address 172.16.1.160 172.16.1.254

To understand the output above, you need to know the following:

  • The plus symbol (+) means that the configuration line exists in the “startup-config” but not in the “running-config”
  • The minus symbol (-) means that the configuration line exists in “running-config” but not in “startup-config”.

In our example above, there is a command in backup configuration file (startup-config) that excludes address range 172.16.1.106 up to 172.16.1.254 from the DHCP address pool.

The comparison shows that someone has entered and changed the range of excluded addresses, and replaced it by range 172.16.1.160 to 172.16.1.254 and did not save the changes.

That’s why the changes are only present in the active configuration (running-config). The command which is present in the running-config is preceded by the minus (-) symbol.

In our example above, the only difference between the two files are the two excluded-address commands.

If there were more differences they would be listed as well. The command only displays the lines of the files in which there are differences. The order of the path is important as we’ll see below.

Example 2

Router> enable
Router # show archive config differences flash:STARTUP-CONFIG system:running-config

Contextual Config Diffs:
+router eigrp 100
+auto-summary
-router ospf 1
-log-adjacency-changes
-network 1.1.1.1 0.0.0.0 area 0

A “+” sign means this command is present in the “running-config” but not in the “STARTUP-CONFIG”
A “-” sign means this command is present in the “STARTUP-CONFIG” but not in the “running-config”

I hope the post was helpful. If you have any more information or you want to provide additional references on the file comparison feature feel free to comment below.

Related Posts

  • What is Cisco IOS – Overview and Description of Cisco’s Operating System
  • How to Configure SNMP on Cisco Devices (Routers, Switches)
  • Cisco Access List Configuration Examples (Standard, Extended ACL) on Routers Etc
  • PPTP Remote Access VPN Configuration on Cisco Routers
  • Cisco IOS Zone Based Firewall Configuration Example (ZBF)

Filed Under: Cisco IOS

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

We use Elastic Email as our marketing automation service. By submitting this form, you agree that the information you provide will be transferred to Elastic Email for processing in accordance with their Terms of Use and Privacy Policy. Also, you allow me to send you informational and marketing emails from time-to-time.

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books ("Cisco ASA Firewall Fundamentals" and "Cisco VPN Configuration Guide") which are available at Amazon and on this website as well.

Comments

  1. Salim says

    April 1, 2021 at 5:57 pm

    Thank you very much.

  2. Kaisa says

    April 1, 2021 at 9:10 pm

    Thank you very much Andrea

  3. Harris Andrea says

    April 2, 2021 at 10:27 am

    You are welcome Kaisa, have a nice day.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this site

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2023 | Privacy Policy | Terms and Conditions | Hire Me | Contact | Amazon Disclaimer | Delivery Policy

0 shares