IOS-XE SNMP
Rules for SNMP, the protocol monitoring tools use to poll the device. SNMPv1 and v2c send a shared community string in clear text. SNMPv3 with priv authenticates and encrypts. They come from the ios-snmp policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 4 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template. A card marked changed has one line edited to show a failure.
All the rules come from ios-snmp.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Cisco IOS templates page lists the file’s known limitations. Run the rules against show running-config.
| Rule | Method | Since |
|---|---|---|
| No SNMPv1 or v2c communities | must_not_match_regex |
8.0.2 |
| SNMPv3 with encryption | must_match_regex |
8.0.0 |
No SNMPv1 or v2c communities
A community string is a shared password sent in clear text with every poll. A read-write community can change the config. This rule fails on any snmp-server community line, whatever its name or access.
// No SNMPv1 or SNMPv2c community is configured (line snmp-server community is absent)#[must_not_match_regex]/^snmp-server community /msnmp-server group NMS-GROUP v3 privsnmp-server location Example sitesnmp-server contact noc@example.netsnmp-server host 192.0.2.60 version 3 priv nms-pollerWhy: There is no snmp-server community line.
snmp-server community EXAMPLECOMM-RO RO MGMT-ACCESSsnmp-server location Example sitesnmp-server contact noc@example.netWhy: A community is set. Limiting it with an access list does not change the result.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| NIST SP 800-53 | SC-12 |
| HIPAA (45 CFR) | 164.312(e)(1) |
| ISO/IEC 27001:2022 Annex A | A.8.5 |
Tested with: sample excerpts from IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
SNMPv3 with encryption
SNMPv3 has three security levels: noauth, auth and priv. Only priv encrypts the traffic as well as checking who sent it. This rule passes when at least one snmp-server group uses v3 priv.
// An SNMPv3 group uses authPriv (snmp-server group ... v3 priv)#[must_match_regex]/^snmp-server group .+ v3 priv/msnmp-server group NMS-GROUP v3 privsnmp-server group SNMPV3GROUP v3 privWhy: Both groups use v3 priv.
snmp-server group NMS-GROUP v3 authWhy: v3 auth checks the sender but does not encrypt.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| NIST SP 800-53 | SC-12 |
| HIPAA (45 CFR) | 164.312(e)(1) |
| ISO/IEC 27001:2022 Annex A | A.8.5, A.8.24 |
Tested with: sample excerpts from IOS-XE 17.9 (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Cisco IOS policy templates: every rule in
ios-snmp.policy, its references and known limitations. - Policy Definitions: the definition file format and every method.
- Policy Assignments: run a definition against your devices.
- Policy Compliance Results: read the pass and fail results.