Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

RME compliance issue - Check for presence of cmd "OR" cmd

It does not appear to me that I can do "OR" logic when checking commands on an interface, for example this is what I want to accomplish:

IF switchport mode access

then IF this command exist "dot1x port-control" OR this command exit "switchport port-security"

do nothing,

Else

Display the Interface Name

I best I have been able to do, is to check for the presense of both commands and a success will display one command per interface in the report and displaying both commands per interface means a failure.

I am running RME 4.1.1

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: RME compliance issue - Check for presence of cmd "OR" cmd

You should be able to do something like this to assert the command exists:

+ [#(dot1x port-control|switchport port-security).*#]

2 REPLIES
Cisco Employee

Re: RME compliance issue - Check for presence of cmd "OR" cmd

You should be able to do something like this to assert the command exists:

+ [#(dot1x port-control|switchport port-security).*#]

New Member

Re: RME compliance issue - Check for presence of cmd "OR" cmd

I keep thinking of the "|" pipe in IOS.

That was it though.

I used "!Vlan", so we will check all interfaces except Vlan Interfaces.

I am able to run this on all switches in a subnet, and it works great. 

Name:

Name: CheckForDot1X SubMode: No isPrerequisite: No
Ordered : No Prerequisite-Commandset : AccessPortCmdSet Parent: AccessPortCmdSet
+ [#(dot1x port-control|switchport port-security).*#]

AccessPortCmdSet SubMode: Yes isPrerequisite: Yes
Ordered : No Prerequisite-Commandset : none Parent: none
interface [#!Vlan.*#]
+ switchport mode access

thanks!

222
Views
0
Helpful
2
Replies