Verifying whether Simple Network Management Protocol (SNMP) is active on a Cisco switch is the first step in setting up network monitoring, auditing security configurations, or diagnosing polling failures. Because Cisco operating systems handle SNMP agent activation, version-specific credentials, and hidden security keys differently, a single configuration check rarely shows the whole picture. Depending on your switch platform and SNMP version, you will need a combination of operational status commands and targeted configuration filters to confirm that the SNMP agent is running and properly configured.
Table of Contents
Step-by-Step Guide to Checking SNMP Status and Running Configuration via CLI
To determine whether the SNMP agent is active on a Cisco Catalyst switch running IOS or IOS-XE, follow this sequential verification workflow from the command-line interface (CLI).
Enter Privileged EXEC Mode
Connect to the switch via SSH or console and elevate your session to privilege level 15. Most SNMP inspection and configuration commands are hidden or restricted in basic User EXEC mode.
ios
Switch> enable
Switch#Check the Operational State of the SNMP Agent
Run theshow snmpcommand to query the live status of the SNMP process.
ios
Switch# show snmp- If SNMP is disabled: The switch immediately returns
%SNMP agent not enabled. No background SNMP polling or trap generation is occurring. If SNMP is enabled: The switch displays the local Chassis ID, cumulative packet counters (
SNMP packets inputandSNMP packets output), PDU request breakdowns, and the current status ofSNMP logging.Inspect Active SNMP Statements in the Running Configuration
Once you know the agent is running, filter the active configuration in RAM to view the global SNMP parameters:
ios
Switch# show running-config | include snmp-server
This output reveals configured community strings, trap receivers (snmp-server host), system contact and location details, enabled trap types (snmp-server enable traps), and source interfaces.Verify That UDP Port 161 Is Open and Listening
Confirm that the switch’s control plane is actively listening for incoming SNMP polling requests on UDP port 161:
ios
Switch# show udp | include 161
On newer Catalyst IOS-XE platforms, you can also runshow control-plane host open-ports | include 161to verify that the SNMP process is bound to the local socket.
Checking both operational state (show snmp) and active configuration (show running-config | include snmp-server) confirms whether the SNMP daemon is running and listening for requests.
Commands to View SNMPv2c Community Strings and Hidden SNMPv3 Users
While checking the running configuration works well for SNMPv1 and SNMPv2c, Cisco IOS and IOS-XE deliberately hide snmp-server user lines from show running-config output after converting SNMPv3 passwords into localized cryptographic keys. Use the following CLI commands to determine which SNMP versions are active and inspect both community strings and hidden SNMPv3 credentials:
! 1. View active SNMPv1/v2c community strings, permissions (RO/RW), and ACLs
Switch# show snmp community
Community name: ILMI
Community Index: ILMI
Community SecurityName: ILMI
storage-type: read-only active
Community name: NETMON_RO
Community Index: NETMON_RO
Community SecurityName: NETMON_RO
storage-type: nonvolatile active access-list: 10
! 2. View configured SNMPv3 groups, security models (v1, v2c, v3), and views
Switch# show snmp group
groupname: MONITOR_GRP security model:v3 priv
contextname: <no context specified> storage-type: nonvolatile
readview : v1default writeview: <no writeview specified>
notifyview: *tv.FFFF.FFFF.FFFF.FFFF0F
row status: active access-list: SNMP_ACL
! 3. View hidden SNMPv3 users, authentication hashes, and encryption algorithms
Switch# show snmp user
User name: solarwinds_poller
Engine ID: 800000090300002584E51B00
storage-type: nonvolatile active
Authentication Protocol: SHA
Privacy Protocol: AES128
Group-name: MONITOR_GRP
! 4. View the local SNMP Engine ID required for SNMPv3 polling and traps
Switch# show snmp engineID
Local SNMP engineID: 800000090300002584E51B00
Remote Engine ID IP-addr Port
Always run show snmp user and show snmp group rather than relying solely on the running configuration whenever you need to audit SNMPv3 deployments.
Comparing SNMP Verification Across Cisco Catalyst, Nexus, and SMB Switches
If you manage a multi-platform Cisco environment, the commands and default behaviors vary across operating systems. The table below compares how to verify SNMP status across Cisco Catalyst (IOS/IOS-XE), Cisco Nexus (NX-OS), and Cisco Small Business (SMB) switches.
| Verification Criteria | Cisco Catalyst (IOS / IOS-XE) | Cisco Nexus (NX-OS) | Cisco Small Business (SMB CLI / Web GUI) |
|---|---|---|---|
| Default SNMP Agent State | Disabled until an snmp-server command is entered | Enabled by default (snmp-server protocol enable) | Disabled by default |
| Primary Status Command | show snmp | show snmp | CLI: show snmpGUI: SNMP > State |
| Filter Running Configuration | show running-config \| include snmp-server | show running-config snmp | CLI: show running-config \| include snmp |
| View SNMPv1/v2c Communities | show snmp community | show snmp community | CLI: show snmp communityGUI: SNMP > Communities |
| View SNMPv3 Users | show snmp user | show snmp user | CLI: show snmp userGUI: SNMP > Users |
| View SNMPv3 Groups | show snmp group | show snmp group | CLI: show snmp groupGUI: SNMP > Groups |
| VRF / Context Awareness | Configured via snmp-server vrf or community/group context mapping | Requires explicit VRF specification (e.g., use-vrf management for hosts) | Bound automatically to active Management VLAN interfaces |
Accounting for platform-specific syntax—especially NX-OS’s dedicated show running-config snmp command and VRF requirements—prevents false negatives during cross-platform audits.
Fixing “%SNMP agent not enabled”: Configuration Templates for SNMPv2c and SNMPv3
If your initial verification returned %SNMP agent not enabled, the switch has no active SNMP community strings or groups configured. In Cisco IOS and IOS-XE, the SNMP agent starts automatically as soon as you apply a valid configuration statement. Use one of the templates below in global configuration mode (configure terminal) to enable the agent, replacing the bracketed placeholders with your environment’s values.
! ==========================================================
! OPTION A: Enable SNMPv2c (Read-Only with IP Access List)
! ==========================================================
configure terminal
! Create a standard ACL permitting only your monitoring server
ip access-list standard SNMP_NMS_ACL
permit <NMS_IP_ADDRESS>
exit
! Configure community string, metadata, and source interface
snmp-server community <COMMUNITY_STRING> RO SNMP_NMS_ACL
snmp-server location <SITE_OR_RACK_LOCATION>
snmp-server contact <ADMIN_EMAIL_OR_PHONE>
snmp-server trap-source <MANAGEMENT_INTERFACE_ID>
end
write memory
! ==========================================================
! OPTION B: Enable SNMPv3 (AuthPriv with SHA and AES-128)
! ==========================================================
configure terminal
! Create a standard ACL permitting only your monitoring server
ip access-list standard SNMP_NMS_ACL
permit <NMS_IP_ADDRESS>
exit
! Create an SNMPv3 group enforcing authentication and encryption (priv)
snmp-server group <V3_GROUP_NAME> v3 priv access SNMP_NMS_ACL
! Create an SNMPv3 user tied to the group with SHA auth and AES-128 privacy
snmp-server user <V3_USERNAME> <V3_GROUP_NAME> v3 auth sha <AUTH_PASSWORD> priv aes 128 <PRIV_PASSWORD>
! Optional: Set system metadata and source interface
snmp-server location <SITE_OR_RACK_LOCATION>
snmp-server contact <ADMIN_EMAIL_OR_PHONE>
snmp-server trap-source <MANAGEMENT_INTERFACE_ID>
end
write memory
Once you apply either template, you can re-run the verification commands covered earlier to confirm the agent is active and populated with your credentials.
Troubleshooting When SNMP Is Enabled on the Switch But Fails External Polling
Sometimes the CLI confirms that the SNMP agent is enabled, yet external network monitoring tools fail with timeouts during an snmpwalk or device discovery. Follow these steps to isolate and resolve the communication failure:
- Test Reachability and Watch Switch Packet Counters
Run a manualsnmpwalkfrom your monitoring server or a Linux host while watching the packet counters on the switch viashow snmp. - SNMPv2c test:
snmpwalk -v2c -c <COMMUNITY_STRING> <SWITCH_IP> 1.3.6.1.2.1.1 - SNMPv3 test:
snmpwalk -v3 -l authPriv -u <V3_USER> -a SHA -A <AUTH_PASS> -x AES -X <PRIV_PASS> <SWITCH_IP> 1.3.6.1.2.1.1
If SNMP packets input in show snmp does not increment when you run snmpwalk, the packets are being blocked before reaching the switch’s SNMP process (by a firewall, routing issue, interface ACL, or Control Plane Policing). If the counter increments alongside Unknown community name or Illegal operation, the packets are reaching the agent but failing authentication or ACL checks.
Audit Access Control Lists (ACLs) Attached to SNMP
If an ACL is bound to your community string or SNMPv3 group, verify that the exact source IP address of your polling server is permitted:
ios
Switch# show ip access-lists <ACL_NAME_OR_NUMBER>
Remember that all Cisco ACLs end with an implicitdeny any. If your monitoring server polls from a secondary interface or NAT IP not listed in the ACL, the SNMP agent will silently drop the request.Check Management VRF and Return Routing
Many enterprise switches (such as the Catalyst 9000 series) place the dedicated management port (GigabitEthernet0/0) inside a separate routing table (Mgmt-vrf). If your monitoring tool polls the switch via an in-band SVI versus an out-of-band management port, verify that the switch has a valid return route in that specific VRF (show ip route vrf Mgmt-vrf) and that VRF-aware SNMP contexts are properly aligned if polling across VRFs.Verify SNMP MIB Views
If your monitoring tool can connect but returnsNo Such Object available on this agent at this OID, check whether a custom MIB view is restricting access to specific OID branches:
ios
Switch# show snmp view
Ensure that theiso(1) ormib-2(1.3.6.1.2.1) subtree is set toincludedfor the view assigned to your SNMP group.Inspect Control Plane Policing (CoPP)
High-density switches use Control Plane Policing to protect the CPU from traffic spikes. Check whether CoPP is dropping incoming UDP port 161 packets:
ios
Switch# show policy-map control-plane
Look for non-zerodropcounters under the class-map handling management or SNMP traffic.
Systematically checking packet counters first tells you immediately whether you are dealing with a network transport obstacle or a local credential/ACL mismatch.
Cisco IOS show snmp Command Reference and Output Specifications
The following reference defines the formal syntax, release history, subcommands, and output fields for the show snmp command family in Cisco IOS and Cisco IOS-XE.
Command Syntax
show snmp [chassis | community | contact | context | engineID | group | host | location | mib | pending | sessions | user | view]
- Command Mode: Privileged EXEC (
#) - Release History:
- Cisco IOS Release 10.0: Introduced the base
show snmpcommand. - Cisco IOS Release 12.0(3)T: Added the
engineID,group,user, andviewkeywords to support SNMPv3 architecture. - Cisco IOS-XE Release 3.x / 16.x / 17.x: Integrated unchanged into Catalyst IOS-XE software.
Subcommand Definitions
chassis: Displays the SNMP server serial number / chassis ID string.community: Lists all configured SNMPv1/v2c community strings, their security names, storage types, and associated access lists.contact: Displays the system contact string configured viasnmp-server contact.context: Shows SNMP context names mapped to specific VPN routing and forwarding (VRF) instances or VLANs.engineID: Displays the identification string of the local SNMP engine and all configured remote engines.group: Displays SNMP security groups, mapped security models (v1,v2c,v3), read/write/notify views, and bound ACLs.host: Lists configured trap and inform recipient hosts, UDP ports, security models, and packet statistics per host.location: Displays the physical system location string configured viasnmp-server location.mib: Displays a list of all SNMP MIB module object identifiers (OIDs) registered on the switch.pending: Shows currently awaiting SNMP requests being processed by the agent.sessions: Displays active SNMP session details and timeout parameters.user: Displays configured SNMPv3 usernames, engine IDs, authentication protocols, privacy protocols, and group memberships.view: Displays the configured SNMP family view names, associated OID trees, and inclusion/exclusion masks.
show snmp Output Field Descriptions
Chassis: The unique identifier of the device (typically the hardware serial number or MAC address).SNMP packets input: Total number of SNMP packets received by the agent.Bad SNMP version errors: Count of received packets specifying an unrecognized or unsupported SNMP version.Unknown community name: Count of SNMPv1/v2c packets received with an unconfigured community string or from an IP address denied by an SNMP ACL.Illegal operation for community name supplied: Count of packets requesting an operation (such as aSet-Requestwrite operation) using a Read-Only (RO) community string.Encoding errors: Count of received SNMP packets that were improperly formatted according to ASN.1/BER encoding rules.Number of requested variables: Cumulative count of MIB object instances queried by management stations.Number of altered variables: Cumulative count of MIB object instances modified via SNMPSet-Requestoperations.Get-request PDUs: Number ofGet-RequestProtocol Data Units received.Get-next PDUs: Number ofGet-NextPDUs received (commonly generated duringsnmpwalkoperations).Set-request PDUs: Number ofSet-RequestPDUs received.SNMP packets output: Total number of SNMP packets transmitted by the switch.Too big errors: Number of responses where the generated PDU exceeded the maximum packet size supported by the requester.No such name errors: Number of requests querying an OID that does not exist in the switch’s MIB tree.Bad value errors: Number ofSet-Requestoperations specifying an invalid value or syntax for a MIB object.General errors: Number of requests that failed due to internal device errors not covered by other specific error counters.Response PDUs: Total number ofGet-ResponsePDUs sent back to polling stations.Trap PDUs: Total number of unsolicited SNMP trap messages generated by the switch.SNMP logging: Indicates whether SNMP trap logging is currentlyenabledordisabledand lists active destination hosts.
Mastering these verification commands and output counters ensures you can quickly audit SNMP state, inspect hidden SNMPv3 credentials, and resolve polling issues across any Cisco switch in your network.











Comments