Network Management
Apply a compliance rule with config block using RegEx to selected interface types
There are times when a Compliance rule needs to be confined to a subset of interfaces already in group and needs to be dealt with differently than a standard Config Block
First published date
Last published date
Overview
Product section
Cause
Resolution
Create the policy rule in the web
- In the advanced section, set the criteria you are searching for.
- in the search Config File/Block, select the Config Block.
- Lay out the criteria of the section(s) of the config where NCM needs to look at.
For this example, I want to search several different interfaces, but not all
I want to look at any block that starts with interface serial, interface test1, interface test2 or interface multilink
- The RegEx for the config block start would be:
interface serial*.*|interface test1*.*|interface test2*.*|interface multilink*.*
- The RegEx for the config block end would be:
!
Note: Prior To NCM 7.7, RegEx patterns used in the Config block is a single line expression. Multi-line expressions used will not be fully recognized.
Example of a Non-supported Regex:
In this case I would like to check all Gigabit ethernet ports on VLAN 104 that have flowcontrol receive on.
^interface GigabitEthernet.*\n(.*\n)*.*switchport access vlan 104.*\n(.*\n)*.*flowcontrol receive on