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

Answered Question
Feb 2nd, 2010

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

I have this problem too.
0 votes
Correct Answer by Joe Clarke about 6 years 10 months ago

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

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Joe Clarke Tue, 02/02/2010 - 22:33

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

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

charlie-hall Wed, 02/03/2010 - 14:30

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!

Actions

This Discussion