Network Management
Matching ignored lines in NCM baselines and configs
NCM matches lines based on an algorithm, and will match ignored lines in most cases even when lines are added and line numbers change.
First published date
Last published date
Overview
In NCM 7.9 and later, you can select the lines to ignore when you add or edit a baseline. Ignoring lines where differences are expected (such as the hostname) prevents false positives. NCM matches lines based on an algorithm, and will match ignored lines in most cases even when lines are added and line numbers change.
Note: For more information about adding baselines and assigning them to devices, see Establish baselines as a comparison point for config changes.
Product section
Resolution
NCM uses an algorithm to match lines in the baseline with the corresponding lines in a config. The algorithm is based on the longest common substring. If lines are added or removed in the config, NCM uses the algorithm to identify the lines that were added or removed and then continue comparing corresponding lines.
For example, line 5 of the baseline contains the hostname, and this line is selected to be ignored. A line was added to the config several lines before the hostname, and so the hostname line is pushed down to line 6. NCM matches the line after the added line to the corresponding line in the baseline. Therefore, NCM ignores the correct line even though the line number changed.
If a line is added directly above the ignored line, NCM ignores the added line and flags the line that should have been ignored as a new line. In the example below, NCM ignores the line that immediately follows no ip finger(line 5). It then flags the hostname line in the config as a new line because it doesn't correspond to the next line in the baseline. Even though NCM ignores the added line instead of the hostname line, it correctly reports that a line was added.