Document toolboxDocument toolbox

Comparing Two Configuration Files

NetMRI provides different ways to compare configuration files. You can open 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, perform 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 panel 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 panel 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 drop-down, device table, and Config Archive panel.
  4. In the second Device Group dropdown, choose the group and choose the device. Then, on the right-hand panel, 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, perform 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 can compare the files.

Change Management in the Comparing Configuration Files Window

When the Comparing Configuration Files window appears, each of the two panels 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 panel.

The Templates option enables the loading of a Config Template from the NetMRI appliance. This can help yo u determine if and how a given configuration on a device deviates from the mandated template for the organization. For more information on developing config templates, see Working with Configuration Templates.

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.

The side-by-side view provides a scroll bar for each configuration file panel. 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.

Note

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, and 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 a specific text, type the text in the Find field, and then 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 then click the name of the file you want to export.