CCNA 200-301

CCNP Enterprise

CCNP Security

CCIE Enterprise Lab

CCIE Security Lab

CCNP Service Provider

CCNP Data Center

CCNP Collaboration

CCIE DC Lab

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.

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).

  1. 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#

  2. Check the Operational State of the SNMP Agent
    Run the show snmp command to query the live status of the SNMP process.
    ios
    Switch# show snmp

  3. If SNMP is disabled: The switch immediately returns %SNMP agent not enabled. No background SNMP polling or trap generation is occurring.
  4. If SNMP is enabled: The switch displays the local Chassis ID, cumulative packet counters (SNMP packets input and SNMP packets output), PDU request breakdowns, and the current status of SNMP logging.

  5. 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.

  6. 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 run show control-plane host open-ports | include 161 to 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 CriteriaCisco Catalyst (IOS / IOS-XE)Cisco Nexus (NX-OS)Cisco Small Business (SMB CLI / Web GUI)
Default SNMP Agent StateDisabled until an snmp-server command is enteredEnabled by default (snmp-server protocol enable)Disabled by default
Primary Status Commandshow snmpshow snmpCLI: show snmp
GUI: SNMP > State
Filter Running Configurationshow running-config \| include snmp-servershow running-config snmpCLI: show running-config \| include snmp
View SNMPv1/v2c Communitiesshow snmp communityshow snmp communityCLI: show snmp community
GUI: SNMP > Communities
View SNMPv3 Usersshow snmp usershow snmp userCLI: show snmp user
GUI: SNMP > Users
View SNMPv3 Groupsshow snmp groupshow snmp groupCLI: show snmp group
GUI: SNMP > Groups
VRF / Context AwarenessConfigured via snmp-server vrf or community/group context mappingRequires 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:

  1. Test Reachability and Watch Switch Packet Counters
    Run a manual snmpwalk from your monitoring server or a Linux host while watching the packet counters on the switch via show snmp.
  2. SNMPv2c test: snmpwalk -v2c -c <COMMUNITY_STRING> <SWITCH_IP> 1.3.6.1.2.1.1
  3. 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.

  1. 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 implicit deny 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.

  2. 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.

  3. Verify SNMP MIB Views
    If your monitoring tool can connect but returns No 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 the iso (1) or mib-2 (1.3.6.1.2.1) subtree is set to included for the view assigned to your SNMP group.

  4. 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-zero drop counters 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 snmp command.
  • Cisco IOS Release 12.0(3)T: Added the engineID, group, user, and view keywords 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 via snmp-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 via snmp-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 a Set-Request write 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 SNMP Set-Request operations.
  • Get-request PDUs: Number of Get-Request Protocol Data Units received.
  • Get-next PDUs: Number of Get-Next PDUs received (commonly generated during snmpwalk operations).
  • Set-request PDUs: Number of Set-Request PDUs 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 of Set-Request operations 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 of Get-Response PDUs 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 currently enabled or disabled and 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.

Please follow and like us:
Last modified: November 17, 2026

Author

Comments

Write a Reply or Comment

Your email address will not be published.