In SNMPv2c, the community string travels on the wire in clear text. Anyone who can see management traffic can capture the community string. What can be read depends on the MIB view and access rights configured on the device; if a write-enabled community has been left open, the configuration can be changed too. Core switches still running with the default “public” community still turn up in the field. Below is the user–group–view structure, Cisco IOS commands, access restriction and verification order from Linux needed to move switch and router monitoring to SNMPv3 authPriv.
SNMP versions and security levels: noAuthNoPriv, authNoPriv, authPriv
In SNMPv1 and v2c, authentication consists only of matching the community string. No integrity check, no encryption. SNMPv3, with the User-based Security Model (USM, RFC 3414), adds a user name, an authentication digest and optional encryption to each message. Three security levels are defined:
| Level | Authentication | Encryption | Use |
|---|---|---|---|
| v1 / v2c | Community (clear text) | None | Isolated lab only |
| v3 noAuthNoPriv | User name only | None | In practice no different from v2c |
| v3 authNoPriv | HMAC (MD5/SHA) | None | Integrity, but content is readable |
| v3 authPriv | HMAC (SHA/SHA-2) | DES/AES | Target level for production |
authNoPriv prevents forged requests and packet tampering; but interface descriptions, the ARP table and routing information remain readable. It’s half the job. The target level is authPriv. On the algorithm side, MD5 and DES are now considered weak: if the device supports it, choose SHA for authentication (preferably the SHA-2 family, RFC 7860) and AES-128 or above for encryption (the AES definition for USM is in RFC 3826). Older platforms may offer only SHA-1 and AES-128; even this combination is a serious step up from v2c.
SNMPv3 architecture: users, groups, views and the engine ID
SNMPv3 configuration consists of four objects. Starting to troubleshoot before the relationship between them is clear means trying commands blindly:
- View: Defines which OID tree can be seen.
iso(1) is the whole tree; sensitive branches can be left out withexcluded. - Group: Ties together the security level (auth/priv) and the read, write and notify views. The View-based Access Control Model (VACM, RFC 3415) applies authorization at this level.
- User: Belongs to a group and carries the authentication and encryption passwords.
- Engine ID: The unique identity of each SNMP entity. Passwords are stored by converting them into a key “localized” with this identity.
The consequence of the engine ID in the field: if the device’s local engine ID changes (manual change, or on some platforms a MAC/chassis change), the keys of previously defined users become invalid. No data comes in until the users are recreated. A large share of the “SNMPv3 stopped” calls after a stack member replacement or an RMA come from here. Instead of pinning the engine ID manually, leave the default and write the step “redefine SNMPv3 users” into the hardware replacement procedure. That’s the predictable path.
SNMPv3 authPriv configuration example on Cisco IOS
The example below defines read-only access and trap sending for two monitoring servers on the management network (10.10.99.10 and 10.10.99.11). The syntax is Cisco IOS/IOS XE.
! 1. Source restriction ACL
ip access-list standard ACL-SNMP-NMS
permit host 10.10.99.10
permit host 10.10.99.11
deny any log
!
! 2. View: in this example the whole tree is readable; in production limit it to the monitored MIB branches
snmp-server view VIEW-RO iso included
!
! 3. Group: authPriv, read-only, ACL attached
snmp-server group GRP-NMS-RO v3 priv read VIEW-RO access ACL-SNMP-NMS
!
! 4. User: SHA authentication, AES-128 encryption
snmp-server user nms-ro GRP-NMS-RO v3 auth sha <AuthPassword> priv aes 128 <PrivPassword>
!
! 5. Trap destination and source interface
snmp-server trap-source Loopback0
snmp-server host 10.10.99.10 version 3 priv nms-ro
snmp-server enable traps snmp linkdown linkup coldstart
snmp-server enable traps config
!
! 6. Remove old community definitions (after the migration is complete)
no snmp-server community <old-community>
The points where people get stuck most on the console:
- SNMPv3 users don’t appear in the
show running-configoutput. This isn’t a bug; it’s a security design; checking is done withshow snmp user. The practical consequence is significant: when you restore from a configuration backup, you need to recreate the users. - Newer IOS XE versions offer SHA-2 (e.g. SHA-256) and AES-192/256 options. Since the syntax varies by platform, verify it in the command reference for your version.
- Make the authentication and encryption passwords different and at least 8 characters long. Clients such as Net-SNMP reject shorter passwords.
- If
snmp-server enable trapsis typed without parameters, all trap types on the platform are enabled and the monitoring server drowns in noise. Enable the types you need one by one.
After applying, look at the show snmp user, show snmp group, show snmp view and show snmp engineID outputs on the device. The group should appear at the “priv” level and with the right ACL.
Access restriction: ACLs, the management VLAN and trap destinations
authPriv encrypts traffic; it doesn’t limit who can send requests to the agent. That’s a separate layer, and it’s missing in most setups:
- Group ACL: As above, use the
accessparameter to allow only the monitoring servers’ addresses. Thedeny any logline sends unauthorized attempts to syslog; you see who is knocking on the door. - Management plane: SNMP, SSH and syslog traffic should be carried in a separate management VLAN or VRF; access from user VLANs to device management addresses should be blocked at the L3 boundary. For segmentation decisions, see the VLAN design in enterprise networks article.
- Trap destinations: Queries go to UDP 161 and traps to UDP 162. Traps are unacknowledged; for critical notifications, acknowledged
informscan be considered (snmp-server host 10.10.99.10 informs version 3 priv nms-ro). There is an often-missed detail here: in SNMPv3 informs, the authoritative party is the receiver. The monitoring server’s engine ID must be defined on the device withsnmp-server engineID remote, and the user must also be created separately for that engine ID with theremoteparameter. If not, traps work and informs silently drop. - Write access: Don’t define a write view for monitoring. Configuration changes are made not over SNMP but over auditable SSH/API channels.
Verification with snmpwalk and snmpget
Before adding the device to the monitoring platform, test it from the monitoring server itself with Net-SNMP tools. Whether the problem is on the device or the platform is separated from the start.
# Read sysDescr and sysUpTime
snmpget -v3 -l authPriv -u nms-ro -a SHA -A 'AuthPassword' -x AES -X 'PrivPassword' \
10.10.20.1 SNMPv2-MIB::sysDescr.0 SNMPv2-MIB::sysUpTime.0
# List interface names
snmpwalk -v3 -l authPriv -u nms-ro -a SHA -A 'AuthPassword' -x AES -X 'PrivPassword' \
10.10.20.1 IF-MIB::ifName
# 64-bit interface counters (required for high-speed ports)
snmpwalk -v3 -l authPriv -u nms-ro -a SHA -A 'AuthPassword' -x AES -X 'PrivPassword' \
10.10.20.1 IF-MIB::ifHCInOctets
Net-SNMP’s error messages tell you directly where the fault is:
| Net-SNMP message | Likely cause |
|---|---|
| Timeout: No Response | ACL, firewall, wrong IP or SNMP disabled on the device |
| Unknown user name | The user isn’t defined, or wasn’t recreated after an RMA/engine ID change |
| Authentication failure | The auth password or algorithm (SHA/MD5) doesn’t match |
| Decryption error | The priv password or algorithm (AES/DES) doesn’t match |
| Some branches come back empty | The view is restricted, or the group is tied to the wrong view |
If you see “Timeout,” the order of checks is: first, on the monitoring server, use tcpdump -ni any udp port 161 to see whether the request actually goes out, then look at the ACL counters on the device (show access-lists ACL-SNMP-NMS). If the counter doesn’t increase, the packet isn’t reaching the device; check the firewall rule in between. A warning: typing the password on the command line saves it in the shell history. Clear the history after the test, or keep the parameters in the user-specific ~/.snmp/snmp.conf file.
Managing SNMPv3 credentials on the monitoring server
The real burden of SNMPv3 falls not on the device but on the monitoring platform. In an enterprise network infrastructure of a few hundred devices, make these decisions up front:
- A single user, or a user per device group? A single user makes management easier, but if one password leaks, the whole network is exposed. The middle way is to define a few users by device role or location.
- Storing passwords: Use the platform’s secret variables (for example, “Secret text” type macros in Zabbix). Don’t leave clear-text passwords in template descriptions or exported files.
- Password rotation: In SNMPv3, changing a password means redefining the user. For rotation without interruption, add a second user with the new password, switch the platform to it, then delete the old user.
- Automation: Since the user definition doesn’t appear in the running-config, configuration standard checks won’t catch it. Verify the user’s existence by collecting the
show snmp useroutput periodically.
If the platform hasn’t been chosen yet, SNMPv3 support and other decision criteria are in the Zabbix, LibreNMS and PRTG comparison article. If you want to see the source–destination distribution of traffic beyond interface counters, you need to move on to NetFlow, sFlow and IPFIX. SNMP only tells you “how much.”
Common mistakes when moving from v2c to v3
Start the migration with a pilot of a few devices. In the pilot, v2c and v3 run side by side; community definitions are removed after the monitoring platform proves it receives data with v3. Mistakes you may encounter:
- Forgetting to remove the community: If v3 is added and v2c is left in place, the security gain is zero. At the end of the migration, verify that the
show running-config | include snmp-server communityoutput is empty on all devices. - Not matching the group and user level: If the group is
privand the user is defined only withauth, queries are rejected. - Continuing with 32-bit counters: Because SNMPv1 doesn’t support 64-bit counters, some old templates still use
ifInOctets. A 32-bit counter wraps around at about 4.29 billion bytes: in about 34 seconds on a fully loaded 1 Gbit/s port, and about 3.4 seconds on a 10 Gbit/s port. If the polling interval is longer than that, the graph produces wrong values. Check that templates useifHCInOctets/ifHCOutOctets. - Not pinning the trap source: If
trap-sourceisn’t set, traps arrive with the IP of the outgoing interface; the platform processes them as if they came from a device it doesn’t know. - Skipping the time window: USM prevents replay of old messages using the engine boots and engine time values. After a device restarts, the platform learns these values again. If you see constant “notInTimeWindow” errors, look for two devices with the same engine ID; it’s common with cloned virtual devices.
- Not accounting for CPU impact: Encryption adds processing load on the agent side. Instead of walking large tables such as ARP, MAC and routing at short intervals, separate the polling interval by data type.
For setting up network-wide monitoring infrastructure and planning periodic checks, see the network maintenance, monitoring and periodic checks service; for the device configuration standard, see the switch and router installation page.
Frequently asked questions
Why doesn’t the SNMPv3 user appear in the running-config?
Cisco IOS doesn’t write SNMPv3 users with their passwords to the configuration file; users are seen with show snmp user. When you restore from a configuration backup, you need to define the users again separately.
Isn’t the authNoPriv level enough?
It isn’t. authNoPriv prevents forged requests and message tampering but doesn’t encrypt the content; interface descriptions, ARP and routing tables can be read by someone listening on the network. In production the target is authPriv.
How much does SNMPv3 affect device CPU?
Encryption and digest calculation add processing load compared with v2c; the effect depends on the number of OIDs polled and the frequency. Poll large tables rarely and interface counters often, and watch the device’s CPU graph for a few days after the migration.
What happens if the engine ID changes?
Because user keys are localized with the engine ID, existing users stop working when the engine ID changes and must be recreated. Write the step of redefining SNMPv3 users into the hardware replacement and RMA procedure.