Document toolboxDocument toolbox

Comparing Two Configuration Files

NetMRI provides different ways to compare configuration files: opening the device's config files from within the Config Management –> Config Archive page, or directly from the Device Viewer. We describe both methods in this section.

Using the Configuration Manager to Compare Config Files

To compare two configuration files in the Configuration Manager, do the following:

  1. Navigate to Config Management –> Config Archive.
  2. Select a Device Group, and then select a device in the table beneath. The right pane of the Archive page displays the library of configuration files discovered in the device.
  3. Select two files by enabling their check boxes.
  4. Click the Compare button. A Comparing Configuration Files window appears, listing the chosen configuration files side-by-side.

You can compare configuration files between devices, from within the same device group or between any two devices anywhere in the network, by selecting them.

  1. Navigate to Config Management –> Config Archive.
  2. Choose a Device Group, and then choose a device in the table beneath. The right pane of the Archive page displays the library of configuration files discovered in the device.
  3. Click the Compare Second Device button. The Config Archive page splits horizontally to show a second Device Group dropdown, device table and Config Archive pane.
  4. In the second Device Group dropdown, choose the group and choose the device. Then, in the right pane, select the checkbox for the config file. (For example, compare the Current Running config files for each chosen device.)
  5. Click the Compare button. A Comparing Configuration Files window appears, listing the chosen configuration files side-by-side.

Using the Device Viewer to Compare Config Files


Note: See the Using the Config Explorer topic for related information about using the Device Viewer to compare config files in a device.


The Device Viewer also offers its own Config Explorer page (Device Viewer –> Configuration Management –> Config Explorer) which allows comparison of any stored revisions of a single device's running or archived configuration files.
To compare two configuration files in the Device Viewer, do the following:

  1. Navigate to Device Viewer –> Configuration Management –> Config Explorer for a particular device. In the table, select two files by enabling their check boxes.
  2. Click the Compare button. The Comparing Configuration Files window opens, where you compare the files.

Change Management in the Comparing Configuration Files Window

When the Comparing Configuration Files window appears, each of the two panes provides a drop-down config file menu. The menu allows you to load any other configuration file from the chosen networked system, from all four categories: Running, Saved, Baseline or Templates. Each of the menu options provides a submenu that lists each of the configuration files, based on their respective category. The Saved option, for example, shows all Current Saved and Archived Saved configuration files present in the device. Choosing one of these loads that file into the current pane.
The Templates option enables loading of a Config Template from the NetMRI appliance (see Working with Configuration Templates for information on developing config templates). This can help yo u determine if and how a given configuration on a device deviates from the mandated template for the organization.
By default, config files are shown side-by-side in the Comparing Configuration Files window. You can change the appearance of the current window by using the View menu. Display configuration files in Side-by-Side, Inline or Over/Under.
While many users will likely stay with the default, inline is a useful option that directly matches the changes per line against the same line for both configuration files. The top line for each change comparison is from the left-side config while the lower line is from the right-side config.
Side-by-Side view provides a scroll bar for each configuration file pane. You can display the entire file, or Changes Only which shows only the changes to each file in the Viewer. You can choose the number of surrounding lines of file text for the changes in each file.
Finally, choosing Swap Files switches the two files' visual position in the window.

Difference Highlighting and File Exporting

The Comparing Configuration Files window highlights differences between the configuration files as follows:

  • Blue indicates a change in either selected file.
  • Red indicates a removal.
  • Green indicates an addition.
  • Gray shows where unchanged lines have been removed from the files to shorten them for easier viewing.

If the differences between the two configuration files exceed 20,000 rows, the Comparing Configuration Files window displays only the differences without the side-by-side comparison. You can download the entire diff file by using the CTRL + S command.

Actions in the Comparing Configuration Files window consist of Exporting either of the open files. Choosing this option uses the standard Web browser to save the text file into the default download directory on the local machine.

  • To replace one file with another file: Click the icon, then select the new file in the drop-down list. (The current file is indicated by a dot to the left of its name.)
  • To find specific text: Type the text in the Find field and press Enter. Bold highlighting is applied to instances of the search string in both files.
  • To change file orientation: choose View –> Side-by-Side, Inline or Over/Under.
  • To switch between viewing changes only and entire files: choose View –> Entire file or Changes Only.
  • To change the number of lines visible around changes: choose View –> Number of lines to show around changes.
  • To swap file locations within the window: choose View –> Swap Files.
  • To export a configuration file: Open the Action menu and click the name of the file you want to export.