Reply

CPD rule to check absense of specific command

Member
Posts: 2
3696     0

Hi all, been trying to configure a CPD rule to return all interfaces that do not contain a specific command, so far we have been using the following rule but the output is a bit confusing (we want to know any interfaces that do not contain the command 'authentication port-control auto');

 

Optional Block:

    interface G.*

        authentication port-control auto

 

Invalid Block:

    interface G.*

 

When running the rule against the below example configuration we get the correct response (G1/0/1), however the results also include the next line of configuration (description trunk link).

 

interface GigabitEthernet1/0/1

description trunk link

switchport access vlan 5

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface GigabitEthernet1/0/2

description L3-link

no switchport

ip address 1.1.1.1 255.255.255.252

authentication port-control auto

!

 

Are we running the right command for this type of output? And if so is there a way to have the results formatted in a more appropriate format (can we input this policy into a report for example)?

 

Thanks in advance

 

Re: CPD rule to check absense of specific command

Adviser
Posts: 353
3697     0

If you are using NetMRI 6.9 or later you are better off using an XML rule, which is a lot more flexible than CPD.

 

Take a look in the docs for a description of how these work. There are also examples here:

 

https://infoblox.box.com/s/fx1eti6j1rmpcf69z2rfoor837k5crek

 

The "L3-ifc-descr.xml" would probably provide a good basis for the rule you are looking for. That one finds all up layer 3 interfaces that are lacking a description.

 

John

 

Re: CPD rule to check absense of specific command

Member
Posts: 2
3697     0
Thanks for the quick response John. We are currently running 6.8.5.73183, I'll start the upgrade process but it will take some weeks due to organisational processes. Is there anything else we can try in the interim? Also any insight into having a report pull its data from a rule/policy? Thanks
Showing results for 
Search instead for 
Did you mean: 

Recommended for You