EOS SNMP
Rules for SNMP: no community strings, SNMPv3 with authentication and encryption, and no weak SNMPv3 algorithms. EOS prints SNMPv3 users in show running-config, so the user rule can see them. They come from the eos-snmp policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 6 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.
All the rules come from eos-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 Arista EOS 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 group with authPriv | must_match_regex |
8.0.0 |
| No MD5 or DES SNMPv3 users | must_not_match_regex |
8.0.2 |
No SNMPv1 or v2c communities
SNMPv1 and v2c send the community string in clear text, and it works like a password. This rule fails on any snmp-server community line.
// No SNMPv1 or SNMPv2c community is configured (fails on snmp-server community)#[must_not_match_regex]/^snmp-server community /msnmp-server contact NetOps <netops@example.com>snmp-server location Dublin DC1, Hall Asnmp-server group NMS v3 privsnmp-server user nms NMS v3 localized f5717f2899ab0100 auth sha 7d1e4b0c2f9a8e6d5c4b3a291807f6e5d4c3b2a1 priv aes 0a1b2c3d4e5f60718293a4b5c6d7e8f9snmp-server host 192.0.2.60 vrf MGMT version 3 priv nmssnmp-server vrf MGMTWhy: Only SNMPv3 is set up.
snmp-server contact NetOps <netops@example.com>snmp-server community dc1-ro ro SNMP-MGMTsnmp-server group NMS v3 authsnmp-server host 192.0.2.60 vrf MGMT version 2c dc1-roWhy: There is a v2c community.
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 EOS 4.32.2F (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
SNMPv3 group with authPriv
priv is the SNMPv3 level with both authentication and encryption. This rule needs at least one snmp-server group at v3 priv.
// An SNMPv3 group uses authPriv (snmp-server group ... v3 priv)#[must_match_regex]/^snmp-server group \S+ v3 priv\b/msnmp-server group NMS v3 privsnmp-server user nms NMS v3 localized f5717f2899ab0100 auth sha 7d1e4b0c2f9a8e6d5c4b3a291807f6e5d4c3b2a1 priv aes 0a1b2c3d4e5f60718293a4b5c6d7e8f9Why: The NMS group uses v3 priv.
snmp-server community dc1-ro ro SNMP-MGMTsnmp-server group NMS v3 authsnmp-server user nms NMS v3 localized f5717f2899ab0100 auth md5 3c4b5a6978e1f20d1c2b3a4958677685 priv des 9e8d7c6b5a4f30211f2e3d4c5b6a7988Why: The group uses v3 auth, which has no encryption.
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 EOS 4.32.2F (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.
No MD5 or DES SNMPv3 users
MD5 and DES are weak. This rule fails on an snmp-server user line with auth md5, priv des or priv 3des. Use auth sha (or stronger) and priv aes.
// No SNMPv3 user uses MD5 authentication or DES privacy (fails on snmp-server user ... auth md5 or priv des)#[must_not_match_regex]/^snmp-server user \S+ \S+ .*\b(auth md5|priv (des|3des))\b/msnmp-server group NMS v3 privsnmp-server user nms NMS v3 localized f5717f2899ab0100 auth sha 7d1e4b0c2f9a8e6d5c4b3a291807f6e5d4c3b2a1 priv aes 0a1b2c3d4e5f60718293a4b5c6d7e8f9Why: The user has SHA authentication and AES privacy.
snmp-server group NMS v3 authsnmp-server user nms NMS v3 localized f5717f2899ab0100 auth md5 3c4b5a6978e1f20d1c2b3a4958677685 priv des 9e8d7c6b5a4f30211f2e3d4c5b6a7988Why: The user has MD5 authentication and DES privacy.
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 EOS 4.32.2F (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.
Related reference
- Arista EOS policy templates: every rule in
eos-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.