RME Compliance check to cleanup old IOS statements

Answered Question
Dec 3rd, 2009
User Badges:

There are IOS switches and routers that are configured with both old and the new SNMP servers. I'm using RME compliance and deploy to cleanup device configurations. It seems I am not grasping the 'compliant' and 'not compliant' concept.


My baseline template has the following:

# Check that the following are the only snmp servers.
- [#!snmp-server host 172\.20\.35\.61.*#]
- [#!snmp-server host 172\.20\.35\.90.*#]
- [#!snmp-server host 172\.20\.35\.139.*#]
- [#!snmp-server host 172\.20\.35\.204.*#]



I want only the above four to be the only snmp-server statements in the configuration. In the RME report, I was expecting non-compliant and a list of the other SNMP servers that needs to be removed from the configuration. I received a report saying the devices were compliant.


Here is an example of what is in the current device configuration:

snmp-server host 172.20.35.139 ******** snmp
snmp-server host 172.20.35.204  ******** snmp
snmp-server host 172.20.35.61 ******** snmp
snmp-server  host 172.20.35.90 ******** snmp
snmp-server host 172.20.37.31 ******** snmp       << needs to go
snmp-server host 172.20.37.32 ******** snmp       << needs to go
snmp-server host  172.20.37.33 ******** snmp        << needs to go
snmp-server host 172.20.37.34 ******** snmp        << needs to go

Correct Answer by Joe Clarke about 7 years 5 months ago

I think what you want is:


+ snmp-server host 172.20.35.139 ******** snmp
+ snmp-server host 172.20.35.204  ******** snmp
+ snmp-server host 172.20.35.61 ******** snmp
+ snmp-server  host 172.20.35.90 ******** snmp

- [#snmp-server host (?!172\.20\.35\.139|172\.20\.35\.204|172\.20\.35\.61|172\.20\.35\.90).*#]

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Joe Clarke Thu, 12/03/2009 - 23:51
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

I think what you want is:


+ snmp-server host 172.20.35.139 ******** snmp
+ snmp-server host 172.20.35.204  ******** snmp
+ snmp-server host 172.20.35.61 ******** snmp
+ snmp-server  host 172.20.35.90 ******** snmp

- [#snmp-server host (?!172\.20\.35\.139|172\.20\.35\.204|172\.20\.35\.61|172\.20\.35\.90).*#]

Actions

This Discussion

Related Content